The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> Python Programming
|
idle problems
Discuss idle problems in the Python Programming forum on Dev Shed. idle problems Python Programming forum discussing coding techniques, tips and tricks, and Zope related information. Python was designed from the ground up to be a completely object-oriented programming language.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

July 30th, 2003, 03:55 PM
|
|
Registered User
|
|
Join Date: Jul 2003
Posts: 28
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
idle problems
i just installed pyton 1.52, everything works fine except idle
i, can't save my work,and when i do manage to save a .py file
i can't pull it up my python screen just flashes and disapears
i,m running windows ME
|

July 30th, 2003, 04:34 PM
|
 |
Hello World :)
|
|
Join Date: Mar 2003
Location: Hull, UK
|
|
|
Hi perfect,
Not sure why exactly your using such an old version of Python, if your saving an interactive session with Idle you can't just run the script, you'll end up with syntax errors caused by the '>>>' prompt. One bad thing about python is, when it serves up an error message it closes the window (flashing up then disappearing). Somthing i hoped they would have fixed by now, maybe for 2.4.
The saving problem could simply be caused by the version od python and so Idle your using. Other than that i can't really sugest much more.
Hope this helps,
Have fun,
Mark.
|

July 30th, 2003, 05:27 PM
|
 |
onCsdfeu
|
|
Join Date: Jul 2003
Location: Canada
Posts: 100
Time spent in forums: 2 h 16 m 21 sec
Reputation Power: 10
|
|
Well as for Python code executing and then closing up, there are two simple workarounds I've thought of.
#1 : Put, at the VERY end of your code, a call to raw_input(). Kinda like "Press Enter to continue"...
#2 Work in command line mode. You'll have to add the path to your Python directory by adding it to your PATH environment variable if you want it to be useful. The best option IMHO, but some people really are afraid of command line environments.
You probably already figured those out  but it took me some time to figure them out. Silly me.
As for your IDLE problem, perfect20002, netytan summed it up : upgrade your Python version. The only reason I could think about is that you got it on some CD in a book. 1.5.2 is... well... deprecated ? We just got to 2.3  IDLE is now a very efficient tool, I believe.
I have a small IDLE problem too, anyway. Sometimes, for a reason I can't fathom, my files won't save. Pressing Ctrl-S, or choosing Save or Save as in the menu won't save either. My workaround is to open a new window and then copy-paste the code into the new window. This works, but it's getting irritating. Is that a known bug ? Any solution ?
__________________
Time is the greatest of teachers ; sadly, it kills all of its students.
- Hector Berlioz
Last edited by SolarBear : July 30th, 2003 at 05:31 PM.
|

July 30th, 2003, 07:31 PM
|
 |
Hello World :)
|
|
Join Date: Mar 2003
Location: Hull, UK
|
|
I don't know solar, I've never really had this problem of not being able to save. Probably because where i use idle for the interactive prompt, i wouldn't really use it for writing a full program (mainly because of the syntax coloring). You might want to post this on the python bug's page on source forge.
http://sourceforge.net/tracker/?gro...470&atid=105470
On the plus side the version of idle included with Python 2.3 looks to be a big improvment. you can now change the style! including color's and font used for your code! The menu's also seem to be better organised!
Upgrade to Python 2.3 perfect, it wont bite
Take care guys,
Mark.
|

August 3rd, 2003, 11:26 PM
|
 |
onCsdfeu
|
|
Join Date: Jul 2003
Location: Canada
Posts: 100
Time spent in forums: 2 h 16 m 21 sec
Reputation Power: 10
|
|
Just in case this could be of use or interest to anybody, I'm posting this.
Quote: Originally posted by SolarBear
I have a small IDLE problem too, anyway. Sometimes, for a reason I can't fathom, my files won't save. Pressing Ctrl-S, or choosing Save or Save as in the menu won't save either. My workaround is to open a new window and then copy-paste the code into the new window. This works, but it's getting irritating. Is that a known bug ? Any solution ? |
Well I've solved the problem. I had put a comment containing "non-standard" characters (e.g.: à ) and when I tried saving my work, IDLE suggested to put a line containing the type of encoding used. If you refuse, IDLE won't save your file.
|

