PyAMF 0.1.1 released

2008-02-18 Thread Thijs Triemstra | Collab
We released PyAMF 0.1.1, a lightweight library that allows Flash and Python applications to communicate via Adobe's ActionScript Message Format. AMF3 and RemoteObject are supported in all the implemented Remoting gateways, currently supported for Django, Twisted, Web2Py and WSGI. This is

Python-URL! - weekly Python news and links (Feb 18)

2008-02-18 Thread Gabriel Genellina
QOTW: Syntax can be, and has been, interoperable. The definitions of the telephone network, the Internet, email, and the Web are all bits-on-the-wire definitions of what you send back and forth, and they've all worked well enough to change the world. This belief that bits-on-the-wire is more

ANN: amplee 0.6.0 - AtomPub Python implementation

2008-02-18 Thread Sylvain Hellegouarch
Hi all, I'm glad to announce the release of amplee in version 0.6.0 == Overview of this release == This release is an important move from previous releases as it doesn't include support for any HTTP layer out of the box anymore. The reason is that it made the previous API needlessly complex and

Public Python Training Classes

2008-02-18 Thread Steve Holden
Holden Web is pleased to announce the availability of public classes in the Python language. The current schedule is available at http://holdenweb.com/py/training/ Our initial classes are mostly introductory, but we are also offering experimental half-day seminars, the first two of which

Re: Tkinter = Rodney Dangerfield?

2008-02-18 Thread Gabriel Genellina
En Sun, 17 Feb 2008 17:35:35 -0200, [EMAIL PROTECTED] escribi�: Tkinter gets no respect. But IDLE's a Tkinter-based app and every example I've Googled up shows Tkinter as needing about half as much code as wx to do the same job. I'm beginning to Tkinter up my language application. Am I making

Current Fastest Python Implementation?

2008-02-18 Thread samuraisam
Has anyone done any recent testing as to which current python implementation is the quickest? Perhaps for Django development - though the current one certainly is fast (and I doubt micro optimizations would make much difference in overall performance). Regardless - have those pypy folks made a

Re: Developing a Package with Sub Packages

2008-02-18 Thread Gabriel Genellina
En Sun, 17 Feb 2008 22:34:27 -0200, Josh English [EMAIL PROTECTED] escribi�: Here's what I think is happening: IMS/__init__.py uses os.getcwd() to establish the path to the data folder and the files inside of it. When I run StoryCreator, os.getcwd() returns the story folder. If I'm right,

Re: Looking for a Python Program/Tool That Will Add Line Numbers to a txt File

2008-02-18 Thread thebjorn
On Feb 15, 8:55 pm, Jeff Schwab [EMAIL PROTECTED] wrote: W. Watson wrote: See Subject. It's a simple txt file, each line is a Python stmt, but I need up to four digits added to each line with a space between the number field and the text. Perhaps someone has already done this or there's a

Re: Pmw Use and Grayson's Book

2008-02-18 Thread [EMAIL PROTECTED]
On Feb 18, 5:30 am, W. Watson [EMAIL PROTECTED] wrote: I wonder why he uses it? He uses it because Pmw does a lot of heavy lifting for you when designing Tkinter apps. Pmw adds things like widgets pre-populated with scrollbars and labels and automatic widget/label alignment. I use Pmw for all

Re: Current Fastest Python Implementation?

