Launch file in Notepad
George
gtog at _no___spam_myrealbox.com
Thu May 12 10:46:20 EDT 2005
Richie Hindle wrote:
>>By the way, b1 comes from a command line parameter, so the user enters
>>c:\test.txt as command line parameter.
>
>
> How are you prompting the user? When I run this:
>
> import os
> b1=raw_input("Enter a filename: ")
> os.system('notepad.exe ' + b1)
>
> and enter c:\test.txt, it works as expected.
So it does with me, but the user does not enter the filename, he
launches my Python script file from the DOS-prompt with a command line
parameter, for example:
test.py c:\test.txt
In that case the \ escapes the t. (read on!)
That is, until now. For some very strange reason it suddenly works as
expected. I don't understand it anymore, but never mind. Maybe I changed
my little proggie somehow, causing it accidentally to work. Thanks anyway.
George
More information about the Python-list
mailing list