August 4th, 2003, 02:04 PM
|
|
Contributing User
|
|
Join Date: Feb 2002
Location: BCN
Posts: 84
Time spent in forums: 1 h 1 m 4 sec
Reputation Power: 12
|
|
|
Hi all,
I've just donwloaded python2.3 and IDLE does not work. I clicl it, the clock mousepointer appears for some seconds and the it dies silently. Has somone had the same problem?
|

August 4th, 2003, 03:01 PM
|
 |
Hello World :)
|
|
Join Date: Mar 2003
Location: Hull, UK
|
|
|
Hi,
Your on Mac OS? If so Tk isn't available for mac as far as i know, and since Tk is the GUI which Idle is made up of that would be why. Another possible reason is that the version of Idle in 2.3 works by opening a socket, some firewalls can apparently cause this not to work but I have no experiance with this.
Did the Idle in 2.2 or whatever version you had previously work for you?
Hope this helps.
|

August 4th, 2003, 04:43 PM
|
|
Contributing User
|
|
Join Date: Feb 2002
Location: BCN
Posts: 84
Time spent in forums: 1 h 1 m 4 sec
Reputation Power: 12
|
|
|
Hi,
I'm running Win2K. Yes it worked with all the previous versions of python. I think it has something to do with path names, it does not work properly with multiword paths.
Thanks for the help.
|

August 4th, 2003, 04:58 PM
|
 |
Hello World :)
|
|
Join Date: Mar 2003
Location: Hull, UK
|
|
I havn't heard of anything like this. Mmmm why do you think it's a path thing? where do you have Python installed? I have Python in 'C' on my windows Box's and it works fine  so i'd try reinstalling it there.
Mark.
|

August 4th, 2003, 06:57 PM
|
 |
onCsdfeu
|
|
Join Date: Jul 2003
Location: Canada
Posts: 100
Time spent in forums: 2 h 16 m 21 sec
Reputation Power: 10
|
|
|
Well it MAY be a path problem.
PATH is an environment variable in Windoze, in case you didn't know, meaning that when you try executing a command/program, if it's not in the directory you're working in it'll search in directories listed in PATH. Go in Control Panel -> System and then search for the Environment Variables button, or something like that. I have no Win2k box available, sadly.
The problem might be that your PATH variable points to your previous version of Python, like "C:\Python22" while it's now "C:\Python23" or whatever. I'm only guessing, but this might be possibility.
|

August 5th, 2003, 02:59 AM
|
|
Contributing User
|
|
Join Date: Feb 2002
Location: BCN
Posts: 84
Time spent in forums: 1 h 1 m 4 sec
Reputation Power: 12
|
|
|
Hi all,
It's already solved. I've created a direct acces to idle.pyw that worked and when comparing with the one the installation did I've seen some diferences. Changing this all works perfectly now. Thank you all!!
|

August 5th, 2003, 01:40 PM
|
|
Contributing User
|
|
Join Date: Mar 2002
Posts: 89
Time spent in forums: 8 h 48 m 50 sec
Reputation Power: 12
|
|
|
ya the shortcut to IDLE in Python 2.3 was incorrect, you just have to change it to the right path and it'll work.
|

August 5th, 2003, 03:27 PM
|
 |
Hello World :)
|
|
Join Date: Mar 2003
Location: Hull, UK
|
|
|
Mmm ok, this is an error with the installer? So if you don't install in the default possition then the Idle shortcut doesnt work?
I've always installed it in the default possition so i havn't had this problem myself, but is this just a problem with 2.3 or is this true of other versions?
Mark.
Last edited by netytan : August 5th, 2003 at 03:37 PM.
|

August 6th, 2003, 01:59 AM
|
|
Contributing User
|
|
Join Date: Feb 2002
Location: BCN
Posts: 84
Time spent in forums: 1 h 1 m 4 sec
Reputation Power: 12
|
|
|
For me is the first time that it does not work. As I'd installed 2.1 and 2.2 before I suppose that this is a Python 2.3 error.
|

August 6th, 2003, 03:21 PM
|
 |
Hello World :)
|
|
Join Date: Mar 2003
Location: Hull, UK
|
|
|
Strange, it isn't a usually error. Perhaps you would like to submit this error to the Python bug tracker on soureforge? Where it is not exactly and error in Python (being in the installer) it is an error none the less. If not I would be happy to. The URL is in a post above.
Have fun,
Mark.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|