py-postgresql-0.8 for Python 3 Released: Was pg_proboscis

2009-04-04 Thread jwp
I'm pleased to announce the release of py-postgresql 0.8. This release marks months of work porting the 2.x code to Python 3 and making numerous improvements. py-postgresql is a port of pg_proboscis-1.0 and other projects under the pg/python project umbrella. This release simplifies the project

mystic-0.1a1

2009-04-04 Thread Michael McKerns
mystic: a simple model-independent inversion framework http://www.its.caltech.edu/~mmckerns/software.html # Version 0.1a1: 04/03/09 # Highlights Solvers: - Differential Evolution (x2) - Nelder-Mead Simplex - Powell's Directional Search Method API: - solvers share a common interface

pyspread 0.0.11 released

2009-04-04 Thread mmanns
pyspread 0.0.11 released Homepage: - http://pyspread.sf.net About: -- Pyspread is a cross-platform spreadsheet application that is based on and written in the programming language Python. Pyspread provides an arbitrary size, three-dimensional grid

[RELEASED] Python 3.1 alpha 2

2009-04-04 Thread Benjamin Peterson
On behalf of the Python development team, I'm thrilled to announce the second alpha release of Python 3.1. Python 3.1 focuses on the stabilization and optimization of features and changes Python 3.0 introduced. For example, the new I/O system has been rewritten in C for speed. Other features

Re: Cannot find text in *.py files with Windows Explorer?

2009-04-04 Thread Tim Golden
John Doe wrote: Anybody have a solution for Windows (XP) Explorer search not finding ordinary text in *.py files? It came up a couple of months ago either on this list or on python-win32. Don't have web access at the moment, but try searching the archives for references to search, registry

Re: Cannot find text in *.py files with Windows Explorer?

2009-04-04 Thread John Doe
Tim Golden m...@timgolden.me.uk wrote: Now I think about it, try searching for xplorer2 since I think I mentioned that I have used that instead of explorer for some while. Yeah... at least by the time I move from Windows XP to Windows 7, very likely I will be using a different file

Re: python needs leaning stuff from other language

2009-04-04 Thread Robert Kern
On 2009-04-03 23:48, Tim Wintle wrote: On Fri, 2009-04-03 at 18:27 -0500, Robert Kern wrote: agreed. If .clear was to be added then really assignments to slices should be entirely removed. Please tell me you are joking. Well I'm not joking as such. I've noticed that python-ideas seems to be

Re: Problem understanding some unit tests in Python distribution

2009-04-04 Thread Peter Otten
André wrote: Hi everyone, In the hope of perhaps contributing some additional unit tests for Python (thus contributing back to the community), I dove in the code and found something that should be simple but that I can not wrap my head around. In list_tests.py, one finds === from test

Re: Module caching

2009-04-04 Thread Graham Dumpleton
On Apr 4, 10:41 am, Jon Clements jon...@googlemail.com wrote: On 3 Apr, 23:58, Aaron Scott aaron.hildebra...@gmail.com wrote: are you an experienced python programmer? Yeah, I'd link to think I'm fairly experienced and not making any stupid mistakes. That said, I'm fairly new to working

TODAY April 4 -Guido Python 3000 @ Global FSW Voice Meeting BerkeleyTIP -Linus,Guido,Shuttleworth...

2009-04-04 Thread john_re
Guido - Python 3000 video. 5PM Python hour Anyone: Please email me or the BTIP list if you know of any recent (past 12 months) Python videos. Thanks. :) Join with the friendly, productive, Global FSW community, in the _TWICE_ monthly, Voice over internet meeting, BerkeleyTIP-Global.

Re: how to optimize zipimport

2009-04-04 Thread Coonay.appspot
On Apr 2, 6:26 pm, John Machin sjmac...@lexicon.net wrote: On Mar 30, 11:39 pm, Coonay fla...@gmail.com wrote: On Mar 26, 1:38 pm, John Machin sjmac...@lexicon.net wrote: On Mar 26, 2:06 pm, Coonay fla...@gmail.com wrote: On Mar 26, 10:41 am, Coonay fla...@gmail.com wrote: in

Re: Hash of None varies per-machine

2009-04-04 Thread Thomas Bellman
Steven D'Aprano st...@remove-this-cybersource.com.au wrote: You can hash numbers no matter how big they are. hash(float('inf')) 314159 Cute. And hash(float('-inf')) is -271828... -- Thomas Bellman, Lysator Computer Club, Linköping University, Sweden God is real, but Jesus is an

