Re: SocketServer and a Java applet listener

2005-08-28 Thread google
Steve Horsley schreef: > [EMAIL PROTECTED] wrote: > > Dear newsgroup, > > > > I give up, I must be overseeing something terribly trivial, but I can't > > get a simple (Java) applet to react to incoming (python) SocketServer > > messages. > > > > Without boring you with the details of my code (on

Re: trictionary?

2005-08-28 Thread Scott David Daniels
Randy Bush wrote: >... i could be a bit more obscure and do > if week in bin: > bin[week][not full] += 1 > else: > bin[week] = [ full, not full ] If you cannot take the setdefault advice, at least do: try: bin[week][not full] += 1 except KeyError:

Re: trictionary?

2005-08-28 Thread Adam Tomjack
I'd write it like this: bin = {} for start, end, AS, full in heard: week = int((start-startDate)/aWeek) counters = bin.setdefault(week, [0, 0]) if full: counters[0] += 1 else: counters[1] += 1 for week, (times_full, times_not_full) in bi

Re: Embedding Python in other programs

2005-08-28 Thread Ravi Teja
Greg, I don't recall touching VB6 in 4 years. From whatever I remember, you are trying to do early binding (trying to find a registered type library). You need to do late binding instead (use CreateObject) to dynamically instantiate the COM object. Ravi Teja. -- http://mail.python.org/mailman/

Re: Release of PyPy 0.7.0

2005-08-28 Thread Terry Reedy
"Michael Sparks" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > (Factor of ~450 though is pretty d*^%n cool though :) I think the ratio was 10 or 100 times higher when first measureable. I have long expected success but am still impressed. TJR -- http://mail.python.org/mail

Re: Embedding Python in other programs

2005-08-28 Thread Gregory Piñero
Guys, I am so lost. I followed the instructions exactly at http://www.python.org/windows/win32com/QuickStartServerCom.html But then when I opened up Visual Basic 6 and went to project>references, It is not listing anything like the helloworld com thingy I just registered? What do I need to do t

Re: overload builtin operator

2005-08-28 Thread Terry Reedy
I suspect that PyPy, when further alone, will make it easier to do things like develop a customized interpreter that has alternate definitions for builtin operators. So maybe the OP should ask again in a year or two. TJR -- http://mail.python.org/mailman/listinfo/python-list

Re: trictionary?

2005-08-28 Thread Randy Bush
>> bin = {} >> for whatever: >>for [a, b] in foo: >>x = 42 - a >>if bin.has_key(x): >> bin[x.b] += 1 >>else: >> bin[x.b] = 1 >> bin[x.not b] = 0 >> for x, y, z in bin.iteritems(): >>print x, y, z >> >> should the dic

Re: trictionary?

