Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #38007
| Path | csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed101.telia.com!starscream.dk.telia.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <andreas.roehler@online.de> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.000 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'interpreter': 0.04; 'subject:Python': 0.05; 'url:launchpad': 0.05; 'arguments': 0.07; 'default.': 0.07; 'parsing': 0.07; 'subject:PEP': 0.07; 'python': 0.09; 'if,': 0.09; 'okay': 0.09; 'pep': 0.09; 'received:212.227.126': 0.09; 'windows,': 0.09; 'bug': 0.10; 'subject:python': 0.11; 'skip:# 20': 0.13; 'andreas': 0.16; 'elsewhere.': 0.16; 'shown.': 0.16; 'specified.': 0.16; 'string': 0.17; 'version.': 0.17; '>>>': 0.18; 'windows': 0.19; 'subject:) ': 0.20; 'import': 0.21; 'latter': 0.22; 'occurs': 0.22; 'parse': 0.22; 'work,': 0.22; 'cc:2**0': 0.23; 'example': 0.23; 'specified': 0.23; 'this:': 0.23; 'seems': 0.23; 'patch': 0.24; 'url:bugs': 0.24; 'linux': 0.24; 'script': 0.24; 'pass': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'looks': 0.26; '(see': 0.27; 'implemented': 0.27; 'rules': 0.27; 'all.': 0.28; 'run': 0.28; 'starts': 0.29; "i'm": 0.29; 'file': 0.32; "skip:' 20": 0.32; 'to:addr:python-list': 0.33; 'version': 0.34; 'child': 0.36; 'should': 0.36; 'subject: (': 0.36; 'uses': 0.37; 'subject:: ': 0.38; 'some': 0.38; 'to:addr:python.org': 0.39; 'subject:-': 0.40; 'most': 0.61; 'thomas': 0.62; 'virus:</script': 0.63; 'virus:<script': 0.63; 'acts': 0.71 |
| Date | Thu, 31 Jan 2013 19:40:19 +0100 |
| From | Andreas Röhler <andreas.roehler@online.de> |
| User-Agent | Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130105 Thunderbird/17.0.2 |
| MIME-Version | 1.0 |
| To | python-list@python.org |
| Subject | Re: Python launcher (PEP 397) and emacs python-mode.el |
| References | <amuqb5FueeU1@mid.individual.net> <mailman.1246.1359630370.2939.python-list@python.org> <amvkqcF71apU1@mid.individual.net> |
| In-Reply-To | <amvkqcF71apU1@mid.individual.net> |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 8bit |
| X-Provags-ID | V02:K0:EcC4V95EAJm27K6fmhSsFcZ4pGMrVwO1oJ1HWxD1UHv MiL7RG01Cxpitbxy8K7EqatnKElEikrQBI/Z3moVXOLBAUNC9a MWbAtxAqGd9Knqhkmj90KiPeeRVUk+JDFKyeLbaSfBrNjPpGUn bZ+ru24tKgYto3NPmgxT4Ql933OVomZrZftWeLJCrwfAEa3rr8 Vd2hxafIlF0ri0lVSqk8qwqIYG4Sdn9QFT8zE3fMICDAGJDjkD ikyLPs8mmBiqG4A6sKQ2J9puPohNFtvv6TAEPnlkO/OclkhRcA VJiAk7UacVe4KvZr1zLtWXNGNkt6WaoQBqNsiSpHH/mxit5vLe DAmllF7pKvpF0QJ7nd0M= |
| Cc | Thomas Heller <theller@ctypes.org> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1254.1359657646.2939.python-list@python.org> (permalink) |
| Lines | 65 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1359657646 news.xs4all.nl 6867 [2001:888:2000:d::a6]:47735 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:38007 |
Show key headers only | View raw
Am 31.01.2013 17:35, schrieb Thomas Heller: > Am 31.01.2013 12:05, schrieb Andreas Röhler: >> Am 31.01.2013 10:03, schrieb Thomas Heller: >>> Has someone managed to patch python-mode.el to use >>> the PEP 397 python launcher when you hit C-c C-c? >>> >>> It seems that emacs should parse the shebang line in the edited >>> python script and pass the corresponding arguments to py.exe. >>> >> >> Yes, that's the way python-mode.el acts by default. >> >> AFAIU that launcher is implemented in Python3.3 and should not need any >> patch at all. >> Should it not work, please file a bug-report at >> >> https://bugs.launchpad.net/python-mode > > Well, let me make these remarks: > > 1. I'm on Windows, using gnu-emacs 24.2.1, and python-mode.el 6.1.0. > I do not understand how the shebang line is used by python-mode.el, it uses py-shebang-regexp to determine - if a shebang is given - if, yes, which interpreter to run > depending on what I write into it either 'python.exe' is started when > I hit C-c C-c, or I get 'Spawning child process: invalid argument'. > The latter occurs most often when the shebang string contains 'jython'. please file a bug-report giving some example script which triggers the bug > > > 2. I would like to use the PEP 397 python launcher to start the python > version that is specified in the shebang line. > The python launcher py.exe parses this line when I run 'py script.py', > and then starts the corresponding python interpreter version. > The launcher parses the shebang line by its own rules (see pep397 for > exact details). One example is this: > > <script> > #!/usr/bin/python3.1-32 > import sys; print(sys.version) > </script> > > The python launcher starts 'c:\Python31\python.exe -3.1-32 script.py'. > unfortunatly don't have a windows at my disposal. At linux it would run exactly the interpreter specified. Might be okay for windows as shown. > I would like emacs to do the same; however this would require emacs > to do the same shebang line parsing as the launcher does. > So we do - looks like python-mode.el precedes PEP 397 :) Expecting the bug elsewhere. > Thomas
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Python launcher (PEP 397) and emacs python-mode.el Thomas Heller <theller@ctypes.org> - 2013-01-31 10:03 +0100
Re: Python launcher (PEP 397) and emacs python-mode.el Andreas Röhler <andreas.roehler@online.de> - 2013-01-31 12:05 +0100
Re: Python launcher (PEP 397) and emacs python-mode.el Thomas Heller <theller@ctypes.org> - 2013-01-31 17:35 +0100
Re: Python launcher (PEP 397) and emacs python-mode.el Vinay Sajip <vinay_sajip@yahoo.co.uk> - 2013-01-31 18:26 +0000
Re: Python launcher (PEP 397) and emacs python-mode.el Thomas Heller <theller@ctypes.org> - 2013-01-31 21:53 +0100
Re: Python launcher (PEP 397) and emacs python-mode.el Vinay Sajip <vinay_sajip@yahoo.co.uk> - 2013-01-31 23:59 +0000
Re: Python launcher (PEP 397) and emacs python-mode.el Andreas Röhler <andreas.roehler@online.de> - 2013-02-01 08:13 +0100
Re: Python launcher (PEP 397) and emacs python-mode.el Andreas Röhler <andreas.roehler@online.de> - 2013-01-31 19:40 +0100
csiph-web