Re: Problem understanding some unit tests in Python distribution

2009-04-04 Thread André
On Apr 4, 4:38 am, Peter Otten __pete...@web.de wrote: André wrote: Hi everyone, In the hope of perhaps contributing some additional unit tests for Python (thus contributing back to the community), I dove in the code and found something that should be simple but that I can not wrap my

Re: is there a way to collect twitts with python?

2009-04-04 Thread '2+
anyway i found: http://code.google.com/p/python-twitter/ and http://mike.verdone.ca/twitter/ and both were easy to install on intrepid .. but didn't work python-twitter did work by manually downloading: http://python-twitter.googlecode.com/svn/trunk/twitter.py well but it seems like i have to

How to free /destroy object created by PyTuple_New

2009-04-04 Thread grbgooglefan
I am using PyTuple_New to pass function arguments to PyObject_CallObject for execution of a Python function. How can I free up the memory and object allocated by the PyTuple_New function? I am using Python interpreter in my multi-threaded C application at load condition my application crashes

Re: Pythoner,Wish me luck!

2009-04-04 Thread Hendrik van Rooyen
barisa bbaj...@gmail.com wrote: Hi, I'm also begginer in python; i did few basic programs about graph etc.. my question is : what benefit is using interactive intrepreter ? i come from java backround, so I use eclipse for python as well. I start my program, it does it's job, and that's it.

PyFunction_New examples

2009-04-04 Thread Trigve
Hi, I'm trying to use PyFunction_New() function but I've problem finding out how it works. What I'm trying to do is to create python function on the fly and then trying to create function object from if via PyFunction_New. My problems are similar to this:

statvfs clearance

2009-04-04 Thread Sreejith K
Python's statvfs module contains the following indexes to use with os.statvfs() that contains the specified information statvfs.F_BSIZE Preferred file system block size. statvfs.F_FRSIZE Fundamental file system block size. statvfs.F_BLOCKS Total number of blocks in the filesystem.

Re: Hash of None varies per-machine

2009-04-04 Thread Hendrik van Rooyen
Steven D'Aprano st...@remove..urce.com.au wrote: On Fri, 03 Apr 2009 10:50:08 -0700, ben.taylor wrote: 2. Should the hash of None vary per-machine? I can't think why you'd write code that would rely on the value of the hash of None, but you might I guess. The value of hash(None) appears to

Re: statvfs clearance

2009-04-04 Thread Albert Hopkins
On Sat, 2009-04-04 at 03:56 -0700, Sreejith K wrote: Python's statvfs module contains the following indexes to use with os.statvfs() that contains the specified information statvfs.F_BSIZE Preferred file system block size. statvfs.F_FRSIZE Fundamental file system block size.

Re: is there a way to collect twitts with python?

2009-04-04 Thread Hendrik van Rooyen
Dennis Lee Bieber wlfr...@ix.netcom.com wrote: Given the subject line -- my first thought was Depends on the density of the twitt population, and how hungry the python is G I see that everybody is politically correctly maintaining the three t twitt spelling, instead of yielding to the obvious

Re: Undefined symbol PyUnicodeUCS2_DecodeUTF8

2009-04-04 Thread Diez B. Roggisch
Manish Jain schrieb: Hi all, I am using Gnome on FreeBSD 7.1. A few days back, my gnome crashed and I have had to spend over 4 days recovering my gnome environment. Pretty much everything is okay now except for a few python-dependent applications (alacarte, for instance), which exit

Re: User or UserManager ? Problems of Observer Pattern

2009-04-04 Thread 一首诗
Thanks for your advice. I studied python from the tutorial and the library manual, and I think I am familiar enough with Python's grammar and API. That's why I never thought I need to read a book of Python. But if Programming Python also explains OO, I would be happy to read it. In fact, I am

Re: django model problem

2009-04-04 Thread Dave Angel
Mark wrote: I think the first thing you need to do is decide if there is going to be more than one Musician object. and more than one Album object. Presently you are giving all musicians the same first_name and last_name. I suggest you look up the documentation for the special method

Re: A design problem I met again and again.

2009-04-04 Thread 一首诗
That's clever. I never thought of that. Not only something concrete, like people, could be class, but a procedure, like a Session, could also be a Class. Thanks for you all who replied. I learned a lot from this thread and I even made some notes of all your advices because I think I might

