Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #18655

Re: Installing a script and use it via python -m

Date 2012-01-08 08:31 +1100
From Cameron Simpson <cs@zip.com.au>
Subject Re: Installing a script and use it via python -m
References <35d4f491-85e3-48ee-81e8-b9a627dcb19c@i26g2000vbt.googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.4519.1325971920.27778.python-list@python.org> (permalink)

Show all headers | View raw


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>

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

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

csiph-web