ob. I know that curl has this
capability, but I'll learn something by tinkering with python code.
Thanks.
--
John Savage (my news address is not valid for email)
--
http://mail.python.org/mailman/listinfo/python-list
t I
>want to prevent from being displayed. Is there a way to prevent the
>output of x.exe from python?
To consign stdout to nul in MSDOS you can use os.system('x.exe>nul')
so that will probably work for windows, too. This works regardless
of x.exe or x.bat so should do
>
>In this example though, it will replace the 3 spaces no matter where
>they are at, not just in the beginning... still, it's probably more
>practical for most use cases.
You'd corner it with:
if x.startswith(' '*3): x=x.replace(
hat
could have upset python. Any ideas on a fix?
I'm giving it 620k of conventional memory to play with.
--
John Savage (my news address is not valid for email)
--
http://mail.python.org/mailman/listinfo/python-list
Sebastian Busch <[EMAIL PROTECTED]> writes:
>The task is:
>
>"Remove the first two lines that don't begin with "@" from a file."
>
>How would you do it with sed?
Why a sed solution in a python group?
sed '/^@/!{G;/\n\n\n/{P;d;};s/[^\n]*//;h;d
ituting N bytes
with another N bytes, exactly.
--
John Savage (my news address is not valid for email)
--
http://mail.python.org/mailman/listinfo/python-list
dge of the screen--maybe
it's the text wrapping that causes the seg fault.
--
John Savage (my news address is not valid for email)
--
http://mail.python.org/mailman/listinfo/python-list
>
>which is pretty straight-forward.
While it looks neat, it will not work when /abc/ matches line 1.
Non-standard versions of sed, e.g., GNU, allow you to use 0,/abc/
to neatly step around this nuisance; but for standard sed you'll
need a more complicated sed script.
--
John Savage
hly 10% of its characters as a question mark,
whereas when I give Python's yenc.encode a binary music file and
view its output using 'more', it displays about 90% of the output
as a question mark.
Any ideas?
--
John Savage(my news address is not valid for email)
--
http://mail.python.org/mailman/listinfo/python-list
cation that couldn't more efficiently be done by other means?
Naive but curious minds wish to know!
--
John Savage (my news address is not valid for email)
--
http://mail.python.org/mailman/listinfo/python-list
ogram with keyboard interrupt-ability?
Endless loops arise when I forget to increment a loop index, or code
incorrectly the end condition test, or indent wrongly, etc.
--
John Savage (my news address is not valid for email)
--
http://mail.python.org/mailman/listinfo/python-list
11 matches
Mail list logo