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


Groups > comp.lang.python > #49160

Re: Inconsistency on getting arguments

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
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; 'output': 0.05; 'subject:getting': 0.07; 'sys': 0.07; 'lines:': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.11; '2.7': 0.14; 'windows': 0.15; '"python"': 0.16; "'a',": 0.16; "'b',": 0.16; '(windows': 0.16; 'marco': 0.16; 'received:80.91.229.3': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:plane.gmane.org': 0.16; 'received:t-ipconnect.de': 0.16; 'skip:[ 30': 0.16; 'url:windows': 0.16; 'variable.': 0.16; 'wrote:': 0.18; 'import': 0.22; 'previously': 0.22; 'print': 0.22; 'header:User-Agent:1': 0.23; 'environment': 0.24; "i've": 0.25; 'script': 0.25; 'header:X-Complaints-To:1': 0.27; 'installed': 0.27; "i'm": 0.30; 'file': 0.32; 'url:python': 0.33; 'maybe': 0.34; "i'd": 0.34; 'could': 0.34; 'but': 0.35; 'hi,': 0.36; 'url:org': 0.36; 'two': 0.37; 'skip:[ 10': 0.38; 'to:addr:python- list': 0.38; 'issue': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'called': 0.40; 'new': 0.61; 'simple': 0.61; 'different': 0.65; 'user,': 0.69; 'behavior': 0.77; 'missing.': 0.84
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Peter Otten <__peter__@web.de>
Subject Re: Inconsistency on getting arguments
Date Tue, 25 Jun 2013 15:55:04 +0200
Organization None
References <5EDCC30CBA986647AAD0B4DA15FAC92D36FCD5FA@NLSRVWP-EXM02.ttg.global>
Mime-Version 1.0
Content-Type text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding 7Bit
X-Gmane-NNTP-Posting-Host p50848be5.dip0.t-ipconnect.de
User-Agent KNode/4.7.3
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.3829.1372168511.3114.python-list@python.org> (permalink)
Lines 34
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1372168511 news.xs4all.nl 15876 [2001:888:2000:d::a6]:44065
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:49160

Show key headers only | View raw


Marco Perniciaro wrote:

> Hi,
> I've been working with Python for a long time.
> Yet, I came across an issue which I cannot explain.
> 
> Recently I have a new PC (Windows 7).
> Previously I could call a Python script with or without the "python" word
> at the beginning. Now the behavior is different if I use or not use the
> "python" prefix!
> 
> I only have Python 2.7 installed and the path in in my environment
> variable. I create a simple file called "example.py" which contains two
> lines:
> 
>       import sys
>       print sys.argv
> 
> This is the output result:
> 
>       C:\Users\mapr>example.py a b c
>       ['C:\\Users\\mapr\\example.py']
> 
>       C:\Users\mapr>python example.py a b c
>       ['example.py', 'a', 'b', 'c']
> 
> Can someone please explain?

I'm not a Windows user, but I'd try

http://docs.python.org/2/using/windows.html#executing-scripts

with python.exe instead of pythonw.exe. Maybe the %* is missing.

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


Thread

Re: Inconsistency on getting arguments Peter Otten <__peter__@web.de> - 2013-06-25 15:55 +0200

csiph-web