2008-02-18 Thread Stefan Behnel
samuraisam wrote: Has anyone done any recent testing as to which current python implementation is the quickest? Search for a recent thread on CPython and IronPython. Perhaps for Django development - though the current one certainly is fast (and I doubt micro optimizations would make much

Re: Current Fastest Python Implementation?

2008-02-18 Thread cokofreedom
On Feb 18, 9:37 am, Stefan Behnel [EMAIL PROTECTED] wrote: samuraisam wrote: Has anyone done any recent testing as to which current python implementation is the quickest? Search for a recent thread on CPython and IronPython. Perhaps for Django development - though the current one

Re: Tkinter Confusion

2008-02-18 Thread [EMAIL PROTECTED]
Most of the other questions have already been answered, so I'll tackle this one: On Feb 17, 8:36 pm, [EMAIL PROTECTED] wrote: Google's great, but it has no truth meter. Do I inherit from Frame? Or is that a big mistake. (Both positions repeated frequently.) Inherit from Frame if you want your

Professional Grant Proposal Writing Workshop (June 2008: Seattle, Washington)

2008-02-18 Thread Anthony Jones
The Grant Institute's Grants 101: Professional Grant Proposal Writing Workshop will be held Seattle, Washington,June18 - 20, 2008. Interested development professionals, researchers, faculty, and graduate students should register as soon as possible, as demand means that seats will fill up

Re: Is there a way to link a python program from several files?

2008-02-18 Thread BlueBird
On Feb 16, 7:53 pm, [EMAIL PROTECTED] (Edward A. Falk) wrote: IOW, is there a linker for python? I've written a program comprised of about five .py files. I'd like to find a way to combine them into a single executable. I wrote a small wiki page to sum-up my findings about such typical

Re: Tkinter Confusion

2008-02-18 Thread 7stud
On Feb 18, 1:41 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Most of the other questions have already been answered, so I'll tackle this one: On Feb 17, 8:36 pm, [EMAIL PROTECTED] wrote: Google's great, but it has no truth meter. Do I inherit from Frame? Or is that a big mistake. (Both

Re: Looking for a Python Program/Tool That Will Add Line Numbers to a txt File

2008-02-18 Thread Michael Wronna
On Thu, 14 Feb 2008, W. Watson wrote: See Subject. It's a simple txt file, each line is a Python stmt, but I need up to four digits added to each line with a space between the number field and the text. Perhaps someone has already done this or there's a source on the web for it. I'm not

Re: TRAC - Trac, Project Leads, Python, and Mr. Noah Kantrowitz (sanitizer)

2008-02-18 Thread Ilias Lazaridis
[RESEND of answer to all initial groups] On 16 Öåâ, 15:45, Steve Holden [EMAIL PROTECTED] wrote: Ilias Lazaridis wrote: [...] Of course I'll not stay with trac, I'll leave the sinking ship, I've prepare long time ago to do so, step by step. An will migrate step by step away from trac and

Re: TRAC - Trac, Project Leads, Python, and Mr. Noah Kantrowitz (sanitizer)

2008-02-18 Thread Ilias Lazaridis
[RESEND answer to all initial groups] On 16 Öåâ, 19:15, Jeff Schwab [EMAIL PROTECTED] wrote: Ilias Lazaridis wrote: Essence: snipSpam spam spam spam.../snip I just looked at your resume. http://lazaridis.com/resumes/lazaridis.html (need to update it, lot's of irrelevant stuff, should

Re: TRAC - Trac, Project Leads, Python, and Mr. Noah Kantrowitz (sanitizer)

2008-02-18 Thread cokofreedom
Dear Ilias, Post in a single reply. Coko -- http://mail.python.org/mailman/listinfo/python-list

Re: different instances with different data descriptors with the same name

2008-02-18 Thread Peter Otten
Fabrizio Pollastri wrote: Data descriptors are set as attributes of object types. So if one has many instances of the same class and wants each instance to have a different property (data descriptor) that can be accessed with a unique attribute name, it seems to me that there is no solution

Need help to figure out urllib2.Request()

2008-02-18 Thread James Yu
Hi folks, I tried to open some web pages with urllib2.Request(url, data, headers), but it always give me a 404 error. Eg. url = 'http://www.whatever.com/somephp.php' data = {} data['id'] = account for i in book2Open: data['book'] = i url_data = urllib.urlencode(data) request =

Re: decode Numeric Character References to unicode

2008-02-18 Thread 7stud
On Feb 18, 3:20 am, William Heymann [EMAIL PROTECTED] wrote: How do I decode a string back to useful unicode that has xml numeric character references in it? Things like #21344; BeautifulSoup can handle two of the three formats for html entities. For instance, an 'o' with umlaut can be

Re: decode Numeric Character References to unicode

2008-02-18 Thread 7stud
On Feb 18, 4:53 am, 7stud [EMAIL PROTECTED] wrote: On Feb 18, 3:20 am, William Heymann [EMAIL PROTECTED] wrote: How do I decode a string back to useful unicode that has xml numeric character references in it? Things like #21344; #which is: _#21344_; (without the underscores)

Re: decode Numeric Character References to unicode

2008-02-18 Thread Duncan Booth
7stud [EMAIL PROTECTED] wrote: On Feb 18, 4:53 am, 7stud [EMAIL PROTECTED] wrote: On Feb 18, 3:20 am, William Heymann [EMAIL PROTECTED] wrote: How do I decode a string back to useful unicode that has xml numeric cha racter references in it? Things like #21344; #which is: _#21344_;

Re: linux disc space

2008-02-18 Thread Tobiah
DataSmash wrote: I simply want to capture the free disc space in a variable so that I can compare changes. I'm aware of a few commands like df -h or du - k, but I can't figure out how to capture those values as a variable. I also looked at os.statvfs(), but that output doesn't seem to make

Re: Seemingly odd 'is' comparison.

2008-02-18 Thread Duncan Booth
Tobiah [EMAIL PROTECTED] wrote: Subject: Seemingly odd 'is' comparison. Please put your question into the body of the message, not just the headers. print float(3.0) is float(3.0) True print float(3.0 * 1.0) is float(3.0) False Thanks, Tobiah Your values are already all

Re: decode Numeric Character References to unicode

2008-02-18 Thread Ben Finney
7stud [EMAIL PROTECTED] writes: For instance, an 'o' with umlaut can be represented in three different ways: '' followed by 'ouml;' '' followed by '#246;' '' followed by '#xf6;' The fourth way, of course, is to simply have 'ö' appear directly as a character in the document, and set the

Re: Fate of itertools.dropwhile() and itertools.takewhile()

2008-02-18 Thread Simon Brunning
On Dec 29, 2007 11:10 PM, Raymond Hettinger [EMAIL PROTECTED] wrote: I'm considering deprecating these two functions and would like some feedback from the community or from people who have a background in functional programming. Personally, I'd rather you kept them around. I have no FP

How to overcome the incomplete download with urllib.urlretrieve ?

2008-02-18 Thread James Yu
This is part of my code that invokes urllib.urlretrieve: for i in link2Visit: localName = i.split('/') i = i.replace(' ', '%20') tgtPath = ['d:\\', 'work', 'python', 'grab_n_view'] localPath = '' for j in tgtPath: localPath = os.path.join(localPath, j)

Re: different instances with different data descriptors with the same name

2008-02-18 Thread grflanagan
On Feb 18, 11:21 am, Fabrizio Pollastri [EMAIL PROTECTED] wrote: Data descriptors are set as attributes of object types. So if one has many instances of the same class and wants each instance to have a different property (data descriptor) that can be accessed with a unique attribute name, it

Re: Seemingly odd 'is' comparison.

2008-02-18 Thread Arnaud Delobelle
On Feb 13, 10:19 pm, Tobiah [EMAIL PROTECTED] wrote: print float(3.0) is float(3.0) True print float(3.0 * 1.0) is float(3.0) False [You don't need to wrap your floats in float()] def f(): ... return 3.0 is 3.0, 3.0*1.0 is 3.0 ... f() (True, False) import dis dis.dis(f) 2

Re: Seemingly odd 'is' comparison.

2008-02-18 Thread Christian Heimes
Tobiah wrote: print float(3.0) is float(3.0) True print float(3.0 * 1.0) is float(3.0) False Thumb rule: Never compare strings, numbers or tuples with is. Only compare an object with a singleton like a type or None. is is not a comparison operator. Christian --

Re: Looking for a Python Program/Tool That Will Add Line Numbers to a txt File

2008-02-18 Thread William Pursell
On Feb 14, 6:54 am, W. Watson [EMAIL PROTECTED] wrote: See Subject. It's a simple txt file, each line is a Python stmt, but I need up to four digits added to each line with a space between the number field and the text. Perhaps someone has already done this or there's a source on the web for

Re: Could WSGI handle Asynchronous response?

2008-02-18 Thread est
On Feb 18, 7:05 pm, est [EMAIL PROTECTED] wrote: I am writing a small 'comet'-like app using flup, something like this: def myapp(environ, start_response):     start_response('200 OK', [('Content-Type', 'text/plain')])     return ['Flup works!\n']        -Could this be part of

Re: Pmw Use and Grayson's Book

2008-02-18 Thread Mike Driscoll
On Feb 18, 2:29 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Feb 18, 5:30 am, W. Watson [EMAIL PROTECTED] wrote: I wonder why he uses it? He uses it because Pmw does a lot of heavy lifting for you when designing Tkinter apps. Pmw adds things like widgets pre-populated with scrollbars

Re: flattening a dict

2008-02-18 Thread Duncan Booth
Boris Borcic [EMAIL PROTECTED] wrote: It is more elementary in the mathematician's sense, and therefore preferable all other things being equal, imo. I've tried to split 'gen' but I can't say the result is so much better. def flattendict(d) : gen = lambda L : (x for M in exp(L) for

Re: flattening a dict

2008-02-18 Thread Boris Borcic
Arnaud Delobelle wrote: On Feb 17, 4:03 pm, Boris Borcic [EMAIL PROTECTED] wrote: George Sakkis wrote: On Feb 17, 7:51 am, Arnaud Delobelle [EMAIL PROTECTED] wrote: BTW, I keep using the idiom itertools.chain(*iterable). I guess that during function calls *iterable gets expanded to a tuple.

Re: Could WSGI handle Asynchronous response?

2008-02-18 Thread Jean-Paul Calderone
On Mon, 18 Feb 2008 05:27:41 -0800 (PST), est [EMAIL PROTECTED] wrote: On Feb 18, 7:05 pm, est [EMAIL PROTECTED] wrote: I am writing a small 'comet'-like app using flup, something like this: def myapp(environ, start_response): start_response('200 OK', [('Content-Type', 'text/plain')])

Re: Tkinter = Rodney Dangerfield?

2008-02-18 Thread Kevin Walzer
[EMAIL PROTECTED] wrote: Tkinter gets no respect. But IDLE's a Tkinter-based app and every example I've Googled up shows Tkinter as needing about half as much code as wx to do the same job. I'm beginning to Tkinter up my language application. Am I making a big mistake? No, you're not. Tkinter

Re: Tkinter = Rodney Dangerfield?

2008-02-18 Thread MartinRinehart
Gabriel Genellina wrote: I don't like Tk because the widgets are ugly, old-fashioned, and don't have the right look and feel. Take another look. A year or so back Tkinter went to platform native widgets. -- http://mail.python.org/mailman/listinfo/python-list

pycon matplotlib tutorial deadline tomorrow

2008-02-18 Thread [EMAIL PROTECTED]
I will be presenting a tutorial on matplotlib a this year's pycon. If you are coming to the conference, are are already in the Chicago area, you may want to consider signing up for the tutorial http://us.pycon.org/2008/tutorials/ Tomorrow (Monday Feb 18th) is the deadline for registration.

Re: Could WSGI handle Asynchronous response?

2008-02-18 Thread est
On Feb 18, 10:35 pm, Jean-Paul Calderone [EMAIL PROTECTED] wrote: On Mon, 18 Feb 2008 05:27:41 -0800 (PST), est [EMAIL PROTECTED] wrote: On Feb 18, 7:05 pm, est [EMAIL PROTECTED] wrote: I am writing a small 'comet'-like app using flup, something like this: def myapp(environ,

ANN: Phatch = PHoto bATCH processor and renamer based on PIL

2008-02-18 Thread SPE - Stani's Python Editor
I'm pleased to announce the release of Phatch which is a powerful batch processor and renamer. Phatch exposes a big part of the Python Imaging Library through an user friendly GUI. (It is using python-pyexiv2 to offer more extensive EXIF and IPTC support.) Phatch is not targeted at manipulating

RE: Looking for a Python Program/Tool That Will Add Line Numbers to atxt File

2008-02-18 Thread Reedick, Andrew
-Original Message- From: [EMAIL PROTECTED] [mailto:python- [EMAIL PROTECTED] On Behalf Of William Pursell Sent: Monday, February 18, 2008 8:37 AM To: python-list@python.org Subject: Re: Looking for a Python Program/Tool That Will Add Line Numbers to atxt File On Feb 14, 6:54 am,

Re: Linux/Python Issues

2008-02-18 Thread MartinRinehart
[EMAIL PROTECTED] wrote: IOW: all this is assumed to be common *n*x knowledge. Both GNOME and KDE put Windows to shame. An old Windows guy, like me, can just start using either one without needing 'common *n*x knowledge.' Too bad the *n*x community isn't more welcoming to outsiders.

Re: Linux/Python Issues

2008-02-18 Thread MartinRinehart
Paul Boddie wrote: Here's one page which probably tells you stuff you already know: http://wiki.python.org/moin/BeginnersGuide/Download Thank you! It says I need Python (which I've got) and the Python-devel package, which sounds like it might include Tkinter and IDLE. Now if only I knew

Re: How to overcome the incomplete download with urllib.urlretrieve ?

2008-02-18 Thread Matt Nordhoff
This isn't super-helpful, but... James Yu wrote: This is part of my code that invokes urllib.urlretrieve: for i in link2Visit: localName = i.split('/') i = i.replace(' ', '%20') You should use urllib.quote or urllib.quote_plus (the latter replaces spaces with + instead

Re: Tkinter Confusion

2008-02-18 Thread MartinRinehart
Many thanks to all. -- http://mail.python.org/mailman/listinfo/python-list

Re: Could WSGI handle Asynchronous response?

2008-02-18 Thread Jean-Paul Calderone
On Mon, 18 Feb 2008 06:48:26 -0800 (PST), est [EMAIL PROTECTED] wrote: [snip] So, is there any solution that handles this nicely? Or, more specificly, is there any solution that is more 'comet'-like, let's say 'socket'-like than WSGI which could almost do full-dulex HTTP communications, and

Re: Linux/Python Issues

2008-02-18 Thread Paul Boddie
On 18 Feb, 16:39, [EMAIL PROTECTED] wrote: Paul Boddie wrote: Here's one page which probably tells you stuff you already know: http://wiki.python.org/moin/BeginnersGuide/Download Thank you! It says I need Python (which I've got) and the Python-devel package, which sounds like it might

Python-URL! - weekly Python news and links (Feb 18)

2008-02-18 Thread Gabriel Genellina
QOTW: Syntax can be, and has been, interoperable. The definitions of the telephone network, the Internet, email, and the Web are all bits-on-the-wire definitions of what you send back and forth, and they've all worked well enough to change the world. This belief that bits-on-the-wire is more

Re: How to get current module object

2008-02-18 Thread Alex
Gabriel Genellina wrote: En Sun, 17 Feb 2008 16:25:44 -0200, Alex [EMAIL PROTECTED] escribi�: Can I get reference to module object of current module (from which the code is currently executed)? I know __import__('filename') should probably do that, but the call contains redundant

Re: How to get current module object

2008-02-18 Thread Alex
Alex wrote: function and class namespaces have __name__ attribute too I was wrong - these were function and class _objects'_ namespaces -- http://mail.python.org/mailman/listinfo/python-list

Re: flattening a dict

2008-02-18 Thread Boris Borcic
Duncan Booth wrote: Boris Borcic [EMAIL PROTECTED] wrote: It is more elementary in the mathematician's sense, and therefore preferable all other things being equal, imo. I've tried to split 'gen' but I can't say the result is so much better. def flattendict(d) : gen = lambda L : (x

Python 3.0

2008-02-18 Thread Blubaugh, David A.
Is there a logical reason why Python 3 is not backwards compatible? David Blubaugh -Original Message- From: Bill Hart [mailto:[EMAIL PROTECTED] Sent: Friday, February 15, 2008 7:44 PM To: Blubaugh, David A. Subject: Re: scary thought for consideration I don't know, it's in alpha

MyHDL

2008-02-18 Thread Blubaugh, David A.
Dear Mr. Polo, Yes, I believe that there may indeed be a problem with MyHDL module running under python 2.5 under the windows environment. I have been having extensive problems with importing the MyHDL module. I will provide additional information if required. Thank you very much for all of

list mutability

2008-02-18 Thread gigs
hi im having this code l = [1, 3, 5, 'D', 1, 2, 3, 4, 5, 6, 7, 'A', 'S', 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 'A'] why i need to copy x list? can someone explain me. If i dont copy it i get this result: took_num_range(l) [[1, 2, 3, 4, 5, 6, 7], [6, 5, 4, 3, 2, 1, 0], [6, 5, 4, 3, 2, 1, 0], [6, 5,

average of PIL images

2008-02-18 Thread vaneric
hi i have a set of RGB images of diff faces (of people )as a 2 dim numpyarray ..something like threefaces=array([[xa1,xa2,xa3], [xb1,xb2,xb3], [xc1,xc2,xc3]]) where xa1,xa2,xa3 are tuples each representing rgb values of a pixel of first image .. i need to create the average face

Re: Python 3.0

2008-02-18 Thread Bruno Desthuilliers
Blubaugh, David A. a écrit : Is there a logical reason why Python 3 is not backwards compatible? Yes : cleaning up some cruft and warts accumulated from the years. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3.0

2008-02-18 Thread Steve Holden
Blubaugh, David A. wrote: Is there a logical reason why Python 3 is not backwards compatible? Yes. For a long time now the next *major* release of Python has been flagged as one which will take the opportunity to remove several design flaws from the original language and add features and

Re: Python 3.0

2008-02-18 Thread Gary Herron
Blubaugh, David A. wrote: Is there a logical reason why Python 3 is not backwards compatible? Yes. It's a conscious decision by the developers and community to get rid of some of the crud and old design decisions that have crept into the language over the last 10+ years. The intent is to

Re: Python 3.0

2008-02-18 Thread Jeroen Ruigrok van der Werven
-On [20080218 18:33], Blubaugh, David A. ([EMAIL PROTECTED]) wrote: Is there a logical reason why Python 3 is not backwards compatible? The sheer amount of overhaul as documented in http://www.python.org/dev/peps/pep-3100/ makes it already not backwards compatible. Python has been progressing

Re: Developing a Package with Sub Packages

2008-02-18 Thread Josh English
When testing the package in idle, this results in C:\Python25\Lib\idlelib instead of the file. The Data folder is created in this folder now. On 2/18/08, Gabriel Genellina [EMAIL PROTECTED] wrote: En Sun, 17 Feb 2008 22:34:27 -0200, Josh English [EMAIL PROTECTED] escribi�: Here's what I

Who is this person?? This is Mohammad

2008-02-18 Thread dawa-dawa
Who is this person?? This is Mohammad Who is this person?? This is Mohammad http://mohammad.islamway.com//?lang=eng -- http://mail.python.org/mailman/listinfo/python-list

Re: different instances with different data descriptors with the same name

2008-02-18 Thread Gabriel Genellina
En Mon, 18 Feb 2008 08:21:11 -0200, Fabrizio Pollastri [EMAIL PROTECTED] escribi�: Data descriptors are set as attributes of object types. So if one has many instances of the same class and wants each instance to have a different property (data descriptor) that can be accessed with a

Re: list mutability

2008-02-18 Thread John Machin
On Feb 19, 5:09 am, gigs [EMAIL PROTECTED] wrote: hi im having this code l = [1, 3, 5, 'D', 1, 2, 3, 4, 5, 6, 7, 'A', 'S', 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 'A'] why i need to copy x list? can someone explain me. If i dont copy it i get this result: took_num_range(l) [[1, 2, 3, 4, 5, 6,

RE: Question

2008-02-18 Thread Blubaugh, David A.
Dan, I have been working with examples within the Scipy and Numpy framework. Those are the examples that I have been working with at this time, including the FFT example. The following command: python setup.py install. Is what I did within the Python IDLE environment. However, python was

Re: Developing a Package with Sub Packages

2008-02-18 Thread Gabriel Genellina
En Mon, 18 Feb 2008 16:23:28 -0200, Josh English [EMAIL PROTECTED] escribi�: When testing the package in idle, this results in C:\Python25\Lib\idlelib instead of the file. The Data folder is created in this folder now. Works for me: main.py: from testpkg import a testpkg directory (a

Re: How to get current module object

2008-02-18 Thread Gabriel Genellina
En Mon, 18 Feb 2008 14:49:02 -0200, Alex [EMAIL PROTECTED] escribió: Gabriel Genellina wrote: That's what I've been searching for, thanks. By the way, I know it might be trivial question... but function and class namespaces have __name__ attribute too. Why is global one always returned? I

Python for Safety-Critical Software Development for Aerospace Applications

2008-02-18 Thread Blubaugh, David A.
To All, I was wondering if anyone has specific information as to the use of the Python language for the development of Safety-Critical software for aerospace applications?? For example, developing Python-based source code that has been verified to DO-178B Level A certification. Any

Re: average of PIL images

2008-02-18 Thread Robert Kern
vaneric wrote: hi i have a set of RGB images of diff faces (of people )as a 2 dim numpyarray ..something like threefaces=array([[xa1,xa2,xa3], [xb1,xb2,xb3], [xc1,xc2,xc3]]) where xa1,xa2,xa3 are tuples each representing rgb values of a pixel of first image .. i need to

Re: Need help to figure out urllib2.Request()

2008-02-18 Thread Gabriel Genellina
En Mon, 18 Feb 2008 09:21:10 -0200, James Yu [EMAIL PROTECTED] escribi�: Hi folks, I tried to open some web pages with urllib2.Request(url, data, headers), but it always give me a 404 error. Eg. url = 'http://www.whatever.com/somephp.php' data = {} data['id'] = account for i in

Re: Solve a Debate

2008-02-18 Thread castironpi
On Feb 17, 11:23 pm, greg [EMAIL PROTECTED] wrote: Wolfgang Draxinger wrote: Somehow you seem to think, that a lookup table will require more resources (memory I guess you thought) than a sequence of comparisons. However you didn't take into account, that the program code itself requires

Re: average of PIL images

2008-02-18 Thread 7stud
On Feb 18, 10:18 am, vaneric [EMAIL PROTECTED] wrote: hi i have a set of RGB images of diff faces (of people )as a 2 dim numpyarray ..something like threefaces=array([[xa1,xa2,xa3],        [xb1,xb2,xb3],        [xc1,xc2,xc3]]) where xa1,xa2,xa3 are  tuples each representing rgb values of a

Re: average of PIL images

2008-02-18 Thread 7stud
On Feb 18, 1:58 pm, 7stud [EMAIL PROTECTED] wrote: On Feb 18, 10:18 am, vaneric [EMAIL PROTECTED] wrote: hi i have a set of RGB images of diff faces (of people )as a 2 dim numpyarray ..something like threefaces=array([[xa1,xa2,xa3],        [xb1,xb2,xb3],        [xc1,xc2,xc3]])

Re: average of PIL images

2008-02-18 Thread 7stud
On Feb 18, 2:05 pm, 7stud [EMAIL PROTECTED] wrote: num = arr[1:, 2:] That says to get all elements from row 1 to the bottom that are in from column 2 to the end of the row. err.. That says to get all elements from row 1 to the last row which are in column 2, column 3, etc. to the end of the

Re: Python Memory Manager

2008-02-18 Thread MartinRinehart
Paul Rubin wrote: The problem here is with a high allocation rate, you have to GC a lot more often, which typically involves copying live data. This is last century's issue. Copying data, RAM to RAM, is nearly free using the Intel architecture. This short article,

Re: average of PIL images

2008-02-18 Thread Larry Bates
vaneric wrote: hi i have a set of RGB images of diff faces (of people )as a 2 dim numpyarray ..something like threefaces=array([[xa1,xa2,xa3], [xb1,xb2,xb3], [xc1,xc2,xc3]]) where xa1,xa2,xa3 are tuples each representing rgb values of a pixel of first image .. i need to

Garbage collection

2008-02-18 Thread Simon Pickles
Hi, I'm building a server with python, but coming from a c++ background, garbage collection seems strange. For instance, I have a manager looking after many objects in a dict. When those objects are no longer needed, I use del manager[objectid], hoping to force the garbage collector to

Re: Python Memory Manager

2008-02-18 Thread Steve Holden
[EMAIL PROTECTED] wrote: Paul Rubin wrote: The problem here is with a high allocation rate, you have to GC a lot more often, which typically involves copying live data. This is last century's issue. Copying data, RAM to RAM, is nearly free using the Intel architecture. This short

Re: Question

2008-02-18 Thread Gabriel Genellina
En Mon, 18 Feb 2008 17:48:57 -0200, Blubaugh, David A. [EMAIL PROTECTED] escribi�: Dan, I have been working with examples within the Scipy and Numpy framework. Those are the examples that I have been working with at this time, including the FFT example. The following command: python

Re: Linux/Python Issues

2008-02-18 Thread MartinRinehart
Paul Boddie wrote: The whole CNR stuff and the proprietary software slant of Linspire obscures the solution, in my opinion. Thanks for all your help, Paul. CNR, which is now free, is absolutely marvelous when it's got what you need. If Python2.5 were in the warehouse, I'd have clicked, gone

Re: Python Memory Manager

2008-02-18 Thread rbossy
Quoting Steve Holden [EMAIL PROTECTED]: [...] Not only that, but all pointers to an object have to be updated when it is relocated. Any problem in computer science can be solved by another level of indirection -- David John Wheeler ;-) RB --

Re: Is there any Generic RSS/ATOM generator in Python?

2008-02-18 Thread Christopher Arndt
On 11 Feb., 15:47, js [EMAIL PROTECTED] wrote: I'm looking for RSS/ATOM generator I can use in Python. I searched on pypi and the other places but I couldn't find any options on this. (I found many parsers, though) Is there any de-fact standard RSS/ATOM generator? (especially, I'd like to

Re: Passing a callable object to Thread

2008-02-18 Thread Lie
On Feb 16, 12:29 pm, Jeff Schwab [EMAIL PROTECTED] wrote: Paul Rubin wrote: Jeff Schwab [EMAIL PROTECTED] writes: Why not? They seem intuitive to me. I would find it weird if you couldn't have 0-tuple, and even weirder if you couldn't have a 1-tuple. Maybe my brain has been warped by

Re: Garbage collection

2008-02-18 Thread Ken
Simon Pickles wrote: Hi, I'm building a server with python, but coming from a c++ background, garbage collection seems strange. For instance, I have a manager looking after many objects in a dict. When those objects are no longer needed, I use del manager[objectid], hoping to force the

Re: Python Memory Manager

2008-02-18 Thread Jeff Schwab
[EMAIL PROTECTED] wrote: Paul Rubin wrote: The problem here is with a high allocation rate, you have to GC a lot more often, which typically involves copying live data. This is last century's issue. Copying data, RAM to RAM, is nearly free using the Intel architecture. What's the Intel

Double underscores -- ugly?

2008-02-18 Thread benhoyt
Hi guys, I've been using Python for some time now, and am very impressed with its lack of red tape and its clean syntax -- both probably due to the BDFL's ability to know when to say no. Most of the things that got me initially have been addressed in recent versions of Python, or are being

Re: Linux/Python Issues

2008-02-18 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: [EMAIL PROTECTED] wrote: IOW: all this is assumed to be common *n*x knowledge. Both GNOME and KDE put Windows to shame. An old Windows guy, like me, can just start using either one without needing 'common *n*x knowledge.' Too bad the *n*x community isn't more

Re: Seemingly odd 'is' comparison.

2008-02-18 Thread Steven D'Aprano
On Mon, 18 Feb 2008 14:11:53 +0100, Christian Heimes wrote: Tobiah wrote: print float(3.0) is float(3.0) True print float(3.0 * 1.0) is float(3.0) False Thumb rule: Never compare strings, numbers or tuples with is. Only compare an object with a singleton like a type or None. is

Re: Passing a callable object to Thread

2008-02-18 Thread castironpi
On Feb 18, 4:26 pm, Jeff Schwab [EMAIL PROTECTED] wrote: Lie wrote: On Feb 16, 12:29 pm, Jeff Schwab [EMAIL PROTECTED] wrote: Paul Rubin wrote: Jeff Schwab [EMAIL PROTECTED] writes: Why not?  They seem intuitive to me.  I would find it weird if you couldn't have 0-tuple, and even

RE: Question

2008-02-18 Thread Blubaugh, David A.
I have already solved that problem. Sorry for not alerting you as to me of solving this issue. Thank you very much for the help. I was wondering if you would be interested in helping in the development of a Scipy / MyHDL hybrid. The advantage of this would be to develop FPGA logic with the

Understanding While Loop Execution

2008-02-18 Thread Brad
Hi folks, I'm still fairly new to programming in python and programming in general. A friend of mine is in a CompSci 101 course and was working on a slider game when he encountered a problem. We eventually figured out what the problem was and built a test case to help solve it, but I can't for

Re: flattening a dict

2008-02-18 Thread Steven D'Aprano
On Mon, 18 Feb 2008 14:03:20 +, Duncan Booth wrote: Why, why, why, why are you using lambda here? It only makes the code harder to read (and it is bad enough without that). A lambda which is assigned directly to a variable is a bad code smell. Oh come on. I don't get this allergy to

Re: Passing a callable object to Thread

2008-02-18 Thread Jeff Schwab
Lie wrote: On Feb 16, 12:29 pm, Jeff Schwab [EMAIL PROTECTED] wrote: Paul Rubin wrote: Jeff Schwab [EMAIL PROTECTED] writes: Why not? They seem intuitive to me. I would find it weird if you couldn't have 0-tuple, and even weirder if you couldn't have a 1-tuple. Maybe my brain has been

Re: flattening a dict

2008-02-18 Thread Arnaud Delobelle
On Feb 18, 10:22 pm, Steven D'Aprano [EMAIL PROTECTED] cybersource.com.au wrote: [...] The problem with lambdas comes from people trying to hammer multi- expression functions into a single-expression lambda, hence obfuscating the algorithm. That's no different from people who obfuscate multi-

Re: flattening a dict

2008-02-18 Thread Jeff Schwab
Arnaud Delobelle wrote: On Feb 18, 10:22 pm, Steven D'Aprano [EMAIL PROTECTED] cybersource.com.au wrote: [...] The problem with lambdas comes from people trying to hammer multi- expression functions into a single-expression lambda, hence obfuscating the algorithm. That's no different from

Re: Double underscores -- ugly?

2008-02-18 Thread Ben Finney
benhoyt [EMAIL PROTECTED] writes: I realise that double underscores make the language conceptually cleaner in many ways (because fancy syntax and operator overloading are just handled by methods), but they don't *look* nice. That's a good thing, in that it draws attention to the names. The

Re: Passing a callable object to Thread

2008-02-18 Thread Jeff Schwab
[EMAIL PROTECTED] wrote: On Feb 18, 4:26 pm, Jeff Schwab [EMAIL PROTECTED] wrote: Lie wrote: On Feb 16, 12:29 pm, Jeff Schwab [EMAIL PROTECTED] wrote: Paul Rubin wrote: Jeff Schwab [EMAIL PROTECTED] writes: Why not? They seem intuitive to me. I would find it weird if you couldn't have

Re: TRAC - Trac, Project Leads, Python, and Mr. Noah Kantrowitz (sanitizer)

2008-02-18 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: Dear Ilias, Post in a single reply. He has to, in hopes to gain the traction he desires - as otherwise he's pretty much ignored these days. Which is a good thing of course... Diez -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   >