Dan Halligan <[EMAIL PROTECTED]> writes:
> How would I pass a control character to python on the command line?
It depends on which command line you are using. Most Unix-like shells
will allow you to input a control character by preceding it with ^V.
Since \t is the TAB character, you should be a
Thanks for all the responses!
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 19 Aug 2008 05:35:27 -0700, wannymahoots wrote:
> optparse seems to be escaping control characters that I pass as
> arguments on the command line. Is this a bug? Am I missing something?
> Can this be prevented, or worked around?
You are misinterpreting the evidence. Here's the short ex
On Aug 19, 10:35 pm, [EMAIL PROTECTED] wrote:
> optparse seems to be escaping control characters that I pass as
> arguments on the command line. Is this a bug? Am I missing
> something? Can this be prevented, or worked around?
>
> This behaviour doesn't occur with non-control characters.
>
> For
On Aug 19, 1:45 pm, Hrvoje Niksic <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] writes:
> > optparse seems to be escaping control characters that I pass as
> > arguments on the command line. Is this a bug? Am I missing
> > something? Can this be prevented, or worked around?
>
> It has nothing t
[EMAIL PROTECTED] wrote:
optparse seems to be escaping control characters that I pass as
arguments on the command line. Is this a bug? Am I missing
something?
you're missing the distinction between the content of a string object,
and how the corresponding string literal looks.
>>> x = {'d
[EMAIL PROTECTED] writes:
> optparse seems to be escaping control characters that I pass as
> arguments on the command line. Is this a bug? Am I missing
> something? Can this be prevented, or worked around?
It has nothing to do with optparse, it's how Python prints strings:
$ python -c 'impor
optparse seems to be escaping control characters that I pass as
arguments on the command line. Is this a bug? Am I missing
something? Can this be prevented, or worked around?
This behaviour doesn't occur with non-control characters.
For example, if this program (called test.py):
from optparse