Using Python 2.7 modules in Ubuntu 12.04
Question: I have implemented a Stack.py module that I would like to be able to import,
but when I tried to save it to usr/lib/python2.7 Ubuntu didn't allow it. Now,
I go to usr/lib and python2.7 folder doesn't even show up anymore in the
graphic interface, although I am able to see it is still there by using sudo.

Any ideas about what I am doing wrong? Thanks in advance!


Answer: How did you write the original Stack.py? If you used a text editor (without
elevating it to super user) you'll have to save it somewhere you have write
permissions (Desktop, for example) and then you could do:

    
    
    sudo cp ~/Desktop/Stack.py /usr/lib/python2.7
    

That being said, I think this is more a question for the AskUbuntu site (also
a part of Stack Exchange).

If that doesn't work you could simply put Stack.py in the directory with the
file you want to use it with and do

    
    
    from Stack import [what you want to import/use] 
    

or

    
    
    from Stack import *
    

