Re: Python for amd64 and mingw-w64

2008-12-21 Thread David Cournapeau
On Fri, Dec 19, 2008 at 3:30 PM, Martin v. Löwis mar...@v.loewis.de wrote: - Any extension requires the MS_WIN64 to be defined, but this symbol is only defined for MS compiler (in PC/pyport.h). Why do you say that? It is only defined when _WIN64 is defined; this has nothing to do with a MS

Re: New Python 3.0 string formatting - really necessary?

2008-12-21 Thread Patrick Mullen
On Sat, Dec 20, 2008 at 10:15 PM, r rt8...@gmail.com wrote: On Dec 20, 11:11 pm, walterbyrd walterb...@iname.com wrote: On Dec 20, 5:05 pm, Roy Smith r...@panix.com He got really hung up on the % syntax. I guess it's good to know that there is, at least, one person in the world doesn't

Re: New Python 3.0 string formatting - really necessary?

2008-12-21 Thread Marc 'BlackJack' Rintsch
On Sat, 20 Dec 2008 22:15:23 -0800, r wrote: It would be nice to get a vote together and see what does the average pythoneer want? What do they like, What do they dislike. What is the state of the Python Union? Does anybody know, Does anybody care? I think python is slipping away from it's

Re: Python for amd64 and mingw-w64

2008-12-21 Thread Martin v. Löwis
This is the only problem on python side of things to make extensions buildable on windows x64 (all the other problems I have encountered so far to make numpy build with mingw-w64 are numpy's or mingw-w64). Thanks! Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: New Python 3.0 string formatting - really necessary?

2008-12-21 Thread Marc 'BlackJack' Rintsch
On Sat, 20 Dec 2008 15:27:43 -0800, walterbyrd wrote: On Dec 19, 10:25 am, Michael Torrie torr...@gmail.com wrote: Personally the new string formatter is sorely needed in Python. Really? You know, it's funny, but when I read problems that people have with python, I don't remember seeing

Re: Python is slow

2008-12-21 Thread Marc 'BlackJack' Rintsch
On Sat, 20 Dec 2008 14:18:40 -0800, cm_gui wrote: Seriously cm_gui, you're a fool. Python is not slow. haha, getting hostile? python fans sure are a nasty crowd. Python is SLOW. when i have the time, i will elaborate on this. You are not fast enough to elaborate on Python's

Re: linecache vs egg - reading line of a file in an egg

2008-12-21 Thread R. Bernstein
Robert Kern robert.k...@gmail.com writes: R. Bernstein wrote: Does linecache work with source in Python eggs? If not, is it contemplated that this is going to be fixed or is there something else like linecache that currently works? linecache works with eggs and other zipped Python source,

Re: New Python 3.0 string formatting - really necessary?

2008-12-21 Thread Steven D'Aprano
On Sun, 21 Dec 2008 00:57:46 -0800, Patrick Mullen wrote: 2) In my experience, major version changes tend to be slower than before. When a lot of things change, especially if very low-level things change, as happened in python 3.0, the new code has not yet went through many years of revision

Re: trapping all method calls in a class...

2008-12-21 Thread Aaron Brady
On Dec 21, 1:32 am, Chris Rebert c...@rebertia.com wrote: On Sat, Dec 20, 2008 at 11:12 PM, Piyush Anonymous piyush.subscript...@gmail.com wrote: hi, i need to trap all method calls in a class in order to update a counter which is increased whenever a method is called and decreased

Re: How to transfer data structure or class from Python to C/C++?

2008-12-21 Thread Aaron Brady
On Oct 16, 9:10 am, Hongtian hongtian.i...@gmail.com wrote: snip Not exactly. In my C/C++ application, I have following function or flow: void func1() { call PyFunc(struct Tdemo, struct Tdemo1); } I mean I want to invoke Python function 'PyFunc' and transfer a data structure

Re: New Python 3.0 string formatting - really necessary?

2008-12-21 Thread Aaron Brady
On Dec 20, 8:26 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Sat, 20 Dec 2008 17:55:35 -0800, Aaron Brady wrote: snip This behavior is currently legal: %i %%i % 0 % 1 '0 1' So, just extend it.  (Unproduced.) %i %i % 0 % 1 '0 1' Errors should never pass

Read an image from a URL and write it to the browser

