python module developer wanted for 'libmsgque'

2007-05-10 Thread Andreas Otto
Hi, I'm a the maintainer for the new project 'libmsgque' hosted at SF (see below for details) and need a volunteer to develop the language bindings for python. Is somebody available to take over this job ? An example language binding for tcl is allready available. This is the initi

Re: Erlang style processes for Python

2007-05-10 Thread Kay Schluehr
On May 10, 8:31 am, Jacob Lee <[EMAIL PROTECTED]> wrote: > Funny enough, I'm working on a project right now that is designed for > exactly that: PARLEY,http://osl.cs.uiuc.edu/parley. (An announcement > should show up in clp-announce as soon as the moderators release it). My > essential thesis is th

Re: tkinter - Screen Resolution

2007-05-10 Thread Eric Brunel
On Wed, 09 May 2007 18:37:32 +0200, <[EMAIL PROTECTED]> wrote: > Hi, > I have developed a GUI using tkinter (grid geometory manager). > The structure is a top frame containing multiple subframes. Each > subframe has a combination of widgets like(Entry, label, > button,listboxes). The subframes are

Re: Comparing dates problem

2007-05-10 Thread Tim Golden
[EMAIL PROTECTED] wrote: > I am writing a reminder program for our Zimbra email client. One of > the requirements I was given was to automatically increment or > decrement the display to show something like the following: > > 5 minutes until appointment > > or > > 10 minutes past your appointmen

the inspect thing

2007-05-10 Thread castironpi
-the code: class A: b=2 import inspect print inspect.getsource(A) class A: c=2 print inspect.getsource(A) -unavailable from the console, but gets you: class A: b=2 class A: b=2 One thought is, in inspect, could at least: def findsource(object): #snip

replacing string in xml file--revisited

2007-05-10 Thread saif . shakeel
Hi, I need to replace a string in xml file with something else.Ex - rate rate - Here i have opened an xml file(small part is pasted here).I want to replace the word 'localId' with 'dataPackageID' wherever it comes in xml file.I have asked

Re: preferred windows text editor?

2007-05-10 Thread Ant
On May 9, 11:21 pm, BartlebyScrivener <[EMAIL PROTECTED]> wrote: ... > I too vote for VIM. I use it on both Windows XP and Debian Etch. I > can't find anything it doesn't do. I also use Vim (well, GVim). The only thing I find missing is an integrated console for running code snippets/entire scrip

Re: elegant python style for loops

2007-05-10 Thread ian . team . python
thank you everybodyvery well answered.just one question remains where do i find documentation on zip ...i was looking for a function like this, but could not even find a relevant list of functions!! -- http://mail.python.org/mailman/listinfo/python-list

Re: Erlang style processes for Python

2007-05-10 Thread jkn
Have you seen Candygram? http://candygram.sourceforge.net/ jon N -- http://mail.python.org/mailman/listinfo/python-list

Re: elegant python style for loops

2007-05-10 Thread ian . team . python
On May 10, 6:00 pm, [EMAIL PROTECTED] wrote: > thank you everybodyvery well answered.just one question > remains > where do i find documentation on zip ...i was looking for a function > like this, but could not even find a relevant list of functions!! ooops...even that was answered. ag

Re: Specification for win32com.client package

2007-05-10 Thread Peter Fischer
Hello Tim, thank you for your quick and detailed reply. So I will try it at the python-win32 list. Many thanks for your help and if you want I will let you know when I know more. Best regards, Peter. - Need Mail bonding? Go to the Yahoo! Mail Q&A for great tip

Re: SEO - Search Engine Optimization - Seo Consulting

2007-05-10 Thread Hendrik van Rooyen
"Steve Holden" <[EMAIL PROTECTED]> wrote: > Steven D'Aprano wrote: > > On Wed, 02 May 2007 19:47:28 -0700, Huck Phin wrote: > [a request for peace, love and understanding, concluding with] > >> We all should be a little more considerate of each other. > > > > And if the hippy hug fest fails to s

Re: elegant python style for loops

2007-05-10 Thread Ant
On May 10, 6:51 am, [EMAIL PROTECTED] wrote: ... > into a list of tuples to allow moving through multiple lists, or is > the for i in range(len(listkeys)): the only solution? > > Any suggestions? For the specific case of indexing lists, the following is cleaner than the 'for i in range...' solutio

Re: Towards faster Python implementations - theory

