Re: I'm happy with Python 2.5

2011-03-06 Thread n00m
http://www.spoj.pl/forum/viewtopic.php?f=20&t=8264 That's all what I meant to say in here. User numerix (German?) knows ropes of Python miles far better than e.g. me. -- http://mail.python.org/mailman/listinfo/python-list

Re: Extending dict (dict's) to allow for multidimensional dictionary

2011-03-06 Thread Javier
Looks a good idea. I use this kind of "recursive dicts" to represent tree like datastruct in python. Like: car["ford"]["taurus"]["price"]=... car["toyota"]["corolla"]["mpg"]=... car["toyota"]["corolla"]["price"]=... It would be good if it could be combined with class2dict (converting dict elem

AW: import python module from C++ code

2011-03-06 Thread Markus Schaber
Hi, > von Arthur Mc Coy: > Still need the answer to the question: " howto embed given python file > (which contains python class and its members) into the c++ application ? " There is no straight way of embedding a Python module into a c++ application. You will have to embed the python interpre

PAYPAL WHOLESALE all BRAND(UGG BOOTS, SHOES, CLOTHES, HANDBAG, WATCH, JEANS, JERSEY, T-SHIRT, SHIRTS, HOODY, EYEGLASS, CAP, SHAWL, WALLT) and so on http://www.24hours-online.com/.

2011-03-06 Thread amy
PAYPAL payment wholesale SHOES(UGG BOOTS, Timberland boots ,Munich shoes,NIKE,ADIDAS,LV,GUCCI,CHANEL,PRADA,POLO,D&G,DIOR AND SO ON) http://www.24hours-online.com/ PAYPAL payment wholesale CLOTHING and jeans(Franklin Marshall,Moncler eiderdown,Nike,ADIDAS,A&F,D&G,ED HARDAY,BAPE,BBC,LV,GUCCI,ARMANI,P

Re: I'm happy with Python 2.5

2011-03-06 Thread Steven D'Aprano
On Sun, 06 Mar 2011 20:28:19 -0800, alex23 wrote: > On Feb 27, 11:57 pm, n00m wrote: >> http://www.spoj.pl/ > > There's your problem. I'd say most Python 3.x adopters are using it for > something other than working out whose performance dick is the longest. In fairness, the Python Dev team is v

Re: I'm happy with Python 2.5

2011-03-06 Thread alex23
On Feb 27, 11:57 pm, n00m wrote: > http://www.spoj.pl/ There's your problem. I'd say most Python 3.x adopters are using it for something other than working out whose performance dick is the longest. -- http://mail.python.org/mailman/listinfo/python-list

Re: What do I need to know in order to write a web application in python?

2011-03-06 Thread Grant Edwards
On 2011-03-05, ErichCart ErichCart wrote: > Visual Python seems to be exactly what I want. But it doesn't seem > very popular. Perhaps it means that there are not many people who will > be able to help if I have problems with it. Also judging by the amount > of ads at visualpython.org, it also do

Re: questions about multiprocessing

2011-03-06 Thread Vincent Ren
I've got some new problems and I tried to search on Google but got no useful information. I want to download some images with multiprocessing.pool In my class named Renren, I defined two methods: def getPotrait(self, url): # get the current potraits of a friend on Renren.com

Re: python data types in c++ code

2011-03-06 Thread Dan Stromberg
On Sun, Mar 6, 2011 at 10:07 AM, Arthur Mc Coy <1984docmc...@gmail.com>wrote: > You know, they are still using SVN, they are > very loosely coupled to the past. > Cython's very nice if you don't plan to do more than C/C++ with Python. SWIG might be better if you intend to do more VHLL's than Pyth

Re: having both dynamic and static variables

2011-03-06 Thread Steven D'Aprano
On Sun, 06 Mar 2011 12:59:55 -0800, Westley Martínez wrote: > I'm confused. Can someone tell me if we're talking about constant as in > 'fixed in memory' or as in 'you can't reassign' or both? Python already has fixed in memory constants. They are immutable objects like strings, ints, floats, et

Re: my computer is allergic to pickles

2011-03-06 Thread Bob Fnord
GSO wrote: > On 5 March 2011 02:14, MRAB wrote: > ... > >> Any comments, suggestions? > >> > > You obviously can't feed your computer pickles then. > > How about a tasty tidbit of XML? Served up in a main dish of DOM, or > serially if preferred? Well, right now it takes three lines to save t

PyWeek 12 (April 2011) is registration is open!

2011-03-06 Thread Richard Jones
The 12th Python Game Programming Challenge (PyWeek) is almost upon us. It'll run from the 3rd to the 10th of April. Registration for teams and individuals is now open on the website: http://pyweek.org/ The PyWeek challenge: - Invites entrants to write a game in one week from scratch either as

paypal payment cheap wholesale soccer jersey baseball jerseys basketball jerseys NFL NBA MLB NHL jersey

2011-03-06 Thread DG Shoes Paypal wholesaler
paypal payment cheap wholesale soccer jersey baseball jerseys basketball jerseys NFL NBA MLB NHL jersey free shipping AAA quality clothes cheap wholesale . NFL jersey wholesale NFL NBA MLB NHL soccer soccer jerseys nike brand,MLB jerseys china supplier MLB jerseys china wholesaler. wholesale MLB j

Re: python data types in c++ code

2011-03-06 Thread Miki Tebeka
>// howto get obj properties of different types > (map, list, string, int, bool) ? Python's C API is very well documented. You can use http://docs.python.org/c-api/object.html?highlight=pyobject#PyObject_GetAttr to get attributes or http://docs.python.org/c-api/object.html?hi

Re: my computer is allergic to pickles

2011-03-06 Thread Miki Tebeka
> Or, which situations does shelve suit better and which does > marshal suit better? shelve ease of use and the fact it uses the disk to store objects makes it a good choice if you have a lot of object, each with a unique string key (and a tuple of strings can be converted to and from a string).

Re: Cluto like library for Python

2011-03-06 Thread Miki Tebeka
You have several option for interfacing with C libraries: Cython, swig, boost-python, ctypes ... You can find several machine learning packages mentioned at http://web.media.mit.edu/~stefie10/technical/pythonml.html, I have no experience with any of them so I can't recommend any. HTH -- Miki T

Re: 下载 below Download, in python.org site menu

2011-03-06 Thread Martin v. Loewis
It's intentional. Notice that it goes to a different URL than the English download link. Which is a synonym for the English download link (/getit is /download at present) Perhaps a translated page is planned? No, translation is not the motivation at all. Chinese readers will know when to u

Re: Fun with 'str' and 'bytes'

2011-03-06 Thread Terry Reedy
On 3/6/2011 4:55 PM, Nicholas Devenish wrote: On 04/03/2011 16:40, nn wrote: As far as I know, that is pretty much it. Also see: http://bugs.python.org/issue3982 That is a depressing bug report, and really comes across as people who don't use networking commenting on the requirements of peopl

Re: 下载 below Download, in python.org site menu

2011-03-06 Thread Terry Reedy
On 3/6/2011 6:42 AM, Martin v. Loewis wrote: > Am 06.03.2011 12:18, schrieb Alex Willmer: >> On the English version of http://python.org I'm seeing 下载 as a menu >> item between Download and Community. AFAICT it's Simplified Chinese >> for 'download'. Is it's appearance intentional, or a leak throug

Re: having both dynamic and static variables

2011-03-06 Thread Gregory Ewing
John Nagle wrote: "let" allows the usual optimizations - constant folding, hoisting out of loops, compile time arithmetic, unboxing, etc. Only if the compiler knows the value of the constant, which it won't if it's defined in a different module. -- Greg -- http://mail.python.org/mailman/listi

Cluto like library for Python

2011-03-06 Thread Ravi
I like Cluto as a data clustering software a lot. But its library binding is available only in C. Is there any python library which is similar to Cluto? -- http://mail.python.org/mailman/listinfo/python-list

Re: ImSim: Image Similarity

2011-03-06 Thread John Bokma
n00m writes: > As for "proper" quoting: I read/post to this group via my web-browser. > And for me everything looks OK. I don't even quite understand what > exactly > do you mean by your remark. I'm not a facebookie/forumish/twitterish > thing. Exactly. It's Usenet, something I've been using for

Re: my computer is allergic to pickles

2011-03-06 Thread Bob Fnord
Miki Tebeka wrote: > > I'm using python to do some log file analysis and I need to store > > on disk a very large dict with tuples of strings as keys and > > lists of strings and numbers as values. > I recommend that you'll use the shelve module. It stores data on disk and is > more memory effic

Re: What is the best book to learn Python from Perl and C++ background

2011-03-06 Thread Nicholas Devenish
On 04/03/2011 17:49, Ignoramus20691 wrote: I bought a "Hello World!" book for my 9 year old son. The book teached "programming for kids" and it does it in Python. I do not know any Python, but I am very comfortable with C++ and perl. I wrote a little over 100k lines of perl. I want to learn Pyt

Re: Fun with 'str' and 'bytes'

2011-03-06 Thread Nicholas Devenish
On 04/03/2011 16:40, nn wrote: As far as I know, that is pretty much it. Also see: http://bugs.python.org/issue3982 That is a depressing bug report, and really comes across as people who don't use networking commenting on the requirements of people who write networking code. It's good to s

Re: ImSim: Image Similarity

2011-03-06 Thread n00m
As for "proper" quoting: I read/post to this group via my web-browser. And for me everything looks OK. I don't even quite understand what exactly do you mean by your remark. I'm not a facebookie/forumish/twitterish thing. Btw I don't know what is the twitter. I don't need it, neither to know nor t

Re: new to python, trying to choose a book.

2011-03-06 Thread Brandon LaRocque
I'd suggest Zed Shaw's amazing Learn Python The Hard Way [1] (which isn't as hard as it sounds) - and it's free over the web (but, I believe - you can buy a copy). I dislike Pilgrim's Dive Into Python, but that's just me (though I thoroughly recommend Dive Into HTML5 to anyone interested in HTML5)

Re: new to python, trying to choose a book.

2011-03-06 Thread Westley Martínez
On Sun, 2011-03-06 at 11:21 -0800, sogeking99 wrote: > hey. been looking into book for learning python(or what ever resource > really) two books are frequently recommended, learn python the hard > way and think python. i have also been recommended dive into python by > one person, who said it was f

Re: ImSim: Image Similarity

2011-03-06 Thread John Bokma
n00m writes: > On Mar 6, 10:17 pm, n00m wrote: >> On Mar 6, 8:55 pm, John Bokma wrote: >> >> >> >> > n00m writes: >> > >http://www.nga.gov/search/index.shtm >> > >http://deyoung.famsf.org/search-collections >> > > etc >> > > Seems they all offer search only by keywords and this kind. >> > > Wh

Re: having both dynamic and static variables

2011-03-06 Thread Westley Martínez
On Sun, 2011-03-06 at 07:58 +, Steven D'Aprano wrote: > On Sat, 05 Mar 2011 20:33:49 -0800, Westley Martínez wrote: > > > On Sat, 2011-03-05 at 18:37 -0800, John Nagle wrote: > >> It's worth having some syntax for constants. I'd suggest > >> using "let": > > +1 on syntax for constants. -

Re: I'm happy with Python 2.5

2011-03-06 Thread n00m
PS The winner (just a schoolboy) of IOI 2009 lives in my town, not very far from my house. I'm proud to have such a neibour. His account on spoj: http://www.spoj.pl/users/tourist/ Of course he's also registered on many other online judge systems, incl. www.topcoder.com -- http://mail.python.org/ma

Re: ImSim: Image Similarity

2011-03-06 Thread n00m
On Mar 6, 10:17 pm, n00m wrote: > On Mar 6, 8:55 pm, John Bokma wrote: > > > > > n00m writes: > > >http://www.nga.gov/search/index.shtm > > >http://deyoung.famsf.org/search-collections > > > etc > > > Seems they all offer search only by keywords and this kind. > > > What about to submit e.g. ros

Re: I'm happy with Python 2.5

2011-03-06 Thread n00m
On Mar 6, 7:25 pm, Michael Torrie wrote: > On 02/27/2011 06:57 AM, n00m wrote: > > > Steve, see a list of accepted langs there, in bottom dropdown: > >http://www.spoj.pl/submit/There *was* Python 2.6. > > Then admins shifted back to 2.5. People vote by their legs. > > rr, is that you? Are you ask

Re: ImSim: Image Similarity

2011-03-06 Thread n00m
On Mar 6, 8:55 pm, John Bokma wrote: > n00m writes: > >http://www.nga.gov/search/index.shtm > >http://deyoung.famsf.org/search-collections > > etc > > Seems they all offer search only by keywords and this kind. > > What about to submit e.g. roses2.jpg (copy) and to find its > > original? Assume w

Re: I'm happy with Python 2.5

2011-03-06 Thread geremy condra
On Sun, Feb 27, 2011 at 6:27 AM, Tom Zych wrote: > n00m wrote: >> Am I turmoiling your wishful thinking? >> You may nourish it till the end of time. > > Let us cease to nourish those fabled ones who dwell under bridges. +1 QOTW. Geremy Condra -- http://mail.python.org/mailman/listinfo/python-li

new to python, trying to choose a book.

2011-03-06 Thread sogeking99
hey. been looking into book for learning python(or what ever resource really) two books are frequently recommended, learn python the hard way and think python. i have also been recommended dive into python by one person, who said it was fantastic. but another person said it was dated and even when

Re: I'm happy with Python 2.5

2011-03-06 Thread Dan Stromberg
On Thu, Mar 3, 2011 at 10:43 AM, Ian Kelly wrote: > On Sun, Feb 27, 2011 at 7:15 AM, n00m wrote: > > http://www.spoj.pl/problems/TMUL/ > > > > Python's "print a * b" gets Time Limit Exceeded. > > If speed is the only thing you care about, then you can forget about > fretting over whether 2.5 or

Re: ImSim: Image Similarity

2011-03-06 Thread John Bokma
n00m writes: > http://www.nga.gov/search/index.shtm > http://deyoung.famsf.org/search-collections > etc > Seems they all offer search only by keywords and this kind. > What about to submit e.g. roses2.jpg (copy) and to find its > original? Assume we don't know its author neither its title Title:

Re: python data types in c++ code

2011-03-06 Thread Stefan Behnel
Arthur Mc Coy, 06.03.2011 19:07: Stephan, you are lead developer over there :))) It's marketing, Let's say, as a core developer of Cython, I'm well aware of it's virtues, and I can tell you that my suggestion is actually well backed by the user feedback we get. You will find some of it on the

