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

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

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

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

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

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

ANN: PyMite release 05

2007-05-10 Thread dwhall
.. Hello, I would like to announce the fifth release of PyMite. PyMite is still in its experimental stages. It works pretty well, but you need to know C, makefiles and how to cross-compile using gcc or other compiler. !!Dean == PyMite == :Author:Dean Hall :Copyright:

Re: change of random state when pyc created??

2007-05-10 Thread Alan Isaac
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! Please feel free to suggest

Re: preferred windows text editor?

2007-05-10 Thread Flavio Preto
I use VIM here too. Mainly because i always switch from Windows to Linux and using the same text editor is a way to avoid getting crazy. []'s Preto On 9 May 2007 15:21:41 -0700, BartlebyScrivener [EMAIL PROTECTED] wrote: On May 9, 1:26 pm, Looney, James B [EMAIL PROTECTED] wrote: I'm using

Re: elegant python style for loops

2007-05-10 Thread Gary Herron
[EMAIL PROTECTED] wrote: To step through a list, the python style is avoid an explicit index. But what if the same hidden index is to be used for more than one list for example:- for key,value in listKeys,listValues : newdict[key]=value won't work as it is a tuple of lists, as

Re: elegant python style for loops

2007-05-10 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: To step through a list, the python style is avoid an explicit index. But what if the same hidden index is to be used for more than one list for example:- for key,value in listKeys,listValues : newdict[key]=value won't work as it is a tuple of lists, as

Re: elegant python style for loops

2007-05-10 Thread Peter Otten
[EMAIL PROTECTED] wrote: To step through a list, the python style is avoid an explicit index. But what if the same hidden index is to be used for more than one list for example:- for key,value in listKeys,listValues : newdict[key]=value won't work as it is a tuple of lists, as

Re: Erlang style processes for Python

2007-05-10 Thread Jacob Lee
On Wed, 09 May 2007 18:16:32 -0700, Kay Schluehr wrote: Every once in a while Erlang style [1] message passing concurrency [2] is discussed for Python which does not only imply Stackless tasklets [3] but also some process isolation semantics that lets the runtime easily distribute tasklets (

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

2007-05-10 Thread James T. Dennis
Dennis Lee Bieber [EMAIL PROTECTED] wrote: On Wed, 09 May 2007 06:50:38 -, James T. Dennis [EMAIL PROTECTED] declaimed the following in comp.lang.python: In fact I realized, after reading through tempfile.py in /usr/lib/... that the following also doesn't work like I'd expect:

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

2007-05-10 Thread James T. Dennis
Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote: In [EMAIL PROTECTED], James T. Dennis wrote: Tonight I discovered something odd in the __doc__ for tempfile as shipped with Python 2.4.4 and 2.5: it says: This module also provides some data items to the user: TMP_MAX -

Re: change of random state when pyc created??

2007-05-10 Thread Raymond Hettinger
On May 9, 6:42 am, Alan Isaac [EMAIL PROTECTED] wrote: Is there a warning anywhere in the docs? Should there be? I do not think additional documentation here would be helpful. One could note that the default hash value is the object id. Somewhere else you could write that the placement of

Re: elegant python style for loops

2007-05-10 Thread Asun Friere
On May 10, 4:20 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote: for a, b in zip(lista, listb): ... You don't even need the for loop nowadays. Just pass the zipped list to a dictionary constructor thusly: newdict = dict(zip(listKeys,listValues)) Asun --

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

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 that

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 appointment

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 - SERVICEPARAMETER id=_775 Semantics=subfunction DDORef=_54 SHORTNAMErate/SHORTNAME LONGNAMErate/LONGNAME VALUE role=constant DataType=unsigned value=1 / BYTEPOSITION role=position BytePos=1 / /SERVICEPARAMETER -

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 scripts.

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.

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 QA for great

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 stop spamming,

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...' solution

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 can only be

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 change

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 name can only be bound

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

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 code

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 my

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

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

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]: 'spam' I know

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 - SERVICEPARAMETER id=_775 Semantics=subfunction DDORef=_54 SHORTNAMErate/SHORTNAME LONGNAMErate/LONGNAME VALUE role=constant DataType=unsigned value=1 /

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

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

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

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 - SERVICEPARAMETER id=_775 Semantics=subfunction DDORef=_54 SHORTNAMErate/SHORTNAME LONGNAMErate/LONGNAME VALUE role=constant DataType=unsigned value=1 /

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 - SERVICEPARAMETER id=_775 Semantics=subfunction DDORef=_54 SHORTNAMErate/SHORTNAME LONGNAMErate/LONGNAME VALUE

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 % arg to:

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 seems

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 the

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()'

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 interested in

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). TJG --

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

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;

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 have to

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 - SERVICEPARAMETER id=_775 Semantics=subfunction DDORef=_54 SHORTNAMErate/SHORTNAME LONGNAMErate/LONGNAME VALUE

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 May

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

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

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 floating

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

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 the breath

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

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):

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() dict.__init__(self,

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 depend on

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

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 in an

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, SBCL

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

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. Something like

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 lock in

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

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 can tell.

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. --

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):

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 check

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(): thnx.

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,

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(SELECT

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 resolution, instead of

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

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. --

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

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 visualizations you

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

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 (to mark

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

  1   2   3   >