2007-05-10 Thread Hendrik van Rooyen
"Terry Reedy" <[EMAIL PROTECTED],,.edu> wrote: > "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > | I am relatively new on this turf, and from what I have seen so far, it > | would not bother me at all to tie a name's type to its first use, so that > | the name

Re: Change serial timeout per read

2007-05-10 Thread Hendrik van Rooyen
<[EMAIL PROTECTED]> wrote: > I'm writing a driver in Python for an old fashioned piece of serial > equipment. Currently I'm using the USPP serial module. From what I can > see all the serial modules seem to set the timeout when you open a > serial port. This is not what I want to do. I need to ch

Re: Towards faster Python implementations - theory

2007-05-10 Thread Hendrik van Rooyen
"John Nagle" <[EMAIL PROTECTED]> wrote: > Paul Boddie wrote: > > On 9 May, 08:09, "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote: > > > >>I am relatively new on this turf, and from what I have seen so far, it > >>would not bother me at all to tie a name's type to its first use, so that > >>the n

Newbie (but improving) - Passing a function name with parameters as a parameter

2007-05-10 Thread mosscliffe
I am trying to time a function's execution, but I get 'TypeError: 'bool' object is not callable' when I try to run it. I suspect it is my calling of 'timeloop' with the function name 'lookup' and its associated variables or it could just be some stupid error on my part. function 'lookups' was wor

Re: replacing string in xml file--revisited

2007-05-10 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, saif.shakeel wrote: > Although this works alone it is nto > working when i handle multiple file I/O.Is there a alternative to do > this.(maybe without read() operation) Why do you want to change the part that *works* instead of fixing the c

Newbie Prob : IDLE can't import Tkinter

2007-05-10 Thread Romain FEUILLETTE
Hello, I'have just install Python 2.5.1 on Linux and the IDLE doesn't seem to works because it didn't find Tcl/Tk Is there someone to explain how to modify the file "setup.py" to tell the install that Tcl/Tk are at the paht : "/usr/bin/tclsh" and "usr/bin/wish/" ? I have attached to log file of

Re: preferred windows text editor?

2007-05-10 Thread Jorgen Bodde
I prefer PsPad. If you like Notepad++, PSPad might be a better choice. More intuitive. I've used Notepad++ for a while, I really disliked the fact that every new install my settings XML file would get overwritten, and what does that guy have with Comic sans MS? Every default style is hard coded in

matplotlib problem

2007-05-10 Thread redcic
I've got a question regarding matplotlib. I use the command: pylab.plot(...) to create a graph. Then, the execution of the code stops after the line: pylab.show() which is off course the last line of my code. My problem is that I have to close the figure window before in order to finish the execut

Re: Minor bug in tempfile module (possibly __doc__ error)

2007-05-10 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, James T. Dennis wrote: > Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: >> In <[EMAIL PROTECTED]>, James T. Dennis wrote: > >> You can change it by simply assigning to the name: > >> In [15]: tempfile.template = 'spam' > >> In [16]: tempfile.template >> Out[16]: 'sp

Re: PYDOC replacement. (Was:Sorting attributes by catagory)

2007-05-10 Thread Nick Vatamaniuc
On May 10, 1:28 am, Ron Adam <[EMAIL PROTECTED]> wrote: > Nick Vatamaniuc wrote: > > Ron, > > > Consider using epydoc if you can. Epydoc will sort the methods and it > > will also let you use custom CSS style sheets for the final HTML > > output. Check out the documentation of my PyDBTable module.

Re: replacing string in xml file--revisited

2007-05-10 Thread half . italian
On May 10, 12:56 am, [EMAIL PROTECTED] wrote: > Hi, > I need to replace a string in xml file with something else.Ex > > - > rate > rate > > > > - > > Here i have opened an xml > file(small part is pasted here).I want to replace the word 'loca

Re: Boost python : get the shape of a numpy ndarray in C++ code.

2007-05-10 Thread TG
What I'm trying to say here : a numpy array is supposed to have it's shape stored as a tuple. What I want to do is to access this information from my C++ code, in order to do some validity check. So, by looking around in the doc of boost/python/numeric.hpp I was able to do this : void Layer::set_

Re: Newbie Prob : IDLE can't import Tkinter

2007-05-10 Thread Asun Friere
On May 10, 6:31 pm, Romain FEUILLETTE <[EMAIL PROTECTED]> wrote: > Hello, > > I'have just install Python 2.5.1 on Linux and the IDLE doesn't seem to > works because it didn't find Tcl/Tk > Perhaps you haven't installed Tkinter? I'm not sure which distribution you are using, but on my box (with Py

