ANN: PyQt v4.0 Released - Python Bindings for Qt v4

2006-06-12 Thread Phil Thompson
Riverbank Computing is pleased to announce the release of PyQt v4.0 available from http://www.riverbankcomputing.co.uk/pyqt/. The main change from v4.0beta1 is the inclusion of comprehensive HTML documentation based on the Qt documentation. PyQt is a comprehensive set of Qt bindings for the

ANN: Metavolv.py finds improved parameter values for YOUR program.

2006-06-12 Thread I. Myself
Metavolv.py is a computer program that searches for a better set of parameters for some other program, which we call the target program. The target program determines what better means, and it writes a merit value to the screen. The parameters appear in a configuration file for the target

RERP 0.8.0, an alternative robots.txt parser

2006-06-12 Thread Philip Semanchuk
RERP (Robot Exclusion Rules Parser) is an alternative to Python's standard robotparser module. I was motivated to write this because the Python's robotparser doesn't gracefully handle non-ASCII which occurs in about .1% of robots.txt files. This module (RERP) handles non-ASCII and also adds a

Re: How to link foreign keys primary keys using python?

2006-06-12 Thread sonal . patankar
Hi Mr. George, Let me try it again... I am not using any relational database to store the required tables with primary keys foreign keys When I say PRIMARY KEY = 1. It means an index is created on the specified fields (Out of various fields given in the comma separated txt file)

An error ?

