Need help with TCP/IP client access from Windows
Bill Tutt
billtut at microsoft.com
Fri Jul 30 19:52:03 EDT 1999
More information about the Python-list mailing list
Fri Jul 30 19:52:03 EDT 1999
- Previous message (by thread): Need help with TCP/IP client access from Windows
- Next message (by thread): Need help with TCP/IP client access from Windows
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> -----Original Message----- > From: Eric S. Raymond [mailto:esr at thyrsus.com] > > > > > (2) How does one read and write the Windows equivalent of > a dotfile? > > > Must this involve the (shudder) registry? > > > > You could, by using Mark's win32 extensions. MS would prefer you > > kept this kind of info in the registry, but that doesn't stop > > anybody, least of all you <g>. > > > > The issue is really what is meant by a HOME directory. On NT, this > > has a certain amount of meaning - there's probably a > > %WINDIR%/profiles/%USERNAME% directory tree for that user (where > > those funky %...% things are environment vars), but probably it's > > safer to get that path out of the registry. On Win9x, it's pretty > > meaningless, since a logon and username are pretty much an empty > > formality. There's almost no way to keep multiple users on a Win9x > > box from stepping on each other. (Of course, I mean multiple serial > > users; the only possible kind in Windows). > Just to be annoying... I thought I'd send out some info on how things are supposed to work on Win32 boxes. The correct way to go about doing these things is via the SHGetFolderPath API. (Calling SHGetSpecialFolderPath is also ok, but SHGetFolderPath is the preferred API entry point.) Docs at: http://msdn.microsoft.com/library/sdkdoc/shellcc/Shell/Functions/ShGetFolder Path.htm A description of all of the special folders is at: http://msdn.microsoft.com/library/sdkdoc/shellcc/shell/Functions/CSIDL.htm Ok so can I use these in Python yet? Unfortunately, not at the moment. If someone screams and yells I'm sure Mark or I will write the necessary wrapping code. The preferred place on NT (ignoring terminal server) for per user application data files to reside in is: "%WINDIR%\Profiles\%USERNAME%\Application Data\<appname>" If you don't want the data to roam (assuming your account is setup that way), the data should go in: "%WINDIR%\Profiles\%USERNAME%\Local Settings\Application Data\<appname>" Bill
- Previous message (by thread): Need help with TCP/IP client access from Windows
- Next message (by thread): Need help with TCP/IP client access from Windows
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list