[Pythonmac-SIG] working around versions
vip at avatar.com.au
Mon Nov 5 21:42:01 CET 2007
Thanks for your reply Ronald.
I do run multiple versions, but I change the symlink of Current.
Do you mean because people change versions in other ways, say through
a shell alias rather than change the symlink?
I can see that the sys.prefix approach is safer.
On 06/11/2007, at 1:37 AM, Ronald Oussoren wrote:
> On 5 Nov, 2007, at 3:51, David Worrall wrote:
>> Hi All,
>> We're doing some work around different versions of Python on OSX (and
>> what's in their respective site-packages directory),
>> and I was wondering:
>> Given that we can pick up the the version number of the current
>> instantiation using sys.version,
>> is there a direct way of computing the locating values for x and y in
>> other than through concatenating the above string with a splice of
> BTW. The library location is os.path.join(sys.prefix, 'lib', 'python
> %d.%d'%(sys.version_info[:2])). This should resolve to a path that
> doesn't refer to 'Versions/Current' but to 'Versions/x.y'. Do not
> assume that the 'Current' link will point to currently running
> version of Python, a user might have installed multiple versions of
>> experimental polymedia: www.avatar.com.au
>> Sonic Communications Research Group,
>> University of Canberra: creative.canberra.edu.au/scrg/
>> Pythonmac-SIG maillist - Pythonmac-SIG at python.org
experimental polymedia: www.avatar.com.au
Sonic Communications Research Group,
University of Canberra: creative.canberra.edu.au/scrg/
More information about the Pythonmac-SIG