How to convert Unicode string to raw string escaped with HTML Entities

2007-05-10 Thread ldng
Hi, I'm looking for a way to convert en unicode string encoded in UTF-8 to a raw string escaped with HTML Entities. I can't seem to find an easy way to do it. Quote from urllib will only work on ascii (which kind of defeat the purpose imho) and escape from cgi doesn't seems to do anything with my

Re: replacing string in xml file--revisited

2007-05-10 Thread half . italian
On May 10, 12:56 am, [EMAIL PROTECTED] wrote: > Hi, > I need to replace a string in xml file with something else.Ex > > - > rate > rate > > > > - > > Here i have opened an xml > file(small part is pasted here).I want to replace the word 'loca

Re: preferred windows text editor?

2007-05-10 Thread Laurent Pointal
T. Crane a écrit : > Right now I'm using Notepad++. What are other people using? > > trevis Notepad++ :-) And still use ConTEXT from time to time when I have big (MB) xml files to look at. -- http://mail.python.org/mailman/listinfo/python-list

Re: replacing string in xml file--revisited

2007-05-10 Thread saif . shakeel
On May 10, 1:42 pm, [EMAIL PROTECTED] wrote: > On May 10, 12:56 am, [EMAIL PROTECTED] wrote: > > > > > > > Hi, > > I need to replace a string in xml file with something else.Ex > > > - > > rate > > rate > > > > > > > > - > > > Here i have ope

Re: Minor bug in tempfile module (possibly __doc__ error)

2007-05-10 Thread Marc Christiansen
James T. Dennis <[EMAIL PROTECTED]> scribis: > In fact I realized, after reading through tempfile.py in /usr/lib/... > that the following also doesn't "work" like I'd expect: > ># foo.py >tst = "foo" >def getTst(arg): If I change this line: >return "foo-%s"

Re: How to convert Unicode string to raw string escaped with HTML Entities

2007-05-10 Thread Tim Golden
ldng wrote: > Hi, > > I'm looking for a way to convert en unicode string encoded in UTF-8 to > a raw string escaped with HTML Entities. I can't seem to find an easy > way to do it. > > Quote from urllib will only work on ascii (which kind of defeat the > purpose imho) and escape from cgi doesn't

Re: preferred windows text editor?

2007-05-10 Thread Charles Sanders
Ant wrote: > > What method of executing code snippets in a Python shell do other Vim > users use? Other than just copy/paste? > Not vim, but good old vi so should work in vim 1. Mark the start of the fragment, for exampls ms (to mark with label s). Labels a through z are available. 2. Move to t

Re: Newbie (but improving) - Passing a function name with parameters as a parameter

2007-05-10 Thread Asun Friere
Try again ... Just looking over your code quickly ... the function 'lookup' returns either True or False (a boolean) depending on whether matchcount == pattcount. Then in the declaration of the function 'timeloop' this return value gets bound to 'dofunction.' The subsequent call 'dofunction()' f

Re: How to convert Unicode string to raw string escaped with HTML Entities

2007-05-10 Thread ldng
On 10 mai, 11:03, Tim Golden <[EMAIL PROTECTED]> wrote: > > Probably worth having a look at this: > >http://effbot.org/zone/unicode-convert.htm Great ! You made my day :-) Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Simulating simple electric circuits

2007-05-10 Thread Dave Baum
In article <[EMAIL PROTECTED]>, Bjoern Schliessmann <[EMAIL PROTECTED]> wrote: > Sounds more familiar than the analog approach. Maybe I misunderstood > something ... but I can't transfer my problem to this way of > thinking yet. My biggest problem is the fact that relays aren't > really interes

Re: How to convert Unicode string to raw string escaped with HTML Entities

2007-05-10 Thread Tim Golden
ldng wrote: > On 10 mai, 11:03, Tim Golden <[EMAIL PROTECTED]> wrote: >> Probably worth having a look at this: >> >>http://effbot.org/zone/unicode-convert.htm > > Great ! You made my day :-) > > Thanks. That's all right, but it's the effbot you need to thank. (Hope Fredrik's reading this).

Re: Multiple regex match idiom

2007-05-10 Thread Steffen Oschatz
On 9 Mai, 11:00, Hrvoje Niksic <[EMAIL PROTECTED]> wrote: > I often have the need to match multiple regexes against a single > string, typically a line of input, like this: > > if (matchobj = re1.match(line)): > ... re1 matched; do something with matchobj ... > elif (matchobj = re2.match(line)):