2006-06-12 Thread Bo Yang
Hi , I am confronted with an odd question in the python cgi module ! Below is my code : import cgitb ; cgitb.enable() import cgi print Hello World ! How easy the script is , and the url is 202.113.239.51/vote/cgi/a.py but apache give me a 'Server internal error !' and the error log is : [Fri

Re: How to link foreign keys primary keys using python?

2006-06-12 Thread sonal . patankar
MTD wrote: Your post is confusing. Here is my advice: investigate the use of dictionaries. Dictionaries can allow you to define data in the form { key:data }, e.g. { area_code : area_data } { (area_code,school_code) : school_data } { (school_code,student_code) : student_data } Thanx Mr.

Re: Screen Scraping for Modern Applications?

2006-06-12 Thread Daniel Nogradi
Scrape means simply scraping pixel colors from locations on the screen. I'll worry about assembling it into meaningful information. import ImageGrab im = ImageGrab.grab() v = im.getpixel((x, y)) requires: http://www.pythonware.com/products/pil/ /F ## # (New in

Re: PIL problem after installation

2006-06-12 Thread Lad
Fredrik Lundh wrote: Lad wrote: I installed PIL under Linux but now when I try it I get the error: decoder jpeg not available How can I correct that problem? if you built PIL yourself, the setup script told you how to fix this. - make sure you have right libraries installed

Re: An error ?

2006-06-12 Thread Rene Pijlman
Bo Yang: [Fri Jun 16 14:06:45 2006] [error] [client 10.10.110.17] malformed header from script. Bad header=Hello World!: a.py The output of a CGI script should consist of two sections, separated by a blank line. The first section contains a number of headers, telling the client what kind of data

Re: wxPython: Should you use a master sizer object?

2006-06-12 Thread Morpheus
IIRC the wx dox contain stuff about sizers too. It's definitly worth to get into this stuff. Once you are used to sizers, you don't want to miss them anymore. HTH Morpheus John Salerno [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Steve Holden wrote: There doesn't seem to be any

Re: wxPython: Keyboard events and TreeCtrl

2006-06-12 Thread jean-michel bain-cornu
Am I supposed to connect the method to the Frame somehow? Or does it automatically get called when the user hits Ctrl-I, regardless of the fact that no other methods call OnKeyDown? I think it must be connected to the treectrl. One line or a combination of : self.Bind(wx.EVT_KEY_DOWN,

Re: How to link foreign keys primary keys using python?

2006-06-12 Thread sonal
Hi Mr. George, Sorry for confusing u so much... Let me try it again... I am not using any relational database to store the required tables with primary keys foreign keys When I say PRIMARY KEY = 1. It means an index is created on the specified fields (Out of various fields given in the

Re: How to link foreign keys primary keys using python?

2006-06-12 Thread sonal
MTD wrote: Your post is confusing. Here is my advice: investigate the use of dictionaries. Dictionaries can allow you to define data in the form { key:data }, e.g. { area_code : area_data } { (area_code,school_code) : school_data } { (school_code,student_code) : student_data } Thanx Mr.

Re: How to link foreign keys primary keys using python?

2006-06-12 Thread Steve Holden
[EMAIL PROTECTED] wrote: Hi Mr. George, Let me try it again... I am not using any relational database to store the required tables with primary keys foreign keys None the less, you are using relational database terminology. If you want people to understand you then you should use

Re: direct initialization of class attributes vs. declarations w/in __init__

2006-06-12 Thread Steve Holden
[EMAIL PROTECTED] wrote: Fredrik Lundh wrote: [EMAIL PROTECTED] wrote: Output from laptop comp.: 1 10 2 10 3 10 so how are you entering and running the code on your laptop ? what happens if you set the class attribute to 100 instead of 10 ? /F You can see my other post which I just

Re: direct initialization of class attributes vs. declarations w/in __init__

2006-06-12 Thread Steve Holden
[EMAIL PROTECTED] wrote: [...] Read my other post. The code was/is definitely identical. In any event, I don't really care. It's working properly now, and if I have similarly weird problems in future, I'll deal with them at that time. I don't know what was up, but I understand it doesn't make

Re: An error ?

2006-06-12 Thread Steve Holden
Bo Yang wrote: Hi , I am confronted with an odd question in the python cgi module ! Below is my code : import cgitb ; cgitb.enable() import cgi print Hello World ! How easy the script is , and the url is 202.113.239.51/vote/cgi/a.py but apache give me a 'Server internal error !'

printing all variables

2006-06-12 Thread Sheldon
Good day, I would like to know if there is a way to print all the variables set in a python program with having to write print variable on all? sincerely, Sheldon -- http://mail.python.org/mailman/listinfo/python-list

Re: Evaluating a Function After X Seconds: Python Equivalent to JavaScript's SetTimeout() Function

2006-06-12 Thread Diez B. Roggisch
Dennis Lee Bieber schrieb: I don't know? How does SetTimeout actually behave? Asynchronously? Synchronously? That is... would The former. It is the poor-mans threading of JavaScript so to speak. Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: mutable member, bug or ...

2006-06-12 Thread Sambo
Bruno Desthuilliers wrote: Sambo a écrit : By accident I assigned int to a class member 'count' which was initialized to (empty) string and had no error till I tried to use it as string, obviously. Why was there no error on assignment( near the end ). Python is dynamically typed -

Re: How to link foreign keys primary keys using python?

2006-06-12 Thread Steve Holden
sonal wrote: Hi Mr. George, Sorry for confusing u so much... Let me try it again... I am not using any relational database to store the required tables with primary keys foreign keys When I say PRIMARY KEY = 1. It means an index is created on the specified fields (Out of

Re: [mod_python] using nested blocks in psp

2006-06-12 Thread grahamd
cloc3 wrote: I'm a newbie in python, and I'm fighting against nested blocks in psp. Thats a little example with a funny behaviour: [code] html form select name=List !--makes a list with a loop -- % for i in range(50, 350, 50): if 'List' in form and int(form['List'])==i: sel=selected

Re: printing all variables

2006-06-12 Thread Duncan Booth
Sheldon wrote: Good day, I would like to know if there is a way to print all the variables set in a python program with having to write print variable on all? Not all the variables in a program (that would be rather more than you want), but you can print all the variables in a specific

Function to remove elements from a list not working

2006-06-12 Thread Girish Sahani
Hi, I am trying to convert a list of pairs (l4) to list l5 by removing those pairs from l4 which are not present in a third list called pairList. The following is a simplified part of the routine i have written. However it does not give the correct output. Please help! Its possible i have made

Re: Function to remove elements from a list not working

2006-06-12 Thread Maric Michaud
Le Lundi 12 Juin 2006 10:12, Girish Sahani a écrit : def getl5():     l5 = []     pairList = [[1,2],[3,4],[3,5],[3,6],[9,7],[8,9],[8,7],[7,9],[11,10]]     l4 = [[4,2],[4,7],[4,10],[4,12],[9,2],[9,7],[9,10],[9,12],[11,2],[11,7]] for pair in l4:         if pair not in pairList:            

Re: An error ?

2006-06-12 Thread Maric Michaud
Le Lundi 12 Juin 2006 09:07, Steve Holden a écrit : print Content-Type: text\plain\n a typo I guess, print Content-Type: text/plain\n -- _ Maric Michaud _ Aristote - www.aristote.info 3 place des tapis 69004 Lyon Tel: +33 426 880 097 --

Function to remove elements from a list not working (corrected)

2006-06-12 Thread Girish Sahani
Hi, I am trying to modify a list of pairs (l4) by removing those pairs which are not present in a third list called pairList. The following is a simplified part of the routine i have written. However it does not give the correct output. Please help! Its possible i have made a trivial mistke

Re: printing all variables

2006-06-12 Thread Sheldon
Duncan Booth skrev: Sheldon wrote: Good day, I would like to know if there is a way to print all the variables set in a python program with having to write print variable on all? Not all the variables in a program (that would be rather more than you want), but you can print all

Re: Python or Ajax?

2006-06-12 Thread bruno at modulix
Redefined Horizons wrote: I've been hearing a ot about AJAX lately. I may have to build a web application in the near future, and I was curoius: How does a web application that uses Python compare with one that uses AJAX? How does a car that has a diesel motor compare with one that is red ?

Re: Intermittent Failure on Serial Port

2006-06-12 Thread H J van Rooyen
Serge Orlof wrote: | H J van Rooyen wrote: | Serge Orloff wrote: | | | H J van Rooyen wrote: | | Traceback (most recent call last): | |File portofile.py, line 232, in ? | | ret_val = main_routine(port, pollstruct, pfifo) | |File portofile.py, line 108, in main_routine | |

Re: Function to remove elements from a list not working (corrected)

2006-06-12 Thread Maric Michaud
Le Lundi 12 Juin 2006 10:25, Girish Sahani a écrit : Hi, I am trying to modify a list of pairs (l4) by removing those pairs which are not present in a third list called pairList. The following is a simplified part of the routine i have written. However it does not give the correct output.

Re: parent in a class __init__ def?

2006-06-12 Thread bruno at modulix
[EMAIL PROTECTED] wrote: (meta : please don't top-post) Intuitively, the name lookup on self.parent.foo would be faster than if you passed in the object in question Each dot means doing a lookup in a namespace. The more dots, the more lookups. And lookups do have a cost. -- bruno

Re: Function to remove elements from a list not working (corrected)

2006-06-12 Thread [EMAIL PROTECTED]
Girish Sahani wrote: Hi, I am trying to modify a list of pairs (l4) by removing those pairs which are not present in a third list called pairList. The following is a simplified part of the routine i have written. However it does not give the correct output. Please help! Its possible i

Re: An error ?

2006-06-12 Thread Steve Holden
Maric Michaud wrote: Le Lundi 12 Juin 2006 09:07, Steve Holden a écrit : print Content-Type: text\plain\n a typo I guess, print Content-Type: text/plain\n Good eye! regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd

Re: parent in a class __init__ def?

2006-06-12 Thread bruno at modulix
Ray Schumacher wrote: What is the feeling on using parent in a class definition parent is just a name. What is the semantic for this name ? Parent class (ie: superclass) ? Container ? Else ? that class methods Takes care, class method has a very defined meaning in Python - a class method is

urllib behaves strangely

2006-06-12 Thread Gabriel Zachmann
Here is a very simple Python script utilizing urllib: import urllib url = http://commons.wikimedia.org/wiki/Commons:Featured_pictures/chronological; print url print file = urllib.urlopen( url ) mime = file.info() print mime print file.read() print

Re: Function to remove elements from a list not working (corrected)

2006-06-12 Thread Girish Sahani
Thanks!It workedi wasted a lot of time trying to find a bug in my code...what is wrong in iterating over a list and modifying it? Doesnt python take the modified list every time the loop starts? Also in this case, i want to add a condition that if none of the pairs are in pairList, element =

Re: [mod_python] using nested blocks in psp

2006-06-12 Thread cloc3
[EMAIL PROTECTED] wrote: See: http://www.modpython.org/pipermail/mod_python/2005-May/018102.html Comment hints may still be needed in certain cases to turn off scopes even if 8 space or tab indents are needed so it is good to understand what they are about. Thank you. That solves my

py2exe tkinter

2006-06-12 Thread Robin Becker
Don't know if this is the right place to ask, but has anyone considered using something like tcl's freewrap code to integrate tkinter into py2xe single executables? We currently use the (fairly clunky) nsis route to create single file executables with py2exe as input, but with the new

Re: Killing a thread

2006-06-12 Thread Antoon Pardon
Op 2006-06-10, Carl J. Van Arsdall schreef [EMAIL PROTECTED]: Felipe Almeida Lessa wrote: Em Sex, 2006-06-09 às 13:54 -0700, Manish Marathe escreveu: On 6/9/06, Fredrik Lundh [EMAIL PROTECTED] wrote: Manish Marathe wrote: I am creating threads using my self

Re: Function to remove elements from a list not working

2006-06-12 Thread bruno at modulix
Girish Sahani wrote: Hi, I am trying to convert a list of pairs (l4) to list l5 by removing those pairs from l4 which are not present in a third list called pairList. The following is a simplified part of the routine i have written. However it does not give the correct output. Please

Re: Function to remove elements from a list not working (corrected)

2006-06-12 Thread Girish Sahani
Thank you Markthis works too... Btw going slightly off-topic, when i try to run a code like below with around 50 elements (pairs) in l4,python just hangs. Any ideas why this is happening...the data is not that large :(( Girish Sahani wrote: Hi, I am trying to modify a list of pairs (l4)

Using PHP in Python

2006-06-12 Thread Tgone
Hello, I've come across sites that discuss embedding Python in PHP, but is it possible to access PHP functions in Python? -- http://mail.python.org/mailman/listinfo/python-list

Re: Using PHP in Python

2006-06-12 Thread Diez B. Roggisch
Tgone wrote: Hello, I've come across sites that discuss embedding Python in PHP, but is it possible to access PHP functions in Python? I'm not aware of a generic wrapper thingy. Which doesn't mean there is none. But which functions are you interested in? I can't believe there is much that

Re: Using PHP in Python

2006-06-12 Thread Tgone
Diez B. Roggisch wrote: Tgone wrote: Hello, I've come across sites that discuss embedding Python in PHP, but is it possible to access PHP functions in Python? I'm not aware of a generic wrapper thingy. Which doesn't mean there is none. But which functions are you interested in? I

Re: Function to remove elements from a list working, but python hangs :((

2006-06-12 Thread Girish Sahani
Hey Bruno...you are seeing the wrong post :P...please ignore this and check out the one with (corrected) appended at the end... Also, i used the list comprehension thingy which u have given, but now the problem is python just hangs if my list l4 contains around 50 pairs...considering its not that

Re: Using PHP in Python

2006-06-12 Thread Diez B. Roggisch
I have some custom PHP functions that I didn't want to re-write in Python. But maybe I should just rewrite them :) Certainly yes. And you'd be amazed how easier it is in python, I believe. Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: urllib behaves strangely

2006-06-12 Thread Benjamin Niemann
Gabriel Zachmann wrote: Here is a very simple Python script utilizing urllib: import urllib url = http://commons.wikimedia.org/wiki/Commons:Featured_pictures/chronological; print url print file = urllib.urlopen( url ) mime = file.info() print mime

Re: urllib behaves strangely

2006-06-12 Thread Benjamin Niemann
Benjamin Niemann wrote: Gabriel Zachmann wrote: Here is a very simple Python script utilizing urllib: import urllib url = http://commons.wikimedia.org/wiki/Commons:Featured_pictures/chronological; print url print file = urllib.urlopen( url ) mime =

Re: py2exe tkinter

2006-06-12 Thread Robin Becker
Robin Becker wrote: Don't know if this is the right place to ask, but has anyone considered using something like tcl's freewrap code to integrate tkinter into py2xe single executables? We currently use the (fairly clunky) nsis route to create single file executables with py2exe as input,

Re: urllib behaves strangely

2006-06-12 Thread John Hicken
Gabriel Zachmann wrote: Here is a very simple Python script utilizing urllib: import urllib url = http://commons.wikimedia.org/wiki/Commons:Featured_pictures/chronological; print url print file = urllib.urlopen( url ) mime = file.info() print mime

Re: urllib behaves strangely

2006-06-12 Thread Duncan Booth
Gabriel Zachmann wrote: Here is a very simple Python script utilizing urllib: import urllib url = http://commons.wikimedia.org/wiki/Commons:Featured_pictures/chronologi cal print url print file = urllib.urlopen( url ) mime = file.info() print mime

Re: Intermittent Failure on Serial Port (Trace Result)

2006-06-12 Thread H J van Rooyen
8-- (snip) old fail: | | | Traceback (most recent call last): | | |File portofile.py, line 232, in ? | | | ret_val = main_routine(port, pollstruct, pfifo) | | |File portofile.py, line 108, in main_routine | | | send_nak(port, timeout) # so bad luck -

Re: Function to remove elements from a list working, but Python Hangs :((

2006-06-12 Thread Girish Sahani
I guess it's already the case with lst = [ e for e in lst if e in pairs ] In [1]: lst = (1,2,3,4) In [2]: pairs=(5,) In [3]: lst=[e for e in lst if e in pairs] In [4]: lst Out[4]: [] Yes its working. I realized that i was giving an input which didnt satisfy the condition. Now if you

Re: Function to remove elements from a list working, but python hangs :((

2006-06-12 Thread bruno at modulix
Girish Sahani wrote: (please don't top-post) Hey Bruno...you are seeing the wrong post :P...please ignore this and check out the one with (corrected) appended at the end... ot You should have posted the correction in the same thread. /ot Also, i used the list comprehension thingy which u have

Re: Function to remove elements from a list working, but Python Hangs :((

2006-06-12 Thread Steve Holden
Girish Sahani wrote: I guess it's already the case with lst = [ e for e in lst if e in pairs ] In [1]: lst = (1,2,3,4) In [2]: pairs=(5,) In [3]: lst=[e for e in lst if e in pairs] In [4]: lst Out[4]: [] Yes its working. I realized that i was giving an input which didnt satisfy the

Re: PIL problem after installation

2006-06-12 Thread peter
I had similar problems a couple of months back when I was teaching myself Tkinter and PIL. I wrote up my experiences here:- http://www.aqzj33.dsl.pipex.com/how_i_learned_tkinter/contents.htm If you look at the section on Images you will see how I eventually solved it (with bucket loads of help

Re: More pythonic shell sort?

2006-06-12 Thread John Machin
On 11/06/2006 1:26 PM, [EMAIL PROTECTED] wrote: Thanks for the critique. John Machin wrote: On 10/06/2006 7:00 AM, [EMAIL PROTECTED] wrote: [snip] def sort(self,myList): for gap in self.gapSeq: for i in range(1,gap+1):

Re: Using PHP in Python

2006-06-12 Thread Rene Pijlman
Tgone: I have some custom PHP functions that I didn't want to re-write in Python. But maybe I should just rewrite them :) Absolutely. The alternative is one of many IPC mechanisms that are available in both Python and PHP (such as XML-RPC). But that may require more effort than rewriting the

Re: Very nice python IDE (windows only)

2006-06-12 Thread Jan Bijsterbosch
Hello ago, Bernard, ago [EMAIL PROTECTED] schreef in bericht news:[EMAIL PROTECTED] Bernard Lebel wrote: Not me. I'll probably sound pedantic but - the editor text looks awful, changing the editor options had no effect at all - there is no network access of UNC paths other than through

Searching and manipulating lists of tuples

2006-06-12 Thread MTD
Hello, I'm wondering if there's a quick way of resolving this problem. In a program, I have a list of tuples of form (str,int), where int is a count of how often str occurs e.g. L = [ (X,1),(Y,2)] would mean X occurs once and Y occurs twice If I am given a string, I want to search L to see if

Re: Searching and manipulating lists of tuples

2006-06-12 Thread Mike Kent
MTD wrote: Hello, I'm wondering if there's a quick way of resolving this problem. In a program, I have a list of tuples of form (str,int), where int is a count of how often str occurs ... So clearly that doesn't work... any ideas? Yes, use the proper tool for the job. Tuples are

Re: Searching and manipulating lists of tuples

2006-06-12 Thread Steve Holden
MTD wrote: Hello, I'm wondering if there's a quick way of resolving this problem. In a program, I have a list of tuples of form (str,int), where int is a count of how often str occurs e.g. L = [ (X,1),(Y,2)] would mean X occurs once and Y occurs twice If I am given a string, I want

Re: Searching and manipulating lists of tuples

2006-06-12 Thread Harold Fellermann
MTD wrote: Hello, I'm wondering if there's a quick way of resolving this problem. In a program, I have a list of tuples of form (str,int), where int is a count of how often str occurs e.g. L = [ (X,1),(Y,2)] would mean X occurs once and Y occurs twice If I am given a string, I want to

Re: Searching and manipulating lists of tuples

2006-06-12 Thread MTD
Yes, use the proper tool for the job. Tuples are immutable (they are read-only once created). Instead use a dictionary. They key would be your string, the value would be the count. Wow, I really should have thought of that! Thanks. -- http://mail.python.org/mailman/listinfo/python-list

(pre)forking server framework?

2006-06-12 Thread czajnik
Hi! I'm quite new to Python development. Can someone advise me a framework useful for building (pre-)forking or threaded TCP servers, other than SocketServer ? I've seen source code of a few python-based app servers, all of theme seem to reinvent the wheel, eventually reusing SocketServer. I'd

Re: Searching and manipulating lists of tuples

2006-06-12 Thread Gerard Flanagan
MTD wrote: Hello, I'm wondering if there's a quick way of resolving this problem. In a program, I have a list of tuples of form (str,int), where int is a count of how often str occurs e.g. L = [ (X,1),(Y,2)] would mean X occurs once and Y occurs twice If I am given a string, I want to

Re: Function to remove elements from a list not working (corrected)

2006-06-12 Thread Boris Borcic
Girish Sahani wrote: Hi, I am trying to modify a list of pairs (l4) by removing those pairs which are not present in a third list called pairList. The following is a simplified part of the routine i have written. However it does not give the correct output. Please help! Its possible i

Re: An error ?

2006-06-12 Thread Bo Yang
It works , thank you everyone ! I think there is much more I need to learn before I can grasp a full understand of the C/S modle ! Thanks again ! -- http://mail.python.org/mailman/listinfo/python-list

Re: (pre)forking server framework?

2006-06-12 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: Hi! I'm quite new to Python development. Can someone advise me a framework useful for building (pre-)forking or threaded TCP servers, other than SocketServer ? I've seen source code of a few python-based app servers, all of theme seem to reinvent the wheel,

Re: Screen Scraping for Modern Applications?

2006-06-12 Thread Cameron Laird
In article [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: . . . Scrape means simply scraping pixel colors from locations on the screen. I'll worry about assembling it into meaningful information. Previously, I used Java, and it

Dr. Dobb's Python-URL! - weekly Python news and links (Jun 12)

2006-06-12 Thread Cameron Laird
QOTW: Check out BeautifulSoup -- you will never write HTMLParser-based screen scrapers again. :) - Jonathan Ellis You clearly need something instead of XML. - Paul McGuire http://groups.google.com/group/comp.lang.python/msg/09e943c8dbf1e8c5? Johann C. Rocholl donates a PNG manager in

Re: Python or Ajax?

2006-06-12 Thread Bo Yang
I think if you know java language very well but feel suffering with the error prone javascript , GWT is good choose for AJAX development . With the well-known IDE Eclipse your development time efficiency will promote fast ! -- http://mail.python.org/mailman/listinfo/python-list

logging magic

2006-06-12 Thread [EMAIL PROTECTED]
Hi everyone. I've just been trying to add a bit more granularity to my logging code, as the jump from INFO (level 20) to DEBUG (level 10) is a bit too big. I was thinking of borrowing a few levels from java: fine (18), finer (16) and finest(14). This is what I've tried: log =

Re: Python or Ajax?

2006-06-12 Thread dingbat
Redefined Horizons wrote: How does a web application that uses Python compare with one that uses AJAX? Mauve has the most RAM -- http://mail.python.org/mailman/listinfo/python-list

Re: (pre)forking server framework?

2006-06-12 Thread czajnik
Diez B. Roggisch napisal(a): Why do you care if the asynchronous model is overkill or the performance is good? Twisted comes close to what you want - and using its strength as arguments against it strikes me as odd. I was unclear :) I mean I don't like using asynchronous model for the kind

Re: Very nice python IDE (windows only)

2006-06-12 Thread digitalorganics
Great IDE! I love it. Two things that make me very happy: 1. Unlike PythonWin and Stan's Python Editor (SPE), PyScripter shows not just methods but also attributes in the class browser. [I'll mention that Eric3 also does this, but I don't use Eric3 much because the editor component doesn't allow

Re: (pre)forking server framework?

2006-06-12 Thread Thomas Guettler
Am Mon, 12 Jun 2006 06:22:52 -0700 schrieb czajnik: Hi! I'm quite new to Python development. Can someone advise me a framework useful for building (pre-)forking or threaded TCP servers, other than SocketServer ? I've seen source code of a few python-based app servers, all of theme seem

Re: Very nice python IDE (windows only)

2006-06-12 Thread digitalorganics
Jan Bijsterbosch wrote: Hello ago, Bernard, ago [EMAIL PROTECTED] schreef in bericht news:[EMAIL PROTECTED] Bernard Lebel wrote: Not me. I'll probably sound pedantic but - the editor text looks awful, changing the editor options had no effect at all - there is no network access of

Re: Very nice python IDE (windows only)

2006-06-12 Thread digitalorganics
By the way, does anyone know if / how you can change the key bindings in PythonWin? In PyScripter, I was quite pleased that the autocomplete lets you make your selection by pressing enter (natural), yet in PythonWin you have to press tab (unnatural). Thanks. [EMAIL PROTECTED] wrote: Great IDE! I

Re: Win XP: Problem with shell scripting in Python

2006-06-12 Thread A.M
Does it overcome the problem that you reported earlier, that the contents of the output file from BCP were out of order? Yes, it does. But, to be honest, I don't know how!!! John Machin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On 10/06/2006 3:00 AM, A.M wrote: Here is

Re: Function to remove elements from a list not working (corrected)

2006-06-12 Thread Paul McGuire
Girish Sahani [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I am trying to modify a list of pairs (l4) by removing those pairs which are not present in a third list called pairList. The following is a simplified part of the routine i have written. However it does not give

Re: Thread specific singleton

2006-06-12 Thread jhnsmth
Gabriele Farina wrote: Hi, I'm tring to implement a Singleton object that should be specific for every thread who create it, not global. I tried a solution that seems to work, but I have a very poor knowledge of concurrent programming, so I'd like someone to help me find some problems in

VC++ types to ctypes

2006-06-12 Thread lux
Hi to all, i need to traslate this struct in python using ctypes struct Soptions { char chVolumeLabel[128]; __int32 nSessionToImport; BS_BOOL bJolietFileSystem; BS_BOOL bBootable; TCHAR chBootImage[_MAX_PATH]; BS_BOOL bFinalize; BS_BOOL bTestBurn; BS_BOOL bPerformOPC; BS_BOOL

Bridge: Ruby to Python communication

2006-06-12 Thread digitalorganics
Hello all. I want a ruby and a python module to be able to communicate with each other, access classes, instances and the like. Is there a bridge for this? I'm aware of rupy, but the documentation seems rather inadequate for the uninitiated. Are there other libraries/bridges or maybe a rupy

Re: PIL problem after installation

2006-06-12 Thread Fredrik Lundh
Lad wrote: I downloaded jpeg (from ftp://ftp.uu.net/graphics/jpeg/ ) source libraries( file jpegsrc.v6b.tar.gz) and installed them. Now in /usr/local/lib I have the following files: cjpeg ,djpeg,jpegtran,rdjpgcom and wrjpgcom cjpeg, djpeg etc are executables, not libraries. if you have

Re: Searching and manipulating lists of tuples

2006-06-12 Thread Sion Arrowsmith
Steve Holden [EMAIL PROTECTED] wrote: def algorith(d, s): if s in d: d[s] += 1 else: d[s] = 1 def algorith(d, s): d[s] = d.get(s, 0) + 1 And the OP should note that converting between dict d and list of pairs L is simply a matter of L = d.items() and d = dict(L)

Re: Using PHP in Python

2006-06-12 Thread Michel Claveau
Hi! Only in Windows, I can call PHP (more exactly PHP-script) from Python. I can, also, call, from Python, PHP-defined-functions, like a method of a Python-class. It's a combination of Active-scripting dynamic method add to a class. -- @-salutations Michel Claveau --

Re: Function to remove elements from a list not working (corrected)

2006-06-12 Thread Fredrik Lundh
Girish Sahani wrote: Btw going slightly off-topic, when i try to run a code like below with around 50 elements (pairs) in l4,python just hangs. Any ideas why this is happening...the data is not that large :(( building a filtered new list by repeatedly removing stuff from a copy of the

Re: ANN: PyQt v4.0 Released - Python Bindings for Qt v4

2006-06-12 Thread Damjan
QtNetwork A set of classes to support TCP and UDP socket programming and higher level protocols (eg. HTTP). Since QtNetwork is asynchronous how does it compare to twisted? I find Qt's signals and slots easier to understand and work with than twisted deferreds. -- damjan --

Re: Bridge: Ruby to Python communication

2006-06-12 Thread vasudevram
[EMAIL PROTECTED] wrote: Hello all. I want a ruby and a python module to be able to communicate with each other, access classes, instances and the like. Is there a bridge for this? I'm aware of rupy, but the documentation seems rather inadequate for the uninitiated. Are there other

Re: Function to remove elements from a list not working (corrected)

2006-06-12 Thread Fredrik Lundh
Girish Sahani wrote: Thanks!It workedi wasted a lot of time trying to find a bug in my code...what is wrong in iterating over a list and modifying it? Doesnt python take the modified list every time the loop starts? this is explained in the tutorial, under the for statement: The for

Re: Bridge: Ruby to Python communication

2006-06-12 Thread Michel Claveau
Hi! For me, like PHP (message of 11h.35) : Only in Windows, I can call Ruby (more exactly Ruby-script) from Python. I can, also, call, from Python, Ruby-defined-functions, like a method of a Python-class. It's a combination of Active-scripting dynamic method add to a class. It's run OK with

Re: VC++ types to ctypes

2006-06-12 Thread Thomas Heller
lux wrote: Hi to all, i need to traslate this struct in python using ctypes struct Soptions { char chVolumeLabel[128]; __int32 nSessionToImport; BS_BOOL bJolietFileSystem; BS_BOOL bBootable; TCHAR chBootImage[_MAX_PATH]; BS_BOOL bFinalize; BS_BOOL bTestBurn;

Re: Bridge: Ruby to Python communication

2006-06-12 Thread digitalorganics
I'll check that out, thanks! vasudevram wrote: [EMAIL PROTECTED] wrote: Hello all. I want a ruby and a python module to be able to communicate with each other, access classes, instances and the like. Is there a bridge for this? I'm aware of rupy, but the documentation seems rather

Re: Searching and manipulating lists of tuples

2006-06-12 Thread bruno at modulix
MTD wrote: Hello, I'm wondering if there's a quick way of resolving this problem. In a program, I have a list of tuples of form (str,int), where int is a count of how often str occurs e.g. L = [ (X,1),(Y,2)] would mean X occurs once and Y occurs twice If I am given a string, I want

Re: Bridge: Ruby to Python communication

2006-06-12 Thread digitalorganics
Wait wait, what do I do exactly? Thanks Michel. Michel Claveau wrote: Hi! For me, like PHP (message of 11h.35) : Only in Windows, I can call Ruby (more exactly Ruby-script) from Python. I can, also, call, from Python, Ruby-defined-functions, like a method of a Python-class. It's a

Re: Writing PNG with pure Python

2006-06-12 Thread Johann C. Rocholl
Just in case anybody has the same problem, here's my first attempt at implementing a subset of the PNG spec in pure Python. I license it to you under the terms of the GNU GPL. Update: the code is now licensed under the Apache License 2.0.

Re: Intermittent Failure on Serial Port (Trace Result)

2006-06-12 Thread Serge Orlov
H J van Rooyen wrote: Note that the point of failure is not the same place in the python file, but it is according to the traceback, again at a flush call... Yes, traceback is bogus. Maybe the error is raised during garbage collection, although the strace you've got doesn't show that. The

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Jun 12)

2006-06-12 Thread John Salerno
Cameron Laird wrote: Andrew Clover provides new Python icons: http://doxdesk.com/img/software/py/icons2.png http://mail.python.org/pipermail/python-dev/2006-March/063235.html http://mail.python.org/pipermail/python-dev/2006-April/063517.html I love the new 'folder'

  1   2   >