[Tutor] (no subject)
rudy.schockaert at gmail.com
Wed Jul 6 22:33:43 CEST 2005
This will work, but only on an English version of the OS. E.g. in Dutch the
desktop is called 'Bureaublad'.
On 7/6/05, Mark Thomas <thomas.s.mark at gmail.com> wrote:
> 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 <http://www.theswamp.org> - against HTML email
> / \
> Tutor maillist - Tutor at python.org
"A little nonsense now and then, is cherished by the wisest men." -- Roald
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor