Andy Leszczynski writes:
> I have got following program:
>
> import sys
> import binascii
> from string import *
> sys.stdout.write(binascii.unhexlify("41410A4141"))
>
>
> when I run under Unix I got:
>
> $ python u.py > u.bin
> $ od -t x1 u.bin
> 000 41 41 0a 41 41
>
> and under Windows/Cygwi
black wrote:
> anyone could figure me out ?
No, I suspect people would have to be a trained
psychologist to figure you out.
*wink*
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
Timothy Smith wrote:
>>> i have NO idea what in there could be making it have such a strange
>>> error. it just says "error" when you try run it. there nothing terribly
>>> strange being done.
> i am still coming across this error it's driving me nuts. usually i can
> find what's wrong, but it i
Mike Meyer wrote:
> It's not normal to write binary content to stdout - you normally write
Well, I grew up in the Unix world and it is normal over there.
I am still curious which layer adds that 0xd. Is it python, cygwin,
windows ...
Thx for reply, Andy
--
http://mail.python.org/mailman/listin
Steve Holden wrote:
> Neal Becker wrote:
> >
> > Still curious about the answer. If I know that I am imported from __main__,
> > then I can do access X as sys.modules[__main__].X. In general, I don't
> > know how to determine who is importing me.
> >
> I don't think you can without huge amounts o
On 2005-10-12, black <[EMAIL PROTECTED]> wrote:
> i wrote some functions for copying and moving files caz' i didnt find
> concret functions within the doc. but i think these operations are
> simple and important so there may be some internal ones i didnt know.
http://www.google.com/search?hl=en&q
Take a look at PLY.
There is an example lexer in the download for parsing fortran.
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 2005-10-12 at 00:16 -0400, Mike Meyer wrote:
[...]
> It's not normal to write binary content to stdout - you normally write
> it to a file. Open the file with open(name, 'wb') to write binaries.
>
It is interesting that as a "Unix consultant" you should make that
claim. Especially since
Andy Leszczynski writes:
> Mike Meyer wrote:
>> It's not normal to write binary content to stdout - you normally write
>
> Well, I grew up in the Unix world and it is normal over there.
I watched the Unix world grow up, and it ain't normal to me. I don't
think I've ever written a program that wr
"Andrew Markebo" wrote:
>
> Hello!
>
> I am messing around with communicating between LabVIEW and Python, got
> it to work by a small 'fix' (grabbing the generated file, and
> importing it by hand)
>
> What I might want to do, is to automatically generate the data done by
> executing makepy.py and
Andy Leszczynski wrote:
> watch this:
> http://www.turbogears.org.nyud.net:8090/docs/wiki20/20MinuteWiki.mov
>
> or read this:
> http://www.turbogears.org.nyud.net:8090/docs/wiki2 0/page4.html
>
> should not it be:
>
> 2 def save(self, pagename, data, submit, new):
> 3 hub.begin()
> 4 if new == Tr
Mike Meyer wrote:
> I watched the Unix world grow up, and it ain't normal to me.
Since there's no distinction between a file opened in binary mode and in
text mode on Unix, there is no difference.
> I don't
> think I've ever written a program that wrote binary data to standard
> out, not in nea
Xah Lee wrote:
> Addendum, 200510
>
> Here's further example of Python's extreme low quality of
> documentation. In particular, what follows focuses on the bad writing
> skill aspect, and comments on some language design and quality issues
> of Python.
>
>>From the Official Python documentation o
Andy Leszczynski enlightened us with:
> should not it be:
>
> 2 def save(self, pagename, data, submit, new):
> 3 hub.begin()
> 4 if new == True:
> 5 page = Page(pagename=pagename, data=data)
> 6 else:
> 7 page = Page.byPagename(pagename)
> 8 page.data = data
>
> instead of:
>
> 4 if new
mr. xah... would you be willing to give a lecture at pycon 2006? i'm sure you
would draw a huge crowd and a lot of people would like to meet you in person...
thanks.
--
http://mail.python.org/mailman/listinfo/python-list
marduk <[EMAIL PROTECTED]> writes:
> On Wed, 2005-10-12 at 00:16 -0400, Mike Meyer wrote:
> [...]
>> It's not normal to write binary content to stdout - you normally write
>> it to a file. Open the file with open(name, 'wb') to write binaries.
>>
>
> It is interesting that as a "Unix consultant"
Erik Max Francis <[EMAIL PROTECTED]> writes:
> > I've written lots of things whose standard out was designed
> > specifically to be read by another program, but never as binary data.
>
> Plenty of applications use that functionality and depend on it. See
> cjpeg, djpeg, the pbmplus library, and s
Bryan wrote:
> mr. xah... would you be willing to give a lecture at pycon 2006? i'm
> sure you would draw a huge crowd and a lot of people would like to meet
> you in person...
>
> thanks.
>
I think that would be a highly un-pythonesque crowd. Python isn't much
in the sense of limitations, b
Is it an idea to include a new __filename__ predefined attribute to
2.5, so that __file__ contains the entire path to the module, and
__filename__ only the name of the module?
For instance it's useful to include a not-static reference to the
filename in a scripts usage() section and it's cumbersom
Andy Leszczynski wrote:
> when I run under Unix I got:
>
> $ python u.py > u.bin
> $ od -t x1 u.bin
> 000 41 41 0a 41 41
>
> and under Windows/Cygwin following:
>
> $ python u.py > u.bin
> $ od -t x1 u.bin
> 000 41 41 0d 0a 41 41
> 006
>
> The question is how can I pipe out binary cont
201 - 220 of 220 matches
Mail list logo