|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
If you can have CGI with Python can you have HTML and Java Script, also??!!??
|
|
#2
|
|||
|
|||
|
And if they do go with python why won't it work for me??!!!???
![]() |
|
#3
|
||||
|
||||
|
I'm not 100% on what you're getting at reaper but... you can use Python CGI (tick that one off) to output HTML (and that one) and yes, even Javascript (a straight flush
)Mark. |
|
#4
|
|||
|
|||
|
Quote:
It would help if you could be more specific about exactly how it didn't work. What is the code you are trying to run? Was there an error message, either in the browser or in the server error log? Did your PC hang? Did it explode in a ball of flames? A CGI script runs on a server and returns a chunk of data to the browser. This is usually an HTML page, which can include Javascript just like a normal HTML page. The Javascript is run on the browser, and is totally separate from the CGI script. As far as the Python script is concerned it is just sending a stream of bytes. Here is a handy tip for CGI programming (for Python 2.2 onwards). If you add the following lines to the start of your CGI script then any exceptions that your script generates will be returned as nicely formatted HTML, with a complete traceback. Code:
import cgitb cgitb.enable() You will only want to do this during development, since it is not something you will want your users to see. However you can configure the cgitb module to write the traceback to the error log instead. RTFM for more information. Hope this helps. Dave - The Developers' Coach |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > If you can have CGI with Python can you have HTML and Java Script, also??!!?? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|