2008-12-21 Thread McCoy Fan
I want to do something simple: read an image from an image URL and write the image to the browser in CGI style. I wrote a CGI script to do this (I'm new to Python) and got the following error: FancyURLopener instance has no attribute 'tempcache' in bound method FancyURLopener.__del__ of

Re: New Python 3.0 string formatting - really necessary?

2008-12-21 Thread Aaron Brady
On Dec 20, 8:49 pm, MRAB goo...@mrabarnett.plus.com wrote: Aaron Brady wrote: On Dec 20, 7:38 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: Instead of just whinging, how about making a suggestion to fix it? Go on, sit down for an hour or ten and try to work out how a

RE: Best Practice using Glade/Python (ericericaro: message 1 of 20)

2008-12-21 Thread Barak, Ron
Hi Eric, Once the UI is defined, you interface to events as usual, e.g.: def OnSelChanged(self, evt): self.tablecont = str(self.GetItemText(evt.GetItem())) self.dprint(line()+. OnSelChanged:, self.tablecont) self.TreeViewController(self.tablecont)

HMAC with RIPEMD-160

2008-12-21 Thread Kless
Is there any way of use HMAC with RIPEMD-160? Since that to create a ripemd-160 hash there is to use: h = hashlib.new('ripemd160') it looks that isn't possible For HMAC-SHA256 would be: - import hashlib import hmac hm = hmac.new('key', msg='message', digestmod=hashlib.sha256)

Re: Read an image from a URL and write it to the browser

2008-12-21 Thread Peter Otten
McCoy Fan wrote: I want to do something simple: read an image from an image URL and write the image to the browser in CGI style. I wrote a CGI script to do this (I'm new to Python) and got the following error: FancyURLopener instance has no attribute 'tempcache' in bound method

Re: New Python 3.0 string formatting - really necessary?

2008-12-21 Thread Duncan Booth
Steven D'Aprano st...@remove-this-cybersource.com.au wrote: Errors should never pass silently, unless explicitly silenced. You have implicitly silenced the TypeError you get from not having enough arguments for the first format operation. That means that you will introduce ambiguity and

Re: New Python 3.0 string formatting - really necessary?

2008-12-21 Thread Marc 'BlackJack' Rintsch
On Sun, 21 Dec 2008 12:45:32 +, Duncan Booth wrote: You seem to have made an unwarranted assumption, namely that a binary operator has to compile to a function with two operands. There is no particular reason why this has to always be the case: for example, I believe that C# when given

Re: Read an image from a URL and write it to the browser

2008-12-21 Thread McCoy Fan
On Dec 21, 7:25 am, Peter Otten __pete...@web.de wrote: McCoy Fan wrote: I want to do something simple: read an image from an image URL and write the image to the browser in CGI style. I wrote a CGI script to do this (I'm new to Python) and got the following error: FancyURLopener

Re: New Python 3.0 string formatting - really necessary?

2008-12-21 Thread Steven D'Aprano
On Sun, 21 Dec 2008 12:45:32 +, Duncan Booth wrote: Steven D'Aprano st...@remove-this-cybersource.com.au wrote: Errors should never pass silently, unless explicitly silenced. You have implicitly silenced the TypeError you get from not having enough arguments for the first format

www.iofferkicks.com china cheap wholesale nike shoes,air jordan shoes,air force one shoes.

2008-12-21 Thread www.iofferkicks.com
Get Nike Shoes at Super Cheap Prices Discount Nike air jordans (www.iofferkicks.com) Discount Nike Air Max 90 Sneakers (www.iofferkicks.com) Discount Nike Air Max 91 Supplier (www.iofferkicks.com) Discount Nike Air Max 95 Shoes Supplier (www.iofferkicks.com) Discount Nike Air Max 97 Trainers

Re: C API and memory allocation

2008-12-21 Thread Hrvoje Niksic
Aaron Brady castiro...@gmail.com writes: I hold this is strong enough to put the burden of proof on the defenders of having 's'. What is its use case? Passing the string to a C API that can't handle (or don't care about) embedded null chars anyway. Filename API's are a typical example. --

Re: New Python 3.0 string formatting - really necessary?

2008-12-21 Thread Steve Holden
r wrote: On Dec 20, 11:11 pm, walterbyrd walterb...@iname.com wrote: On Dec 20, 5:05 pm, Roy Smith r...@panix.com He got really hung up on the % syntax. I guess it's good to know that there is, at least, one person in the world doesn't like the % formatting. As least the move was not

Re: New Python 3.0 string formatting - really necessary?

2008-12-21 Thread skip
Marc Many newbie code I have seen avoids it by string concatenation: Marc greeting = 'Hello, my name is ' + name + ' and I am ' + str(age) + ' old.' Marc That's some kind of indirect complaint. :-) I see Python code like that written by people with a C/C++ background. I don't

Re: a small doubt

2008-12-21 Thread Bruno Desthuilliers
(answering to the OP) Piyush Anonymous wrote: i wrote this code -- class Person(object): instancesCount = 0 def __init__(self, title=): Person.instancesCount += 1 self.id http://self.id = tempst def testprint(self): print blah blah def

Re: trapping all method calls in a class...

2008-12-21 Thread Bruno Desthuilliers
Chris Rebert a écrit : (snip) Sidenotes about your code: - `args` and `kwds` are the conventional names for the * and ** special arguments for '**', the most conventional names (at least the one I usually see) are 'kwargs', then 'kw' -- http://mail.python.org/mailman/listinfo/python-list

Re: New Python 3.0 string formatting - really necessary?

2008-12-21 Thread Duncan Booth
Marc 'BlackJack' Rintsch bj_...@gmx.net wrote: a+b+c+d might execute a.__add__(b,c,d) allowing more efficient string concatenations or matrix operations, and a%b%c%d might execute as a.__mod__(b,c,d). But that needs special casing strings and ``%`` in the comiler, because it might not be

Re: New Python 3.0 string formatting - really necessary?

2008-12-21 Thread Duncan Booth
Steven D'Aprano st...@remove-this-cybersource.com.au wrote: a+b+c+d might execute a.__add__(b,c,d) allowing more efficient string concatenations or matrix operations, and a%b%c%d might execute as a.__mod__(b,c,d). That's only plausible if the operations are associative. Addition is

Re: New Python 3.0 string formatting - really necessary?

2008-12-21 Thread Aaron Brady
On Dec 21, 7:34 am, Marc 'BlackJack' Rintsch bj_...@gmx.net wrote: On Sun, 21 Dec 2008 12:45:32 +, Duncan Booth wrote: You seem to have made an unwarranted assumption, namely that a binary operator has to compile to a function with two operands. There is no particular reason why this

Re: How to read stdout from subprocess as it is being produced

2008-12-21 Thread Alex
On Dec 19, 5:09 pm, Albert Hopkins mar...@letterboxes.org wrote: On Fri, 2008-12-19 at 06:34 -0800, Alex wrote: Hi, I have a Pyhon GUI application that launches subprocess. I would like to read the subprocess' stdout as it is being produced (show it in GUI), without hanging the GUI. I

Re: New Python 3.0 string formatting - really necessary?

2008-12-21 Thread Aaron Brady
On Dec 21, 8:50 am, Steve Holden st...@holdenweb.com wrote: r wrote: snip This all really comes down to the new python users. Yea, i said it. Not rabid fanboys like Steven and myself.(i can't speak for walter but i think he would agree) Are we going to make sure joe-blow python newbie

Re: New Python 3.0 string formatting - really necessary?

2008-12-21 Thread Mel
Duncan Booth wrote: I don't see that. What I suggested was that a % b % c would map to a.__mod__(b,c). (a % b) % c would also map to that, but a % (b % c) could only possibly map to a.__mod__(b.__mod__(c)) There's a compiling problem here, no? You don't want a%b%c to implement as

Re: New Python 3.0 string formatting - really necessary?

2008-12-21 Thread Marc 'BlackJack' Rintsch
On Sun, 21 Dec 2008 15:30:34 +, Duncan Booth wrote: Marc 'BlackJack' Rintsch bj_...@gmx.net wrote: a+b+c+d might execute a.__add__(b,c,d) allowing more efficient string concatenations or matrix operations, and a%b%c%d might execute as a.__mod__(b,c,d). But that needs special casing

Re: New Python 3.0 string formatting - really necessary?

2008-12-21 Thread MRAB
Aaron Brady wrote: On Dec 20, 8:49 pm, MRAB goo...@mrabarnett.plus.com wrote: Aaron Brady wrote: On Dec 20, 7:38 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: Instead of just whinging, how about making a suggestion to fix it? Go on, sit down for an hour or ten and try to

Re: Python is slow

2008-12-21 Thread MRAB
Marc 'BlackJack' Rintsch wrote: On Sat, 20 Dec 2008 14:18:40 -0800, cm_gui wrote: Seriously cm_gui, you're a fool. Python is not slow. haha, getting hostile? python fans sure are a nasty crowd. Python is SLOW. when i have the time, i will elaborate on this. You are not fast enough to

Re: New Python 3.0 string formatting - really necessary?

2008-12-21 Thread Aaron Brady
On Dec 21, 10:31 am, MRAB goo...@mrabarnett.plus.com wrote: Aaron Brady wrote: On Dec 20, 8:49 pm, MRAB goo...@mrabarnett.plus.com wrote: Aaron Brady wrote: On Dec 20, 7:38 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: Instead of just whinging, how about making a

Re: New Python 3.0 string formatting - really necessary?

2008-12-21 Thread MRAB
Aaron Brady wrote: On Dec 21, 10:31 am, MRAB goo...@mrabarnett.plus.com wrote: Aaron Brady wrote: On Dec 20, 8:49 pm, MRAB goo...@mrabarnett.plus.com wrote: Aaron Brady wrote: On Dec 20, 7:38 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: Instead of just whinging, how

Re: Python is slow

2008-12-21 Thread Krishnakant
With my current experience with java, python and perl, I can only suggest one thing to who ever feels that python or any language is slow. By the way there is only one language with is fastest and that is assembly. And with regards to python, I am writing pritty heavy duty applications right now.

Re: Python is slow

2008-12-21 Thread r
RTFM, use as much python code and optimize with C where needed, problem solved! -- http://mail.python.org/mailman/listinfo/python-list

Re: New Python 3.0 string formatting - really necessary?

2008-12-21 Thread bearophileHUGS
MRAB: Interesting. The re module uses a form of bytecode. Not sure about the relative cost of the dispatch code, though. I was talking about the main CPython VM, but the same ideas may be adapted for the RE engine too. Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: Python is slow

2008-12-21 Thread Luis M . González
On Dec 21, 2:34 pm, r rt8...@gmail.com wrote: RTFM, use as much python code and optimize with C where needed, problem solved! That's true if your *really* need C's extra speed. Most of the times, a better algorithm or psyco (or shedskin) can help without having to use any other language. This

Twisted for non-networking applications

2008-12-21 Thread Kottiyath
Hi all, Is it a good idea to use Twisted inside my application, even though it has no networking part in it? Basically, my application needs lots of parallel processing - but I am rather averse to using threads - due to myraid issues it can cause. So, I was hoping to use a reactor pattern to

Re: Python is slow

2008-12-21 Thread r
Could not have said it better myself Luis, i stay as far away from C as i can. But there are usage cases for it. -- http://mail.python.org/mailman/listinfo/python-list

Are python objects thread-safe?

2008-12-21 Thread RajNewbie
Say, I have two threads, updating the same dictionary object - but for different parameters: Please find an example below: a = {file1Data : '', file2Data : ''} Now, I send it to two different threads, both of which are looping infinitely: In thread1: a['file1Data'] = open(filename1).read

Re: New Python 3.0 string formatting - really necessary?

2008-12-21 Thread Christian Heimes
Patrick Mullen schrieb: 2) In my experience, major version changes tend to be slower than before. When a lot of things change, especially if very low-level things change, as happened in python 3.0, the new code has not yet went through many years of revision and optimization that the old code

Re: New Python 3.0 string formatting - really necessary?

2008-12-21 Thread r
I noticed when i mentioned self nobody wants to touch that subject. There could be many reasons why... 0.) nobody but the 10 regulars i see here exists 1.) nobody cares(doubt it) 2.) nobody is brave enough to question it(maybe) 3.) most people like to type self over and over again(doubt it) 4.)

