Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!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.015 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'python': 0.08; 'received :mail-bw0-f46.google.com': 0.09; 'subject:method': 0.09; 'subject:file': 0.13; '"import': 0.16; 'received:209.85.214.46': 0.16; 'setup.py.': 0.16; 'wrote:': 0.16; 'wed,': 0.17; 'this?': 0.21; 'header:In-Reply-To:1': 0.22; 'command': 0.24; 'aug': 0.24; 'thanks.': 0.26; 'received:209.85.214': 0.28; '24,': 0.29; 'message-id:@mail.gmail.com': 0.29; 'there': 0.33; 'to:addr :python-list': 0.33; 'something': 0.37; 'skip:t 50': 0.38; 'received:google.com': 0.38; 'received:209.85': 0.38; 'subject:: ': 0.39; 'option': 0.39; 'to:addr:python.org': 0.39; 'genellina': 0.84; 'gabriel': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=zYH7RCvFpU1E28Q852hkyTHZ/yekrYR0YACAAVetSko=; b=EcaSdWFIYt8rBNndh3jT8ToXKRVDlD6GDmdYHH5vl9bYgs0UzZxsERbawfw+8+ePjl stq0G0emQU2SjWnkXuiu+cgHBTgefyTm/VGEONlxSyroe+vMDyxMTrEjICi3netHfc28 5BLo6CckmsBnUlrvWtWF3wrjYFvYyWNAC/f2A= MIME-Version: 1.0 In-Reply-To: References: From: Sebastien Douche Date: Wed, 24 Aug 2011 14:22:12 +0200 Subject: Re: Execute a method in a file in an egg To: python-list@python.org Content-Type: text/plain; charset=UTF-8 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: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1314188573 news.xs4all.nl 23913 [2001:888:2000:d::a6]:47273 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:12141 On Wed, Aug 24, 2011 at 12:04, Gabriel Genellina wrote: >> Is there a way to do this from the command line? Thanks. > > Something like this? > > python -c "import the.module;the.module.someclass().method(arguments)" Or with console_scripts option in setup.py. -- Sebastien Douche Twitter : @sdouche