|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
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
|
|||
|
|||
|
IDLE - Run Script
Well, I'm trying to do this: Writing Hangman in Python
There is no 'Run Script' command. This is my first time using IDLE. I'm using python.pyw |
|
#2
|
||||
|
||||
|
How Chief,
In Python 2.3 IDLE has been totally rearanged! To run a Python script from IDLE you need go to "Run -> Run Module". Hope this helps, Have fun, Mark. |
|
#3
|
|||
|
|||
|
Yeah, I tried that. But it's either I get a syntax error or the script doesn't work.
|
|
#4
|
|||
|
|||
|
well shouldn't you fix these syntax errors and run the script?
|
|
#5
|
|||
|
|||
|
Well the syntax errors are like:
>>> ... and the copyright at the top. |
|
#6
|
||||
|
||||
|
2k makes a good point, if there is a syntax error you should probably fix it before running it. But, if you are relying on IDLE for error catching (as i've done in the past
) then you may have a problem here! Here's where Python gives you an extra hand.. by running your script from the command like with -i .First cd to your Python directory (you can do this with cd path/to/python), then type the following Code:
python -i path/to/your/file This will execute the python program and then hop over to the interactive interpriter, you should be able to easily see Python's error messages, and test your code using the interactive prompt ![]() My favourate way , Python Rocks!Have fun, Mark. |
|
#7
|
|||
|
|||
Whoa! This is really cool! I had no idea you could do this. Python is the best. I'm going to have a lot of fun now. ![]() |
|
#8
|
||||
|
||||
|
Wow wow wow, why do you have interactive promps inside your Python program?
If you saved a script you wrote in Interactive mode you will need to remove all the promps (>>>) and etc.. then I'd suggest you read throught the intro's on python.org, loads of intereating things to learn here ![]() http://www.python.org/doc/Intros.html Mark. Last edited by netytan : August 16th, 2003 at 06:08 PM. |
|
#9
|
|||
|
|||
|
just post the code..
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > IDLE - Run Script |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|