[IronPython] Write permissions

Michael Foord fuzzyman at voidspace.org.uk
Thu Jul 8 20:49:30 CEST 2010


On 08/07/2010 19:46, Rob Brown-Bayliss wrote:
> On Thu, Jul 8, 2010 at 11:38 PM, Michael Foord
> <fuzzyman at voidspace.org.uk>  wrote:
>
>    
>> Writing to C: in Vista and Windows 7 requires elevated permissions so your
>> application will require admin privileges. Can you not choose another
>> location to write to (one of the user folders)?
>>
>>      
> I could.  On linux I would write to /tmp is there a similar concept in
> windows vista and 7?
>    

There are multiple ways of finding the temporary directory in .NET.

> Are there some good docs along the lines of .NET python equivalents of
>   win32api.GetUserName() and others?
>    


System.Environment.UserName

System.Environment almost certainly has the temp directory as well. 
Check that or System.IO.Directory.

All the best,

Michael

> 	
>
>
>    


-- 
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog

READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies ("BOGUS AGREEMENTS") that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20100708/8a9bde88/attachment.html>


More information about the Ironpython-users mailing list