Introduction to Python/Practical Django Skills: Places Still Available

2010-01-13 Thread Steve Holden
Please note that it isn't too late to join either or both of these New York City classes. Introduction to Python runs from January 19-21. Practical Django Skills runs on January 22. More details from http://holdenweb.com/py/training/ or http://holdenweb.eventbrite.com/ regards Steve --

Sphinx 0.6.4 released

2010-01-13 Thread Georg Brandl
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, I'm proud to announce the release of Sphinx 0.6.4, which is a bugfix-only release in the 0.6 series. What is it? === Sphinx is a tool that makes it easy to create intelligent and beautiful documentation for Python projects (or other

Python-URL! - weekly Python news and links (Jan 13)

2010-01-13 Thread Gabriel Genellina
QOTW: ... if I want to know something new (be it a computer language or anything else, such as economics, history, science) I skip the introductory material and go directly to the discussion, to the issues. This is for me the most effective and interesting way of learning something new. And if

Re: Bugs in CPython 3.1.1 [wave.py]

2010-01-13 Thread Alf P. Steinbach
* Stefan Behnel: Alf P. Steinbach, 13.01.2010 06:55: * Steven D'Aprano: I think you need to chill out and stop treating a simple bug report as a personal slight on you. I'm sorry but you're again trying to make people believe something that you know is false, which is commonly called

usage of .pth files

2010-01-13 Thread swapnil
Python's documentation (http://docs.python.org/install/ index.html#modifying-python-s-search-path) states that we can add more locations to python's module search path by add a path configuration file to a directory that’s already on Python’s path, usually to the .../site-packages/ directory

get back my simple little string after re search and replace

