Cool thanks!
Simple and elegant
Stefano Mtangoo
Senior Poster
3,731 posts since Jun 2007
Reputation Points: 462
Solved Threads: 396
Skill Endorsements: 0
This code is not working on my version of Python (3.2). It just restarts the shell and does not do anything else.
If you are using this in Idle, it won't work because the python process running in the shell is different from Idle gui's process. This will only restart the process running in the shell, not Idle itself.
Gribouillis
Posting Maven
3,101 posts since Jul 2008
Reputation Points: 1,130
Solved Threads: 761
Skill Endorsements: 11
It is not working in either the shell or Idle. It's strange because when I was running the program on another computer (which I suppose must use a different version of Python) it worked completely fine.
What do you exactly mean by 'the shell' ? also what's your OS ?
Gribouillis
Posting Maven
3,101 posts since Jul 2008
Reputation Points: 1,130
Solved Threads: 761
Skill Endorsements: 11
Is that 3.2 3.2.2 as there was an issue with input statement with 3.2.1? Probably not reason though, at that problem would make program OK in IDLE and not OK in direct excecution.
pyTony
pyMod
6,312 posts since Apr 2010
Reputation Points: 879
Solved Threads: 987
Skill Endorsements: 26