Re: What do I need to know in order to write a web application in python?

2011-03-06 Thread Dan Stromberg
On Fri, Mar 4, 2011 at 6:07 PM, Paul Rubin wrote: > ErichCart ErichCart writes: > > By real-time, I mean that I want it to be similar to the way instant > > online chess works. Something like here: instantchess.com, but for > > RISK. > > If you want to do that in a web browser, the main techniqu

Re: python data types in c++ code

2011-03-06 Thread Arthur Mc Coy
In short, the answer is to use PyObject dictionary ? -- http://mail.python.org/mailman/listinfo/python-list

Re: python data types in c++ code

2011-03-06 Thread Arthur Mc Coy
Stephan, you are lead developer over there :))) It's marketing, however very nice solution.. I will propose my bosses to rediscover their world assumptions. You know, they are still using SVN, they are very loosely coupled to the past. I have to wash their brains... Meantime still battling with Py

Re: python data types in c++ code

2011-03-06 Thread Arthur Mc Coy
Stefan, great suggestion !! I will definitely bookmark this page and consider later. But my project dictate me use SWIG. I'm almost near the happy subend. Very curios on question I asked in previous message. Dear all, I love you too much :) Arthur -- http://mail.python.org/mailman/listinfo/pyth

Re: python data types in c++ code

