[Tutor] How to programmatically EDIT a python file using an editorof my choice ?

Sander Sweers sander.sweers at gmail.com
Mon Apr 13 09:18:30 CEST 2009


2009/4/13 Dominique <mydomdom at gmail.com>:
> What surprises me is that before calling the subprocess.Popen() method, I
> normalized the path using:
> filename = os.path.normpath(filename).

It does.But do you also call os.path.normpath for the program path?
See below an example.

>>> import os
>>> path = 'C:\Program Files\Notepad++\notepad++.exe'
>>> os.path.normpath(path)
'C:\\Program Files\\Notepad++\notepad++.exe'

Greets
Sander


More information about the Tutor mailing list