2005-08-28 Thread Roy Smith
Steven Bethard <[EMAIL PROTECTED]> wrote: > In Python, pairs are usually handled with tuples[2], but tuples would be > inconvenient in this case, since the first value must be modified. Instead of modifying the tuple (which you can't do), you can create a new one: a, b = myDict[key] myDict[key]

Re: trictionary?

2005-08-28 Thread [EMAIL PROTECTED]
Steven Bethard wrote: > Adam Tomjack wrote: > > Steven Bethard wrote: > > ... > >> Using a two element list to store a pair of counts has a bad code > >> smell to me. > > ... > > > > Why is that? > > Note that "code smell"[1] doesn't mean that something is actually wrong, > just that it might be.

Re: formal math ?

2005-08-28 Thread mehdi . rabah
Thanks you two. I was just thinking if it was possible. If I really want to do this, maybe the best way is to do an interface to python of an open source project I have just discovered : maxima. So long, -- http://mail.python.org/mailman/listinfo/python-list

Re: Lossless Number Conversion

2005-08-28 Thread [EMAIL PROTECTED]
Chris Spencer wrote: > Is there any library for Python that implements a kind of universal > number object. Something that, if you divide two integers, generates a > ratio instead of a float, or if you take the square root of a negative, > generates a complex number instead of raising an exception

Re: trictionary?

2005-08-28 Thread Steven Bethard
Adam Tomjack wrote: > Steven Bethard wrote: > ... >> Using a two element list to store a pair of counts has a bad code >> smell to me. > ... > > Why is that? Note that "code smell"[1] doesn't mean that something is actually wrong, just that it might be. In Python, pairs are usually handled wit

Re: trictionary?

2005-08-28 Thread Adam Tomjack
Steven Bethard wrote: ... > Using a two element list to store a pair of counts has > a bad code smell to me. ... Why is that? It strikes me as the cleanest way to solve that problem, as long as it's easy enough to figure out what each element really represents. You could name each element, bu

Re: global interpreter lock

2005-08-28 Thread Mike Meyer
Bryan Olson <[EMAIL PROTECTED]> writes: phil hunt wrote: > > What's important is *predictability*, e.g. which instruction will > > the computer execute next? > > > > If you only have one thread, you can tell by looking at the code > > what gets executed next. It's very simple. > Not really. Tr

Re: Question

2005-08-28 Thread Adam Tomjack
Double clicking python.exe will give you the command line version. To run IDLE, click Start -> Programs -> Python 2.x -> IDLE. pythonw.exe is useful for running GUI scripts. In Windows there are two types of programs: command line and gui programs. python.exe is the command line version. Su

Re: trictionary?

2005-08-28 Thread Steven Bethard
Randy Bush wrote: > now i want to add a second count column, kinda like > > bin = {} > for whatever: >for [a, b] in foo: > x = 42 - a > if bin.has_key(x): >bin[x.b] += 1 > else: >bin[x.b] = 1 >bin[x.not b] = 0 > for x,

Question

2005-08-28 Thread Beginner/Not Yet Programmer
I've never programmed before, so I thought I'd try and learn a bit by using some Python tutorials. I started using the tutorial at http://www.honors.montana.edu/~jjc/easytut/easytut/node3.html. It mentioned different forms of Python, specifically Command Line and IDLE. Being inexperienced, I'm n

Re: Dynamic image creation for the web...

2005-08-28 Thread Mike Meyer
Tompa <[EMAIL PROTECTED]> writes: >> The other thing you may need to check is the HTTP header of the >> generated image. > If possible I'd rather separate the HTTP/HTML-stuff from image creation. > I'd like to have an HTML file that refers to a py-file that creates images > which are returned som

Re: Writing portable applications

2005-08-28 Thread Mike Meyer
Ulrich Hobelmann <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: >>> I'd rather develop a native client for the machine that people >>> actually WANT to use, instead of forcing them to use that >>> little-fiddly web browser on a teeny tiny display. >> You missed the point: How are you going to prov

Re: trictionary?

2005-08-28 Thread Adam Tomjack
Oops, I found a bug in my previous code. If you say bin_item = bin.setdefault(x, [1, 0]) bin_item[0] += 1 then if x wasn't in bin, it'll get initialized to [1, 0], then incremented to [2, 0] in the first loop. The code you asked about would have produced [1, 0]. Instead, you can say:

Re: NooB Question

2005-08-28 Thread Sybren Stuvel
APCass enlightened us with: > How do you execute a .py in Linux with KDE? If I double click on my > program it opens Kwrite, for editing. Make it executable (properties, permissions, executable). Make sure it has #!/usr/bin/python as the first line. Sybren -- The problem with the world is stupi

Re: trictionary?

2005-08-28 Thread Adam Tomjack
Randy, I'd probably use a two element list. Instead of using an if/else to check if an element is in your dict and initialize it, you can use the setdefault() function. The docs for dictionaries explain it pretty well. bin = {} for whatever: for [a, b] in foo: x

trictionary?

2005-08-28 Thread Randy Bush
i have some code which looks kinda like bin = {} for whatever: for [a, b] in foo: x = 42 - a y = 42 - b if bin.has_key(x): bin[x] += 1 else: bin[x] = 1 for i, j in bin.iteritems(): print i, j now i want t

Re: Dynamic image creation for the web...

2005-08-28 Thread Benjamin Niemann
Tompa wrote: > Benjamin Niemann odahoda.de> writes: >> You are almost there. > I don't feel so... > >> Your create_image.py does not return anything to the >> browser yet. > Yes, I am aware of that but I do not what to return. > >> First return proper HTTP headers, e.g. >> >> sys.stdout.write(

Lossless Number Conversion

2005-08-28 Thread Chris Spencer
Is there any library for Python that implements a kind of universal number object. Something that, if you divide two integers, generates a ratio instead of a float, or if you take the square root of a negative, generates a complex number instead of raising an exception? Lisp has something like

using common lisp with python.

2005-08-28 Thread [EMAIL PROTECTED]
is there a way to embed common lisp programs in python? -- http://mail.python.org/mailman/listinfo/python-list

Re: aproximate a number

2005-08-28 Thread Michael Sparks
billiejoex wrote: > Hi all. I'd need to aproximate a given float number into the next (int) > bigger one. Because of my bad english I try to explain it with some > example: > > 5.7 --> 6 > 52.987 --> 53 > 3.34 --> 4 > 2.1 --> 3 What about 2.0? By your spec that should be rounded to 3 - is that w

Re: aproximate a number

2005-08-28 Thread billiejoex
Thank you. :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: overload builtin operator

2005-08-28 Thread Bengt Richter
On Sun, 28 Aug 2005 04:09:10 GMT, [EMAIL PROTECTED] (Bengt Richter) wrote: [... a response to the OP's apparent desire to "overload the divide operator" with a call to his safediv function ...] The part that rewrote the the AugAssign could only work for plain name Augassign targets, so I introd

Re: aproximate a number

2005-08-28 Thread Will McGugan
billiejoex wrote: > Hi all. I'd need to aproximate a given float number into the next (int) > bigger one. Because of my bad english I try to explain it with some example: > > 5.7 --> 6 > 52.987 --> 53 > 3.34 --> 4 > 2.1 --> 3 > Have a look at math.ceil >>> import math >>> math.ceil(5.7) 6.0

Re: aproximate a number

2005-08-28 Thread rafi
billiejoex wrote: > Hi all. I'd need to aproximate a given float number into the next (int) > bigger one. Because of my bad english I try to explain it with some example: > > 5.7 --> 6 > 52.987 --> 53 > 3.34 --> 4 > 2.1 --> 3 > > Regards > > math.ceil returns what you need but as a float, th

aproximate a number

2005-08-28 Thread billiejoex
Hi all. I'd need to aproximate a given float number into the next (int) bigger one. Because of my bad english I try to explain it with some example: 5.7 --> 6 52.987 --> 53 3.34 --> 4 2.1 --> 3 Regards -- http://mail.python.org/mailman/listinfo/python-list

Re: Bug in string.find; was: Re: Proposed PEP: New style indexing,was Re: Bug in slice type

2005-08-28 Thread Steve Holden
Bryan Olson wrote: > Steve Holden wrote: > > Paul Rubin wrote: > > We are arguing about trivialities here. Let's stop before it gets > > interesting :-) > > Some of us are looking beyond the trivia of what string.find() > should return, at an unfortunate interaction of Python features, > brough

Re: global interpreter lock

2005-08-28 Thread Bryan Olson
Piet van Oostrum wrote: >>Paul Rubin (PR) wrote: >>PR> Really, the essence of programming is to find ways of organizing the >>PR> program to stay reliable and maintainable in the face of that >>PR> combinatorial explosion. That means facing the problem and findin

Re: Bug in string.find

2005-08-28 Thread bearophileHUGS
I agree with Bryan Olson. I think it's a kind of bug, and it has to be fixed, like few other things. But I understand that this change can give little problems to the already written code... Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: python image thumbnail generator?

2005-08-28 Thread Terry Hancock
On Saturday 27 August 2005 09:06 pm, Chris Dewin wrote: > I'm thinking it would be nice and easy, if we could just upload a jpg into > a dir called "gallery/". When the client clicks the "gallery" link, a > cgi script could search the gallery/ dir, and create thumbnails of any > jpeg images that d

Re: py to exe: suggestions?

2005-08-28 Thread Ron Adam
chris patton wrote: > I need to convert a python file to an '.exe'. I've tried py2exe, and I > don't like it because you have to include that huge dll and libraries. > > Thanks for the Help!! Do you want to create an exe to give to others, or so that you can use it in windows easier just like a

Re: global interpreter lock

2005-08-28 Thread Bryan Olson
phil hunt wrote: > It's not the number of paths that's important. Absolutely right. Non-trivial software always has too many paths to consider them individually, so we have to reason generally. > What's important is *predictability*, e.g. which instruction will > the computer execute next? >

Re: Dynamic image creation for the web...

2005-08-28 Thread Tompa
Max Erickson gmail.com> writes: > > check out sparklines: > > http://bitworking.org/projects/sparklines/ > > It is a script very similar to what you want to do. This sure looks interesting! Strange that I couldn't find this when I googled for this kind of stuff... I will check it out - thanks

Re: Bug in string.find; was: Re: Proposed PEP: New style indexing,was Re: Bug in slice type

2005-08-28 Thread Bryan Olson
Steve Holden wrote: > Paul Rubin wrote: > We are arguing about trivialities here. Let's stop before it gets > interesting :-) Some of us are looking beyond the trivia of what string.find() should return, at an unfortunate interaction of Python features, brought on by the special-casing of negat

Re: Dynamic image creation for the web...

2005-08-28 Thread Tompa
Richard Lewis fastmail.co.uk> writes: > It would be useful to know what web server software you're using. I intended to add that info but forgot... I run IIS on W2K, python 2.4.1 and PIL 1.1.5. > The other thing you may need to check is the HTTP header of the > generated image. If possible I'd

Re: Yielding a chain of values

2005-08-28 Thread Peter Hansen
Talin wrote: > I'm finding that a lot of places within my code, I want to return the > output of a generator from another generator. Currently the only method > I know of to do this is to explicitly loop over the results from the > inner generator, and yield each one: > >for x in inner(

Re: Dynamic image creation for the web...

2005-08-28 Thread Tompa
Benjamin Niemann odahoda.de> writes: > You are almost there. I don't feel so... > Your create_image.py does not return anything to the > browser yet. Yes, I am aware of that but I do not what to return. > First return proper HTTP headers, e.g. > > sys.stdout.write('Status: 200 OK\r\n') > sys.s

Re: python image thumbnail generator?

2005-08-28 Thread Wouter van Ooijen (www.voti.nl)
>I'm thinking it would be nice and easy, if we could just upload a jpg into >a dir called "gallery/". When the client clicks the "gallery" link, a >cgi script could search the gallery/ dir, and create thumbnails of any >jpeg images that don't already have a thumbnail associated with them. The >scr

Re: Doubt C and Python

2005-08-28 Thread Wouter van Ooijen (www.voti.nl)
>> I use Python when my time is most valuable (in most cases it is), in >> the very few cases the computer's time is more valuable I write in >> C/C++. > >In cases when the computer's time is more valuable, why not use CPython >with C/C++ API? Only most time consuming parts can be replaced to C/C+

Re: ideas for university project ??

2005-08-28 Thread Ken Starks
Jon Hewer wrote: > Hi > > I'm about to start my third, and final, year in computer science at > cambridge uni, and i need to come up with an idea for a software > project, but i'm really struggling for ideas, and i was wondering > whether anyone here had any suggestions. > > I'd say i'm probably

Re: Release of PyPy 0.7.0

2005-08-28 Thread Michael Sparks
Valentino Volonghi aka Dialtone wrote: > Michael Sparks <[EMAIL PROTECTED]> wrote: > >> Would it be useful for people to start trying out their modules/code to >> see if they work with this release, and whether they can likewise be >> translated using the C/LLVM backends, or would you say this is

Re: Release of PyPy 0.7.0

2005-08-28 Thread Erik Max Francis
Carl Friedrich Bolz wrote: > pypy-0.7.0: first PyPy-generated Python Implementations > == > > What was once just an idea between a few people discussing > on some nested mailing list thread and in a pub became reality ... > the PyPy deve

Re: What are new-style classes?

2005-08-28 Thread Reinhold Birkenfeld
Terry Hancock wrote: > On Sunday 28 August 2005 04:47 am, Vaibhav wrote: >> I recently heard about 'new-style classes'. I am very sorry if this >> sounds like a newbie question, but what are they? I checked the Python >> Manual but did not find anything conclusive. Could someone please >> enlighten

Re: What are new-style classes?

2005-08-28 Thread Terry Hancock
On Sunday 28 August 2005 04:47 am, Vaibhav wrote: > I recently heard about 'new-style classes'. I am very sorry if this > sounds like a newbie question, but what are they? I checked the Python > Manual but did not find anything conclusive. Could someone please > enlighten me? Thanks! "New style" c

Re: Socket Troubles

2005-08-28 Thread Chris Spencer
Michael Sparks wrote: > Chris Spencer wrote: > > At one point in your code you do this: > self._socket.setblocking(0) > > This says "if we can't recieve or send data without blocking, fail rather > than succeed". One of the failure modes is to return error 11. This is > infact normally

Re: Release of PyPy 0.7.0

2005-08-28 Thread Valentino Volonghi aka Dialtone
Michael Sparks <[EMAIL PROTECTED]> wrote: > Would it be useful for people to start trying out their modules/code to see > if they work with this release, and whether they can likewise be translated > using the C/LLVM backends, or would you say this is too early? (I'm more > thinking in terms of it

Re: Embedding Python in other programs

2005-08-28 Thread Gregory Piñero
Thanks Ravi, I'll take a look On 27 Aug 2005 22:55:40 -0700, Ravi Teja <[EMAIL PROTECTED]> wrote: > http://www.python.org/windows/win32com/QuickStartServerCom.html > > If you are using ActivePython, that tutorial is included (PyWin32 > documentation -> Python COM -> Overviews) along with the nee

Yielding a chain of values

2005-08-28 Thread Talin
I'm finding that a lot of places within my code, I want to return the output of a generator from another generator. Currently the only method I know of to do this is to explicitly loop over the results from the inner generator, and yield each one: for x in inner(): yield x

RE:Returned mail: see transcript for details

2005-08-28 Thread MAILsweeper
Please be aware that a message to the following recipient(s) has been blocked because it was identified as containing a virus, and your address was specified as the sender: [EMAIL PROTECTED] This does not necessarily mean that you were the sender, as your address could have been chosen at ran

Re: formal math ?

2005-08-28 Thread William Park
[EMAIL PROTECTED] wrote: > Hi, > > I have just discovered python and it seems so easy ans so powerful to > me that it remind me matlab or maple programming language (sorry free > software purists ears). > > So I was wondering if there a sort of formal math library, that can do > a thing like: >

Re: Release of PyPy 0.7.0

2005-08-28 Thread Michael Sparks
Carl Friedrich Bolz wrote: [[... great news ...]] Would it be useful for people to start trying out their modules/code to see if they work with this release, and whether they can likewise be translated using the C/LLVM backends, or would you say this is too early? (I'm more thinking in terms of it

Re: close failed: [Errno 0] No error goes to stdout

2005-08-28 Thread Peter Hansen
Yoav wrote: > I use the following code to the console output: > > def get_console(cmd): > try: > p_in, p_out, p_err = os.popen3(cmd) > except: > pass > out_str = '' > for obj in p_out: > out_str = out_str + obj >

Re: py to exe: suggestions?

2005-08-28 Thread Bugs
If your users already have Python installed then you could just create a self-extracting, self-executing .exe that contains only your scripts and necessary files. I belive many of the popular zip utilities have the ability to do this. The free info-zip does this as well: http://www.info-zip.o

Re: Release of PyPy 0.7.0

2005-08-28 Thread Simon Percivall
That's great! Congratulations! -- http://mail.python.org/mailman/listinfo/python-list

Re: Socket Troubles

2005-08-28 Thread Michael Sparks
Chris Spencer wrote: > My code's ... at http://deadbeefbabe.org/paste/1525/0 ... > I've written a simple class to manage P2P socket connections. However, > whenever I try to receive data, the socket raises an exception with the > error message (11, 'Resource temporarily unavailable'). At one poin

NooB Question

2005-08-28 Thread APCass
How do you execute a .py in Linux with KDE? If I double click on my program it opens Kwrite, for editing. -- http://mail.python.org/mailman/listinfo/python-list

Release of PyPy 0.7.0

2005-08-28 Thread Carl Friedrich Bolz
pypy-0.7.0: first PyPy-generated Python Implementations == What was once just an idea between a few people discussing on some nested mailing list thread and in a pub became reality ... the PyPy development team is happy to announce its fi

close failed: [Errno 0] No error goes to stdout

2005-08-28 Thread Yoav
I use the following code to the console output: def get_console(cmd): try: p_in, p_out, p_err = os.popen3(cmd) except: pass out_str = '' for obj in p_out: out_str = out_str + obj for obj in p_err:

NASFiC?

2005-08-28 Thread Aahz
Anyone gonna be at NASFiC next weekend? Want a get-together? (NASFiC is a science fiction convention that will be in Seattle this time; for more info, see http://nasfic.org/) -- Aahz ([EMAIL PROTECTED]) <*> http://www.pythoncraft.com/ The way to build large Python applications

Re: What are new-style classes?

2005-08-28 Thread Steve Holden
Vaibhav wrote: > I recently heard about 'new-style classes'. I am very sorry if this > sounds like a newbie question, but what are they? I checked the Python > Manual but did not find anything conclusive. Could someone please > enlighten me? Thanks! > Older Pythons have a dichotomy between program

Re: Dynamic image creation for the web...

2005-08-28 Thread Max Erickson
Tompa <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Hi, > > I would like to create images on the fly as a response to an http > request. I can do this with PIL like this (file create_gif.py): > from PIL import Image, ImageDraw > check out sparklines: http://bitworking.org/projects/sp

Re: Converting from Microsoft Binary Format floats to Python Float

2005-08-28 Thread geskerrett
Well, thank-you again. It's a bit embarassing, but you are correct ... It was a typo on in the sample data. A bit frustrated with myself as I checked, and double checked, but I guess became a bit blinded to the problem. Sorry to waste your time, and appreciate your assistance and patience. Geoff

Re: Dynamic image creation for the web...

2005-08-28 Thread Benjamin Niemann
Tompa wrote: > Hi, > > I would like to create images on the fly as a response to an http request. > I can do this with PIL like this (file create_gif.py): > from PIL import Image, ImageDraw > > print 'Status: 200 OK' > print 'Content-type: text/html' > print > print 'Python Dynamic Image Creatio

Re: Cygwin font problems

2005-08-28 Thread Jason Tishler
Steve, On Sat, Aug 27, 2005 at 11:43:23PM -0400, Steve Holden wrote: > Cygwin runs Python 2.4.1, Windows runs 2.4. Any light on this mystery > gratefully received. You may get better traction on the Cygwin mailing list. I recommend trying there. Jason -- PGP/GPG Key: http://www.tishler.net/ja

Re: Doubt C and Python

2005-08-28 Thread James Kim
Wouter van Ooijen (www.voti.nl) wrote: > I use Python when my time is most valuable (in most cases it is), in > the very few cases the computer's time is more valuable I write in > C/C++. In cases when the computer's time is more valuable, why not use CPython with C/C++ API? Only most time consum

Re: Doubt C and Python

2005-08-28 Thread James Kim
Jeff Schwab wrote: > 5. Scripting is easier in Python than in Java, particularly with > regard to environment variables and process control. > > Of course, these are only my opinions. I am particularly not an expert > on Python or Java. Note that for Java experts, Jython can be used for in

Re: Modify a C++ instance from the embed python interpreter

2005-08-28 Thread Wezzy
Diez B. Roggisch <[EMAIL PROTECTED]> wrote: > Wezzy wrote: > > Hi, is there a tool that automatically expose an object to python? i > > have an instance of a C++ (or ObjC) object and i want to pass it to the > > embed interpreter that runs inside my program. > > Python code have to call c++ method

Re: Writing portable applications (Was: Jargons of Info Tech industry)

2005-08-28 Thread Ulrich Hobelmann
Mike Meyer wrote: >> I'd rather develop a native client for the machine that people >> actually WANT to use, instead of forcing them to use that >> little-fiddly web browser on a teeny tiny display. > > You missed the point: How are you going to provide native clients for > platforms you've never

Re: py to exe: suggestions?

2005-08-28 Thread gene tani
There's movpy, w/option to exclude Unicode/win98 capabilities: http://www.voidspace.org.uk/python/movpy/ Also: http://www.effbot.org/zone/exemaker.htm http://www.python.org/doc/current/dist/postinstallation-script.html http://www.jython.org/docs/differences.html Ben Finney wrote: > chris patton

Re: Socket Troubles

2005-08-28 Thread Peter Hansen
Chris Spencer wrote: > I've written a simple class to manage P2P socket connections. However, > whenever I try to receive data, the socket raises an exception with the > error message (11, 'Resource temporarily unavailable'). I would assume (without looking at your code) that this is equivalent

Re: Can I send files through xmlrpc connections?

2005-08-28 Thread ookoi
hi, You can try this recipe, it should provides what you need. http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/413404 The key is: xmlrpclib.Binary(my_file_object.read()) -- sébastien http://yadp.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Dynamic image creation for the web...

2005-08-28 Thread Richard Lewis
On Sun, 28 Aug 2005 09:50:17 + (UTC), "Tompa" <[EMAIL PROTECTED]> said: > Hi, > > I would like to create images on the fly as a response to an http > request. > I can do this with PIL like this (file create_gif.py): > from PIL import Image, ImageDraw > > print 'Status: 200 OK' > print 'Conte

Dynamic image creation for the web...

2005-08-28 Thread Tompa
Hi, I would like to create images on the fly as a response to an http request. I can do this with PIL like this (file create_gif.py): from PIL import Image, ImageDraw print 'Status: 200 OK' print 'Content-type: text/html' print print 'Python Dynamic Image Creation Test' print '' im = Image.new("P

Re: What are new-style classes?

2005-08-28 Thread Robert Kern
Vaibhav wrote: > I recently heard about 'new-style classes'. I am very sorry if this > sounds like a newbie question, but what are they? I checked the Python > Manual but did not find anything conclusive. Could someone please > enlighten me? Thanks! There's a link on the left sidebar of http://doc

Re: py to exe: suggestions?

2005-08-28 Thread Ben Finney
chris patton <[EMAIL PROTECTED]> wrote: > I need to convert a python file to an '.exe'. A Python program is executable only in the context of a Python interpreter. Python is a dynamic language; it can't be compiled to native machine code. > I've tried py2exe, and I don't like it because you have

What are new-style classes?

2005-08-28 Thread Vaibhav
I recently heard about 'new-style classes'. I am very sorry if this sounds like a newbie question, but what are they? I checked the Python Manual but did not find anything conclusive. Could someone please enlighten me? Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: py to exe: suggestions?

2005-08-28 Thread Sybren Stuvel
chris patton enlightened us with: > I need to convert a python file to an '.exe'. I've tried py2exe, and > I don't like it because you have to include that huge dll and > libraries. Then what would you expect? The whole Python interpreter is needed if you want to run Python programs. It's more a s

py to exe: suggestions?

2005-08-28 Thread chris patton
I need to convert a python file to an '.exe'. I've tried py2exe, and I don't like it because you have to include that huge dll and libraries. Thanks for the Help!! -- http://mail.python.org/mailman/listinfo/python-list

Re: problems with tarfile.open and tar.bz2

2005-08-28 Thread Lars Gustäbel
On Fri, 26 Aug 2005 09:05:29 -0700, justin.vanwinkle wrote: > Hello everyone, > > I need some tar functionality for my program. Currently the following > code properly displays tar archives, and tar.gz archives. However, it > chokes on tar.bz2 archives with the following error: > > File "mai

Re: Windows/win32all, unicode and long filenames

2005-08-28 Thread Do Re Mi chel La Si Do
Hi ! You are true. But, more, don't believe : for use with CD-Rom/DVD, a path cannot to have more than 64 caracteres. @-salutations Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: Socket Troubles

2005-08-28 Thread Chris Spencer
Chris Spencer wrote: > I've written a simple class to manage P2P socket connections. However, > whenever I try to receive data, the socket raises an exception with the > error message (11, 'Resource temporarily unavailable'). > > My code's fairly straight-forward, with much of it right out of t

Socket Troubles

2005-08-28 Thread Chris Spencer
I've written a simple class to manage P2P socket connections. However, whenever I try to receive data, the socket raises an exception with the error message (11, 'Resource temporarily unavailable'). My code's fairly straight-forward, with much of it right out of the Python docs, so I'm not sur