[ANN] Pyro 3.9 released

2009-04-04 Thread Irmen de Jong
Hi, Pyro 3.9 has been released! Pyro is a an advanced and powerful Distributed Object Technology system written entirely in Python, that is designed to be very easy to use. Have a look at http://pyro.sourceforge.net for more information. Highlights of this release are: - improved

Re: Cannot find text in *.py files with Windows Explorer?

2009-04-04 Thread Dikkie Dik
Anybody have a solution for Windows (XP) Explorer search not finding ordinary text in *.py files? This is a known issue. You won't be able to search PHP or even VBScript files either, as they are not known text formats and are therefore considered binary, nothing to see here, move along

Re: Hash of None varies per-machine

2009-04-04 Thread Steven D'Aprano
On Sat, 04 Apr 2009 13:09:06 +0200, Hendrik van Rooyen wrote: Any object can be hashed if it has a working __hash__ method. There's no reason not to have None hashable -- it costs nothing and allows you to use None as a dict key. So what happens if I try to pickle the dict and keep it for next

Re: PEP 382: Namespace Packages

2009-04-04 Thread Martin v. Löwis
-0 My main concern is that we'll start seeing all kinds of packages with names like: com.dusinc.sarray.ptookkit.v_1_34_beta.btree.BTree The current lack of global package namespace effectively prevents bureaucratic package naming, which in my mind makes it worth the cost. However,

Re: A design problem I met again and again.

2009-04-04 Thread andrew cooke
Note sure who wrote: Consolidate existing functions? I've thought about it. For example, I have two functions: #= def startXXX(id): pass def startYYY(id): pass #= I could turn it into one:

Re: PEP 382: Namespace Packages

2009-04-04 Thread Martin v. Löwis
Neal Becker wrote: While solving this problem, is it possible also to address an issue that shows up in certain distributions? I'm specifically talking about the fact that on Redhat/Fedora, we have on x86_64 both /usr/lib/pythonxx/ and /usr/lib64/pythonxx. The former is supposed to be for

Re: A design problem I met again and again.

2009-04-04 Thread andrew cooke
andrew cooke wrote: [...] #= def start(type, id): if(type == XXX): pass else if(type == YYY): pass #= i just realised i am assuming type is a type of an object, but you might be using it to mean something else

Re: how to optimize zipimport

2009-04-04 Thread John Machin
On Apr 4, 7:06 pm, Coonay.appspot fla...@gmail.com wrote: On Apr 2, 6:26 pm, John Machin sjmac...@lexicon.net wrote: [snip] i found the the module in the zip reloaded  everytime the code is called,i mean, say ,first time it take me 1 second to call a method in the zip,but it take another

Re: python needs leaning stuff from other language

2009-04-04 Thread Giampaolo Rodola'
On 4 Apr, 04:19, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Fri, 03 Apr 2009 18:52:52 -0700, Giampaolo Rodola' wrote: If there should be one-- and preferably only one --obvious way to do it then my_list.clear() is more obvious than del my_list[:]. Honestly I'm a little

Testing dynamic languages

2009-04-04 Thread grkuntzmd
I am a Java developer. There, I said it :-). When I am writing code, I can rely on the compiler to confirm that any methods I write will be called with parameters of the right type. I do not need to test that parameter #1 really is a String before I call some method on it that only works on

Trouble with subprocess.Popen()

2009-04-04 Thread Fernando
Hi, I'm having a very strange issue with subprocess.Popen. I'm using it to call several times an external exe and keep the output in a list. Every time you call this external exe, it will return a different string. However, if I call it several times using Popen, it will always return the SAME

Re: is there a way to collect twitts with python?

2009-04-04 Thread Dotan Cohen
Python can in fact collect twits: http://www.johnwoodwardphotography.com/images/snake_girl_promo_13_x_19.jpg http://www.bennadel.com/resources/uploads/been_busy_at_kinky_solutions.jpg -- Dotan Cohen http://what-is-what.com http://gibberish.co.il --

Re: Testing dynamic languages

2009-04-04 Thread Martin P. Hellwig
grkunt...@gmail.com wrote: cut If I am writing in Python, since it is dynamically, but strongly typed, I really should check that each parameter is of the expected type, or at least can respond to the method I plan on calling (duck typing). Every call should be wrapped in a try/except statement