Re: Newbie (but improving) - Passing a function name with parameters as a parameter

2007-05-10 Thread Steffen Oschatz
On 10 Mai, 10:27, mosscliffe <[EMAIL PROTECTED]> wrote: > I am trying to time a function's execution, Do you know the timeit module ? : Tool for measuring execution time of small code snippets Steffen -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie (but improving) - Passing a function name with parameters as a parameter

2007-05-10 Thread Ant
As Stephan said, you can investigate the timeit module. If you want to test it your way, wrap up your function call in another function: On May 10, 9:27 am, mosscliffe <[EMAIL PROTECTED]> wrote: ... > def timeloop(dofunction,iters=10): ... > > def lookup(recs,patterns): ... > myrecs = ... > def t

Re: msbin to ieee

2007-05-10 Thread imageguy
On May 6, 6:44 pm, revuesbio <[EMAIL PROTECTED]> wrote: > Hi > Does anyone have the python version of the conversion from msbin to > ieee? > Thank u Not sure if this helps, but I think this thread has the answer; http://groups.google.com/group/comp.lang.python/browse_thread/thread/286d9f6daff9bfab

Re: matplotlib problem

2007-05-10 Thread Steffen Oschatz
On 10 Mai, 10:31, redcic <[EMAIL PROTECTED]> wrote: > I've got a question regarding matplotlib. I use the command: > pylab.plot(...) > to create a graph. > Then, the execution of the code stops after the line: > pylab.show() > which is off course the last line of my code. > > My problem is that I h

Re: replacing string in xml file--revisited

2007-05-10 Thread saif . shakeel
On May 10, 1:55 pm, [EMAIL PROTECTED] wrote: > On May 10, 12:56 am, [EMAIL PROTECTED] wrote: > > > > > > > Hi, > > I need to replace a string in xml file with something else.Ex > > > - > > rate > > rate > > > > > > > > - > > > Here i have ope

Re: Newbie (but improving) - Passing a function name with parameters as a parameter

2007-05-10 Thread mosscliffe
Many thanks. I think I see what you mean. I will try 'timeit' as well. Aren't examples wonderful ? On 10 May, 11:42, Ant <[EMAIL PROTECTED]> wrote: > As Stephan said, you can investigate the timeit module. If you want to > test it your way, wrap up your function call in another function: > > On

Re: PYDOC replacement. (Was:Sorting attributes by catagory)

2007-05-10 Thread Ron Adam
Nick Vatamaniuc wrote: > Thanks for the info, Ron. I had no idea pydoc was that powerful! > -Nick Change *was* to *will be*. It really needed to be re factored. ;-) Cheers, Ron -- http://mail.python.org/mailman/listinfo/python-list

Re: preferred windows text editor?

2007-05-10 Thread Dick Moores
At 11:06 AM 5/9/2007, T. Crane wrote: >Right now I'm using Notepad++. What are other people using? Ulipad. Dick Moores -- http://mail.python.org/mailman/listinfo/python-list

Re: Change serial timeout per read

2007-05-10 Thread rowan
> you will probably have to make the port non blocking, and roll your own > using different time.sleep(n) values between invocations to port.read(1) calls What I actually want to do is to respond immediately if the expected string comes in, but not raise a timeout unless it takes longer than the m

Re: msbin to ieee

2007-05-10 Thread John Machin
On May 10, 8:48 pm, imageguy <[EMAIL PROTECTED]> wrote: > On May 6, 6:44 pm, revuesbio <[EMAIL PROTECTED]> wrote: > > > Hi > > Does anyone have the python version of the conversion from msbin to > > ieee? > > Thank u > > Not sure if this helps, but I think this thread has the > answer;http://group

Re: Single precision floating point calcs?

2007-05-10 Thread Ross Ridge
Grant Edwards <[EMAIL PROTECTED]> wrote: >In the C implementations, the algorithms will be done >implemented in single precision, so doing my Python prototyping >in as close to single precision as possible would be "a good >thing". Something like numpy might give you reproducable IEEE 32-bit floa

Thread-safe dictionary

2007-05-10 Thread tuom . larsen
Hi, please consider the following code: from __future__ import with_statement class safe_dict(dict): def __init__(self, *args, **kw): self.lock = threading.Lock() dict.__init__(self, *args, **kw) def __getitem__(self, key): with self.lock: return dict