Are Django/Turbogears too specific?

2008-12-21 Thread Gilles Ganault
Hi I'd like to rewrite a Web 2.0 PHP application in Python with AJAX, and it seems like Django and Turbogears are the frameworks that have the most momentum. I'd like to use this opportunity to lower the load on servers, as the PHP application wasn't built to fit the number of users hammering

Re: Removing self.

2008-12-21 Thread skip
r I do not like self, and i lamented it from day one, now it is second r nature to me but does that mean it is really needed?? I feel i have r been brainwashed into its usage. ... r 3000 would have been the perfect time to dump self and really clean up r the language,

Re: New Python 3.0 string formatting - really necessary?

2008-12-21 Thread Luis Zarrabeitia
Quoting r rt8...@gmail.com: I noticed when i mentioned self nobody wants to touch that subject. There could be many reasons why... 0.) nobody but the 10 regulars i see here exists 1.) nobody cares(doubt it) 2.) nobody is brave enough to question it(maybe) 3.) most people like to type

Re: New Python 3.0 string formatting - really necessary?

2008-12-21 Thread MRAB
r wrote: I noticed when i mentioned self nobody wants to touch that subject. There could be many reasons why... 0.) nobody but the 10 regulars i see here exists 1.) nobody cares(doubt it) 2.) nobody is brave enough to question it(maybe) 3.) most people like to type self over and over

