On Jun 10, 1:25 pm, "Thomas Morton" <[EMAIL PROTECTED]> wrote: > maybe try string substitution... not sure if that's really the BEST way to > do it but it should work > > startfile(r"%s"%variable)
I concur. That should work. A slightly more in depth example (assuming Windows): os.startfile(r'C:\Documents and Settings\%s\Desktop\myApp.exe' % username) or os.startfile(r'C:\Program Files\%s' % myApp) Hopefully this is what you are talking about. If you were referring to passing in arguments, than you'll want to use the subprocess module instead. > > -------------------------------------------------- > From: "Alexnb" <[EMAIL PROTECTED]> > Sent: Tuesday, June 10, 2008 7:05 PM > To: <[EMAIL PROTECTED]> > Subject: Re: problems with opening files due to file's path > > > > > Well, now i've hit another problem, this time being that the path will be > > a > > variable, and I can't figure out how to make startfile() make it raw with > > a > > variable, if I put startfile(r variable), it doesn't work and > > startfile(rvariable) obviously won't work, do you know how to make that > > work > > or better yet, how to take a regular string that is given and make every > > single "\" into a double "\\"? > <snip> Mike -- http://mail.python.org/mailman/listinfo/python-list