Import, site packages, my modules, Windows vs. Linux

Terry Reedy tjreedy at udel.edu
Wed Jun 4 21:21:24 EDT 2008


"John Ladasky" <ladasky at my-deja.com> wrote in message 
news:4993bd3d-22aa-4e0d-a593-38c0f5e2d69a at m44g2000hsc.googlegroups.com...
| On Windows I found a solution that works, but which may be a kludge.
| In the Python "site-packages" folder, I added a sub-folder called "my-
| packages".  Then I created a text file, "my-packages.pth", containing
| the single line, "my-packages."  Finally, I moved my common personal
| modules into the my-packages folder and deleted all of my clumsy
| duplicates.  Import statements now work for all of my files on the
| Windows box, great!
|
| I then tried to use this same strategy in Linux, and saw that I don't
| automatically have the privileges needed to alter the site-packages
| folder.  On my Windows box, my default account has Administrator
| privileges.

If you do the Windows install for all users, all users can add packages to 
site-packages -- as long as adding the package directory comprises the 
whole installation process and no registry fiddling is required. 






More information about the Python-list mailing list