On Mon, Feb 13, 2012 at 3:16 PM, Arnaud Delobelle wrote:
>> Strangely it was working fine the other day. Then while debugging a
>> script it suddenly started do this and now does this for every script
>
> How were you debugging?
I think I may have been attempting to use pipes to redirect stdin
an
On 13 February 2012 19:50, waylan wrote:
> When I try running any Python Script on the command line with Python
> 3.2 I get this weird behavior. The cursor dances around the command
> line window and nothing ever happens. Pressing Ctr+C does nothing.
> When I close the window (mouse click on X in
When I try running any Python Script on the command line with Python
3.2 I get this weird behavior. The cursor dances around the command
line window and nothing ever happens. Pressing Ctr+C does nothing.
When I close the window (mouse click on X in top right corner), an
error dialog appears asking
On Jul 16, 2:14 pm, alex23 wrote:
...
> AND
> you're citing back what I myself wrote in the link to which I also
> referred the OP - whom (sic) has subsequently posted his success with this
> technique - so I'm not really sure what the point is here other than
> "if you have a different use case
On Jul 16, 12:56 pm, Asun Friere wrote:
> As you note there, this will work when running the vanilla shell (ie
> running it from the command line), but not (potentially) in other
> interactive environments (IronPython being the example you give).
Actually, that was IPython, which is an enhanced
On Jul 16, 10:47 am, alex23 wrote:
...
> This older post should
> help:http://groups.google.com/group/comp.lang.python/browse_frm/thread/6c5...
>
> But the quick answer is to import sys into your program, and do a test
> on hasattr(sys, 'ps1'), which is only created when running the
> interacti
On Wed, 15 Jul 2009 19:07:18 -0500, pdlem...@earthlink.net wrote:
>The WConio console module produces different colors, sometimes quite
>different, when run from Windows command line vs from Python
>interpreter >>> . A good foregnd/backgnd combination under one
>may be unrea
On Jul 16, 10:07 am, pdlem...@earthlink.net wrote:
> The WConio console module produces different colors, sometimes quite
> different, when run from Windows command line vs from Python
> interpreter >>> . A good foregnd/backgnd combination under one
> may be unreadable under
On Jul 16, 10:41 am, alex23 wrote:
> It's recommended that you search through the list for similar
> questions before posting.
Of course, it's even MORE important that one actually ensures they're
responding to the _same_ question before pointing at an answer...
This older post should help:
http
The WConio console module produces different colors, sometimes quite
different, when run from Windows command line vs from Python
interpreter >>> . A good foregnd/backgnd combination under one
may be unreadable under the other : (
I'm using Python 3.0 with the corresponding WC
En Wed, 08 Jul 2009 14:23:54 -0300, Emile van Sebille
escribió:
On 7/8/2009 10:07 AM Lucas Junqueira said...
Hi, I'd like to run a simple windows command-line program from within
my python script and agt all the returt it generates. Is this possible?
How can I do it?
Dependi
On 7/8/2009 10:07 AM Lucas Junqueira said...
Hi, I'd like to run a simple windows command-line program from within my
python script and agt all the returt it generates. Is this possible? How
can I do it?
Depending on python version, look into subprocess, commands or os.pipe
and re
Hi, I'd like to run a simple windows command-line program from within my python
script and agt all the returt it generates. Is this possible? How can I do it?
Thank you!
Veja quais são os assunt
I think I found the problem. I recently removed Python 2.5 and
replaced it with 2.6. When I got in, I tried to run some django
commands and even they weren't producing output. On a hunch, I tried
to uninstall 2.6 and reinstall it, since now even django wasn't
producing output. When I tried, it told
On Mar 31, 9:57 am, JonathanB wrote:
> On Mar 30, 6:28 pm, John Machin wrote:
>
> > On Mar 31, 8:37 am, Irmen de Jong wrote:
> > > Does just typing:
>
> > > python
>
> Yes, just typing python takes me to my interactive prompt
>
> > > Or do you have a module in your E:\Python\dev directory cal
On Mar 31, 11:42 am, Terry Reedy wrote:
> JonathanB wrote:
> > Ok, I'm sure this is really simple, but I cannot for the life of me
> > get any print statements from any of my python scripts to actually
> > print when I call them from the windows command line.
JonathanB wrote:
Ok, I'm sure this is really simple, but I cannot for the life of me
get any print statements from any of my python scripts to actually
print when I call them from the windows command line. What am I doing
wrong?
hello.py:
print "Hello World!"
command line:
E:\Py
#This is pyFind, a python replacement for find(1)
import os, sys, re, fnmatch
from os.path import join
from optparse import OptionParser
usage = "usage: %prog --name [directory1 directory2]"
parser = OptionParser(usage=usage)
parser.add_option("--regex", dest="regex",
help="REGEX MATCHING DOES NO
On Mar 30, 6:28 pm, John Machin wrote:
> On Mar 31, 8:37 am, Irmen de Jong wrote:
> > Does just typing:
>
> > python
Yes, just typing python takes me to my interactive prompt
> > Or do you have a module in your E:\Python\dev directory called 'os', 'sys'
> > or something
> > else that may cl
On Mar 31, 8:37 am, Irmen de Jong wrote:
> JonathanB wrote:
> > Ok, I'm sure this is really simple, but I cannot for the life of me
> > get any print statements from any of my python scripts to actually
> > print when I call them from the windows command line.
JonathanB wrote:
Ok, I'm sure this is really simple, but I cannot for the life of me
get any print statements from any of my python scripts to actually
print when I call them from the windows command line. What am I doing
wrong?
hello.py:
print "Hello World!"
command line:
E:\Py
Ok, I'm sure this is really simple, but I cannot for the life of me
get any print statements from any of my python scripts to actually
print when I call them from the windows command line. What am I doing
wrong?
hello.py:
print "Hello World!"
command line:
E:\Python\dev>
Ernesto wrote:
> I'm looking for a way to capture command line output from a cmd
> session. Is there a way to use python to launch the application from
> the beggining then stream all of the output to a text file ?
Nevermind. This is a telnet question. I'm trying to get telnet
localhost
I'm looking for a way to capture command line output from a cmd
session. Is there a way to use python to launch the application from
the beggining then stream all of the output to a text file ?
--
http://mail.python.org/mailman/listinfo/python-list
Python 2.3 on Windows XP
The following works when run from the command line.
import sys
text = sys.stdin.read()
# do something on the text
# ...
sys.stdout.write(text)
But if the above code is used as a filter program that gets another programs
output as shown below, it fails as shown.
Here's an example...
BEGIN TEST.PY
import sys
print "Original:", sys.argv
for arg in sys.argv:
arg = arg.strip('-\x93\x96') # add chars here you want to strip
print "Stripped:", arg
END TEST.PY
--
http://mail.python.org/mailman/listinfo/python-list
considering that all the command lines are in sys.argv, it's very
simple.
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> I think the lesson there is 'dont depend on getopt, write your own
> command line parser'. I always write my own, as it's so easy to do.
>
I suppose you built your own car so you could get out a bit, too? After
all, there's nothing tricky about a simple internal combust
[EMAIL PROTECTED] wrote:
> I think the lesson there is 'dont depend on getopt, write your own
> command line parser'. I always write my own, as it's so easy to do.
While I'll agree that getopt isn't ideal, I find optparse to be much better.
--
Benji York
--
http://mail.python.org/mailman/listinf
I think the lesson there is 'dont depend on getopt, write your own
command line parser'. I always write my own, as it's so easy to do.
--
http://mail.python.org/mailman/listinfo/python-list
MarkE wrote:
> The answer appears to be:
> An example command line for running the script was written in a word
> document. The "Autocorrect" (sic) feature in word replaces a normal
> dash
There is a lesson there I wish more people would learn: Word is not a
text editor. :)
--
Benji York
--
h
This was discovered after consultation with a colleague who shall
remain nameless but, well, nailed it basically.
The answer appears to be:
An example command line for running the script was written in a word
document. The "Autocorrect" (sic) feature in word replaces a normal
dash at least as I kno
I'm using getopt. I doubt getopt recognises \x96 as a command line
parameter prefix. I suppose I could iterate over sys.argv doing a
replace but that seems messy. I'd rather understand the problem.
That said, and me not understanding code pages that much, I chcp'd the
machines it works on both com
does it matter? Have it key off both "\x96" and "-".
--
http://mail.python.org/mailman/listinfo/python-list
I don't exactly know what is going on, but '\x96' is the encoding for
u'\N{en dash}' (a character that looks like the ASCII dash,
u'\N{hyphen-minus}', u'\x45') in the following windows code pages:
cp1250 cp1251 cp1252 cp1253 cp1254
cp1255 cp1256 cp1257 cp1258 cp874
Windows is clearly doing
I'm sure someone else has posted a similar problem but I can't find it,
nor the solution...
I have a python script which accepts a command line argument.
E.g.
python.exe myscript.py -n Foo
I build this as part of a package using distutils with the
bdist_wininst option on a Windows 2K (SP4) machin
36 matches
Mail list logo