Re: New Python 3.0 string formatting - really necessary?

2008-12-21 Thread Patrick Mullen
On Sun, Dec 21, 2008 at 11:26 AM, r rt8...@gmail.com wrote: I noticed when i mentioned self nobody wants to touch that subject. There could be many reasons why... 0.) nobody but the 10 regulars i see here exists 1.) nobody cares(doubt it) 2.) nobody is brave enough to question it(maybe) 3.)

Re: Are Django/Turbogears too specific?

2008-12-21 Thread Patrick Mullen
On Sun, Dec 21, 2008 at 11:41 AM, Gilles Ganault nos...@nospam.com wrote: Hi I'd like to rewrite a Web 2.0 PHP application in Python with AJAX, and it seems like Django and Turbogears are the frameworks that have the most momentum. I'd like to use this opportunity to lower the load on

Re: Are Django/Turbogears too specific?

2008-12-21 Thread Philip Semanchuk
On Dec 21, 2008, at 2:41 PM, Gilles Ganault wrote: Hi I'd like to rewrite a Web 2.0 PHP application in Python with AJAX, and it seems like Django and Turbogears are the frameworks that have the most momentum. I don't have any practical experience with these, but I've done some research.

Re: New Python 3.0 string formatting - really necessary?

2008-12-21 Thread Bruno Desthuilliers
r a écrit : (snip clueless rant) One more big complaint THE BACKSLASH PLAGUE. ever tried regexp? Yes. exp = re.compile(rno \problem \with \backslashes) , or file paths?. You mean _dos/windows_ file path separator ? It was indeed a stupid choice _from microsoft_ to choose the by then

