On Tue, 17 Nov 2009 23:57:55 +, Rhodri James wrote:
Quote the filenames or escape the spaces:
C:\Python26\Python.exe C:\echo.py C:\New Folder\text.txt
We've been living with this pain ever since windowed GUIs encouraged
users
to put spaces in their file names (Apple, I'm looking at
On Mon, 16 Nov 2009 23:30:09 +, Rhodri James wrote:
Quote the filenames or escape the spaces:
C:\Python26\Python.exe C:\echo.py C:\New Folder\text.txt
We've been living with this pain ever since windowed GUIs encouraged users
to put spaces in their file names (Apple, I'm looking at
On Nov 17, 2:26 pm, Nobody nob...@nowhere.com wrote:
On Mon, 16 Nov 2009 23:30:09 +, Rhodri James wrote:
Quote the filenames or escape the spaces:
C:\Python26\Python.exe C:\echo.py C:\New Folder\text.txt
We've been living with this pain ever since windowed GUIs encouraged users
to
On Tue, 17 Nov 2009 11:47:46 -0800, Gerry wrote:
How about this:
lastarg = .join(sys.argv[2:])
What about it?
IOW, why would you want to do that?
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 17 Nov 2009 19:26:46 -, Nobody nob...@nowhere.com wrote:
On Mon, 16 Nov 2009 23:30:09 +, Rhodri James wrote:
Quote the filenames or escape the spaces:
C:\Python26\Python.exe C:\echo.py C:\New Folder\text.txt
We've been living with this pain ever since windowed GUIs
Nobody wrote:
On Tue, 17 Nov 2009 11:47:46 -0800, Gerry wrote:
How about this:
lastarg = .join(sys.argv[2:])
What about it?
IOW, why would you want to do that?
Like many tricks, it'd work if several conditions applied:
1) there's exactly two arguments expected on the
Rhodri James wrote:
We've been living with this pain ever since windowed GUIs encouraged
users to put spaces in their file names (Apple, I'm looking at you!).
It's not really Apple's fault. There was no problem with
spaces in filenames in the classic MacOS environment,
because there was no
On Mon, Nov 16, 2009 at 6:18 PM, rantingrick rantingr...@gmail.com wrote:
I am currently having fun with command line arguments in a windows
environment. If i get a path that has spaces anywhere in it my script
gets the wrong arguments from sys.argv. You guy's probably know what i
am talking
On Mon, 16 Nov 2009 23:18:23 -, rantingrick rantingr...@gmail.com
wrote:
I am currently having fun with command line arguments in a windows
environment. If i get a path that has spaces anywhere in it my script
gets the wrong arguments from sys.argv. You guy's probably know what i
am
On Nov 16, 5:30 pm, Rhodri James rho...@wildebst.demon.co.uk
wrote:
We've been living with this pain ever since windowed GUIs encouraged users
to put spaces in their file names (Apple, I'm looking at you!).
Fundamentally, if people want the pretty they have to live with the
On Mar 4, 8:38 am, Mike Walker [EMAIL PROTECTED] wrote:
If you run a python file, ie. just double clicking it the only
argument you will have will be the filename of the script. If you
create a shortcut to the script and in the target box add your
arguments (if you have quotation marks
Chris wrote:
On Mar 4, 8:38 am, Mike Walker [EMAIL PROTECTED] wrote:
If you run a python file, ie. just double clicking it the only
argument you will have will be the filename of the script. If you
create a shortcut to the script and in the target box add your
arguments (if you have
If you run a python file, ie. just double clicking it the only
argument you will have will be the filename of the script. If you
create a shortcut to the script and in the target box add your
arguments (if you have quotation marks place them after not inside)
you will see your arguments.
On Mar 4, 7:12 am, Mike Walker [EMAIL PROTECTED] wrote:
I am having some problems with command line arguments in Windows. The same
code under Linux works fine.
In Windows I only get one argument no matter how many arguments are passed
on the command line. I think there is some problem with
Mike Walker [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
If you run a python file, ie. just double clicking it the only
argument you will have will be the filename of the script. If you
create a shortcut to the script and in the target box add your
arguments (if you have
Mark Tolonen [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
From the command line, the 'ftype' and 'assoc' commands can be used
view how an extension is handled:
C:\assoc .py
.py=Python.File
C:\ftype Python.File
Python.File=C:\Python25\python.exe %1 %*
My guess is
it does have one in activepython
Thanks and Regards,
Ginger
- Original Message -
From: Russ P. [EMAIL PROTECTED]
To: python-list@python.org
Sent: Wednesday, November 07, 2007 8:56 AM
Subject: command-line arguments in IDLE
Is it possible to pass command-line arguments when running
On Nov 7, 6:27 am, Russ P. [EMAIL PROTECTED] wrote:
Is it possible to pass command-line arguments when running a program
in IDLE? The Run menu does not seem to provide that option. Thanks.
Can't you just fake the command line args by setting sys.argv? This
isn't too sophisticated, but it
Russ P. wrote:
Is it possible to pass command-line arguments when running a program
in IDLE? The Run menu does not seem to provide that option. Thanks.
thunderfoot's workaround should work well, but requires changing the
script.
If you want IDLE environment, but don't mind running IDLE from
En Wed, 14 Mar 2007 16:51:04 -0300, Jim [EMAIL PROTECTED] escribió:
I'm trying to use subprocess to drive a Perl script. I'm having some
trouble getting it to spot the command line arguments. Basically, if
I call subprocess(args).wait() where args has a second item, I can't
convince the
Thanks for the answers; that was the problem exactly.
--JMike
Duncan Booth wrote:
It sounds like the registry entry for running Python files is messed up.
Can you go to a command line and see what the command 'ftype Python.File'
displays? (Assuming that command lines and ftype still work on
Duncan Booth [EMAIL PROTECTED] escribió en el mensaje
news:[EMAIL PROTECTED]
It sounds like the registry entry for running Python files is messed up.
Can you go to a command line and see what the command 'ftype Python.File'
displays? (Assuming that command lines and ftype still work on Vista)
By the way, note that if I say (on Vista)
python printargs.py booga -a wooga
I get the desired output:
there are 4 args
arg: printargs.py
arg: booga
arg: -a
arg: wooga
So the quesiton still stands, what's up with that?
Thanks,
--JMike
--
Some further information: perl seems to do the same thing (losing
arguments).
We think it may have something to do with file association.
Any ideas anyone?
--JMike
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
But on Windows Vista, when I run that command, I get
there are 1 args
arg: printargs.py
What's up with that?
It sounds like the registry entry for running Python files is messed up.
Can you go to a command line and see what the command 'ftype
[ezd]
| # u.py
| import sys
| print 'args',sys.argv
|
| in Command Prompt window, with 2 command lines on 2 PCs:
|
| # Case (1L):
| C:\tmp u.py a b c
| args ['C:\\tmp\\u.py']
|
| # Case (1D):
| C:\tmp u.py a b c
| args ['C:\\tmp\\u.py', 'a', 'b', 'c']
Almost certainly means that the
Tim Golden wrote:
[ezd]
| # u.py
| import sys
| print 'args',sys.argv
|
| in Command Prompt window, with 2 command lines on 2 PCs:
|
| # Case (1L):
| C:\tmp u.py a b c
| args ['C:\\tmp\\u.py']
|
| # Case (1D):
| C:\tmp u.py a b c
| args ['C:\\tmp\\u.py', 'a', 'b', 'c']
Almost
Tim Golden wrote:
python.file=C:\Python24\python.exe %1 %*
[EMAIL PROTECTED] wrote:
So now I got to decide whether the file association should be
set to %2 %3 %4 %5 %6 %7 %8 %9 and change the
programs that count the arguments or set it to %* and change
the programs do a split on argv[1] to
Ross Ridge wrote:
Tim Golden wrote:
python.file=C:\Python24\python.exe %1 %*
[EMAIL PROTECTED] wrote:
So now I got to decide whether the file association should be
set to %2 %3 %4 %5 %6 %7 %8 %9 and change the
programs that count the arguments or set it to %* and change
the programs
What's the purpose of this utility? Is it to do something with the URL?
And the URL must always be specified? What about the name? Also
mandatory, or optional? The relationship between the two?
its just a simple rss reader. i'm writing it almost purely just to
get me using language (i'm
Jon Hewer wrote:
What's the purpose of this utility? Is it to do something with the URL?
And the URL must always be specified? What about the name? Also
mandatory, or optional? The relationship between the two?
its just a simple rss reader. i'm writing it almost purely just to
get me
Jon Hewer wrote:
i am writing a little script and currently implementing command line
arguments following the guide by mark pilgrim from dive into python;
http://diveintopython.org/scripts_and_streams/command_line_arguments.html
thats all fine, however i am not sure of the BEST way to
You also could opt for the OptionParser in optparse, it is quiet
powerful, and you can keep your code clean. Your requirements would
translate to something like:
py#!/usr/bin/env python
pyshow OptionParser
py
pyfrom optparse import OptionParser
py
pydef main():
pyparser = OptionParser(usage =
[EMAIL PROTECTED] wrote:
pyparser.add_option(-n, --name, dest=name, action=store,
py help=enter a name)
pyparser.add_option(-u, --url, action=store, dest=url,
help = enter an url)
It's worth noting that this will have the same effect and involves less
On Thu, 25 Aug 2005 11:39:48 -0700, Trent Mick wrote:
[michael wrote]
SOLVED! Thank you.
I wonder why this was needed for 2.4 and not 2.2? I don't think it was
lingering things from old installs because it happened on a persons
computer that had never had any python installed before 2.4.
[michael wrote]
I wonder why this was needed for 2.4 and not 2.2? I don't think it was
lingering things from old installs because it happened on a persons
computer that had never had any python installed before 2.4.
[Trent]
It might be due to a bug in the Python 2.4 installer not
Trent Mick wrote:
I used the python2.4.MSI from python.org site (dated 3-6-05). I think this
was the first time they went to MSI verses an exe based installer.
it says Python 2.4 (#60 November 30th, 2004) when I start it.
I think Martin has been doing MSIs for a little bit longer than that,
michael [EMAIL PROTECTED] wrote:
I have a question about Windows based python (2.4 and later).
For example, if I make a script called test.py like so:
import sys
print sys.argv
then run it:
python test.py this is a test
I see a list with
['test.py', 'this', 'is', 'a', 'test']
All is
On Thu, 25 Aug 2005 00:46:41 -0700, Tim Roberts wrote:
michael [EMAIL PROTECTED] wrote:
I have a question about Windows based python (2.4 and later).
For example, if I make a script called test.py like so:
import sys
print sys.argv
then run it:
python test.py this is a test
I see a list
On Thu, 25 Aug 2005 00:46:41 -0700, Tim Roberts wrote:
michael [EMAIL PROTECTED] wrote:
I have a question about Windows based python (2.4 and later).
For example, if I make a script called test.py like so:
import sys
print sys.argv
then run it:
python test.py this is a test
I see a list
[michael wrote]
SOLVED! Thank you.
I wonder why this was needed for 2.4 and not 2.2? I don't think it was
lingering things from old installs because it happened on a persons
computer that had never had any python installed before 2.4.
It might be due to a bug in the Python 2.4 installer not
41 matches
Mail list logo