Launch file in Notepad
Grant Edwards
grante at visi.com
Thu May 12 10:20:29 EDT 2005
On 2005-05-12, Brian van den Broek <bvande at po-box.mcgill.ca> wrote:
>> b1="c:\test.txt"
>> os.system('notepad.exe ' + b1)
>>
>> However, the t of test is escaped by the \, resulting in Notepad trying
>> to open "c: est.txt".
> There are several ways, but the preferred solution is to switch the
> slash direction: "c:/test.txt". Python's smart enough to notice its
> running on Windows and do the right thing with the slash.
Does Python really look at the string and mess with the slash?
I don't think it needs to, since the Windows system calls have
always accepted forward slashses, haven't they?
--
Grant Edwards grante Yow! Ask me the DIFFERENCE
at between PHIL SILVERS and
visi.com ALEXANDER HAIG!!
More information about the Python-list
mailing list