[Python-Dev] proto-pep: plugin proposal (for unittest)
Michael Foord
fuzzyman at voidspace.org.uk
Mon Aug 2 12:53:27 CEST 2010
On 02/08/2010 11:48, Ronald Oussoren wrote:
>
>
> On 02 Aug, 2010,at 11:48 AM, Michael Foord <fuzzyman at voidspace.org.uk>
> wrote:
>
>> On 02/08/2010 07:18, Ronald Oussoren wrote:
>>> On 2 Aug, 2010, at 7:18, Glyph Lefkowitz wrote:
>>>
>>>
>>>> On Aug 1, 2010, at 3:52 PM, Ronald Oussoren wrote:
>>>>
>>>>
>>>>> On 1 Aug, 2010, at 17:22, Éric Araujo wrote:
>>>>>
>>>>>
>>>>>>> Speaking of which... Your documentation says it's named ~/unittest.cfg,
>>>>>>> could you make this a file in the user base (that is, the prefix where
>>>>>>> 'setup.py install --user' will install files)?
>>>>>>>
>>>>>> Putting .pydistutils.cfg .pypirc .unittest2.cfg .idlerc and possibly
>>>>>> other in the user home directory (or %APPDATA% on win32 and
>>>>>> what-have-you on Mac) is unnecessary clutter. However, $PYTHONUSERBASE
>>>>>> is not the right directory for configuration files, as pointed in
>>>>>> http://bugs.python.org/issue7175
>>>>>>
>>>>>> It would be nice to agree on a ~/.python (resp. %APPADATA%/Python) or
>>>>>> $XDG_CONFIG_HOME/python directory and put config files there.
>>>>>>
>>>>> ~/Library/Python would be a good location on OSX, even if the 100% formally correct location would be ~/Preferences/Python (at least of framework builds, unix-style builds may want to follow the unix convention).
>>>>>
>>>> "100% formally" speaking, MacOS behaves like UNIX in many ways.<http://en.wikipedia.org/wiki/Single_UNIX_Specification#Mac_OS_X_and_Mac_OS_X_Server>
>>>>
>>> Storing files in unix location will be confusing to many Mac users, Apple has an explicitly documented convention for where to store files and dot-files in the user's home directory aren't part of that convention.
>>>
>>> An important reason for storing files in ~/Library/Python of ~/Library/Preferences/Python is that these locations are both logical for mac users and can be navigated to from the Finder without resorting to typing the folder name in "Go -> Go to Folder".
>>>
>>>
>>
>> Really? As a Mac user I have never edited (or even looked at) files
>> in ~/Library. I would never think of going there for finding config
>> files to edit. However in my home directory I have:
>>
>> .Xauthority
>> .Xcode
>> . CFUserTextEncoding - (an Apple encoding configuration for Core
>> Foundation)
>> .bash_profile
>> .cups
>> .dropbox
>> .dvdcss
>> .filezilla
>> .fontconfig
>> .hgrc
>> .idlerc
>> .ipython
>> .mono
>> .netbeans
>> .parallels_settings
>> .pypirc
>> .wingide3
>>
>> Actually that is just a small selection of the .config
>> files/directories in my home directory. It is certainly *a* standard
>> location for config files on the Mac, including some Apple software
>> (XCode) and Python applications.
> The only apple one that is actually used is the .CFUserTextEncoding
> file, I have an .Xcode in my home as well but that is empty and last
> updated in 2007. AFAIK current versions of Xcode store preferences in
> ~/Library/Preferences. Most of the other ones are ports of unix tools
> and store junk in the standard unix location for storing
> configuration. Try edit one without resorting to the command-line,
> with a default configuration of the Finder you cannot even see these
> files (and that includes the File open dialog of tools like Text Edit)
>
> The reason you don't normally look in ~/Library/Preferences is that
> GUI tools on OSX have configuration screens for editing preferences
> and you don't have to edit them manually.
Right, so what you are saying is that for user editable text config
files ~/Library/Preferences is *not* a convention - and in fact the unix
convention of dot files in the home directory is commonly used on the
Mac. :-)
Michael
>
>>
>>
>> My preference would be to follow this established and well used
>> convention.
> My preference is still to use ~/Library/Python (or a subdirectory
> thereof) and filenames that don't start with a dot.
>
> Ronald
--
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.
More information about the Python-Dev
mailing list