Re: statvfs clearance

2009-04-04 Thread Hrvoje Niksic
Sreejith K sreejith...@gmail.com writes: Python's statvfs module contains the following indexes to use with os.statvfs() that contains the specified information statvfs.F_BSIZE Preferred file system block size. [...] statvfs.F_NAMEMAX Maximum file name length. Can anyone tell me

Re: Testing dynamic languages

2009-04-04 Thread andrew cooke
grkunt...@gmail.com wrote: If I am writing in Python, since it is dynamically, but strongly typed, I really should check that each parameter is of the expected type, or at least can respond to the method I plan on calling (duck typing). Every call should be wrapped in a try/except statement to

Re: Cannot find text in *.py files with Windows Explorer?

2009-04-04 Thread John Machin
On Apr 4, 3:21 pm, John Doe j...@usenetlove.invalid wrote: Anybody have a solution for Windows (XP) Explorer search not finding ordinary text in *.py files? Get a grep on yourself! http://gnuwin32.sourceforge.net/packages/grep.htm -- http://mail.python.org/mailman/listinfo/python-list

Re: Testing dynamic languages

2009-04-04 Thread Emmanuel Surleau
On Saturday 04 April 2009 15:37:44 grkunt...@gmail.com wrote: I am a Java developer. There, I said it :-). When I am writing code, I can rely on the compiler to confirm that any methods I write will be called with parameters of the right type. I do not need to test that parameter #1 really

Re: Best way to extract from regex in if statement

2009-04-04 Thread Paul McGuire
On Apr 3, 9:26 pm, Paul Rubin http://phr...@nospam.invalid wrote: bwgoudey bwgou...@gmail.com writes: elif re.match(^DATASET:\s*(.+) , line):         m=re.match(^DATASET:\s*(.+) , line)         print m.group(1)) Sometimes I like to make a special class that saves the result:   class

Re: How to free /destroy object created by PyTuple_New

2009-04-04 Thread Andrew Svetlov
To destroy every python object you need to call Py_DECREF. To call python code fron you C thread you need to use pair PyGILState_Ensure/PyGILState_Release. -- http://mail.python.org/mailman/listinfo/python-list

Re: with open('com1', 'r') as f:

2009-04-04 Thread gert
On Apr 4, 12:58 am, Lawrence D'Oliveiro l...@geek- central.gen.new_zealand wrote: In message 8bc55c05-19da-41c4- b916-48e0a4be4...@p11g2000yqe.googlegroups.com, gert wrote:     with open('com1', 'r') as f:         for line in f:              print('line') Why bother, why not just    

Re: Testing dynamic languages

2009-04-04 Thread andrew cooke
andrew cooke wrote: if you are going to do that, stay with java. seriously - i too, am a java developer about half the time, and you can make java pretty dynamic if you try hard enough. look at exploiting aspects and functional programming libraries, for example. also, of course, scala.

Re: Testing dynamic languages

2009-04-04 Thread Luis Gonzalez
On Apr 4, 11:17 am, Emmanuel Surleau emmanuel.surl...@gmail.com wrote: On Saturday 04 April 2009 15:37:44 grkunt...@gmail.com wrote: I am a Java developer. There, I said it :-). Don't worry. I also do terrible things to support my family... --

Re: Cannot find text in *.py files with Windows Explorer?

2009-04-04 Thread drobi...@gmail.com
On Apr 4, 12:21 am, John Doe j...@usenetlove.invalid wrote: Anybody have a solution for Windows (XP) Explorer search not finding ordinary text in *.py files? Thanks. Googling turns up this. http://www.pcmag.com/article2/0,4149,1206399,00.asp I haven't tried it myself. --

Re: python needs leaning stuff from other language

2009-04-04 Thread Paul McGuire
On Apr 3, 11:48 pm, Tim Wintle tim.win...@teamrubber.com wrote: del mylist[:] * or * mylist[:] = [] * or * mylist = [] which, although semantically similar are different as far as the interpreter are concerned (since two of them create a new list): Only the last item creates a new list

Re: with open('com1', 'r') as f:

2009-04-04 Thread gert
On Apr 3, 10:10 pm, Christian Heimes li...@cheimes.de wrote: gert wrote: I do understand, and I went looking into pySerial, but it is a long way from getting compatible with python3.x and involves other libs that are big and non pyhton3.x compatible. So don't use Python 3.0. Most people

Re: statvfs clearance

2009-04-04 Thread Albert Hopkins
On Sat, 2009-04-04 at 15:48 +0200, Hrvoje Niksic wrote: Sreejith K sreejith...@gmail.com writes: Python's statvfs module contains the following indexes to use with os.statvfs() that contains the specified information statvfs.F_BSIZE Preferred file system block size. [...]

Re: python needs leaning stuff from other language

2009-04-04 Thread Zamnedix
On Apr 3, 8:48 am, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Fri, 03 Apr 2009 08:23:22 -0700, Zamnedix wrote: On Apr 2, 3:25 pm, online.serv...@ymail.com wrote: python's list needs a thing  list.clear()  like c# arraylist and python needs a writeline() method Please

Re: statvfs clearance

2009-04-04 Thread Dave Angel
Hrvoje Niksic wrote: Sreejith K sreejith...@gmail.com writes: Python's statvfs module contains the following indexes to use with os.statvfs() that contains the specified information statvfs.F_BSIZE Preferred file system block size. [...] statvfs.F_NAMEMAX Maximum file

Re: with open('com1', 'r') as f:

2009-04-04 Thread Kushal Kumaran
On Fri, 03 Apr 2009 22:10:36 +0200 Christian Heimes li...@cheimes.de wrote: gert wrote: I do understand, and I went looking into pySerial, but it is a long way from getting compatible with python3.x and involves other libs that are big and non pyhton3.x compatible. So don't use Python

Why doesn't StopIteration get caught in the following code?

