newbie script

ataraxia2500 messageboardfan1 at yahoo.com
Thu Sep 25 09:19:36 EDT 2003


hey Ed, 
I get that weird error when I tried to run the little loop, this is what it
says:

sys:1: DeprecationWarning: Non-ASCII character '\xa0' in file myloop.py on
line 3, but no encoding declared; see http://www.python.org/peps
pep-0263.html for details
  File "myloop", line 3
            os.system('/home/joe/src/myprog/myprog')
    ^
SyntaxError: invalid syntax

does it mean anything to you?

thanx in advance
Ed wrote:

> os.system('xyz') runs in a shell, and when it exits returns its exit
> status. e.g.:
> a=os.system('ls bogus_directory')
> if bogus_directory exists then 'a' = 0, and if not 'a' = 1.
> 
> while 1:
>         os.system('xyz')
> 
> will run the program xyz, and as soon as xyz exits it will run it again -
> and so on.
> 
> -Ed
> 




More information about the Python-list mailing list