IMDbPY 1.9 released

2005-05-03 Thread Davide Alberani
IMDbPY 1.9 is available (tgz, deb, rpm, exe) from: http://imdbpy.sourceforge.net/ IMDbPY is a Python package useful to retrieve and manage the data of the IMDb movie database. With this release support for systems with limited CPU power and bandwidth (like PDA, mobile phones and hand-held

[ANN] introducing pytest: a testing interpreter for Python

2005-05-03 Thread Chad Whitacre
Dear All, I'd like to announce the initial release of pytest. Pytest is a testing interpreter for Python. Unlike a testing /framework/, pytest requires nothing of its test scripts that is not included in the Python language itself. Pytests are regular Python scripts that are interpreted in a

Dr. Dobb's Python-URL! - weekly Python news and links (May 3)

2005-05-03 Thread Simon Brunning
QOTW: The security 'droids have decided that since the MS Office Suite is a 'standard' application then software written in MS Office VBA must be 'safe.' Any other development environments (such as Java, Perl, Cygwin) are 'unsafe' and can't be installed. - Peter Olsen There's nothing wrong with

ANNOUNCE: KirbyBase 1.8.2

2005-05-03 Thread Jamey Cribbs
This is an *Emergency* bug-fix release. Fred Pacquier alertly pointed out a bug I introduced in the last version. It occurs when you select all records in a table; newline characters were not getting stripped off the end of every returned record. The bug has been fixed in this version.

Re: Which IDE is recommended?