Re: New Python 3.0 string formatting - really necessary?

2008-12-21 Thread Bruno Desthuilliers
walterbyrd a écrit : On Dec 20, 5:05 pm, Roy Smith r...@panix.com He got really hung up on the % syntax. I guess it's good to know that there is, at least, one person in the world doesn't like the % formatting. As least the move was not entirely pointless. But, you must admit, of all the

Re: New Python 3.0 string formatting - really necessary?

2008-12-21 Thread Bruno Desthuilliers
r a écrit : I noticed when i mentioned self nobody wants to touch that subject. There could be many reasons why... 0.) nobody but the 10 regulars i see here exists 1.) nobody cares(doubt it) 2.) nobody is brave enough to question it(maybe) 3.) most people like to type self over and over

Re: trapping all method calls in a class...

2008-12-21 Thread MrJean1
The decorate_meths() function as given fails: TypeError: 'dictproxy' object does not support item assignment But this version avoids that error (on Python 2.2 thru 2.6): def decorate_meths(klass): for nam, val in klass.__dict__.items(): if callable(val): setattr(klass,

Re: Are Django/Turbogears too specific?

2008-12-21 Thread Bruno Desthuilliers
Gilles Ganault a écrit : Hi I'd like to rewrite a Web 2.0 PHP application in Python with AJAX, and it seems like Django and Turbogears are the frameworks that have the most momentum. I'd like to use this opportunity to lower the load on servers, as the PHP application wasn't built to fit the

Re: Are Django/Turbogears too specific?

2008-12-21 Thread Bruno Desthuilliers
Philip Semanchuk a écrit : (snip) From the reading I did, I gathered that Django was really good if you want to do what Django is good at, but not as easy to customize as, say, Pylons. That was my first impression too, and was more or less true some years ago. After more experience, having

Re: Are Django/Turbogears too specific?

2008-12-21 Thread Philip Semanchuk
On Dec 21, 2008, at 3:14 PM, Bruno Desthuilliers wrote: Philip Semanchuk a écrit : (snip) From the reading I did, I gathered that Django was really good if you want to do what Django is good at, but not as easy to customize as, say, Pylons. That was my first impression too, and was more

Re: New Python 3.0 string formatting - really necessary?

2008-12-21 Thread r
Hey Bruno, Thanks for spelling it out for me :D -- http://mail.python.org/mailman/listinfo/python-list

wxpython for python 3.0 ?

2008-12-21 Thread dlemper
The wxpython web describes compatability with python 2.4 2.5 . Does it work with 3.0 ? If not, anyone have a clue as to when ? -- http://mail.python.org/mailman/listinfo/python-list

noob trouble with IDLE

2008-12-21 Thread Ronald Rodriguez
Hi, Im new to python and I've just started using Byte of Python, running the samples etc. Im using IDLE on Xp. Ok, here's the thing. A sample script makes a call to the os.system() function in order to zip some files. Everything works fine when running from the command line, but the same code

Re: New Python 3.0 string formatting - really necessary?

2008-12-21 Thread r
Bruno, I thought i had already gone up, up, and away to your kill filter. hmm, guess you had a change of heart ;D -- http://mail.python.org/mailman/listinfo/python-list

Re: Python is slow

2008-12-21 Thread James Mills
On Mon, Dec 22, 2008 at 4:47 AM, r rt8...@gmail.com wrote: Could not have said it better myself Luis, i stay as far away from C as i can. But there are usage cases for it. If you can think of 1 typical common case I'll reward you with praise! :) By the way, by common and typical I mean

Re: Twisted for non-networking applications

2008-12-21 Thread James Mills
On Mon, Dec 22, 2008 at 4:27 AM, Kottiyath n.kottiy...@gmail.com wrote: Hi all, Is it a good idea to use Twisted inside my application, even though it has no networking part in it? Basically, my application needs lots of parallel processing - but I am rather averse to using threads - due

Re: Are python objects thread-safe?

2008-12-21 Thread James Mills
On Mon, Dec 22, 2008 at 4:51 AM, RajNewbie raj.indian...@gmail.com wrote: Say, I have two threads, updating the same dictionary object - but for different parameters: Please find an example below: a = {file1Data : '', file2Data : ''} Now, I send it to two different threads, both of

Re: [Help] The pywinauto Can't select the MDI's menu using the MenuItems() which return [].

2008-12-21 Thread gagsl-py2
--- El vie 19-dic-08, 为爱而生 boyee...@gmail.com escribió: I use the WORD Only for my example. The application I test is similar to the WORD and It has't the COM. The code below opens the Choose Font dialog on my Spanish Windows version: py from pywinauto.application import Application py app =

Re: New Python 3.0 string formatting - really necessary?

2008-12-21 Thread Benjamin Kaplan
On Sun, Dec 21, 2008 at 2:26 PM, r rt8...@gmail.com wrote: I noticed when i mentioned self nobody wants to touch that subject. There could be many reasons why... 0.) nobody but the 10 regulars i see here exists if you only see 10 people, you must not be following this list very well.