2009-04-04 Thread grocery_stocker
Given the following [cdal...@localhost ~]$ python Python 2.4.3 (#1, Oct 1 2006, 18:00:19) [GCC 4.1.1 20060928 (Red Hat 4.1.1-28)] on linux2 Type help, copyright, credits or license for more information. def counter(): ... mylist = range(3) ... for i in mylist: ... yield i*i ...

lxml and xslt extensions

2009-04-04 Thread dasacc22
Hi, Im not sure where else to ask this. But basically Im having trouble figuring out how to successfully apply multiple extensions in a single transformation. So for example if i have xsl:stylesheet .../ xsl:template... my:tag/ my:tag/ /xsl:template /xsl:stylesheet in my xsl and my xslt

Re: Why doesn't StopIteration get caught in the following code?

2009-04-04 Thread Dave Angel
grocery_stocker wrote: Given the following [cdal...@localhost ~]$ python Python 2.4.3 (#1, Oct 1 2006, 18:00:19) [GCC 4.1.1 20060928 (Red Hat 4.1.1-28)] on linux2 Type help, copyright, credits or license for more information. def counter(): ... mylist = range(3) ... for i in

Re: Why doesn't StopIteration get caught in the following code?

2009-04-04 Thread andrew cooke
grocery_stocker wrote: while True: ...i = gen.next() ...print i ... 0 1 4 python's magic isn't as magic as you hope. roughly speaking, it only does the necessary rewriting (writing the equivalent code with next etc etc) when you define a function or a method that contains yield.

Re: Cannot find text in *.py files with Windows Explorer?

2009-04-04 Thread Dave Angel
John Doe wrote: Tim Golden m...@timgolden.me.uk wrote: Now I think about it, try searching for xplorer2 since I think I mentioned that I have used that instead of explorer for some while. Yeah... at least by the time I move from Windows XP to Windows 7, very likely I will be using a

Re: lxml and xslt extensions

2009-04-04 Thread dasacc22
On Apr 4, 11:31 am, dasacc22 dasac...@gmail.com wrote: Hi, Im not sure where else to ask this. But basically Im having trouble figuring out how to successfully apply multiple extensions in a single transformation. So for example if i have xsl:stylesheet .../ xsl:template... my:tag/

Re: Hash of None varies per-machine

2009-04-04 Thread Hendrik van Rooyen
Steven D'Aprano st...@r..rsource.com.au wrote: Seems to me you have misunderstood the way pickling works. Yeah right - have you ever looked at the pickle code? Good to hear it just works :-) - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: is there a way to collect twitts with python?

2009-04-04 Thread Bradley Wright
Just to pimp my own wares: http://github.com/bradleywright/yatcip/tree/master A Python Twitter client. -- http://mail.python.org/mailman/listinfo/python-list

Re: Testing dynamic languages

2009-04-04 Thread Francesco Bochicchio
On Sat, 04 Apr 2009 07:37:44 -0700, grkuntzmd wrote: I am a Java developer. There, I said it :-). When I am writing code, I can rely on the compiler to confirm that any methods I write will be called with parameters of the right type. I do not need to test that parameter #1 really is a

Re: Testing dynamic languages

2009-04-04 Thread Tim Wintle
On Sat, 2009-04-04 at 06:37 -0700, grkunt...@gmail.com wrote: If I am writing in Python, since it is dynamically, but strongly typed, I really should check that each parameter is of the expected type, or at least can respond to the method I plan on calling (duck typing). Every call should be

Re: python needs leaning stuff from other language

2009-04-04 Thread Tim Wintle
On Sat, 2009-04-04 at 02:03 -0500, Robert Kern wrote: Let's be clear: python-ideas seems positive on the idea of adding a .clear() method. *Completely removing* slice assignment has not been broached there. Yup, sorry - I did mean to refer to the initial suggestion, rather than my comments

Re: with open('com1', 'r') as f:

2009-04-04 Thread gert
On Apr 4, 5:20 pm, Kushal Kumaran kushal.kuma...@gmail.com wrote: On Fri, 03 Apr 2009 22:10:36 +0200 Christian Heimes li...@cheimes.de wrote: gert wrote: I do understand, and I went looking into pySerial, but it is a long way from getting compatible with python3.x and involves other

Re: Testing dynamic languages

2009-04-04 Thread grkuntzmd
This may be obvious but, clearly there are (at least) two general types of errors: those caused by data external to the program and those caused by bugs in the program. For all inputs coming into the program from outside, such as user inputs and data coming over a network, the inputs must be

Re: django model problem

2009-04-04 Thread Mark
Anyway, since I don't have time to actually install and configure Django to experiment, I'd suggest you post a query on the django-users mailing list, at http://groups.google.com/group/django-users Yes, that's what I did - it seems my problem is either a tough one, or it's just impossible

Re: Hash of None varies per-machine

2009-04-04 Thread Peter Pearson
On 03 Apr 2009 10:57:05 -0700, Paul Rubin http wrote: ben.tay...@email.com writes: 1. Is it correct that if you hash two things that are not equal they might give you the same hash value? Yes, hashes are 32 bit numbers and there are far more than 2**32 possible Python values (think of long

Re: with open('com1', 'r') as f:

2009-04-04 Thread Gabriel Genellina
En Sat, 04 Apr 2009 11:29:22 -0300, gert gert.cuyk...@gmail.com escribió: On Apr 4, 12:58 am, Lawrence D'Oliveiro l...@geek- central.gen.new_zealand wrote: In message 8bc55c05-19da-41c4- b916-48e0a4be4...@p11g2000yqe.googlegroups.com, gert wrote:     with open('com1', 'r') as f:         for

Best Compatible JS Lib for Django

2009-04-04 Thread ntwrkd
Does anyone have experience with using JS Libraries with Django? Do some work better than others and are easier to code with? TIV -- http://mail.python.org/mailman/listinfo/python-list

Re: dict view to list

2009-04-04 Thread Aahz
In article 6b4065b0-6af7-4aff-8023-40e5d521f...@v19g2000yqn.googlegroups.com, Luis Gonzalez luis...@gmail.com wrote: Yes, I know the python approach is to use built-ins. But wouldn't it be cool if we could do mydict.values().tolist() instead? It would be more regular and intuitive and readable

Generators/iterators, Pythonicity, and primes

2009-04-04 Thread John Posner
Inspired by recent threads (and recalling my first message to Python edu-sig), I did some Internet searching on producing prime numbers using Python generators. Most algorithms I found don't go for the infinite, contenting themselves with list all the primes below a given number. Here's a very

Re: lxml and xslt extensions

2009-04-04 Thread Stefan Behnel
Hi, dasacc22 wrote: On Apr 4, 11:31 am, dasacc22 wrote: Im not sure where else to ask this. The best place to ask is the lxml mailing list: http://codespeak.net/mailman/listinfo/lxml-dev But basically Im having trouble figuring out how to successfully apply multiple extensions in a single

Can't one collect twitts and twits in any language?

2009-04-04 Thread Casey Hawthorne
:) -- Regards, Casey -- http://mail.python.org/mailman/listinfo/python-list

Re: Cannot find text in *.py files with Windows Explorer?

2009-04-04 Thread John Doe
Dave Angel da...@dejaviewphoto.com wrote: John Doe wrote: ...at least by the time I move from Windows XP to Windows 7, very likely I will be using a different file manager. If I cannot search Python files, now might be a good time to switch. and the product xplorer2 is at

Re: Generators/iterators, Pythonicity, and primes

2009-04-04 Thread Mark Tolonen
John Posner jjpos...@snet.net wrote in message news:af9fbcc3a7624599a6f51bad2397e...@amdup... Inspired by recent threads (and recalling my first message to Python edu-sig), I did some Internet searching on producing prime numbers using Python generators. Most algorithms I found don't go for

Re: python needs leaning stuff from other language

2009-04-04 Thread Diez B. Roggisch
Tim Wintle schrieb: On Sat, 2009-04-04 at 02:03 -0500, Robert Kern wrote: Let's be clear: python-ideas seems positive on the idea of adding a .clear() method. *Completely removing* slice assignment has not been broached there. Yup, sorry - I did mean to refer to the initial suggestion, rather

Re: Best Compatible JS Lib for Django

2009-04-04 Thread Daniel Fetchinson
Does anyone have experience with using JS Libraries with Django? Do some work better than others and are easier to code with? You might want to ask this on the django list. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown --

RE: Generators/iterators, Pythonicity, and primes

2009-04-04 Thread John Posner
Mark Tolonen said: p = sqrt(n) works a little better :^) -Mark Right you are -- I found that bug in my last-minute check, and then I forgot to trannscribe the fix into the email message. Duh -- thanks! -John E-mail message checked by Spyware Doctor (6.0.0.386) Database version:

Re: Testing dynamic languages

2009-04-04 Thread bearophileHUGS
grkunt...: If I am writing in Python, since it is dynamically, but strongly typed, I really should check that each parameter is of the expected type, or at least can respond to the method I plan on calling (duck typing). Every call should be wrapped in a try/except statement to prevent the

Re: with open('com1', 'r') as f:

2009-04-04 Thread Diez B. Roggisch
gert schrieb: On Apr 3, 10:10 pm, Christian Heimes li...@cheimes.de wrote: gert wrote: I do understand, and I went looking into pySerial, but it is a long way from getting compatible with python3.x and involves other libs that are big and non pyhton3.x compatible. So don't use Python 3.0.

Re: python needs leaning stuff from other language

2009-04-04 Thread Robert Kern
On 2009-04-04 12:07, Tim Wintle wrote: On Sat, 2009-04-04 at 02:03 -0500, Robert Kern wrote: Let's be clear: python-ideas seems positive on the idea of adding a .clear() method. *Completely removing* slice assignment has not been broached there. Yup, sorry - I did mean to refer to the initial

Re: with open('com1', 'r') as f:

2009-04-04 Thread Christian Heimes
gert wrote: On Apr 3, 10:10 pm, Christian Heimes li...@cheimes.de wrote: gert wrote: I do understand, and I went looking into pySerial, but it is a long way from getting compatible with python3.x and involves other libs that are big and non pyhton3.x compatible. So don't use Python 3.0. Most

Re: is there a way to collect twitts with python?

2009-04-04 Thread '2+
nice info, thanx that # stalk my stalkers example look smart i won't use that one if it was for this ml ;D On Sun, Apr 5, 2009 at 1:22 AM, Bradley Wright bradl...@gmail.com wrote: Just to pimp my own wares: http://github.com/bradleywright/yatcip/tree/master A Python Twitter client. --

Re: with open('com1', 'r') as f:

2009-04-04 Thread Gabriel Genellina
En Sat, 04 Apr 2009 14:11:12 -0300, gert gert.cuyk...@gmail.com escribió: On Apr 4, 5:20 pm, Kushal Kumaran kushal.kuma...@gmail.com wrote: On Fri, 03 Apr 2009 22:10:36 +0200 Christian Heimes li...@cheimes.de wrote: gert wrote: I do understand, and I went looking into pySerial, but it is

Creating a session in windows to auth to remote machines

2009-04-04 Thread ericwoodworth
Hi, I'm trying to auth to remote machines so I can plunder WMI to get logs and settings and the like. My script works for most of my machines because they're all in the same domain and I run the script as somebody who has enough access to get at this stuff but for machines off the domain I'm

cProfile.py not found.