2005-05-03 Thread Franz Steinhaeusler
On Mon, 02 May 2005 19:25:57 -0700, Bryan [EMAIL PROTECTED] wrote: dcrespo wrote: But I personally recommend DrPython. (Not only, I'm a member of the project). I saw this message and downloaded DrPython. It's very good: I like the class/functions browser while I'm coding... but I can't find

Re: empty lists vs empty generators

2005-05-03 Thread Terry Reedy
Brian Roberts [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I'm using using generators and iterators more and more intead of passing lists around, and prefer them. However, I'm not clear on the best way to detect an empty generator (one that will return no items) when some sort

Re: Reading output from standard out

2005-05-03 Thread Miki Tebeka
Hello Thierry, Let's say I have a python program which prints output to standard out, let's call it HelloApp. How do I capture these outputs from the python GUI tkinter? For example, I want to call HelloApp from my GUI program and I want to send the output live to a tkinter text

Re: BitKeeper for Python?

2005-05-03 Thread Miki Tebeka
Hello Bruce, Typical, you wait years for a decent replacement for CVS, and then... It's called subversion and it has Python bindings. Bye. -- Miki Tebeka [EMAIL PROTECTED] http://tebeka.bizhat.com The only difference

Re: WordPress Python Library 1.0

2005-05-03 Thread Terry Reedy
Michele Ferretti [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] François Pinard wrote: [Michele Ferretti] http://www.blackbirdblog.it/programmazione/progetti/28 Quoted above, the full content of your article. Is it a message? It surely does not look like an English sentence.

Re: WordPress Python Library 1.0

2005-05-03 Thread Michele Ferretti
Cappy2112 wrote: If you wan't explain what WordPress is, can you at least supply a link for a page that's in English? WordPress is most diffused blog engine: http://www.wordpress.org My library is a client for connect to WP installation. -- Michele Ferretti ICQ#: 14491159 Skype:

Re: Python Challenge ahead [NEW] for riddle lovers

2005-05-03 Thread Dan Bishop
John Hazen wrote: * Dan Bishop [EMAIL PROTECTED] [2005-05-02 21:09]: Dan Christensen wrote: Reinhold Birkenfeld [EMAIL PROTECTED] writes: Dan Christensen wrote: Roel Schroeven [EMAIL PROTECTED] writes: There's no level 12 yet though. Now there's a 12 and a 13 (at

Re: WordPress Python Library 1.0

2005-05-03 Thread Michele Ferretti
Excused all, I have mistaken! I did not know these rules the next time I will follow them Terry Reedy wrote: Michele Ferretti [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] François Pinard wrote: [Michele Ferretti] http://www.blackbirdblog.it/programmazione/progetti/28

Re: Which IDE is recommended?

2005-05-03 Thread Franz Steinhaeusler
On 2 May 2005 08:21:48 -0700, dcrespo [EMAIL PROTECTED] wrote: Hi. You were right: I meant Code Completition. I did what you told me to do. I get now auto completition of code. For example: import wx wx.(here appear a list with the possibilities) But (there's always a but) with: button =

May 3: Vancouver Python, Zope and Plone User's Group

2005-05-03 Thread Paul Prescod
This month's talk: 10 coolest things about Plone, Andy McKay This talk was originally supposed to be: 137 cool things about Plone but we negotiated Andy down to just ten. But these ten things are not just cool: they are the coolest. Plone enthusiasts and hecklers equally welcome. The

Re: Python Challenge ahead [NEW] for riddle lovers

2005-05-03 Thread Reinhold Birkenfeld
Dan Bishop wrote: Well, I'd deal them into 2 piles, and... Damn! That was an obscure hint! Now, how do I open *.gfx files? You don't directly. Hint: gfx stands for? ** SPOILER Graphic*s*. --

Re: popen2 psql

2005-05-03 Thread Mage
Klaus Alexander Seistrup wrote: Mage wrote: I tried to write a proxy script for psql command. I need some query log. I failed to read from the file object. The psql command is probably linked against readline; did you look in the ~/.psql_history file? Thank you. I will check but

Re: BitKeeper for Python?

2005-05-03 Thread hemanth
John Smith wrote: I am going to be working with some people on a project that is going to be done over the internet. I am looking for a good method of keeping everyone's code up to date and have everyone be able to access all the code including all the changes and be able to determine what

Python SQLite

2005-05-03 Thread Pajo
What should I install so I can connect to sqlite from Python. One simple example would be very helpfull. Thanks, Pajo -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter weirdness item count

2005-05-03 Thread Martin Franklin
phil wrote: Using Tkinter Canvas to teach High School Geometry with A LOT of success. My drawing gets very slow after a lot of actions. For instance I have created code to rotate a set of objects about a rotation point. rotate 360 degrees starts to get slow after 720 degrees its

Re: Python SQLite

2005-05-03 Thread Swaroop C H
On 5/3/05, Pajo [EMAIL PROTECTED] wrote: What should I install so I can connect to sqlite from Python. One simple example would be very helpfull. You haven't mentioned which operating system you are using. For Windows, PySQLite binaries are available at http://initd.org/tracker/pysqlite For

Tkinter and Windows XP themes (via manifest files)

2005-05-03 Thread Nir Aides
Hello, How do I make Tkinter use windows XP themes? ordinary root Tkinter windows ignore the manifest file (which is placed by wxPython for the same purpose) but message dialogs popped with tkMessageBox.Message do use the Windows Theme, so it should be possible. Does anyone has a clue?

Re: python+windows/linux - write stdout text to always on top text?

2005-05-03 Thread Swaroop C H
On 2 May 2005 13:14:02 -0700, flamesrock [EMAIL PROTECTED] wrote: I'm curious if theres a way in python to write stdout text to the screen (ie top right) the way they do in some FPS games, so that its always on top, in an invisible window of some set dimensions. No matter what program is on

Re: Data smoothing algorithms? - Thank you all

2005-05-03 Thread Anthra Norell
To contribute to this interesting discussion, which after having provided practical solutions, has become academic, I believe we are dealing with a particularly innocuous case of noise infection, innocuous on account of the noise being conspicuously distinct from the signal. The signal is the

Re: odeint function in SciPy

2005-05-03 Thread FLChamp
Thanks for your help! I don't suppose you happen to know what order this method is? -- http://mail.python.org/mailman/listinfo/python-list

Re: Working with method-wrapper objects

2005-05-03 Thread Dr. Peer Griebel
Bengt Richter wrote: On Thu, 28 Apr 2005 11:33:04 +0200, Dr. Peer Griebel [EMAIL PROTECTED] wrote: Peer Dr. Griebel wrote: [..] Why has [].__str__ a different type than object.__str__? Why is object.__str__ a routine while object().__str__ not? Why wouldn't you expect different

Re: lists in cx_Oracle

2005-05-03 Thread Steve Holden
Andrew Dalke wrote: Steve Holden wrote: Do you think this is a DB-API 3-ish kind of a thing, or would it layer over DB-API 2 in a relatively platform-independent manner? ... but-you-may-know-better-ly y'rs - steve I am a tyro at this. I had to find some tutorials on SQL to

Re: Setting the corner color in rotated PIL images

2005-05-03 Thread Anthra Norell
I just had the same problem the other day. I solved it by starting out with an image large enough to retain enough white area following the rotation. Frederic - Original Message - From: rzed [EMAIL PROTECTED] Newsgroups: comp.lang.python To: python-list@python.org Sent: Sunday, May 01,

Re: Python SQLite

2005-05-03 Thread Pajo
Thnx, my first test app with sqlite is working... -- http://mail.python.org/mailman/listinfo/python-list

Re: odeint function in SciPy

2005-05-03 Thread Robert Kern
FLChamp wrote: Thanks for your help! I don't suppose you happen to know what order this method is? If your answer isn't in the docs I pointed you to or in the source, then I don't know it. Happy hunting. -- Robert Kern [EMAIL PROTECTED] In the fields of hell where the grass grows high Are

Re: py2exe and library.zip

2005-05-03 Thread Peter Hansen
Timothy Smith wrote: is it possible instead of py2exe putting all library's in a zip file, to just put them in a sub dir? Anything's possible. Maybe you could explain what you're actually trying to accomplish (or the reasons) so we can better understand where you're going with this...

Python Problem

2005-05-03 Thread Elangovan
Hi, We are using Python 2.3 version for our applications, for the Past 1 month we were facing the below problem. Problem summary Systems with windows XP and Windows 2000 platforms, when we open pythonwin editor and some py files after that we unable to open any browser window on

Re: Tkinter weirdness item count

2005-05-03 Thread phil
I seem to remember a thread a while ago about a 'bug' with the Tk Canvas widget keeping a reference to objects that had been deleted... Have you thought about using the 'move' method to move your lines? I think this will result in less supprises... Actually I solved that problem. My

Re: Inspect Python Classes for instance data information

2005-05-03 Thread Kent Johnson
Tim Henderson wrote: Hello I want to creat a program that can inspect a set of classes that i have made and spit out a savable version of these classes. To do this I need to be able to inspect each class and get all of its instance data as well as information about a particular meathod.

Re: problem in the compiler ?

2005-05-03 Thread Glauco Silva
I´m sorry if i don´t write correct. My code is like this: MyClass() class MyClass: def __init__(self): btn = RadioButton(command=self.Function) def Function(self): print Enter in the function python : 2.3.5 os: win 2K When a do this, the function 'Function' is call.

Re: urllib2 and timeout question

2005-05-03 Thread Gerard C Blais
Thanks for the suggestion: My program now starts like this: import time import socket socket.setdefaulttimeout(300) import urllib2 import httplib import urlparse, gzip from StringIO import StringIO and it hasn't helped. On Mon, 2 May 2005 21:58:46 -0500, Skip Montanaro [EMAIL PROTECTED]

Re: Py2Exe security

2005-05-03 Thread ech0
someone can sniff the client for the information it sends/receives so its possible to extract the info that way. -- http://mail.python.org/mailman/listinfo/python-list

Re: Py2Exe security

2005-05-03 Thread Simon Brunning
On 3 May 2005 05:03:00 -0700, Terje Johan Abrahamsen [EMAIL PROTECTED] wrote: We have created some programs in Python that are to be distributed around. The programs will be made into .exe files by py2exe. However, in the source there are certain webadresses, logins and passwords that the

Re: So many things that need to be decided....

2005-05-03 Thread Ivan Voras
Heather Stovold wrote: I still need to decide on a database I've really only used Access, and my SQL skills aren't that great. It would also need to be free As many others have suggested, if you're comming from Access, SQLite or Gadfly would probably be good starting points,

Re: Python Challenge ahead [NEW] for riddle lovers

2005-05-03 Thread Roel Schroeven
John Hazen wrote: Hmmm. The title of the html page is dealing evil. If you were playing war instead of solitaire, how would you change how you deal the cards? Hm, I'm not familiar with playing war. You couldn't elaborate a bit on that, could you? -- If I have been able to see further, it

Re: lists in cx_Oracle

2005-05-03 Thread Daniel Dittmar
Andrew Dalke wrote: I want to execute a query with an IN in the WHERE clause and with the parameter taken from a Python variable. That is, I wanted something like this to work id_list = [AB001, AB002, AB003] c.execute(SELECT s.smiles FROM smiles_database s WHERE s.id IN

[Errno 9] Bad File Descriptor on Windows 2003 Server Py 2.4.1

2005-05-03 Thread rbt
The below script produces a '[Errno 9] Bad File Descriptor' when executed. If I remove the try: except: statements, the script stops when the error occurs. The purpose of the script is to monitor the size of the three main logs on a Windows 2003 server and send and email should any of the logs

Re: Py2Exe security

2005-05-03 Thread Terje Johan Abrahamsen
Simon Brunning wrote: On 3 May 2005 05:03:00 -0700, Terje Johan Abrahamsen [EMAIL PROTECTED] wrote: We have created some programs in Python that are to be distributed around. The programs will be made into .exe files by py2exe. However, in the source there are certain webadresses, logins

Re: Voidspace Python Guestbook 1.4.1 (etc)

2005-05-03 Thread Fuzzyman
Oops... those links should have read : http://www.voidspace.org.uk/py­thon/guestbook.html http://www.voidspace.org.uk/cg­i-bin/voidspace/downman.py?fil­e=guestbo... http://www.voidspace.org.uk/cg­i-bin/voidspace/guestbook.py http://www.voidspace.org.uk/cg­i-bin/voidspace/guestbook2.py #~$%£#

Re: Py2Exe security

2005-05-03 Thread Will McGugan
Terje Johan Abrahamsen wrote: If your program can access these details, then a suficiently determined attacker can access them too, regardless of what you do. Yes, I assume so. Luckily it is not national secrets we are trying to hide. But, how does py2exe compare with for example a program

[no subject]

2005-05-03 Thread python-list-bounces+archive=mail-archive . com
#! rnews 1990 Newsgroups: comp.lang.python Path: news.xs4all.nl!newsspool.news.xs4all.nl!transit.news.xs4all.nl!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.abs.net!attws2!ip.att.net!NetNews1!xyzzy!nntp From: Harry George [EMAIL PROTECTED] Subject: Re: Py2Exe security X-Nntp-Posting-Host:

sorting list and then return the index of the sorted item

2005-05-03 Thread custard_pie
I need help sorting a list...I just can't figure out how to sort a list and then return a list with the index of the sorted items in the list for example if the list I want to sort is [2,3,1,4,5] I need [2,0,1,3,4] to be returned Can someone help please --

Re: sorting list and then return the index of the sorted item

2005-05-03 Thread Peter Otten
custard_pie wrote: I need help sorting a list...I just can't figure out how to sort a list and then return a list with the index of the sorted items in the list for example if the list I want to sort is [2,3,1,4,5] I need [2,0,1,3,4] to be returned

Re: sorting list and then return the index of the sorted item

2005-05-03 Thread Antoon Pardon
Op 2005-05-03, custard_pie schreef [EMAIL PROTECTED]: I need help sorting a list...I just can't figure out how to sort a list and then return a list with the index of the sorted items in the list for example if the list I want to sort is [2,3,1,4,5] I need [2,0,1,3,4] to be returned Can

Documenting Python code.

2005-05-03 Thread Isaac Rodriguez
Hi, Are there any standarized ways of documenting Python code? When I check the __doc__ attribute of the standard modules, the results are kind of plain. Is everyone using this style? Since Python is a very powerful language parsing strings, replacing expressions, and processing XML, I was

Re: sorting list and then return the index of the sorted item

2005-05-03 Thread Duncan Booth
custard_pie wrote: I need help sorting a list...I just can't figure out how to sort a list and then return a list with the index of the sorted items in the list for example if the list I want to sort is [2,3,1,4,5] I need [2,0,1,3,4] to be returned Can someone help please you need

Re: sorting list and then return the index of the sorted item

2005-05-03 Thread Simon Brunning
On 3 May 2005 06:37:14 -0700, custard_pie [EMAIL PROTECTED] wrote: I need help sorting a list...I just can't figure out how to sort a list and then return a list with the index of the sorted items in the list for example if the list I want to sort is [2,3,1,4,5] I need [2,0,1,3,4] to be

Re: Py2Exe security

2005-05-03 Thread andreas
On Tue, May 03, 2005 at 06:01:33AM -0700, Terje Johan Abrahamsen wrote: Simon Brunning wrote: On 3 May 2005 05:03:00 -0700, Terje Johan Abrahamsen [EMAIL PROTECTED] wrote: We have created some programs in Python that are to be distributed around. The programs will be made into .exe

Re: sorting list and then return the index of the sorted item

2005-05-03 Thread Fuzzyman
I'd map the values to their index in a dictionary, then sort the list, and from the sorted list fetch all the indexes from the dictionary. Something like : a = [2,3,1,4,5] b = list(a) b.sort() b [1, 2, 3, 4, 5] indexDict = dict([ (value, index) for index, value in enumerate(a)])

Re: sorting list and then return the index of the sorted item

2005-05-03 Thread Antoon Pardon
Op 2005-05-03, Antoon Pardon schreef [EMAIL PROTECTED]: Op 2005-05-03, custard_pie schreef [EMAIL PROTECTED]: I need help sorting a list...I just can't figure out how to sort a list and then return a list with the index of the sorted items in the list for example if the list I want to sort is

Re: sorting list and then return the index of the sorted item

2005-05-03 Thread custard_pie
Okay...THanks a lot everyone,.. Those codes are a real help -- http://mail.python.org/mailman/listinfo/python-list

Any decent IM protocol implementations (icq or aim)

2005-05-03 Thread Jaime Wyant
Can anyone recommend one? Google isn't giving me much. jw -- http://mail.python.org/mailman/listinfo/python-list

Re: cgi print statement in multithreaded enviroment?

2005-05-03 Thread Scott David Daniels
vegetax wrote: So it would be something like this, right?? class ThreadSpecificFile: def __init__(s): self.files = [] def set_stdout(f,thread_id): self.files[thread_id] = f def clean_up(thread_id): del

Re: Python SQLite

2005-05-03 Thread dcrespo
Does PySQLite run on Linux? Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: automated response

2005-05-03 Thread Grant Edwards
On 2005-05-02, ashleyd [EMAIL PROTECTED] wrote: I will be out of the office starting Wednesday 04/13 and will return Tuesday 04/26. If you need anything, please contact Scott Carver at 662-890-0901 ext 5512. He can direct you to the right person. Let's everybody call Scott with our Python

Re: Which IDE is recommended?

2005-05-03 Thread dcrespo
Try one of these: - Hit F8 - Menu View/Toggle Source Browser Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: Py2Exe security

2005-05-03 Thread Grant Edwards
On 2005-05-03, mahasamatman [EMAIL PROTECTED] wrote: I suggest You to use base 64 encoded strings something like password = 'aGlkZGVuX3Bhc3N3b3Jk\n' password = pasword.decode(base64) That will delay the attacker for a few minutes. -- Grant Edwards grante Yow!

Re: atexit not being executed

2005-05-03 Thread Skip Montanaro
Chris I tried looking through the documentation ... Always a good first step... wink Chris ... and came across atexit. I tried putting this into my code and Chris it never seems to actually process the atexit.register() Chris function thus leaving me stranded. My question is

wxpython on cygwin for drPython - ImportError: No module named _core_

2005-05-03 Thread Stephane Roy
Hi, Did someone installed and used successfully drPython on Cygwin? The installation requires wxpython. I tried many different alternatives (source, binary, etc) but so far the best I get is the following. Traceback (most recent call last): File drpython.py, line 45, in ? import wx, wx.stc

Re: So many things that need to be decided....

2005-05-03 Thread Heather Stovold
My personal suggestion would be to go with SQLite because it's a standard database which can be used with large number of other tools and languages. As for report generating features, I don't know of any free report generators that are as easy to use like the one in Access (e.g.

Re: Whats the best Python Book for me

2005-05-03 Thread Nick Vargish
I would recommend starting with the official tutorial to get a feel for the nuts-and-bolts syntax of Python. Once you've worked your way through that (probably not more than an afternoon), pick up a copy of the Python Cookbook. Since you're an experienced programmer, I think the Cookbook will help

Re: So many things that need to be decided....

2005-05-03 Thread Mage
Heather Stovold wrote: I have programmed in the past with a plain text editor too did it for years. - but I much prefer programming with tools that have syntax coloring, code completion, and the ability to run from the editor. Debugging tools are a bonus too. My opinion is that the GUI is

Re: [Errno 9] Bad File Descriptor on Windows 2003 Server Py 2.4.1

2005-05-03 Thread vincent wehren
rbt [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] | The below script produces a '[Errno 9] Bad File Descriptor' when | executed. If I remove the try: except: statements, the script stops when | the error occurs. | | The purpose of the script is to monitor the size of the three

Re: Python Challenge ahead [NEW] for riddle lovers

2005-05-03 Thread Roel Schroeven
Roel Schroeven wrote: John Hazen wrote: Hmmm. The title of the html page is dealing evil. If you were playing war instead of solitaire, how would you change how you deal the cards? Hm, I'm not familiar with playing war. You couldn't elaborate a bit on that, could you? Never mind, I

xml.parsers.expat and utf-8

2005-05-03 Thread dagurp
I have this code: import xml.parsers.expat parser = xml.parsers.expat.ParserCreate(encoding=UTF-8) text = unicode(divþórður/div,'UTF-8') print parser.Parse(text,1) And this is what I get: UnicodeEncodeError: 'ascii' codec can't encode characters in position 5-6: ordinal not in range(128) I

Re: WordPress Python Library 1.0

2005-05-03 Thread [EMAIL PROTECTED]
Caro Michele: Non parlo italiano, ma parlo espagnol. I can read your website, and your library looks interesting. Would you like me to provide an english translation of your webpage so that you can provide a version for english speakers? I am a WordPress user and a Python programmer so I will

Re: So many things that need to be decided....

2005-05-03 Thread Anand S Bisen
Hi I see everybody talking about Eclipse and PyDev i have not used it but just wanted to know how does it compares with Activestate Komodo? thanks Anand Maurice LING wrote: Hi, It seems that you are just starting on Python, same as my situation a year ago. After almost going down the

Re: Any decent IM protocol implementations (icq or aim)

2005-05-03 Thread Michael Soulier
On 5/3/05, Jaime Wyant [EMAIL PROTECTED] wrote: Can anyone recommend one? Google isn't giving me much. http://jabberpy.sourceforge.net/ Mike -- Michael P. Soulier [EMAIL PROTECTED] http://www.digitaltorque.ca http://opag.ca python -c 'import this' --

distributing scripts

2005-05-03 Thread Anand S Bisen
Hello, What is a good way to distributing python scripts as a package. Since lately i am facing lots of issues with my python scripts not being able to run properly due to either (old python 2.2 at the client machine) or missing module. Is there a way by which i can solve these issues revolving

Pydev Refactoring Feature in Eclipse

2005-05-03 Thread querejeto
Folks: I cannot get a refactoring menu to show up on my Eclipse (3.1M3, Windows XP). F3 works, I can run and debug scripts. Can't refactor, though. Any idea what I could be missing on my installation? Thanks: Querejeto -- http://mail.python.org/mailman/listinfo/python-list

Re: So many things that need to be decided....

2005-05-03 Thread Mike Meyer
Heather Stovold [EMAIL PROTECTED] writes: I've decided on DrPython for the Editor An editor for each language? Is that the kind of tower you get when you start using IDEs? I just kept right on using the same text editor I'd been using for the last 20 (now 30) years. I have programmed

Re: python+windows/linux - write stdout text to always on top text?

2005-05-03 Thread flamesrock
I'm writing a multiplayer component to an existing closed source game, and I'd like users to be able to see whats going on in the chat while playing the game. Is it possible? -- http://mail.python.org/mailman/listinfo/python-list

Re: [Errno 9] Bad File Descriptor on Windows 2003 Server Py 2.4.1

2005-05-03 Thread rbt
vincent wehren wrote: rbt [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] | The below script produces a '[Errno 9] Bad File Descriptor' when | executed. If I remove the try: except: statements, the script stops when | the error occurs. | | The purpose of the script is to

twisted jabber and xmlstream

2005-05-03 Thread Operation Latte Thunder
I am playing around with Jabber with Twisted. I can receive messages just fine, and thats great, however, I am a bit confused about how to actually _send_ messages. From what I've seen, I need to call send() on the xmlstream I get when I am auth'd... and thats where I get stuck. Do I need to

Re: python+windows/linux - write stdout text to always on top text?

2005-05-03 Thread Swaroop C H
On 3 May 2005 09:41:37 -0700, flamesrock [EMAIL PROTECTED] wrote: I'm writing a multiplayer component to an existing closed source game, and I'd like users to be able to see whats going on in the chat while playing the game. Is it possible? I do not have much knowledge in this area but your

How to read an integer value from a binary file?

2005-05-03 Thread Olivier Elbaz
Hi, I read a bmp file (binary file) and I want to extract an integer value from it (size value). The whole binary file is read inside a list all_bmp_file. I can read the size value with the following code: for r in all_bmp_file[2:5]: n = struct.unpack('B',r)#B for unsigned char print n

Re: How to read an integer value from a binary file?

2005-05-03 Thread Jeff Epler
As your 'for' loop shows, the number of items in the slice [2:5] is only 3, not 4. Maybe you want the slice [2:6] instead. x = xx\xb6/\0\0 struct.unpack('i', x[2:6]) (12214,) Jeff pgprzSG2OzoK4.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: trouble with lists

2005-05-03 Thread Kristian Zoerhoff
On 3 May 2005 10:42:43 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I'm new to python. I tried doing this x = [[]] * 3 print x [ [] [] [] ] x[0].append( 2 ) [ [2] [2] [2] ] I confused with the last line output. I actually expected something like [ [2] [] [] ] I think you

Re: trouble with lists

2005-05-03 Thread vincent wehren
[EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] | I'm new to python. I tried doing this | | x = [[]] * 3 | print x | [ [] [] [] ] | x[0].append( 2 ) | [ [2] [2] [2] ] | | I confused with the last line output. I actually expected something | like | | [ [2] [] [] ] | | Can

Re: Python Challenge ahead [NEW] for riddle lovers

2005-05-03 Thread Chris McAloney
Hi all, Okay, so I've been working on level seven for a LONG time now. I've decoded the first message to get the hint for the next level. Using the same tactics, then I decode the hint as well, but there are non-printable characters. I've tried stripping out those characters, quoting them to

Read / Write image file

2005-05-03 Thread codecraig
I have a image file on my pc, say a .jpg. Basically I want to setup a client/server socket, and I want the client to read in the jpg and send it to the server, where the server can write that data into a new file on the server. I tried just doing something like.. x = open(abc.jpg) y = x.read()

Re: Setting the corner color in rotated PIL images

2005-05-03 Thread rzed
Anthra Norell [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: [in response to: I'm using PIL to generate some images which may be rotated at the user's option. When they are rotated, the original image is cropped in the new image (which is fine), and the corners are black (which is not,

Re: empty lists vs empty generators

2005-05-03 Thread Andrea Griffini
On 2 May 2005 21:49:33 -0700, Michele Simionato [EMAIL PROTECTED] wrote: Starting from Python 2.4 we have tee in the itertools module, so you can define the following: from itertools import tee def is_empty(it): it_copy = tee(it)[1] try: it_copy.next() except StopIteration:

Re: atexit not being executed

2005-05-03 Thread Chris Gorton
The environment in which I am working is client/server and it is the server that processes all python code. I have tried creating a file (which in the case of what I have explained means that I can't issue a close command) and let the process run as I have before. When the process has finished

Re: How to read an integer value from a binary file?

2005-05-03 Thread Olivier Elbaz
Hi Jeff, You was right, my problem was coming from the number of items that I gave to the unpack method. I was thinking,like an array in C, that slice [2:5] will give 4 items and not 3. Thanks a lot for your help. Olivier On 5/3/05, Jeff Epler [EMAIL PROTECTED] wrote: As your 'for' loop

Read / Write image file

2005-05-03 Thread phil
I have a image file on my pc, say a .jpg. Basically I want to setup a client/server socket, and I want the client to read in the jpg and send it to the server, where the server can write that data into a new file on the server. I tried just doing something like.. x = open(abc.jpg) y

Re: Python Challenge ahead [NEW] for riddle lovers

2005-05-03 Thread Roel Schroeven
Chris McAloney wrote: Hi all, Okay, so I've been working on level seven for a LONG time now. I've decoded the first message to get the hint for the next level. Using the same tactics, then I decode the hint as well, but there are non-printable characters. I've tried stripping out those

PHPParser pod Zope

2005-05-03 Thread JZ
Probuje zainstalowac modul php pod zope i tam napisali dziwna rzecz ze potrzebuje PHP CGI program a nie PHP CLI. Kompilacja php 5.0.4 pod linuksem daje mi w wyniku mod_php + 5 plikow binarnych: pear, php, php-config, phpextdist, phpsize. Zas lektura skryptu do zope jest nizbyt jasna. Napisali:

Re: Read / Write image file

2005-05-03 Thread Max M
codecraig wrote: I have a image file on my pc, say a .jpg. Basically I want to setup a client/server socket, and I want the client to read in the jpg and send it to the server, where the server can write that data into a new file on the server. I tried just doing something like.. x =

Re: Read / Write image file

2005-05-03 Thread codecraig
thanks Phil, the problem was that I was not using rb and wb. thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: trouble with lists

2005-05-03 Thread Kristian Zoerhoff
On 5/3/05, Anand Kumar [EMAIL PROTECTED] wrote: I am actually trying to mimic a multi dimensional array in C. I tried doing things like Python lists are not arrays in that sense. If you really want an array, you probably want Numeric or Numarray. Head over to http://numeric.scipy.org/ to take

Re: Sequences in list

2005-05-03 Thread temp
Hi Michael, Thanks for a quick response, I appreciate it. I will have to get back to you tomorrow, as I can't check what you've given me right now. I presume the fact that you mention the word note in your code you have realised that I'm trying to search for musical sequences. I tried to put my

Re: Read / Write image file

2005-05-03 Thread codecraig
By the way, what is 'rb' and 'wb' ? Also, when I create a client/server sockets I do something like... SERVER --- server.bind(('', 4321)) (sock, addr) = server.accept() x = server.recv(1024) CLIENT client.connect(('localhost', 4321)) x = open(abc.txt, rb) client.send(x)

Re: Best way to parse file into db-type layout?

2005-05-03 Thread Peter A.Schott
Thanks for the comments. Quick notes: 1. Yes, ultimate goal is to output various fields into Excel, but I need to enter the data into a DB as well to avoid having any strange problems. That may be handled by a completely different process. I should have been more exact in saying that my

Re: Read / Write image file

2005-05-03 Thread Maciej Dziardziel
codecraig wrote: I have a image file on my pc, say a .jpg. Basically I want to setup a client/server socket, and I want the client to read in the jpg and send it to the server, where the server can write that data into a new file on the server. I tried just doing something like.. x =

Re: distributing scripts

2005-05-03 Thread Maciej Dziardziel
Anand S Bisen wrote: Hello, What is a good way to distributing python scripts as a package. Since lately i am facing lots of issues with my python scripts not being able to run properly due to either (old python 2.2 at the client machine) or missing module. Is there a way by which i can

  1   2   >