Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #18652 > unrolled thread
| Started by | Oktaka Com <oktakaweb@gmail.com> |
|---|---|
| First post | 2012-01-07 10:32 -0800 |
| Last post | 2012-01-08 08:31 +1100 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.lang.python
Installing a script and use it via python -m Oktaka Com <oktakaweb@gmail.com> - 2012-01-07 10:32 -0800
Re: Installing a script and use it via python -m Cameron Simpson <cs@zip.com.au> - 2012-01-08 08:31 +1100
| From | Oktaka Com <oktakaweb@gmail.com> |
|---|---|
| Date | 2012-01-07 10:32 -0800 |
| Subject | Installing a script and use it via python -m |
| Message-ID | <35d4f491-85e3-48ee-81e8-b9a627dcb19c@i26g2000vbt.googlegroups.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,
[toc] | [next] | [standalone]
| From | Cameron Simpson <cs@zip.com.au> |
|---|---|
| Date | 2012-01-08 08:31 +1100 |
| Message-ID | <mailman.4519.1325971920.27778.python-list@python.org> |
| In reply to | #18652 |
On 07Jan2012 10:32, Oktaka Com <oktakaweb@gmail.com> wrote:
| 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 <cs@zip.com.au> 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 <gnb@bby.com.au>
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web