[Tutor] (no subject)
Rudy Schockaert
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
> http://mail.python.org/mailman/listinfo/tutor
>
--
"A little nonsense now and then, is cherished by the wisest men." -- Roald
Dahl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20050706/44a262b1/attachment-0001.htm
More information about the Tutor
mailing list