2009-04-04 Thread Rahul
I need to profile a slow-running code. The problem is I cannot seem to find cProfile.py. Where can I get it? Is it not included in the normal distro? I tried googling it up and theres tons of info on how to use it but no links for where to download it from. I am using Python 2.4.4 (#3, Feb

Re: Creating a session in windows to auth to remote machines

2009-04-04 Thread ericwoodworth
On Apr 4, 6:39 pm, ericwoodwo...@gmail.com wrote: Hi,      I'm trying to auth to remote machines so I can plunder WMI to get logs and settings and the like.  My script works for most of my machines because they're all in the same domain and I run the script as somebody who has enough access

Re: cProfile.py not found.

2009-04-04 Thread Robert Kern
On 2009-04-04 17:46, Rahul wrote: I need to profile a slow-running code. The problem is I cannot seem to find cProfile.py. Where can I get it? Is it not included in the normal distro? I tried googling it up and theres tons of info on how to use it but no links for where to download it from. I

Re: cProfile.py not found.

2009-04-04 Thread John Yeung
I believe cProfile was added in 2.5. Your best bet on 2.4 is probably the profile module. That is what the docs recommend. John -- http://mail.python.org/mailman/listinfo/python-list

Re: cProfile.py not found.

2009-04-04 Thread Rahul
Robert Kern robert.k...@gmail.com wrote in news:mailman.3312.1238885852.11746.python-l...@python.org: What system are you on? Some Linux distributions put it into a separate package, like python-profile. The python.org Windows and Mac binaries should have it, though. THanks Robert. I'm

[RELEASED] Python 3.1 alpha 2

2009-04-04 Thread Benjamin Peterson
On behalf of the Python development team, I'm thrilled to announce the second alpha release of Python 3.1. Python 3.1 focuses on the stabilization and optimization of features and changes Python 3.0 introduced. For example, the new I/O system has been rewritten in C for speed. Other features

Re: cProfile.py not found.

2009-04-04 Thread Robert Kern
On 2009-04-04 18:08, John Yeung wrote: I believe cProfile was added in 2.5. Your best bet on 2.4 is probably the profile module. That is what the docs recommend. Oops, I missed that piece of information. Alternately, the OP can install lsprof, which was cProfile's third-party incarnation

Re: cProfile.py not found.

2009-04-04 Thread John Machin
On Apr 5, 8:46 am, Rahul nos...@nospam.invalid wrote: I need to profile a slow-running code. The problem is I cannot seem to find   cProfile.py. Where can I get it? Is it not included in the normal distro? I tried googling it up and theres tons of info on how to use it but no links for where

possible pairings in a set

2009-04-04 Thread Ross
I'm new to python and I'm trying to come up with a function that takes a given number of players in a game and returns all possible unique pairings. Here's the code I've come up with so far, but I'm not getting the output I'd like to: def all_pairings(players): cleanlist = [] for

Re: what does execfile mean within profiler output and why does it not have a attached line number

2009-04-04 Thread John Machin
On Apr 5, 9:56 am, Rahul nos...@nospam.invalid wrote: profile tells me that most of my runtime was spent in just one part (1.28 sec cumulatively out of 1.29 secs. But what is execfile? I don't see this as a function call with my python code. Also what's the 0 in the snippet:   :0(execfile)?

Re: possible pairings in a set

2009-04-04 Thread Benjamin Peterson
Ross ross.jett at gmail.com writes: Can you guys help me out? Do you have Python 2.6? If so, it's a solved problem. :) import itertools possible_pairings = list(itertools.combinations(players, 2)) -- http://mail.python.org/mailman/listinfo/python-list

Re: cProfile.py not found.

2009-04-04 Thread Rahul
John Machin sjmac...@lexicon.net wrote in news:0a8400dc-b14b-4bb9-a608- 7327fe88a...@j18g2000prm.googlegroups.com: Read the fantastic manual: http://docs.python.org/library/profile.html [snip] cProfile is recommended for most users; it's a C extension with reasonable overhead that

Re: cProfile.py not found.

2009-04-04 Thread John Machin
On Apr 5, 9:41 am, Rahul nos...@nospam.invalid wrote: John Machin sjmac...@lexicon.net wrote in news:0a8400dc-b14b-4bb9-a608- 7327fe88a...@j18g2000prm.googlegroups.com: Read the fantastic manual: http://docs.python.org/library/profile.html  [snip]       cProfile is recommended for most

  1   2   3   >