I'm very, very new, and am working with Python 3.1.2. New as in installed last night, and working through a tutorial.
I wrote a simple script to aid in learning to break a 'while: True' loop.
My question is, why can I NOT run this script from a directory other than the \python31 directory? I have the python31 directory set in my path.
I'm running XP, if that helps. I can run other programs just fine from any other directory. Does this utilize something in the Python directory that the other scripts did not?
Here is the script:
Really appreciate your help! Very excited to continue learning this.
-Steve
P.S. Do I need to point to the directory at the top of my file with #!? This was hinted at in the tutorial, but again, I'm not sure.
P.P.S. The indentations aren't showing up on this forum, but they are correct.
I wrote a simple script to aid in learning to break a 'while: True' loop.
My question is, why can I NOT run this script from a directory other than the \python31 directory? I have the python31 directory set in my path.
I'm running XP, if that helps. I can run other programs just fine from any other directory. Does this utilize something in the Python directory that the other scripts did not?
Here is the script:
Code:
#Filename: break.py
while True:
s = (input('Enter something : '))
if s == 'quit':
break
print('Lenght of the string is', len(s))
print('Done')
-Steve
P.S. Do I need to point to the directory at the top of my file with #!? This was hinted at in the tutorial, but again, I'm not sure.
P.P.S. The indentations aren't showing up on this forum, but they are correct.
Comment