[Tutor] (no subject)

Mark Thomas thomas.s.mark at gmail.com
Wed Jul 6 20:51:36 CEST 2005


On 7/6/05, Michael Huster <mhuster at simpsonuniversity.edu> wrote:
> In python under windows, how can I create and access a file on the Desktop? The following do NOT work:
 
How about...

>>> userp = os.getenv('USERPROFILE') + '\\Desktop\\MyFile.txt'
>>> fo = file(userp, 'w')
-- 
 _
( ) Mark Thomas     ASCII ribbon campaign
 X www.theswamp.org   - against HTML email
/ \


More information about the Tutor mailing list