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


Groups > comp.lang.python > #49160 > unrolled thread

Re: Inconsistency on getting arguments

Started byPeter Otten <__peter__@web.de>
First post2013-06-25 15:55 +0200
Last post2013-06-25 15:55 +0200
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

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

#49160 — Re: Inconsistency on getting arguments

FromPeter Otten <__peter__@web.de>
Date2013-06-25 15:55 +0200
SubjectRe: Inconsistency on getting arguments
Message-ID<mailman.3829.1372168511.3114.python-list@python.org>
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.

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web