A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2005-September/327084.html below:

Finding where to store application data portably

Finding where to store application data portably Finding where to store application data portablyPeter Hansen peter at engcorp.com
Tue Sep 20 20:33:38 EDT 2005
Tony Houghton wrote:
> 
> I'm using pygame to write a game called Bombz which needs to save some
> data in a directory associated with it. In Unix/Linux I'd probably use
> "~/.bombz", in Windows something like
> "C:\Documents And Settings\<user>\Applicacation Data\Bombz".
> 
> There are plenty of messages in the archives for this group about how to
> find the correct location in Windows, but what about Mac OS? There I
> don't know the correct location for this sort of thing at all. And there
> are other, more obscure systems like RISC OS (it may not have pygame but
> it definitely has python). Surely this is something that's crying out
> for an official function in os or sys.

Perhaps using "import user; user.home" would be adequate.  Note the 
documented side effects of doing that however.

-Peter

More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4