Re: Designing a graph study program

2007-05-10 Thread andrea
On 9 Mag, 09:10, Alexander Schliep <[EMAIL PROTECTED]> wrote: > andrea <[EMAIL PROTECTED]> writes: > > Well then I wanted to draw graphs and I found that pydot is working > > really nicely. > > BUT I'd like to do this, an interactive program to see ho the > > algorithms works... > > For example in

Re: Thread-safe dictionary

2007-05-10 Thread Jean-Paul Calderone
On 10 May 2007 05:45:24 -0700, [EMAIL PROTECTED] wrote: >Hi, > >please consider the following code: > > >from __future__ import with_statement > >class safe_dict(dict): >def __init__(self, *args, **kw): >self.lock = threading.Lock() >dict.__init__(self, *args, **kw) >def __g

trouble with generators

2007-05-10 Thread Hans-Peter Jansen
Hi Pythonistas, I'm stuck in a maze of new style classes and generators. While I love the concepts, I obviously didn't grok them throughout. I'm trying to generate a bunch of similar classes, where some are contained in list attributes of others, e.g.: class A: def __init__(self): self.i

Re: Thread-safe dictionary

2007-05-10 Thread Diez B. Roggisch
Jean-Paul Calderone schrieb: > On 10 May 2007 05:45:24 -0700, [EMAIL PROTECTED] wrote: >> Hi, >> >> please consider the following code: >> >> >> from __future__ import with_statement >> >> class safe_dict(dict): >>def __init__(self, *args, **kw): >>self.lock = threading.Lock() >>

RE: change of random state when pyc created??

2007-05-10 Thread Hamilton, William
> From: Alan Isaac > > I'm sure my first pass will be flawed, but here goes: > > http://docs.python.org/lib/typesmapping.html: > to footnote (3), add phrase "which may depend on the memory location of > the > keys" to get: > > Keys and values are listed in an arbitrary order, > which may

RE: change of random state when pyc created??

2007-05-10 Thread Carsten Haese
On Thu, 2007-05-10 at 08:01 -0500, Hamilton, William wrote: > It's possible there are other factors that can affect this as well. A more > general statement is probably more appropriate: > > "Keys and values are listed in an arbitrary order. This order is > non-random, varies across Python imple

Re: change of random state when pyc created??

2007-05-10 Thread Alan Isaac
>> Alan Isaac requested: >> http://docs.python.org/lib/typesmapping.html: to footnote (3), add phrase >> http://docs.python.org/lib/types-set.html: append a new sentence to 2nd paragraph "Hamilton, William " <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Keys and values are listed

keyword checker - keyword.kwlist

2007-05-10 Thread tom
Hi I try to check whether a given input is keyword or not. However this script won't identify keyword input as a keyword. How should I modify it to make it work? #!usr/bin/env python import keyword input = raw_input('Enter identifier to check >> ') if input in keyword.kwlist: print input

Re: Towards faster Python implementations - theory

2007-05-10 Thread sturlamolden
On May 8, 5:53 pm, John Nagle <[EMAIL PROTECTED]> wrote: > The point here is that we don't need language changes or declarations > to make Python much faster. All we need are a few restrictions that > insure that, when you're doing something unusual, the compiler can > tell. Franz, CMUCL, SB

Re: Single precision floating point calcs?

2007-05-10 Thread sturlamolden
On May 9, 6:51 pm, Grant Edwards <[EMAIL PROTECTED]> wrote: > Is there any way to do single-precision floating point > calculations in Python? Yes, use numpy.float32 objects. > I know the various array modules generally support arrays of > single-precision floats. I suppose I could turn all my

Re: Suggestions for how to approach this problem?

2007-05-10 Thread John Salerno
James Stroud wrote: > I included code in my previous post that will parse the entire bib, > making use of the numbering and eliminating the most probable, but still > fairly rare, potential ambiguity. You might want to check out that code, > as my testing it showed that it worked with your exam

Re: Single precision floating point calcs?

2007-05-10 Thread Grant Edwards
On 2007-05-10, Ross Ridge <[EMAIL PROTECTED]> wrote: > Grant Edwards <[EMAIL PROTECTED]> wrote: >>In the C implementations, the algorithms will be done >>implemented in single precision, so doing my Python prototyping >>in as close to single precision as possible would be "a good >>thing". > > So

Re: Thread-safe dictionary