Re: wxpython for python 3.0 ?

2008-12-21 Thread Benjamin Kaplan
On Sun, Dec 21, 2008 at 4:42 PM, dlem...@bag.python.org wrote: The wxpython web describes compatability with python 2.4 2.5 . Does it work with 3.0 ? If not, anyone have a clue as to when ? This question was asked a couple of times on the wxpython-users mailing list. It's probably going to

Re: Are python objects thread-safe?

2008-12-21 Thread Aaron Brady
On Dec 21, 12:51 pm, RajNewbie raj.indian...@gmail.com wrote: Say, I have two threads, updating the same dictionary object - but for different parameters: Please find an example below: a = {file1Data : '',        file2Data : ''} Now, I send it to two different threads, both of which are

Re: New Python 3.0 string formatting - really necessary?

2008-12-21 Thread Aaron Brady
On Dec 21, 10:58 am, MRAB goo...@mrabarnett.plus.com wrote: Aaron Brady wrote: On Dec 21, 10:31 am, MRAB goo...@mrabarnett.plus.com wrote: snip The original format is a string. The result of '%' is a string if there's only 1 placeholder to fill, or a (partial) format object (class

Re: HMAC with RIPEMD-160

2008-12-21 Thread Chris Rebert
On Sun, Dec 21, 2008 at 4:21 AM, Kless jonas@googlemail.com wrote: Is there any way of use HMAC with RIPEMD-160? Since that to create a ripemd-160 hash there is to use: h = hashlib.new('ripemd160') it looks that isn't possible For HMAC-SHA256 would be: - import hashlib

Re: New Python 3.0 string formatting - really necessary?

2008-12-21 Thread MRAB
Aaron Brady wrote: On Dec 21, 10:58 am, MRAB goo...@mrabarnett.plus.com wrote: Aaron Brady wrote: On Dec 21, 10:31 am, MRAB goo...@mrabarnett.plus.com wrote: snip The original format is a string. The result of '%' is a string if there's only 1 placeholder to fill, or a (partial) format

Beep

2008-12-21 Thread Jeffrey Barish
I use sys.stdout.write('\a') to beep. It works fine on Kubuntu, but not on two other platforms (one of which is Ubuntu). I presume that the problem is due to a system configuration issue. Can someone point me in the right direction? Thanks. -- Jeffrey Barish --

Re: Beep

2008-12-21 Thread Chris Rebert
On Sun, Dec 21, 2008 at 4:16 PM, Jeffrey Barish jeff_bar...@earthlink.net wrote: I use sys.stdout.write('\a') to beep. It works fine on Kubuntu, but not on two other platforms (one of which is Ubuntu). I presume that the problem is due to a system configuration issue. Can someone point me in

Re: Beep

2008-12-21 Thread Stef Mientki
Jeffrey Barish wrote: I use sys.stdout.write('\a') to beep. It works fine on Kubuntu, but not on two other platforms (one of which is Ubuntu). I presume that the problem is due to a system configuration issue. Can someone point me in the right direction? Thanks. I started a thread about

Re: Beep