2010-01-13 Thread Gontrand Trudau
Hi, I have read the python doc pretty much, played around with python code, but unable to get back my string after made my replacement with python RE Here my string : ['em...@msn.com ;em...@msn.com ;name, firstname

Re: parsing an Excel formula with the re module

2010-01-13 Thread Paul McGuire
On Jan 5, 1:49 pm, Tim Chase python.l...@tim.thechases.com wrote: vsoler wrote: Hence, I need toparseExcel formulas. Can I do it by means only of re (regular expressions)? I know that for simple formulas such as =3*A7+5 it is indeed possible. What about complex for formulas that include

Re: Bugs in CPython 3.1.1 [wave.py]

2010-01-13 Thread Stefan Behnel
Alf P. Steinbach, 13.01.2010 09:00: I'm sorry but as Steven did in the quoted material above you're trying to make people believe something that you know is false: I haven't blamed the world, nor described the bug as terrible or a doom, and you know that. I admit that I took the freedom to

Re: Bugs in CPython 3.1.1 [wave.py]

2010-01-13 Thread Steven D'Aprano
On Wed, 13 Jan 2010 06:55:27 +0100, Alf P. Steinbach wrote: * Steven D'Aprano: On Tue, 12 Jan 2010 23:47:31 +0100, Alf P. Steinbach wrote: PS: Next time it would have helped to include a URL to the issue. http://bugs.python.org/issue7681 FYI there is already some feedback in the

Re: Bugs in CPython 3.1.1 [wave.py]

2010-01-13 Thread Alf P. Steinbach
* Steven D'Aprano: Nobody is trying to understate the complexity of writing a large application that supports both 2.6 and 3.x, or of taking an existing library written for 2.5 and upgrading it to support 3.1. But the magnitude of these tasks is no greater (and potentially smaller) than

Re: Bugs in CPython 3.1.1 [wave.py]

2010-01-13 Thread Steven D'Aprano
On Wed, 13 Jan 2010 09:34:55 +0100, Alf P. Steinbach wrote: * Steven D'Aprano: Nobody is trying to understate the complexity of writing a large application that supports both 2.6 and 3.x, or of taking an existing library written for 2.5 and upgrading it to support 3.1. But the magnitude of

Re: Confusion about scan_code in modulefinder.py (in python 2.6)

2010-01-13 Thread Gabriel Genellina
En Tue, 12 Jan 2010 23:15:17 -0300, Brock Pytlik bpyt...@sun.com escribió: I've been working with the modulefinder.py code recently and I've come across a bit of code I'm not grasping. In the scan_code function, there are the following lines: if sys.version_info = (2, 5):

Re: Is python not good enough?

2010-01-13 Thread johan.san...@gmail.com
On Jan 13, 12:55 am, a...@pythoncraft.com (Aahz) wrote: In article 1b42700d-139a-4653-8669-d4ee2fc48...@r5g2000yqb.googlegroups.com, ikuta liu  ikut...@gmail.com wrote: Is python not good enough? for google, enhance python performance is the good way better then choose build Go language?

Re: Bugs in CPython 3.1.1 [wave.py]

2010-01-13 Thread Alf P. Steinbach
* Steven D'Aprano: On Wed, 13 Jan 2010 06:55:27 +0100, Alf P. Steinbach wrote: * Steven D'Aprano: On Tue, 12 Jan 2010 23:47:31 +0100, Alf P. Steinbach wrote: PS: Next time it would have helped to include a URL to the issue. http://bugs.python.org/issue7681 FYI there is already

Re: get back my simple little string after re search and replace

2010-01-13 Thread Gabriel Genellina
En Wed, 13 Jan 2010 02:12:31 -0300, Gontrand Trudau cesium5...@yahoo.ca escribió: I have read the python doc pretty much, played around with python code, but unable to get back my string after made my replacement with python RE Here my string : ['em...@msn.com

Re: Bugs in CPython 3.1.1 [wave.py]

2010-01-13 Thread Lie Ryan
Alf P. Steinbach wrote: * Stefan Behnel: Alf P. Steinbach, 13.01.2010 06:39: * Steven D'Aprano: On Tue, 12 Jan 2010 23:42:28 +0100, Alf P. Steinbach wrote: It is hopeless, especially for a newbie, to create correct Python 2.x+3.x compatible code, except totally trivial stuff of course. So

Re: Is python not good enough?

2010-01-13 Thread tanix
In article 53ec94c0-dbdd-4901-a46b-d7faee121...@j14g2000yqm.googlegroups.com, johan.san...@gmail.com johan.san...@gmail.com wrote: On Jan 13, 12:55=A0am, a...@pythoncraft.com (Aahz) wrote: In article 1b42700d-139a-4653-8669-d4ee2fc48...@r5g2000yqb.googlegroups.= com, ikuta liu

Re: Is python not good enough?

2010-01-13 Thread Chris Rebert
On Wed, Jan 13, 2010 at 1:06 AM, tanix ta...@mongo.net wrote: In article 53ec94c0-dbdd-4901-a46b-d7faee121...@j14g2000yqm.googlegroups.com, johan.san...@gmail.com johan.san...@gmail.com wrote: On Jan 13, 12:55=A0am, a...@pythoncraft.com (Aahz) wrote: In article

Re: Is python not good enough?

2010-01-13 Thread Stefan Behnel
tanix, 13.01.2010 10:06: Well, as soon as they restore the braces to identify the code blocks and provide the functionality of advanced statically type languages, such as threads, async processing, all synchronization primitives, garbage collection, events and GUI, i'd be willing to switch to

Re: usage of .pth files

2010-01-13 Thread Gabriel Genellina
En Wed, 13 Jan 2010 05:01:41 -0300, swapnil swapnil...@gmail.com escribió: Python's documentation (http://docs.python.org/install/ index.html#modifying-python-s-search-path) states that we can add more locations to python's module search path by add a path configuration file to a directory

Re: Is python not good enough?

2010-01-13 Thread Jonathan Hartley
On Jan 13, 9:06 am, ta...@mongo.net (tanix) wrote: Well, as soon as they restore the braces to identify the code blocks and provide the functionality of advanced statically type languages, such as threads, async processing, all synchronization primitives, garbage collection, events and GUI,

Re: parsing an Excel formula with the re module

2010-01-13 Thread Chris Withers
John Machin wrote: The OP was planning to dig the formula text out using COM then parse the formula text looking for cell references and appeared to have a rather simplistic view of the ease of parsing Excel formula text -- that's why I pointed him at those facilities (existing, released,

Sort list of dictionaries by key (case insensitive)

2010-01-13 Thread Nico Grubert
Hi there I have the following list 'mylist' that contains some dictionaries: mylist = [{'title':'the Fog', 'id':1}, {'title':'The Storm', 'id':2}, {'title':'the bible', 'id':3}, {'title':'The thunder', 'id':4} ] How I can sort (case insensitive) the list

Re: Bugs in CPython 3.1.1 [wave.py]

2010-01-13 Thread Stefan Behnel
Terry Reedy, 13.01.2010 04:40: What might be changed more easily is to accept a report but impound it until the confirmation reply. Being able to spit out what one has to say while it is still fresh in the mind should make the email wait more tolerable. What do you think? Sounds like a very

Re: Sort list of dictionaries by key (case insensitive)

2010-01-13 Thread Chris Rebert
On Tue, Jan 12, 2010 at 11:45 PM, Nico Grubert nicogrub...@gmail.com wrote: Hi there I have the following list 'mylist' that contains some dictionaries: mylist = [{'title':'the Fog', 'id':1},          {'title':'The Storm', 'id':2},          {'title':'the bible', 'id':3},          

Re: Sort list of dictionaries by key (case insensitive)

2010-01-13 Thread Peter Otten
Nico Grubert wrote: I have the following list 'mylist' that contains some dictionaries: mylist = [{'title':'the Fog', 'id':1}, {'title':'The Storm', 'id':2}, {'title':'the bible', 'id':3}, {'title':'The thunder', 'id':4} ] How I can sort (case

Re: Sort list of dictionaries by key (case insensitive)

2010-01-13 Thread Chris Rebert
On Wed, Jan 13, 2010 at 2:41 AM, Chris Rebert c...@rebertia.com wrote: On Tue, Jan 12, 2010 at 11:45 PM, Nico Grubert nicogrub...@gmail.com wrote: Hi there I have the following list 'mylist' that contains some dictionaries: mylist = [{'title':'the Fog', 'id':1},          {'title':'The

Re: Sort list of dictionaries by key (case insensitive)

2010-01-13 Thread Florian Diesch
Nico Grubert nicogrub...@gmail.com writes: Hi there I have the following list 'mylist' that contains some dictionaries: mylist = [{'title':'the Fog', 'id':1}, {'title':'The Storm', 'id':2}, {'title':'the bible', 'id':3}, {'title':'The thunder', 'id':4}

Compiling Python 2.7a2 on AIX6.1 (also pycrypto)

2010-01-13 Thread knipknap
Hi, I have just successfully compiled Python 2.7a2 on AIX6.1, using the IBM XL compiler (no gcc). I am documenting this here in case somebody needs it: ### First, I installed the following dependencies: 1. readline-6.1; 2. tcl8.4.19/unix/ 3. tk8.4.19/unix/ 4. zlib-1.2.3 All of these

Re: Sort list of dictionaries by key (case insensitive)

2010-01-13 Thread Nico Grubert
Er, that should have been mylist.sort(key = lambda d: d['title'].lower()) of course. Thanks a lot for the tip, chris. Unfortunately, I only have Python 2.3.5 installed and can't upgrade to 2.4 due to an underliying application server. In python 2.3 the 'sort()' function does not excepts

Re: Sort list of dictionaries by key (case insensitive)

2010-01-13 Thread Peter Otten
Nico Grubert wrote: Er, that should have been mylist.sort(key = lambda d: d['title'].lower()) of course. Thanks a lot for the tip, chris. Unfortunately, I only have Python 2.3.5 installed and can't upgrade to 2.4 due to an underliying application server. In python 2.3 the 'sort()'

Re: Sort list of dictionaries by key (case insensitive)

2010-01-13 Thread Stefan Behnel
Peter Otten, 13.01.2010 13:25: items = Atem Äther ähnlich anders.split() print .join(sorted(items, key=lambda s: s.lower())) If you can make sure that 's' is either always a byte string or always a unicode string (which is good programming practice anyway), an unbound method can simplify

BeautifulSoup

2010-01-13 Thread yamamoto
Hi, I am new to Python. I'd like to extract a tag from a website by using beautifulsoup module. but it doesnt work! //sample.py from BeautifulSoup import BeautifulSoup as bs import urllib url=http://www.d-addicts.com/forum/torrents.php; doc=urllib.urlopen(url).read() soup=bs(doc)

Re: Where's a DOM builder that uses the Builder Pattern to ... build DOMs?

2010-01-13 Thread Stefan Behnel
Phlip, 07.01.2010 17:44: On Jan 7, 5:36 am, Stefan Behnel stefan...@behnel.de wrote: Well, then note that there are tons of ways to generate XML with Python, including the one I pointed you to. from lxml.html import builder as E xml = E.foo() All I want is foo/, but I get

Re: BeautifulSoup

2010-01-13 Thread Peter Otten
yamamoto wrote: Hi, I am new to Python. I'd like to extract a tag from a website by using beautifulsoup module. but it doesnt work! //sample.py from BeautifulSoup import BeautifulSoup as bs import urllib url=http://www.d-addicts.com/forum/torrents.php; doc=urllib.urlopen(url).read()

Re: os.system function

2010-01-13 Thread Lie Ryan
On 01/13/10 04:59, r0g wrote: so you may want to look into pythons core GUI library, TKL. I know Tk and Tcl has been close since their childhood; did they get married too? -- http://mail.python.org/mailman/listinfo/python-list

memory problem with list creation

2010-01-13 Thread Allard Warrink
Within a python script I'm using a couple of different lists containing a large number of floats (+8M). The execution of this script fails because of an memory error (insufficient memory). I thought this was strange because I delete all lists that are not longer necessary directly and my

Re: memory problem with list creation

2010-01-13 Thread Stefan Behnel
Allard Warrink, 13.01.2010 15:24: I found out that when i populated the lists with floats using a for ... in range() loop a lot of overhead memory is used Note that range() returns a list in Python 2.x. For iteration, use xrange(), or switch to Python 3 where range() returns an iterable.

Those two controversial 2nd 3rd paragraphs of my ch 1

2010-01-13 Thread Alf P. Steinbach
Referring to url: http://tinyurl.com/programmingbookP3 Due to especially Steven D'Aprano's comments I've replaced hopeless with very hard in paragraph 1 of section 1.1 -- I know he'll disagree with that also but I think any more downplaying of the difficulties would be misleading.

Re: install exe in virtualenv --no-site-packages

2010-01-13 Thread Jim Pharis
Solved this by copying the pywin32.pth file into my virtualenv site-packages and editing the file to point to the path. On Tue, Jan 12, 2010 at 5:35 PM, Jim Pharis binbr...@gmail.com wrote: How do I install an exe in a sandboxed virtualenv that's been setup with no site packages? The package

Re: BeautifulSoup

2010-01-13 Thread Rolando Espinoza La Fuente
Hi, Also you can check a high-level framework for scrapping: http://scrapy.org/ In their docs includes an example of extracting torrents data from mininova http://doc.scrapy.org/intro/overview.html You will need to understand regular expressions, xpath expressions, callbacks, etc. In the faq

Re: Those two controversial 2nd 3rd paragraphs of my ch 1

2010-01-13 Thread Peter Otten
Alf P. Steinbach wrote: As of this writing two main variants of the Python language are in use, namely Python 2.x and Python 3.x (versions 3.0 and greater). Mostly they’re the same but the effect of e.g. the / division operator changed in 3.0, so in practice it’s very hard to create programs

Python-URL! - weekly Python news and links (Jan 13)

2010-01-13 Thread Gabriel Genellina
QOTW: ... if I want to know something new (be it a computer language or anything else, such as economics, history, science) I skip the introductory material and go directly to the discussion, to the issues. This is for me the most effective and interesting way of learning something new. And if

Re: memory problem with list creation

2010-01-13 Thread Stefan Behnel
Allard Warrink, 13.01.2010 15:24: so I did some investigation on the memory use of the script. I found out that when i populated the lists with floats using a for ... in range() loop a lot of overhead memory is used and that this memory is not freed after populating the list and is also not

Re: Sort list of dictionaries by key (case insensitive)

2010-01-13 Thread Nico Grubert
Thanks a lot Stefan Peter. I'm almost there (except sorting of umlauts does not work yet). import locale def sorted(items, key): decorated = [(key(item), index, item) for index, item in enumerate(items)] decorated.sort() return [item[2] for item in decorated]

Re: Those two controversial 2nd 3rd paragraphs of my ch 1

2010-01-13 Thread Daniel Fetchinson
As of this writing two main variants of the Python language are in use, namely Python 2.x and Python 3.x (versions 3.0 and greater). Mostly they’re the same but the effect of e.g. the / division operator changed in 3.0, so in practice it’s very hard to create programs that work the same –

Re: Sort list of dictionaries by key (case insensitive)

2010-01-13 Thread Stefan Behnel
Nico Grubert, 13.01.2010 16:18: print sorted(items, key=lambda d: locale.strxfrm(d.get('title'))) - [{'id': 2, 'title': 'The Storm'}, {'id': 4, 'title': 'The thunder'}, {'id': 3, 'title': 'the bible'}, {'id': 1, 'title': 'the \xc4hnlich'}] The entry with the umlaut is the last item in but

Re: Is python not good enough?

2010-01-13 Thread ikuta liu
On 1月13日, 上午7時55分, a...@pythoncraft.com (Aahz) wrote: In article 1b42700d-139a-4653-8669-d4ee2fc48...@r5g2000yqb.googlegroups.com, ikuta liu  ikut...@gmail.com wrote: Is python not good enough? for google, enhance python performance is the good way better then choose build Go language? It

Re: Sort list of dictionaries by key (case insensitive)

2010-01-13 Thread Peter Otten
Nico Grubert wrote: Thanks a lot Stefan Peter. I'm almost there (except sorting of umlauts does not work yet). import locale locale.setlocale(locale.LC_ALL, ) def sorted(items, key): decorated = [(key(item), index, item) for index, item in enumerate(items)]

Re: Those two controversial 2nd 3rd paragraphs of my ch 1

2010-01-13 Thread Stefan Behnel
Daniel Fetchinson, 13.01.2010 16:23: Also, I would replace in practice it’s very hard to create programs with in practice it’s very hard to create complex programs because for small programs it's very possible to write code that will work with both python 2 and 3. The question is of course

Code Generator written in python

2010-01-13 Thread nyoka
Can someone help me with sample python code for a code generator -- http://mail.python.org/mailman/listinfo/python-list

Re: Code Generator written in python

2010-01-13 Thread Stefan Behnel
nyoka, 13.01.2010 16:48: Can someone help me with sample python code for a code generator Such as Cheetah? http://www.cheetahtemplate.org/ BTW, you might want to be more specific about your problem at hand. Code generation is a rarely used technique in Python. Most of the time, it's more

Re: Code Generator written in python

2010-01-13 Thread Peter Otten
nyoka wrote: Can someone help me with sample python code for a code generator print print print Seriously, you have to provide more information if you want a meaningful answer. If the generated code is Python, too, then the advice is most likely that you don't need to generate any code at

Re: Code Generator written in python

2010-01-13 Thread Arnaud Delobelle
nyoka danshiz...@gmail.com writes: Can someone help me with sample python code for a code generator Sure, here are some example of self-evaluating python objects, i.e. for each v below, v == eval(v) I'm quite proud of the last one. v = (lambda x:x%(+x+))((lambda

Re: memory problem with list creation

2010-01-13 Thread Gabriel Genellina
En Wed, 13 Jan 2010 11:24:04 -0300, Allard Warrink allardwarr...@gmail.com escribió: Within a python script I'm using a couple of different lists containing a large number of floats (+8M). The execution of this script fails because of an memory error (insufficient memory). I thought this was

Re: Code Generator written in python

2010-01-13 Thread Gabriel Genellina
En Wed, 13 Jan 2010 13:09:38 -0300, Arnaud Delobelle arno...@googlemail.com escribió: nyoka danshiz...@gmail.com writes: Can someone help me with sample python code for a code generator Sure, here are some example of self-evaluating python objects, i.e. for each v below, v ==

Re: Those two controversial 2nd 3rd paragraphs of my ch 1

2010-01-13 Thread Daniel Fetchinson
Also, I would replace in practice it’s very hard to create programs with in practice it’s very hard to create complex programs because for small programs it's very possible to write code that will work with both python 2 and 3. The question is of course what program is simple/small and

Re: Do I have to use threads?

2010-01-13 Thread Tom
On Jan 7, 5:38 pm, MRAB pyt...@mrabarnett.plus.com wrote: Jorgen Grahn wrote: On Thu, 2010-01-07, Marco Salden wrote: On Jan 6, 5:36 am, Philip Semanchuk phi...@semanchuk.com wrote: On Jan 5, 2010, at 11:26 PM, aditya shukla wrote: Hello people, I have 5 directories corresponding 5  

Re: Those two controversial 2nd 3rd paragraphs of my ch 1

2010-01-13 Thread André
On Jan 13, 12:30 pm, Daniel Fetchinson fetchin...@googlemail.com wrote: One code base of cheetah works under python 2 and 3? I doubt it, but I could be wrong. What I can easily imagine is that somebody ported cheetah to python 3. In this case there are two code bases, one for python 2 and

Re: Compiling Python 2.7a2 on AIX6.1 (also pycrypto)

2010-01-13 Thread Josh Volchko
On Jan 13, 6:13 am, knipknap knipk...@gmail.com wrote: Hi, I have just successfully compiled Python 2.7a2 on AIX6.1, using the IBM XL compiler (no gcc). I am documenting this here in case somebody needs it: ### First, I installed the following dependencies: 1. readline-6.1; 2.

dict's as dict's key.

2010-01-13 Thread Albert van der Horst
I have a type of objects that have complicated enough properties to warrant a special class for its type. The class has built in dictionary for all the properties. Something along the line of a = ctype({poker:True}) b = ctype({footbal:True, gender:m}) c = ctype({chess:True, residence:Amsterdam})

Getting access to the process table from python?

2010-01-13 Thread Roy Smith
I need to get information about what processes are running on a box. Right now, I'm interested in Solaris and Linux, but eventually probably other systems too. I need to know things like the pid, command line, CPU time, when the process started running, and owner. Has anybody written a module to

Re: Those two controversial 2nd 3rd paragraphs of my ch 1

2010-01-13 Thread Stefan Behnel
Daniel Fetchinson, 13.01.2010 17:30: Again, django has been ported to python 3, that's fine, everybody acknowledges that, but it's not the case that one code base works with both python versions. Well, if the port is done via 2to3, you can install the same code base in Python 2 and Python 3,

Re: Bugs in CPython 3.1.1 [wave.py]

2010-01-13 Thread Steve Holden
Alf P. Steinbach wrote: * Steven D'Aprano: Nobody is trying to understate the complexity of writing a large application that supports both 2.6 and 3.x, or of taking an existing library written for 2.5 and upgrading it to support 3.1. But the magnitude of these tasks is no greater (and

Re: dict's as dict's key.

2010-01-13 Thread Arnaud Delobelle
Albert van der Horst alb...@spenarnc.xs4all.nl writes: I have a type of objects that have complicated enough properties to warrant a special class for its type. The class has built in dictionary for all the properties. Something along the line of a = ctype({poker:True}) b =

Re: dict's as dict's key.

2010-01-13 Thread Peter Otten
Albert van der Horst wrote: I have a type of objects that have complicated enough properties to warrant a special class for its type. The class has built in dictionary for all the properties. Something along the line of a = ctype({poker:True}) b = ctype({footbal:True, gender:m}) c =

Django (and Pylons) HTML Form Objects Arrays

2010-01-13 Thread AJ ONeal
Do Django and Pylons use templates which map forms in the php / ruby manner (generally speaking)? form input name=user[name] type=text/ input name=user[email] type=text/ input name=user[address][street] type=text/ input name=user[address][city] type=text/ input

Intra-package C extensions with freeze.py

2010-01-13 Thread Pascal Chambon
Hello everyone Some times ago, I've had unexpected problems while trying to freeze some scripts into a standalone executable with the freeze.py script. I had already done it : normally, you simply freeze pure python modules into a standalone executable, you package it along with python

Re: Those two controversial 2nd 3rd paragraphs of my ch 1

2010-01-13 Thread Steve Holden
Daniel Fetchinson wrote: Also, I would replace in practice it’s very hard to create programs with in practice it’s very hard to create complex programs because for small programs it's very possible to write code that will work with both python 2 and 3. The question is of course what

PyQt event recognition

2010-01-13 Thread Zabin
Hey Everyone! I am a new pyqt programmer. I have a tab widget with lots of line edits, radiobuttons and combo boxes. I want to trigger a single sub the moment any one of these widgets listed are modified. I tried using the clicked signal- but it doesnt seem to work. Any suggestion will be much

Re: Join a thread and get the return value of a function

2010-01-13 Thread Aahz
In article 4b33b0c...@dnews.tpgi.com.au, Lie Ryan lie.1...@gmail.com wrote: On 12/25/2009 2:02 AM, mattia wrote: Il Fri, 25 Dec 2009 00:35:55 +1100, Lie Ryan ha scritto: On 12/25/2009 12:23 AM, mattia wrote: Hi all, is there a way in python to get back the value of the function passed to a

Re: Those two controversial 2nd 3rd paragraphs of my ch 1

2010-01-13 Thread Daniel Fetchinson
One code base of cheetah works under python 2 and 3? I doubt it, but I could be wrong. What I can easily imagine is that somebody ported cheetah to python 3. In this case there are two code bases, one for python 2 and another for python 3. So it's not the same program that runs under python 2

Re: Those two controversial 2nd 3rd paragraphs of my ch 1

2010-01-13 Thread Daniel Fetchinson
Again, django has been ported to python 3, that's fine, everybody acknowledges that, but it's not the case that one code base works with both python versions. Well, if the port is done via 2to3, you can install the same code base in Python 2 and Python 3, and the distutils install mechanism

Re: Getting access to the process table from python?

2010-01-13 Thread Aahz
In article 08fc5739-1dd9-402f-84ba-d9f72f48d...@j4g2000yqe.googlegroups.com, Roy Smith r...@panix.com wrote: I need to get information about what processes are running on a box. Right now, I'm interested in Solaris and Linux, but eventually probably other systems too. I need to know things like

Re: Bugs in CPython 3.1.1 [wave.py]

2010-01-13 Thread Terry Reedy
On 1/13/2010 3:44 AM, Steven D'Aprano wrote: On Wed, 13 Jan 2010 09:34:55 +0100, Alf P. Steinbach wrote: Would it be better to say that it's hard or very hard or impractical for the novice? Yes, but ... I don't even know why you feel the need to discuss 2.x in a book that's about 3.x.

Re: Compiling Python 2.7a2 on AIX6.1 (also pycrypto)

2010-01-13 Thread Terry Reedy
On 1/13/2010 6:13 AM, knipknap wrote: Hi, I have just successfully compiled Python 2.7a2 on AIX6.1, using the IBM XL compiler (no gcc). I am documenting this here in case somebody needs it: ### First, I installed the following dependencies: 1. readline-6.1; 2. tcl8.4.19/unix/ 3.

Re: PyQt event recognition

2010-01-13 Thread Zabin
On Jan 14, 9:00 am, Zabin zabin.faris...@gmail.com wrote: Hey Everyone! I am a new pyqt programmer. I have a tab widget with lots of line edits, radiobuttons and combo boxes. I want to trigger a single sub the moment any one of these widgets listed are modified. I tried using the clicked

Re: Simple distributed example for learning purposes?

2010-01-13 Thread Aahz
In article mailman.63.1261857971.28905.python-l...@python.org, Tim Golden m...@timgolden.me.uk wrote: I'm trying to come up with something which will illustrate the usefulness of a distributed processing model. Since I may not be using the term distributed exactly, my criteria are: Distributed

Re: Getting access to the process table from python?

2010-01-13 Thread John Gabriele
On Jan 13, 1:41 pm, Roy Smith r...@panix.com wrote: I need to get information about what processes are running on a box. Right now, I'm interested in Solaris and Linux, but eventually probably other systems too.  I need to know things like the pid, command line, CPU time, when the process

Re: Those two controversial 2nd 3rd paragraphs of my ch 1

2010-01-13 Thread Terry Reedy
On 1/13/2010 11:30 AM, Daniel Fetchinson wrote: Example? Just to be clear I'm looking for an example where one given code runs on python 2 and 3 unmodified. I think django and cheetah doesn't count because they simply take their python 2 code, run it through 2to3 which gives them a python 3

Re: Python and Tkinter Programming by John Grayson

2010-01-13 Thread Peter
On Jan 13, 11:19 am, Ethan Furman et...@stoneleaf.us wrote: Greetings! I am hoping to acquire a book on Python and Tkinter, and found this one.   However, it was published in 2000 for Python 1.52... Can somebody who has this book comment its continued relevance?  Is it still useful for

Re: How to iterate the input over a particular size?

2010-01-13 Thread Aahz
In article 46a5e979-7a87-49ee-ac7e-71d3a235d...@e37g2000yqn.googlegroups.com, joy99 subhakolkata1...@gmail.com wrote: input_string=raw_input(PRINT A STRING:) string_to_word=input_string.split() len_word_list=len(string_to_word) if len_word_list9: rest_words=string_to_word[9:]

Re: Getting access to the process table from python?

2010-01-13 Thread Terry Reedy
On 1/13/2010 1:41 PM, Roy Smith wrote: I need to get information about what processes are running on a box. Right now, I'm interested in Solaris and Linux, but eventually probably other systems too. I need to know things like the pid, command line, CPU time, when the process started running,

Re: A question about Python versions

2010-01-13 Thread Gib Bogle
Sridhar Ratnakumar wrote: On 1/12/2010 10:09 PM, Gib Bogle wrote: I am learning Python, and using PyQt to develop a GUI that will be used to run a Fortran program on Windows, Linux and Mac OS X (I think Python is great, btw). Without thinking about it I downloaded and started working with a

Re: A question about Python versions

2010-01-13 Thread Gib Bogle
Terry Reedy wrote: On 1/13/2010 1:09 AM, Gib Bogle wrote: I am learning Python, and using PyQt to develop a GUI that will be used to run a Fortran program on Windows, Linux and Mac OS X (I think Python is great, btw). Without thinking about it I downloaded and started working with a fairly

Re: Author of a Python Success Story Needs a Job!

2010-01-13 Thread Aahz
In article cbc2f05a-f52a-4f58-adeb-78d931f47...@r24g2000yqd.googlegroups.com, Andrew Jonathan Fine eternalsqu...@hotmail.com wrote: I was laid off by Honeywell several months after I had made my presentation in the 2005 Python Conference. Since then I have been unable to find work either as a

Re: PyQt event recognition

2010-01-13 Thread Jonathan Gardner
On Jan 13, 12:21 pm, Zabin zabin.faris...@gmail.com wrote: On Jan 14, 9:00 am, Zabin zabin.faris...@gmail.com wrote: I am a new pyqt programmer. I have a tab widget with lots of line edits, radiobuttons and combo boxes. I want to trigger a single sub the moment any one of these widgets

paypal django

2010-01-13 Thread ozgur vatansever
Hi, I coded a python interface of a paypal nvp API for django. If you are interested, you can check it out. http://code.google.com/p/django-paypal-driver/ Happy coding. -- http://mail.python.org/mailman/listinfo/python-list

Re: PyQt event recognition

2010-01-13 Thread Zabin
On Jan 14, 10:22 am, Jonathan Gardner jgard...@jonathangardner.net wrote: On Jan 13, 12:21 pm, Zabin zabin.faris...@gmail.com wrote: On Jan 14, 9:00 am, Zabin zabin.faris...@gmail.com wrote: I am a new pyqt programmer. I have a tab widget with lots of line edits, radiobuttons and combo

Re: interactive terminal in Ubuntu Linux : libreadline5-dev works only in Python 2.6 not 3.1

2010-01-13 Thread Lee Harr
When you first had this problem, was python3 installed from source, or was it from the Ubuntu repository? Over a month ago I downloaded the tarball Python-3.1.1 from the python website.  Then the Synaptic Package Manager did not contain this ( latest ) version. There is already python 2.x

Re: os.system function

2010-01-13 Thread r0g
Lie Ryan wrote: On 01/13/10 04:59, r0g wrote: so you may want to look into pythons core GUI library, TKL. I know Tk and Tcl has been close since their childhood; did they get married too? Whoops... yes Tk/Tcl, it seems they had become one in my head only! :) Roger. --

Re: Bugs in CPython 3.1.1 [wave.py]

2010-01-13 Thread Alf P. Steinbach
* Steve Holden: Alf P. Steinbach wrote: * Steven D'Aprano: Nobody is trying to understate the complexity of writing a large application that supports both 2.6 and 3.x, or of taking an existing library written for 2.5 and upgrading it to support 3.1. But the magnitude of these tasks is no

Re: Undo/Redo in PyQt

2010-01-13 Thread David Boddie
On Wednesday 13 January 2010 02:20, Zabin wrote: I am trying to implement the undo and redo facility in pyqt. I have gone through some sites and was wondering whether iyou always need to create subclasses and their definitions for the undo/redo action. My program currently has a single window

Re: Bugs in CPython 3.1.1 [wave.py]

2010-01-13 Thread Alf P. Steinbach
* Alf P. Steinbach: * Steve Holden: Alf P. Steinbach wrote: * Steven D'Aprano: Nobody is trying to understate the complexity of writing a large application that supports both 2.6 and 3.x, or of taking an existing library written for 2.5 and upgrading it to support 3.1. But the magnitude of

Re: Those two controversial 2nd 3rd paragraphs of my ch 1

2010-01-13 Thread Alf P. Steinbach
* Daniel Fetchinson: Nobody is deliberately trying to keep people from porting! I think you misunderstand what is being said, these two statements are very different: (1) single code base working on both python versions (2) creating a second code from a code so that the second code works with

Re: Author of a Python Success Story Needs a Job!

2010-01-13 Thread Phlip
Andrew Jonathan Fine wrote: I was laid off by Honeywell several months after I had made my presentation in the 2005 Python Conference. Since then I have been unable to find work either as a software engineer or in any other capacity, even at service jobs. I've sent resumes and have been

heapq._siftdown / decrease-key support?

2010-01-13 Thread Joshua Bronson
I recently implemented A* search in Python using the heapq module and in my first pass, to accomplish the decrease-key operation I resorted to doing a linear scan of the list to find the position of the key in the heap, and then calling the private undocumented method heapq._siftdown at this

Re: How to test a URL request in a while True loop

2010-01-13 Thread Aahz
In article mailman.233.1262197919.28905.python-l...@python.org, Philip Semanchuk phi...@semanchuk.com wrote: While I don't fully understand what you're trying to accomplish by changing the URL to google.com after 3 iterations, I suspect that some of your trouble comes from using while True.

Re: How to test a URL request in a while True loop

2010-01-13 Thread Aahz
In article hilruv$nu...@panix5.panix.com, Aahz a...@pythoncraft.com wrote: In article mailman.233.1262197919.28905.python-l...@python.org, Philip Semanchuk phi...@semanchuk.com wrote: While I don't fully understand what you're trying to accomplish by changing the URL to google.com after 3

Re: Python and Tkinter Programming by John Grayson

2010-01-13 Thread Lord Eldritch
Peter wrote: provides in his book (I used it once for my first GUI, but these days use Pmw more for my GUIs). Maybe I'm wrong, but for me, it is THE Tkinter reference. I would probably choose another organization of the book, but I am not aware of a better, more complete treatise about.

  1   2   >