2011-03-06 Thread Arthur Mc Coy
Ok people, I do: for (Py_ssize_t i = 0; i< PyList_Size(py_list); ++i) { PuObject* obj = PyList_GetItem(py_list, i); if (obj != NULL) { // howto get obj properties of different types (map, list, string, int, bool) ? } } Very clear code. The question i

Re: python data types in c++ code

2011-03-06 Thread Stefan Behnel
Arthur Mc Coy, 06.03.2011 17:40: Ok, I managed to work with c++ data types in python and can store serialize c++ objects to store in json. Now the task is backward. I wrote a c++ code to get the list of objects using again python interface. The list of objects is returned. PyList. But I can't s

Re: I'm happy with Python 2.5

2011-03-06 Thread Michael Torrie
On 02/27/2011 06:57 AM, n00m wrote: > Steve, see a list of accepted langs there, in bottom dropdown: > http://www.spoj.pl/submit/ There *was* Python 2.6. > Then admins shifted back to 2.5. People vote by their legs. rr, is that you? -- http://mail.python.org/mailman/listinfo/python-list

Re: ImSim: Image Similarity

2011-03-06 Thread n00m
Obviously if we'd use it in practice (in a web-museum ?) all pic's matrices should be precalculated only once and stored in a table with fourty fields v00 ... v93 like: --- pic_title v00v01v02... v93 -

python data types in c++ code

2011-03-06 Thread Arthur Mc Coy
Hi all, Ok, I managed to work with c++ data types in python and can store serialize c++ objects to store in json. Now the task is backward. I wrote a c++ code to get the list of objects using again python interface. The list of objects is returned. PyList. But I can't see how to convert PyObjec

Re: How Translate This PHP

2011-03-06 Thread Noah Hall
On Sun, Mar 6, 2011 at 3:11 PM, Victor Subervi wrote: > Ah. I thought I had to "return" something! Well, based on what you asked, you would've, but based on the code, all it was doing is printing "returnValue - value" Of course, a better way of doing it would be to use formatting - For example,

Re: How Translate This PHP

2011-03-06 Thread Littlefield, Tyler
>How do I translate this PHP code? >if($ok){ >echo "returnValue=1"; >}else{ >echo "returnValue=0"; >} print("return value = "+str(ok)); -- http://mail.python.org/mailman/listinfo/python-list

Re: How Translate This PHP

2011-03-06 Thread Victor Subervi
On Sun, Mar 6, 2011 at 10:53 AM, Noah Hall wrote: > On Sun, Mar 6, 2011 at 2:45 PM, Victor Subervi > wrote: > > Hi; > > How do I translate this PHP code? > > > > if($ok){ > > echo "returnValue=1"; > > }else{ > > echo "returnValue=0"; > > } > > From the code provided - > > if ok: >pri

Re: How Translate This PHP

2011-03-06 Thread Noah Hall
On Sun, Mar 6, 2011 at 2:45 PM, Victor Subervi wrote: > Hi; > How do I translate this PHP code? > > if($ok){ >     echo "returnValue=1"; > }else{ >     echo "returnValue=0"; > } >From the code provided - if ok: print 'returnValue=1' else: print 'returnValue=0' -- http://mail.python.org/

How Translate This PHP

2011-03-06 Thread Victor Subervi
Hi; How do I translate this PHP code? if($ok){ echo "returnValue=1"; }else{ echo "returnValue=0"; } In other words, when the email successfully sends, send back both the name of the variable and its value. TIA, Beno -- http://mail.python.org/mailman/listinfo/python-list

Re: What do I need to know in order to write a web application in python?

2011-03-06 Thread John Pinner
On Mar 5, 7:42 pm, geremy condra wrote: > On Sat, Mar 5, 2011 at 3:49 AM, ErichCart ErichCart > wrote: > > Visual Python seems to be exactly what I want. But it doesn't seem > > very popular. Perhaps it means that there are not many people who will > > be able to help if I have problems with it.

Re: Absolutely Insane Problem with Gmail

2011-03-06 Thread Victor Subervi
On Sat, Mar 5, 2011 at 11:11 PM, Littlefield, Tyler wrote: > >ourEmail = ' > myemaila...@gmail.com' > > >ourEmail = ' > q...@xxx.com' > > You redefine this twice. > Right. The second definition, of course, overwrites the first. That is deliberate. I simply comment out the second when I'm testin

Re: Extending dict (dict's) to allow for multidimensional dictionary

2011-03-06 Thread Ravi
That's a very nice suggestion. Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: I'm happy with Python 2.5

2011-03-06 Thread Tom Zych
Steven D'Aprano wrote: > On Thu, 03 Mar 2011 11:43:12 -0700, Ian Kelly wrote: >> If speed is the only thing you care about, then you can forget about >> fretting over whether 2.5 or 3.1 is faster. You're using the wrong >> language to begin with. > Surely that depends on whether you care about ex

Re: 下载 below Download, in python.org site menu

2011-03-06 Thread Martin v. Loewis
Am 06.03.2011 12:18, schrieb Alex Willmer: > On the English version of http://python.org I'm seeing 下载 as a menu > item between Download and Community. AFAICT it's Simplified Chinese > for 'download'. Is it's appearance intentional, or a leak through from > a translation of the entire page? It's i

下载 below Download, in python.org site menu

2011-03-06 Thread Alex Willmer
On the English version of http://python.org I'm seeing 下载 as a menu item between Download and Community. AFAICT it's Simplified Chinese for 'download'. Is it's appearance intentional, or a leak through from a translation of the entire page? Regards, Alex PS Tested with 10.0.648.114 (75702) and Fi

Re: c++ data types in python script

2011-03-06 Thread Arthur Mc Coy
Great! The solution is to use self.benchmarks = list(object.benchmarks). Now I'm battling with time_t type. C++ time_t converts to python int but it causes memore leaks due to destructor absence. I'm trying to figure it out. If anyone know, please share your thoughts. Be happy :) Arthur -- htt

Re: What do I need to know in order to write a web application in python?

2011-03-06 Thread ErichCart ErichCart
QT Designer looks very nice. I hope I can use it with PySide. I would rather use PySide than PyQT, because PyQT is not under LGPL license. -- http://mail.python.org/mailman/listinfo/python-list

c++ data types in python script

2011-03-06 Thread Arthur Mc Coy
Hi people, I've used SWIG module to embed python inside c++ app. I pass a list of objects (with lots of different properties of types string, float, custom types like URL, Software and finally of list of strings). Now I'm in python. URL and Software has str() method that converts their value to s

Re: I'm happy with Python 2.5

2011-03-06 Thread Steven D'Aprano
On Thu, 03 Mar 2011 11:43:12 -0700, Ian Kelly wrote: > On Sun, Feb 27, 2011 at 7:15 AM, n00m wrote: >> http://www.spoj.pl/problems/TMUL/ >> >> Python's "print a * b" gets Time Limit Exceeded. > > If speed is the only thing you care about, then you can forget about > fretting over whether 2.5 or

Re: having both dynamic and static variables

2011-03-06 Thread Steven D'Aprano
On Sat, 05 Mar 2011 20:33:49 -0800, Westley Martínez wrote: > On Sat, 2011-03-05 at 18:37 -0800, John Nagle wrote: >> It's worth having some syntax for constants. I'd suggest >> using "let": +1 on syntax for constants. -0 for "let". I'd prefer something more explicit, like "const". > I'm a

Re: Problem with python 3.2 and circular imports

2011-03-06 Thread Frank Millman
"Rafael Durán Castañeda" wrote... Thank you for your answer Frank, I think I've found the problem. I was calling modules from inside subpackages, and I need to use them from outside, so I have package in PYTHONPATH. is that correct? But now I have another question: Can I execute an script insi