2008-12-21 Thread Jeffrey Barish
Chris Rebert wrote: Is the 'pcspkr' kernel module built and loaded? Yes. And I should have mentioned that I get sound from Ubuntu applications that produce sound. -- Jeffrey Barish -- http://mail.python.org/mailman/listinfo/python-list

Re: New Python 3.0 string formatting - really necessary?

2008-12-21 Thread alex23
On Dec 21, 10:11 am, r rt8...@gmail.com wrote: Most of the complaints i hear are the redundant use of self. Which I lamented about but have become accustom(brainwashed) to it. I would remove this if it where up to me. It's a shame Python wasn't released under some kind of license, one that

Threads, forks, multiplexing - oh my

2008-12-21 Thread Thomas Raef
I have a program that was created by someone else and it does it's job beautifully. I now want to run multiple instances of this program on a client, after receiving the command line and args from a broker, dispatcher, whatever you want to call it. This dispatcher will listen for a

Re: Read an image from a URL and write it to the browser

2008-12-21 Thread Steve Holden
McCoy Fan wrote: On Dec 21, 7:25 am, Peter Otten __pete...@web.de wrote: McCoy Fan wrote: I want to do something simple: read an image from an image URL and write the image to the browser in CGI style. I wrote a CGI script to do this (I'm new to Python) and got the following error:

Re: Threads, forks, multiplexing - oh my

2008-12-21 Thread James Mills
On Mon, Dec 22, 2008 at 11:36 AM, Thomas Raef tr...@ebasedsecurity.com wrote: I now want to run multiple instances of this program on a client, after receiving the command line and args from a broker, dispatcher, whatever you want to call it. You can use the subprocess module. I've read

Re: Namespaces, multiple assignments, and exec()

2008-12-21 Thread John O'Hagan
On Sat, 20 Dec 2008, John O'Hagan wrote: On Sat, 20 Dec 2008, Terry Reedy wrote: John O'Hagan wrote: I have a lot of repetitive assignments to make, within a generator, that use a function outside the generator: var1 = func(var1, args) var2 = func(var2, args) var3 = func(var3,

Re: New Python 3.0 string formatting - really necessary?

2008-12-21 Thread James Mills
On Mon, Dec 22, 2008 at 11:37 AM, alex23 wuwe...@gmail.com wrote: On Dec 21, 10:11 am, r rt8...@gmail.com wrote: Most of the complaints i hear are the redundant use of self. Which I lamented about but have become accustom(brainwashed) to it. I would remove this if it where up to me. It's a

Re: New Python 3.0 string formatting - really necessary?

2008-12-21 Thread Aaron Brady
On Dec 21, 6:14 pm, MRAB goo...@mrabarnett.plus.com wrote: Aaron Brady wrote: On Dec 21, 10:58 am, MRAB goo...@mrabarnett.plus.com wrote: Aaron Brady wrote: On Dec 21, 10:31 am, MRAB goo...@mrabarnett.plus.com wrote: snip The original format is a string. The result of '%' is a string if

How to represent a sequence of raw bytes

2008-12-21 Thread Steven Woody
Hi, What's the right type to represent a sequence of raw bytes. In C, we usually do 1. char buf[200] or 2. char buf[] = {0x11, 0x22, 0x33, ... } What's the equivalent representation for above in Python? Thanks. - narke -- http://mail.python.org/mailman/listinfo/python-list

Re: How to represent a sequence of raw bytes

2008-12-21 Thread Michiel Overtoom
On Monday 22 December 2008 03:23:03 Steven Woody wrote: 2. char buf[] = {0x11, 0x22, 0x33, ... } What's the equivalent representation for above in Python? buf=\x11\x22\33 for b in buf: print ord(b) ... 17 34 27 Greetings, -- The ability of the OSS process to collect and harness the

Re: New Python 3.0 string formatting - really necessary?

2008-12-21 Thread MRAB
Aaron Brady wrote: On Dec 21, 6:14 pm, MRAB goo...@mrabarnett.plus.com wrote: Aaron Brady wrote: On Dec 21, 10:58 am, MRAB goo...@mrabarnett.plus.com wrote: Aaron Brady wrote: On Dec 21, 10:31 am, MRAB goo...@mrabarnett.plus.com wrote: snip The original format is a string. The result of

Re: Are Django/Turbogears too specific?

2008-12-21 Thread J Kenneth King
Gilles Ganault nos...@nospam.com writes: Hi I'd like to rewrite a Web 2.0 PHP application in Python with AJAX, and it seems like Django and Turbogears are the frameworks that have the most momentum. I'd like to use this opportunity to lower the load on servers, as the PHP application

www.iofferkicks.com china cheap wholesale nike shoes,air jordan shoes,air force one shoes.

2008-12-21 Thread www.iofferkicks.com
Get Nike Shoes at Super Cheap Prices Discount Nike air jordans (www.iofferkicks.com) Discount Nike Air Max 90 Sneakers (www.iofferkicks.com) Discount Nike Air Max 91 Supplier (www.iofferkicks.com) Discount Nike Air Max 95 Shoes Supplier (www.iofferkicks.com) Discount Nike Air Max 97 Trainers

www.iofferkicks.com china cheap wholesale nike shoes,air jordan shoes,air force one shoes.

2008-12-21 Thread iofferkicks...@gmail.com
Get Nike Shoes at Super Cheap Prices Discount Nike air jordans (www.iofferkicks.com) Discount Nike Air Max 90 Sneakers (www.iofferkicks.com) Discount Nike Air Max 91 Supplier (www.iofferkicks.com) Discount Nike Air Max 95 Shoes Supplier (www.iofferkicks.com) Discount Nike Air Max 97 Trainers

Re: Twisted for non-networking applications

2008-12-21 Thread RajNewbie
On Dec 22, 3:26 am, James Mills prolo...@shortcircuit.net.au wrote: On Mon, Dec 22, 2008 at 4:27 AM, Kottiyath n.kottiy...@gmail.com wrote: Hi all,   Is it a good idea to use Twisted inside my application, even though it has no networking part in it?   Basically, my application needs lots

Discount (paypal) www.ebuyvip.com nfl jersey ugg boots

2008-12-21 Thread Jacky
Hi friend Thanks for your reply. The current stock list with the available jerseys and sizea in the add annex, pls check it. and the jerseys pictures you can check my ablum : http://likenfl.photo.163.com . the moq order: 10 pcs the price : $20 inc shipping fee and tax.If you worry do businees

Re: Twisted for non-networking applications

2008-12-21 Thread James Mills
On Mon, Dec 22, 2008 at 3:25 PM, RajNewbie raj.indian...@gmail.com wrote: I was unable to see documentation explaining this - so asking again. Documentation is available here: http://trac.softcircuit.com.au/circuits/wiki/docs And here: pydoc circuits The code itself is heavily documented. I'm

Re: Are Django/Turbogears too specific?

2008-12-21 Thread Tino Wildenhain
Philip Semanchuk wrote: ... I prefer Mako over the other template languages I've seen. From what I can tell Mako is nearly identical to all other template languages you might have seen (e.g. PHP style tags). Thats why I personally would not consider it. Its just much of a hassle to mix code

Re: How to represent a sequence of raw bytes

2008-12-21 Thread Steven Woody
On Mon, Dec 22, 2008 at 10:27 AM, Michiel Overtoom mot...@xs4all.nl wrote: On Monday 22 December 2008 03:23:03 Steven Woody wrote: 2. char buf[] = {0x11, 0x22, 0x33, ... } What's the equivalent representation for above in Python? buf=\x11\x22\33 for b in buf: print ord(b) ... 17 34 27

Re: How to represent a sequence of raw bytes

2008-12-21 Thread Tino Wildenhain
Steven Woody wrote: On Mon, Dec 22, 2008 at 10:27 AM, Michiel Overtoom mot...@xs4all.nl wrote: On Monday 22 December 2008 03:23:03 Steven Woody wrote: 2. char buf[] = {0x11, 0x22, 0x33, ... } What's the equivalent representation for above in Python? buf=\x11\x22\33 ... I thing

Re: How to represent a sequence of raw bytes

2008-12-21 Thread Chris Rebert
On Sun, Dec 21, 2008 at 10:56 PM, Steven Woody narkewo...@gmail.com wrote: On Mon, Dec 22, 2008 at 10:27 AM, Michiel Overtoom mot...@xs4all.nl wrote: On Monday 22 December 2008 03:23:03 Steven Woody wrote: 2. char buf[] = {0x11, 0x22, 0x33, ... } What's the equivalent representation for

Re: How to represent a sequence of raw bytes

2008-12-21 Thread Hrvoje Niksic
Steven Woody narkewo...@gmail.com writes: What's the right type to represent a sequence of raw bytes. In C, we usually do 1. char buf[200] or 2. char buf[] = {0x11, 0x22, 0x33, ... } What's the equivalent representation for above in Python? import array buf = array.array('b', [0x11,

[issue4709] Mingw-w64 and python on windows x64

2008-12-21 Thread Cournapeau David
New submission from Cournapeau David da...@ar.media.kyoto-u.ac.jp: I believe the current pyport.h for windows x64 has some problems. It does not work for compilers which are not MS ones, because building against the official binary (python 2.6) relies on features which are not enabled unless

  1   2   >