[Tutor] os.system

Emile van Sebille emile at fenx.com
Sat Dec 18 01:17:44 CET 2010


On 12/17/2010 4:07 PM jtl999 said...
> I want to pass a variable to os.system which is dir
>>>> dir=raw_input ("Dir Please ")
> Dir Please /
> ok dir = /
>>>> os.system ("ls"  + dir)
> sh: ls/: No such file or directory

this has concatenated "ls" and dir

try with "ls "

Emile


> 32512
>
> any advice
>
>
>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor




More information about the Tutor mailing list