2007-05-10 Thread Duncan Booth
Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: >>- would I need to override another methods e.g. update() or items() in >>order to remain thread-safe or is this enough? No, you'll need to protect almost everything. items may be safe. update, clear, get, has_key, pop, and setdefault all need a lo

How to installo????

2007-05-10 Thread RonV
Just got a new Vista system and puter Installed a newer version of Python, up from 2.2 or so... Tried to install Win extensions, but have forgotten how it's done. Clicking on setup in the Win Extsions package flashes a window by, but cannot read it. and I don't see a way to load the setup i

Re: Towards faster Python implementations - theory

2007-05-10 Thread Tim Golden
sturlamolden wrote: > On May 8, 5:53 pm, John Nagle <[EMAIL PROTECTED]> wrote: > >> The point here is that we don't need language changes or declarations >> to make Python much faster. All we need are a few restrictions that >> insure that, when you're doing something unusual, the compiler ca

newb: Python Module and Class Scope

2007-05-10 Thread johnny
Can a class inside a module, access a method, outside of class, but inside of the module? Eg. Can instance of class a access main, if so how? What is the scope of "def main()" interms of class A? myModule: class A: main() def main(): thnx. -- http://mail.python.org/mailman/listinfo/pyt

Re: newb: Python Module and Class Scope

2007-05-10 Thread rishi pathak
This works for me.Also tried importing this module into another program. The class is inside the module so like the different function's of a module can access each other,the same thing applies to a class and functions/classes #Test Module class foo: def __init__(self): self.

Re: keyword checker - keyword.kwlist

2007-05-10 Thread alessiogiovanni . baroni
On 10 Mag, 15:38, [EMAIL PROTECTED] wrote: > Hi > > I try to check whether a given input is keyword or not. However this > script won't identify keyword input as a keyword. How should I modify it > to make it work? > > #!usr/bin/env python > import keyword > > input = raw_input('Enter identifier to

Re: newb: Python Module and Class Scope

