Re: command line utility for cups

2018-06-20 Thread Brian Oney via Python-list
On Wed, 2018-06-20 at 12:36 +0200, George Fischhof wrote: > Hi, > You can also try click library from pypi, that is a very good command line > stuff. > > George Thank you for the tip. I am away of click and it's awesomeness, but am hesitant because it's not apart of stdlib. I have gotten bitten

Re: command line utility for cups

2018-06-20 Thread Brian Oney via Python-list
Thanks Peter! That's pretty slick. I will get it working for sure now. Regards, Brian -- https://mail.python.org/mailman/listinfo/python-list

Re: command line utility for cups

2018-06-20 Thread George Fischhof
Peter Otten <[email protected]> ezt írta (időpont: 2018. jún. 20., Sze 12:22): > Brian Oney via Python-list wrote: > > > Dear all, > > > > I am having trouble with argparse. I am trying to translate the following > > line to a sleek python script: > > > > lpr -o media=legal -o sides=two-sided-long-

Re: command line utility for cups

2018-06-20 Thread Peter Otten
Brian Oney via Python-list wrote: > Dear all, > > I am having trouble with argparse. I am trying to translate the following > line to a sleek python script: > > lpr -o media=legal -o sides=two-sided-long-edge filename > > Now where I am. > > import argparse > parser = argparse.ArgumentParser(d

Re: command line micro wiki written in Python

2017-02-02 Thread paul . wolf
On Tuesday, 31 January 2017 23:39:41 UTC, Ben Finney wrote: > The Python community has a stronger (?) preference for reStructuredText > format. Can that be the default? > > That is, I want my text files to be named ‘foo’ (no suffix) or ‘foo.txt’ > (because they're primarily text), and have the d

Re: command line micro wiki written in Python

2017-01-31 Thread Ben Finney
Paul Wolf writes: > I've created a command line utility for managing text files. It's > written in Python: […] Thank you. > The key aspects are > > * Entirely command-line driven > > * Text documents only with a slight preference for Markdown The Python community has a stronger (?) preference

Re: command line micro wiki written in Python

2017-01-31 Thread Ethan Furman
On 01/31/2017 02:33 AM, Paul Wolf wrote: I've created a command line utility for managing text files. It's written in Python... That sounds really cool! -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Command Line Inputs from Windows

2015-01-05 Thread James Scholes
Chris Angelico wrote: > The latter form is governed by the association. I don't know off-hand > where that's set in the registry, but you should be able to poke > around in folder settings to find it (but, thank you very much > Microsoft, the exact menu path has changed a number of times between >

Re: Command Line Inputs from Windows

2015-01-03 Thread Gisle Vanem
Ken Stewart wrote: Here is a sample key: S1-5-21-1560217580-722697556-320042093-1000-Classes py_auto_file shell open command The corrected data for the key looks like this: "C:\Python34\python.exe" %1 %* Yikes! You use the awful cmd.exe as the shell d

Re: Command Line Inputs from Windows

2015-01-03 Thread Mark Lawrence
On 03/01/2015 08:03, Ken Stewart wrote: At the moment it looks like the Python installer didn't create these registry entries properly in Windows 7. If that is actally the case please raise an issue on the bug tracker at bugs.python.org if one doesn't already exist. -- My fellow Pythonistas

Re: Command Line Inputs from Windows

2015-01-03 Thread Chris Angelico
On Sat, Jan 3, 2015 at 7:03 PM, Ken Stewart wrote: > I used the 'find' tool in regedit to search for python in the registry. > There were many hits on the word python but only a handful had data fields > similar to the one above. Every instance was missing the %* string. I > modified them all.

Re: Command Line Inputs from Windows

2015-01-03 Thread Ken Stewart
Chris, Dennis, James, and Mark: SUCCESS! Thanks for your suggestions. It was the registry. Kudos to Dennis. The data strings for a lot of different "command" keys in the registry were missing the %* (percent star) characters. Thanks Chris for the explanation on why the %* string is needed

Re: Command Line Inputs from Windows

2015-01-03 Thread Mark Lawrence
On 02/01/2015 19:44, Ken Stewart wrote: Court of King Arthur, Court of BDFL actually. I’d appreciate any help you can provide. I’m having problems passing command line parameters from Windows 7 into a Python script (using Python 3.4.2). It works correctly when I call the interpreter explic

Re: Command Line Inputs from Windows

2015-01-02 Thread Mark Lawrence
On 02/01/2015 21:29, Chris Angelico wrote: On Sat, Jan 3, 2015 at 6:44 AM, Ken Stewart wrote: This works: I may have some details wrong, and it's likely to be a little different on Win7, but poke around and look for a missing %*. Or, better still, make sure you have the py.exe launcher; then

Re: Command Line Inputs from Windows

2015-01-02 Thread Chris Angelico
On Sat, Jan 3, 2015 at 2:41 PM, James Scholes wrote: > Chris Angelico wrote: >> The latter form is governed by the association. I don't know off-hand >> where that's set in the registry, but you should be able to poke >> around in folder settings to find it (but, thank you very much >> Microsoft,

Re: Command Line Inputs from Windows

2015-01-02 Thread Chris Angelico
On Sat, Jan 3, 2015 at 6:44 AM, Ken Stewart wrote: > This works: > python myScript.py arg1 arg2 arg3 > > This doesn’t work: > myScript.py arg1 arg2 arg3 The latter form is governed by the association. I don't know off-hand where that's set in the registry, but you should be able to poke around in

Re: Command Line Progress Bar

2012-12-27 Thread Oscar Benjamin
On 26 December 2012 06:17, Kevin Anthony wrote: > Hello, > I'm writing a file processing script(Linux), and i would like to have a > progress bar. But i would also like to be able to print messages. Is there > a simple way of doing this without implementing something like ncurses? Other project

Re: Command Line Progress Bar

2012-12-26 Thread xDog Walker
On Tuesday 2012 December 25 22:17, Kevin Anthony wrote: > Hello, > I'm writing a file processing script(Linux), and i would like to have a > progress bar. But i would also like to be able to print messages. Is > there a simple way of doing this without implementing something like > ncurses? http:

Re: Command Line Progress Bar

2012-12-26 Thread Alec Taylor
On Thu, Dec 27, 2012 at 3:05 AM, Irmen de Jong wrote: > On 26-12-2012 7:17, Kevin Anthony wrote: >> Hello, >> I'm writing a file processing script(Linux), and i would like to have a >> progress bar. >> But i would also like to be able to print messages. Is there a simple way >> of doing >> thi

Re: Command Line Progress Bar

2012-12-26 Thread Irmen de Jong
On 26-12-2012 7:17, Kevin Anthony wrote: > Hello, > I'm writing a file processing script(Linux), and i would like to have a > progress bar. > But i would also like to be able to print messages. Is there a simple way > of doing > this without implementing something like ncurses? This little li

Re: Command Line Progress Bar

2012-12-26 Thread peter
On 12/26/2012 03:17 AM, Kevin Anthony wrote: Hello, I'm writing a file processing script(Linux), and i would like to have a progress bar. But i would also like to be able to print messages. Is there a simple way of doing this without implementing something like ncurses? -- Thanks Kevin Ant

Re: Command Line Progress Bar

2012-12-25 Thread Mitya Sirenef
On 12/26/2012 01:17 AM, Kevin Anthony wrote: Hello, I'm writing a file processing script(Linux), and i would like to have a progress bar. But i would also like to be able to print messages. Is there a simple way of doing this without implementing something like ncurses? -- Thanks Kevin Ant

Re: Command line arguments??

2009-11-18 Thread Nobody
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 (A

Re: Command line arguments??

2009-11-17 Thread greg
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 tex

Re: Command line arguments??

2009-11-17 Thread Dave Angel
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 com

Re: Command line arguments??

2009-11-17 Thread Rhodri James
On Tue, 17 Nov 2009 19:26:46 -, Nobody 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 put

Re: Command line arguments??

2009-11-17 Thread Nobody
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

Re: Command line arguments??

2009-11-17 Thread Gerry
On Nov 17, 2:26 pm, Nobody 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 put s

Re: Command line arguments??

2009-11-17 Thread Nobody
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 look

Re: Command line arguments??

2009-11-16 Thread rantingrick
On Nov 16, 5:30 pm, "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!).   > Fundamentally, if people want the pretty they have to live with the   > consequences. Thanks everyone , p

Re: Command line arguments??

2009-11-16 Thread Rhodri James
On Mon, 16 Nov 2009 23:18:23 -, rantingrick 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 about. Heres and

Re: Command line arguments??

2009-11-16 Thread Benjamin Kaplan
On Mon, Nov 16, 2009 at 6:18 PM, rantingrick 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 about. Heres and

Re: command-line one-liners a la Perl?

2009-06-18 Thread unayok
On Jun 18, 9:36 am, kj wrote: > I'm a recovering Perl addict, and I'm jonesin' badly for command-line > one-liners, like > >   % perl -lne '@f=split "\t";print join "\t",@f[3,1] if $f[2]=~/frobozz/i' > in.txt > > How can I get my fix with Python? > > kynn I'd encourage you to learn the ways of P

Re: command-line one-liners a la Perl?

2009-06-18 Thread MRAB
kj wrote: I'm a recovering Perl addict, and I'm jonesin' badly for command-line one-liners, like % perl -lne '@f=split "\t";print join "\t",@f[3,1] if $f[2]=~/frobozz/i' in.txt How can I get my fix with Python? python -c "print 'Hello world!'" Although you need to remember that Python m

Re: command line of a process.exe on another host

2009-06-12 Thread Tim Wintle
On Thu, 2009-06-11 at 23:18 +0100, Harry wrote: > HI , > I have number of process run on different windows servers which run's with > different command line parameters. for example "process.exe -input > statusurl: http://sss.com "., These parameters can vary from host to host. > using Psexec I k

Re: command line of a process.exe on another host

2009-06-12 Thread Giampaolo Rodola'
On 12 Giu, 13:02, Tim Golden wrote: > Giampaolo Rodola' wrote: > > On 12 Giu, 00:18, "Harry" wrote: > >> HI , > >> I have number of process run on different windows servers which run's with > >> different command line parameters. > > You can easily do this with psutil [1]: > > Since psutil uses t

Re: command line of a process.exe on another host

2009-06-12 Thread Tim Golden
Giampaolo Rodola' wrote: On 12 Giu, 00:18, "Harry" wrote: HI , I have number of process run on different windows servers which run's with different command line parameters. You can easily do this with psutil [1]: Since psutil uses the native Windows calls to retrieve such kind of info i

Re: command line of a process.exe on another host

2009-06-12 Thread Giampaolo Rodola'
On 12 Giu, 00:18, "Harry" wrote: > HI , > I have number of process run on different windows servers which run's with > different command line parameters. for example "process.exe -input > statusurl:http://sss.com";., These parameters can vary from host to host. > using Psexec I know the PID and pr

Re: command line of a process.exe on another host

2009-06-12 Thread Tim Golden
Harry wrote: HI , I have number of process run on different windows servers which run's with different command line parameters. for example "process.exe -input statusurl: http://sss.com "., These parameters can vary from host to host. using Psexec I know the PID and process name which are run

Re: command line tool for process communication

2008-08-17 Thread Fredrik Lundh
aditya shukla wrote: I have a program which is run through command line .I am trying to create another command line tools which controls this program. So for example in my new program when i give newprog -a then it should invoke the existing tool and perform one of its operation.eg

Re: Command line arguements

2008-07-28 Thread Gabriel Genellina
En Mon, 28 Jul 2008 01:43:52 -0300, Henry Chang <[EMAIL PROTECTED]> escribió: > try optparse :) > http://docs.python.org/lib/module-optparse.html (optparse might be too much for a single argument) > On Sun, Jul 27, 2008 at 9:13 PM, aditya shukla > <[EMAIL PROTECTED]>wrote: > >> in other words i

Re: Command line arguements

2008-07-27 Thread Henry Chang
try optparse :) http://docs.python.org/lib/module-optparse.html On Sun, Jul 27, 2008 at 9:13 PM, aditya shukla <[EMAIL PROTECTED]>wrote: > Hello folks ,I have a program in which a text file is generated as an > output > eg > > C:\prog\ prog -x test.txt > Right now whenever i have to read the tes

Re: Command line input

2008-03-31 Thread Paul Scott
On Mon, 2008-03-31 at 12:39 -0700, [EMAIL PROTECTED] wrote: > How do I receive input from the command line in Python? I have used: sys.argv[ 1 ] I have been doing Python for around 2 days now, so please do double check that! --Paul All Email originating from UWC is covered by disclaimer http

Re: Command line input

2008-03-31 Thread hexusnexus
On Mar 31, 4:04 pm, Rick Dooling <[EMAIL PROTECTED]> wrote: > On Mar 31, 2:39 pm, [EMAIL PROTECTED] wrote: > > > How do I receive input from the command line in Python? > > As long as we are all guessing, do you perhaps mean raw_input? > > my_name = raw_input("What is your name? ") > What is your n

Re: Command line input

2008-03-31 Thread Rick Dooling
On Mar 31, 2:39 pm, [EMAIL PROTECTED] wrote: > How do I receive input from the command line in Python? As long as we are all guessing, do you perhaps mean raw_input? my_name = raw_input("What is your name? ") What is your name? Rick >>> my_name 'Rick' -- http://mail.python.org/mailman/listinfo

Re: Command line input

2008-03-31 Thread Jorgen Grahn
On 31 Mar 2008 20:13:05 GMT, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Mon, 31 Mar 2008 12:39:54 -0700, hexusnexus wrote: > >> How do I receive input from the command line in Python? > > Direct way `sys.argv`, comfortable way `optparse`. I have a feeling he doesn't mean command-line

Re: Command line input

2008-03-31 Thread Marc 'BlackJack' Rintsch
On Mon, 31 Mar 2008 12:39:54 -0700, hexusnexus wrote: > How do I receive input from the command line in Python? Direct way `sys.argv`, comfortable way `optparse`. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Command line arguments in Windows

2008-03-04 Thread Steve Holden
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 y

Re: Command line arguments in Windows

2008-03-04 Thread Chris
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 quotati

Re: Command line arguments in Windows

2008-03-03 Thread Mike Walker
"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" %

Re: Command line arguments in Windows

2008-03-03 Thread Mark Tolonen
"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 yo

Re: Command line arguments in Windows

2008-03-03 Thread Mike Walker
> 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

Re: Command line arguments in Windows

2008-03-03 Thread Chris
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

Re: command-line arguments in IDLE

2007-11-07 Thread Tal Einat
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

Re: command-line arguments in IDLE

2007-11-07 Thread [EMAIL PROTECTED]
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

Re: command-line arguments in IDLE

2007-11-07 Thread Ginger
it does have one in activepython Thanks and Regards, Ginger - Original Message - From: "Russ P." <[EMAIL PROTECTED]> To: Sent: Wednesday, November 07, 2007 8:56 AM Subject: command-line arguments in IDLE > Is it possible to pass command-line arguments when running a program > in ID

Re: Command-line does work when scheduled

2007-10-05 Thread Martin P. Hellwig
Jim wrote: > On Sep 30, 6:16 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: >> On Sun, 30 Sep 2007 07:42:56 -0700, Jim <[EMAIL PROTECTED]> >> declaimed the following in comp.lang.python: >> >>> What else could be wrong? >>> Thanks, >> Possibly those associations are only defined for your

Re: Command-line does work when scheduled

2007-09-30 Thread Jay Loden
I sometimes see issues like this at work because certain processes, including scheduled tasks if I remember right, can run as Local System user instead of as your user account. That tends to be a real pain for Python or Perl scripts because that means that they don't have the associations config

Re: Command-line does work when scheduled

2007-09-30 Thread Jim
On Sep 30, 6:37 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Sun, 30 Sep 2007 11:42:56 -0300, Jim <[EMAIL PROTECTED]> escribi?: > > > > > > > On Sep 29, 8:45 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> > > wrote: > >> The %* at the end is important: if you created the association by usin

Re: Command-line does work when scheduled

2007-09-30 Thread Gabriel Genellina
En Sun, 30 Sep 2007 11:42:56 -0300, Jim <[EMAIL PROTECTED]> escribi�: > On Sep 29, 8:45 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> > wrote: >> The %* at the end is important: if you created the association by using >> "Open with...", or selecting Python from the list of installed programs, >> ve

Re: Command-line does work when scheduled

2007-09-30 Thread Jim
On Sep 30, 6:16 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Sun, 30 Sep 2007 07:42:56 -0700, Jim <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > > What else could be wrong? > > Thanks, > > Possibly those associations are only defined for your login account,

Re: Command-line does work when scheduled

2007-09-30 Thread Jim
On Sep 29, 8:45 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Sat, 29 Sep 2007 22:04:06 -0300, Jim <[EMAIL PROTECTED]> escribi?: > > >> If it works this way, maybe the .py file extension is not correctly > >> registered. > > > Yes, it works this way. > > How do I register the .py extensio

Re: Command-line does work when scheduled

2007-09-29 Thread Gabriel Genellina
En Sat, 29 Sep 2007 22:04:06 -0300, Jim <[EMAIL PROTECTED]> escribi�: >> If it works this way, maybe the .py file extension is not correctly >> registered. > > Yes, it works this way. > How do I register the .py extension correctly? From a command line, type: assoc .py You should get: .py=Python

Re: Command-line does work when scheduled

2007-09-29 Thread Jim
On Sep 29, 6:56 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Sat, 29 Sep 2007 19:17:49 -0300, Jim <[EMAIL PROTECTED]> escribi?: > > > > > > > On Sep 29, 3:19 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> > > wrote: > >> En Sat, 29 Sep 2007 17:34:34 -0300, Jim <[EMAIL PROTECTED]> > >> esc

Re: Command-line does work when scheduled

2007-09-29 Thread Gabriel Genellina
En Sat, 29 Sep 2007 19:17:49 -0300, Jim <[EMAIL PROTECTED]> escribi�: > On Sep 29, 3:19 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> > wrote: >> En Sat, 29 Sep 2007 17:34:34 -0300, Jim <[EMAIL PROTECTED]> >> escribi?: >> >> > I want to schedule a Python program that reads the command line for >>

Re: Command-line does work when scheduled

2007-09-29 Thread Jim
On Sep 29, 3:19 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Sat, 29 Sep 2007 17:34:34 -0300, Jim <[EMAIL PROTECTED]> escribi?: > > > I want to schedule a Python program that reads the command line for > > input. However, when adding an argument to the command line Python > > will not p

Re: Command-line does work when scheduled

2007-09-29 Thread Gabriel Genellina
En Sat, 29 Sep 2007 17:34:34 -0300, Jim <[EMAIL PROTECTED]> escribi�: > I want to schedule a Python program that reads the command line for > input. However, when adding an argument to the command line Python > will not pick it up when using Windows scheduled tasks. > > How do I get it to work?

Re: Command-line option equiv of PYTHONPATH

2007-04-27 Thread Martin v. Löwis
>> Why not just modify sys.path within the actual script? > > Maybe because he has multiple versions of modules he wants to test his > script against. See the original post: 'I can use it as "#!/usr/bin/perl -I"' so clearly his intention is modify the script. Martin -- http://mail.python.org/m

Re: Command-line option equiv of PYTHONPATH

2007-04-27 Thread Harry George
Antoon Pardon <[EMAIL PROTECTED]> writes: > On 2007-04-27, James Stroud <[EMAIL PROTECTED]> wrote: > > Rajesh wrote: > >> Hi, > >> > >> The '-I' option adds the path to the list of directories that > >> contains modules that can be included in a script. I can use it as "#!/ > >> usr/bin/perl -I"

Re: Command-line option equiv of PYTHONPATH

2007-04-27 Thread Antoon Pardon
On 2007-04-27, James Stroud <[EMAIL PROTECTED]> wrote: > Rajesh wrote: >> Hi, >> >> The '-I' option adds the path to the list of directories that >> contains modules that can be included in a script. I can use it as "#!/ >> usr/bin/perl -I" thereby not asking the user of >> the script to set the

Re: Command-line option equiv of PYTHONPATH

2007-04-26 Thread Martin v. Löwis
> The '-I' option adds the path to the list of directories that > contains modules that can be included in a script. I can use it as "#!/ > usr/bin/perl -I" thereby not asking the user of > the script to set the in their environment. > > Is there any equivalent command-line option to the python b

Re: Command-line option equiv of PYTHONPATH

2007-04-26 Thread James Stroud
Rajesh wrote: > Hi, > > The '-I' option adds the path to the list of directories that > contains modules that can be included in a script. I can use it as "#!/ > usr/bin/perl -I" thereby not asking the user of > the script to set the in their environment. > > Is there any equivalent command-line

Re: command line arguments using subprocess

2007-03-15 Thread Gabriel Genellina
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 th

Re: Command line prompt broken on XP with Python 2.5 - help!

2007-02-16 Thread Endless Story
On Feb 16, 11:51 am, "Endless Story" <[EMAIL PROTECTED]> wrote: > I did add c:/cywgin to the path, don't remember why now. Having looked at the Cygwin user manual, I think I probably did this as the result of misunderstanding the installation process. A PATH variable is needed, but it can go into

Re: Command line prompt broken on XP with Python 2.5 - help!

2007-02-16 Thread Endless Story
On Feb 16, 11:51 am, "Endless Story" <[EMAIL PROTECTED]> wrote: > On Feb 16, 11:34 am, Steve Holden <[EMAIL PROTECTED]> wrote: > > > It sounds like you may have mistakenly added Cygwin binary directories > > to your Windows path. This isn't normally necessary, since the Cygwin > > shell makes all n

Re: Command line prompt broken on XP with Python 2.5 - help!

2007-02-16 Thread Endless Story
On Feb 16, 11:34 am, Steve Holden <[EMAIL PROTECTED]> wrote: > It sounds like you may have mistakenly added Cygwin binary directories > to your Windows path. This isn't normally necessary, since the Cygwin > shell makes all necessary path adjustments as it starts. I did add c:/cywgin to the path,

Re: Command line prompt broken on XP with Python 2.5 - help!

2007-02-16 Thread Endless Story
On Feb 16, 11:34 am, Steve Holden <[EMAIL PROTECTED]> wrote: > Endless Story wrote: > > On Feb 16, 10:29 am, Tim Golden <[EMAIL PROTECTED]> wrote: > >> I would ask if you had *any* other Python installation > >> -- say a cygwin one -- which might just be getting in the way? > > > It's a cygwin prob

Re: Command line prompt broken on XP with Python 2.5 - help!

2007-02-16 Thread Steve Holden
Endless Story wrote: > On Feb 16, 10:29 am, Tim Golden <[EMAIL PROTECTED]> wrote: >> I would ask if you had *any* other Python installation >> -- say a cygwin one -- which might just be getting in the way? > > It's a cygwin problem, guddammit. I was wondering if this might be the > case - I should

Re: Command line prompt broken on XP with Python 2.5 - help!

2007-02-16 Thread Endless Story
On Feb 16, 10:29 am, Tim Golden <[EMAIL PROTECTED]> wrote: > I would ask if you had *any* other Python installation > -- say a cygwin one -- which might just be getting in the way? It's a cygwin problem, guddammit. I was wondering if this might be the case - I should have mentioned in my initial p

Re: Command line prompt broken on XP with Python 2.5 - help!

2007-02-16 Thread Tim Golden
Endless Story wrote: > On Feb 16, 9:56 am, "Jim" <[EMAIL PROTECTED]> wrote: >> On Feb 16, 5:52 am, "Endless Story" <[EMAIL PROTECTED]> wrote: >> Are you talking about the Environment Variables-->System Variable-->path? >> You may want to right click on My Computer-->System Properties-->Advanced-->

Re: Command line prompt broken on XP with Python 2.5 - help!

2007-02-16 Thread Endless Story
On Feb 16, 9:56 am, "Jim" <[EMAIL PROTECTED]> wrote: > On Feb 16, 5:52 am, "Endless Story" <[EMAIL PROTECTED]> wrote: > Are you talking about the Environment Variables-->System Variable-->path? > You may want to right click on My Computer-->System Properties-->Advanced--> > Environment Variables-->

Re: Command line prompt broken on XP with Python 2.5 - help!

2007-02-16 Thread Jim
On Feb 16, 5:52 am, "Endless Story" <[EMAIL PROTECTED]> wrote: > My last version of Python was 2.4, running smoothly on XP with path c: > \Python24 - no need even to include this path in PATH; everything > worked as it's supposed to at the command line. > > Just installed Python 2.5, after uninstal

Re: Command line arguments on Vista

2007-01-16 Thread jmike
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

Re: Command line arguments on Vista

2007-01-13 Thread Gabriel Genellina
"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 V

Re: Command line arguments on Vista

2007-01-12 Thread Duncan Booth
[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 Pyth

Re: Command line arguments on Vista

2007-01-12 Thread 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

Re: Command line arguments on Vista

2007-01-12 Thread jmike
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 -- http://mail.pytho

Re: Command line option -Q (floor division)

2006-03-29 Thread Georg Brandl
Christoph Zwerschke wrote: > Just for the records, Anthony Baxter explained that this is by intent, > because it would be still too disruptive a change. The testsuite does > not even run completely with -Qnew yet. Now it does, thanks for the nudge. ;) > So it will be probably only changed with

Re: Command line option -Q (floor division)

2006-03-28 Thread Christoph Zwerschke
Just for the records, Anthony Baxter explained that this is by intent, because it would be still too disruptive a change. The testsuite does not even run completely with -Qnew yet. So it will be probably only changed with Python 3.0. -- Christoph -- http://mail.python.org/mailman/listinfo/pyth

Re: Command line arguments question (Windows XP)

2006-03-21 Thread [EMAIL PROTECTED]
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

Re: Command line arguments question (Windows XP)

2006-03-21 Thread Ross Ridge
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

Re: Command line arguments question (Windows XP)

2006-03-21 Thread [EMAIL PROTECTED]
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',

RE: Command line arguments question (Windows XP)

2006-03-21 Thread Tim Golden
[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 associ

Re: Command line

2005-11-21 Thread Bengt Richter
On Mon, 21 Nov 2005 19:39:42 -0500, Peter Hansen <[EMAIL PROTECTED]> wrote: >amfr wrote: >> Thanks for your help. Another question, is there an built in md5/sha1 >> function in python? > >Yes. > >Although it's a long list, it is worthwhile as a newbie for one to >peruse the list of standard modu

Re: Command line

2005-11-21 Thread Peter Hansen
amfr wrote: > Thanks for your help. Another question, is there an built in md5/sha1 > function in python? Yes. Although it's a long list, it is worthwhile as a newbie for one to peruse the list of standard modules from time to time, until you gain a familiarity with what is there. http://docs

Re: Command line

2005-11-21 Thread amfr
Thanks for your help. Another question, is there an built in md5/sha1 function in python? -- http://mail.python.org/mailman/listinfo/python-list

Re: Command line

2005-11-21 Thread Bengt Richter
On 20 Nov 2005 12:00:02 -0800, "amfr" <[EMAIL PROTECTED]> wrote: >Hoe would I call something on the command line from python, e.g. "ls >-la"? > Depends on how much control you want over where the output goes. If you want the result as a multi-line string formatted the way the system utility (ls he

Re: Command line

2005-11-21 Thread amfr
What I am trying to do is call perl on the command line. Also, do any of these functions return the data recievved from the command? -- http://mail.python.org/mailman/listinfo/python-list

Re: Command line

2005-11-20 Thread Fredrik Lundh
"amfr" wrote: > Hoe would I call something on the command line from python, e.g. "ls > -la"? os.system(cmd), or some relative: http://docs.python.org/lib/os-process.html http://docs.python.org/lib/os-newstreams.html#os-newstreams or http://docs.python.org/lib/module-subprocess.html

Re: Command line

2005-11-20 Thread Diez B. Roggisch
amfr wrote: > Hoe would I call something on the command line from python, e.g. "ls > -la"? Use the module subprocess - otherwise maybe popen2 or os. Regards, Diez -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >