[Tutor] question re: executing exe files with arguments
Luke Paireepinart
rabidpoobear at gmail.com
Sat May 19 00:21:47 CEST 2007
Janani Krishnaswamy wrote:
> Hi!
> I am having trouble executing an exe file with 3 arguments within a
> python script. Right now I have something like this:
>
> os.system(r'"1/2/3/program 1/2/3/argument1 1/2/3/argument2"')
>
> I was trying it with a raw string because of the /'s within it. I'm not
> sure of any other approaches.
>
'\' is the only reason you'd need to use a raw string, not '/'.
This is because backslash is used for special character sequences.
For example, a new line is '\n'.
Other than that, what is the problem you're having, exactly?
HTH,
-Luke
More information about the Tutor
mailing list