Installing a script and use it via python -m

O

Oktaka Com

Hi all,

Is there a way to do below:

1) install via setup.py some script: xxx.py
2) python -m xxx.py

In fact, this question opens to: Is there a platform independent way
to copy xxx.py to somewhere that the system will search for?

Thanks,
 
C

Cameron Simpson

| Is there a way to do below:
|
| 1) install via setup.py some script: xxx.py
| 2) python -m xxx.py
|
| In fact, this question opens to: Is there a platform independent way
| to copy xxx.py to somewhere that the system will search for?

Depends what's in your $PYTHONPATH I think, but setup.py has an "install
for user" option. Use that, then plain old python -m xxx (note: no .py
here - it is the module name, not the file pathname).

Cheers,
--
Cameron Simpson <[email protected]> DoD#743
http://www.cskk.ezoshosting.com/cs/

I will not do it as a hack I will not do it for my friends
I will not do it on a Mac I will not write for Uncle Sam
I will not do it on weekends I won't do ADA, Sam-I-Am
- Gregory Bond <[email protected]>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top