2007-05-10 Thread Duncan Booth
johnny <[EMAIL PROTECTED]> wrote: > Can a class inside a module, access a method, outside of class, but > inside of the module? > > Eg. Can instance of class a access main, if so how? What is the > scope of "def main()" interms of class A? > > myModule: > > class A: >main() > > def main(

Re: How to make Python poll a PYTHON METHOD

2007-05-10 Thread johnny
Is it possible to call threads inside another thread (nested threads)? The example above creates a thread to call a function "eat" every time based on a specified interval. Now for example, if I make the called function "eat" to spawn threads to do the work in a queue and when all jobs are done, s

Read binary data from MySQL database

2007-05-10 Thread Christoph Krammer
Hello, I try to write a python application with wx that shows images from a MySQL database. I use the following code to connect and get data when some event was triggered: dbconn = MySQLdb.connect(host="localhost", user="...", passwd="...", db="images") dbcurs = dbconn.cursor() dbcurs.execute("""

Re: Read binary data from MySQL database

2007-05-10 Thread Carsten Haese
On Thu, 2007-05-10 at 07:19 -0700, Christoph Krammer wrote: > Hello, > > I try to write a python application with wx that shows images from a > MySQL database. I use the following code to connect and get data when > some event was triggered: > > dbconn = MySQLdb.connect(host="localhost", user="..

Re: Read binary data from MySQL database

2007-05-10 Thread Stefan Sonnenberg-Carstens
On Do, 10.05.2007, 16:19, Christoph Krammer wrote: > Hello, > > I try to write a python application with wx that shows images from a > MySQL database. I use the following code to connect and get data when > some event was triggered: > > dbconn = MySQLdb.connect(host="localhost", user="...", passwd=

Re: High resolution sleep (Linux)

2007-05-10 Thread John
On 9 Maj, 03:23, John Nagle <[EMAIL PROTECTED]> wrote: > Hendrik van Rooyen wrote: > > "Tim Roberts" <[EMAIL PROTECTED]> wrote" > > It is also possible to keep the timer list sorted by "expiry date", > > and to reprogram the timer to interrupt at the next expiry time > > to give arbitrary resoluti

Re: preferred windows text editor?

2007-05-10 Thread John DeRosa
On Wed, 9 May 2007 13:06:52 -0500, "T. Crane" <[EMAIL PROTECTED]> wrote: >Right now I'm using Notepad++. What are other people using? SPE, out of the trunk. http://sourceforge.net/projects/spe/ John -- http://mail.python.org/mailman/listinfo/python-list

ANN: parley 0.2

2007-05-10 Thread Jacob Lee
Release Announcement: PARLEY version 0.2 PARLEY is an API for writing Python programs that implement the Actor model of distributed systems, in which lightweight concurrent processes communicate through asynchronous message-passing. Actor systems typically are easier to write and debug than tradit

Re: keyword checker - keyword.kwlist

2007-05-10 Thread tom
> > Hmm... I tried, and identify it. > Try to change the 'input' variable name with other... > Changed input variable to myInput, but the result is still the same. for example, 'else' isn't identified as a keyword by the script though it exists in keyword.kwlist. -- http://mail.python.org/mail

Re: How to make Python poll a PYTHON METHOD

2007-05-10 Thread Grant Edwards
On 2007-05-10, johnny <[EMAIL PROTECTED]> wrote: > Is it possible to call threads inside another thread (nested threads)? No. It's not possible to call threads because they're not callable objects. (I'm assuming you're talking about Thread objects from the threading module.) If you're asking if

SQLObject 0.7.7

2007-05-10 Thread Oleg Broytmann
Hello! I'm pleased to announce the 0.7.7 release of SQLObject. What is SQLObject = SQLObject is an object-relational mapper. Your database tables are described as classes, and rows are instances of those classes. SQLObject is meant to be easy to use and quick to get started wit

Re: Designing a graph study program

2007-05-10 Thread Alexander Schliep
andrea <[EMAIL PROTECTED]> writes: > On 9 Mag, 09:10, Alexander Schliep <[EMAIL PROTECTED]> wrote: >> Check outhttp://gato.sf.net(LGPL license). It does exactly what you >> want to do and there is a binary for MacOS X. Algorithms are implemented >> using Gato's graph class and rudimentary visualiz

SQLObject 0.8.4

2007-05-10 Thread Oleg Broytmann
Hello! I'm pleased to announce the 0.8.4 release of SQLObject. What is SQLObject = SQLObject is an object-relational mapper. Your database tables are described as classes, and rows are instances of those classes. SQLObject is meant to be easy to use and quick to get started wi

Re: preferred windows text editor?

2007-05-10 Thread Ant
On May 10, 9:59 am, Charles Sanders <[EMAIL PROTECTED]> wrote: > Ant wrote: > > > What method of executing code snippets in a Python shell do other Vim > > users use? Other than just copy/paste? > > Not vim, but good old vi so should work in vim > > 1. Mark the start of the fragment, for exampls ms

SQLObject 0.9.0

2007-05-10 Thread Oleg Broytmann
Hello! I'm pleased to announce the 0.9.0 release of SQLObject, the first stable release of the 0.9 branch. What is SQLObject = SQLObject is an object-relational mapper. Your database tables are described as classes, and rows are instances of those classes. SQLObject is meant t

RE: keyword checker - keyword.kwlist

2007-05-10 Thread Hamilton, William
> From: [EMAIL PROTECTED] > > Hi > > I try to check whether a given input is keyword or not. However this > script won't identify keyword input as a keyword. How should I modify it > to make it work? > > #!usr/bin/env python > import keyword > > input = raw_input('Enter identifier to check >> '

Re: trouble with generators

2007-05-10 Thread Diez B. Roggisch
Hans-Peter Jansen schrieb: > Hi Pythonistas, > > I'm stuck in a maze of new style classes and generators. While I love the > concepts, I obviously didn't grok them throughout. > > I'm trying to generate a bunch of similar classes, where some are contained > in list attributes of others, e.g.:

Re: trouble with generators

2007-05-10 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Hans-Peter Jansen wrote: > class Gen(object): > def records(self, cls): > for i in range(3): > setattr(cls, "id", "%s%s" % (cls.__doc__, i)) > yield cls > > […] > > class GenA(Gen): > def __init__(self): > self.genB = GenB()

ANN: eGenix mx Base Distribution 3.0.0 (mxDateTime, mxTextTools, etc.)

2007-05-10 Thread eGenix Team: M.-A. Lemburg
ANNOUNCING eGenix.com mx Base Extension Package Version 3.0.0 Open Source Python extensions providing important and useful services for Python programmers

ANN: eGenix mxODBC Distribution 3.0.0 (mxODBC Database Interface)

2007-05-10 Thread eGenix Team: M.-A. Lemburg
ANNOUNCING eGenix.com mxODBC Database Interface Version 3.0.0 Our commercially supported Python extension providing ODBC database connectivity to Python applications

Re: keyword checker - keyword.kwlist

2007-05-10 Thread Steven D'Aprano
On Thu, 10 May 2007 13:38:40 +, tom wrote: > Hi > > I try to check whether a given input is keyword or not. However this > script won't identify keyword input as a keyword. How should I modify it > to make it work? It works for me. Try printing keyword.__file__ to make sure you are impor

Re: keyword checker - keyword.kwlist

2007-05-10 Thread Sion Arrowsmith
In article <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> wrote: [ ... ] >> Try to change the 'input' variable name with other... >Changed input variable to myInput, but the result is still the same. That was good advice, but isn't going to help here. Because "input" isn't a keyword, it's a builtin. If

Re: keyword checker - keyword.kwlist

2007-05-10 Thread tom
Still no go. I just can't get it right. My current script: #!usr/bin/env python import keyword myInput = raw_input('Enter identifier to check >> ') if myInput in keyword.kwlist: print myInput, "is keyword" else: print myInput, "is not keyword" print keyword.kwlist print keyword.__file

Newbie look at Python and OO

2007-05-10 Thread walterbyrd
I learned to program with Pascal, way back when. Went into software development for a while, then went into systems admin. Have programmed in several languages, just learning Python. Some things I find odd: 1) 5/-2 == -3? 2) list assignment handling, pointing two vars to the same list: With sim

Re: Newbie look at Python and OO

2007-05-10 Thread Carsten Haese
On Thu, 2007-05-10 at 08:58 -0700, walterbyrd wrote: > I learned to program with Pascal, way back when. Went into software > development for a while, then went into systems admin. Have programmed > in several languages, just learning Python. > > Some things I find odd: > > 1) 5/-2 == -3? Divisio

Re: Newbie look at Python and OO

2007-05-10 Thread Grant Edwards
On 2007-05-10, walterbyrd <[EMAIL PROTECTED]> wrote: > 2) list assignment handling, pointing two vars to the same list: Python doesn't have variables. It has objects to which you can bind names. > But with lists: a = list("1234") That creates a list object and binds the name "a" to it.

Re: change of random state when pyc created??

2007-05-10 Thread Robert Kern
Alan Isaac wrote: > "Carsten Haese" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> I was simply pointing out all the ways in which you made it difficult for > the >> community to explain your problem. > > And without that community, I would still not have a clue. > Thanks to all!

Re: Newbie look at Python and OO

2007-05-10 Thread Chris Mellon
On 10 May 2007 08:58:54 -0700, walterbyrd <[EMAIL PROTECTED]> wrote: > I learned to program with Pascal, way back when. Went into software > development for a while, then went into systems admin. Have programmed > in several languages, just learning Python. > > Some things I find odd: > > 1) 5/-2 =

Re: Newbie look at Python and OO

2007-05-10 Thread Larry Bates
walterbyrd wrote: > I learned to program with Pascal, way back when. Went into software > development for a while, then went into systems admin. Have programmed > in several languages, just learning Python. > > Some things I find odd: > > 1) 5/-2 == -3? > > 2) list assignment handling, pointing

Re: replacing string in xml file--revisited

2007-05-10 Thread half . italian
On May 10, 4:21 am, [EMAIL PROTECTED] wrote: > On May 10, 1:55 pm, [EMAIL PROTECTED] wrote: > > > > > On May 10, 12:56 am, [EMAIL PROTECTED] wrote: > > > > Hi, > > > I need to replace a string in xml file with something else.Ex > > > > - > > > rate > > > rate > > > > > > > > > >

Re: Newbie look at Python and OO

2007-05-10 Thread jmg3000
On May 10, 11:58 am, walterbyrd <[EMAIL PROTECTED]> wrote: >[snip] > > 2) list assignment handling, pointing two vars to the same list: > > With simple data types:>>> a = 5 > >>> b = a > >>> a = 3 > >>> a,b > > (3, 5) > > Which is what I'd expect, since I have changed a, but not b. > > But with lis

Re: change of random state when pyc created??

2007-05-10 Thread Carsten Haese
On Thu, 2007-05-10 at 11:29 -0500, Robert Kern wrote: > """Never rely on the order of dictionaries and sets.""" Easy, Robert, there's a baby in that bathwater. I think it's useful to note that the arbitrary ordering returned by dict.keys() et al. is locally stable in the absence of intervening mo

  1   2   3   >