Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!rt.uk.eu.org!news-transit.tcx.org.uk!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'think,': 0.05; 'received:edu.au': 0.07; 'python': 0.08; 'setup.py': 0.09; 'subject:python': 0.10; '(note:': 0.16; '.py': 0.16; 'bond': 0.16; 'from:addr:cs': 0.16; 'from:addr:zip.com.au': 0.16; 'from:name:cameron simpson': 0.16; 'message-id:@cskk.homeip.net': 0.16; 'received:202.125.174': 0.16; 'received:202.125.174.133': 0.16; 'received:boardofstudies.nsw.edu.au': 0.16; 'received:cskk.homeip.net': 0.16; 'received:harvey.boardofstudies.nsw.edu.au': 0.16; 'received:homeip.net': 0.16; 'received:nsw.edu.au': 0.16; 'cc:addr :python-list': 0.16; 'wrote:': 0.18; 'uncle': 0.18; 'cc:no real name:2**0': 0.20; 'cheers,': 0.20; 'header:In-Reply-To:1': 0.22; 'somewhere': 0.23; 'gregory': 0.23; 'opens': 0.23; 'cc:2**0': 0.24; 'subject:use': 0.24; 'module': 0.26; 'depends': 0.28; 'cc:addr:python.org': 0.29; "won't": 0.33; 'header:User-Agent:1': 0.33; 'that,': 0.33; 'there': 0.33; 'option.': 0.34; 'install': 0.35; 'file': 0.36; 'received:au': 0.36; 'question': 0.36; 'charset:us-ascii': 0.37; 'for?': 0.37; 'hack': 0.37; 'but': 0.37; 'some': 0.38; 'plain': 0.39; 'your': 0.61; 'here': 0.65; 'received:202': 0.66; 'friends': 0.67; 'xxx': 0.71; 'cameron': 0.73; 'below:': 0.80; 'sam': 0.95 Date: Sun, 8 Jan 2012 08:31:48 +1100 From: Cameron Simpson To: Oktaka Com Subject: Re: Installing a script and use it via python -m MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <35d4f491-85e3-48ee-81e8-b9a627dcb19c@i26g2000vbt.googlegroups.com> User-Agent: Mutt/1.5.21 (2010-09-15) References: <35d4f491-85e3-48ee-81e8-b9a627dcb19c@i26g2000vbt.googlegroups.com> Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1325971920 news.xs4all.nl 6907 [2001:888:2000:d::a6]:36148 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:18655 On 07Jan2012 10:32, Oktaka 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 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