Re: Python 3 on Mac OS X 10.8.4

2014-06-25 Thread Une Bévue
Le 19/06/2014 12:43, Andrew Jaffe a écrit : The python.org packages are explicitly created in order to have no conflict with the system installed python. There is no problem with using them. OK, fine thanks. -- https://mail.python.org/mailman/listinfo/python-list

Re: python 3.44 float addition bug?

2014-06-25 Thread Stefan Behnel
Steven D'Aprano, 26.06.2014 04:56: > On Wed, 25 Jun 2014 14:12:31 -0700, Maciej Dziardziel wrote: > >> Floating points values use finite amount of memory, and cannot >> accurately represent infinite amount of numbers, they are only >> approximations. This is limitation of float type and applies t

Re: python 3.44 float addition bug?

2014-06-25 Thread Chris Angelico
On Thu, Jun 26, 2014 at 2:17 PM, Steven D'Aprano wrote: > I'm not sure if you're agreeing with me or disagreeing with me. > > "Repeats" is a property of a number *in a specific base*, not of the > number itself. So 1/3 does not repeat in base 3, where it would be > written as the terminating trina

Re: python 3.44 float addition bug?

2014-06-25 Thread Steven D'Aprano
On Thu, 26 Jun 2014 13:13:45 +1000, Chris Angelico wrote: > On Thu, Jun 26, 2014 at 12:56 PM, Steven D'Aprano > wrote: >> That's a myth. decimal.Decimal *is* a floating point value, and is >> subject to *exactly* the same surprises as binary floats, except for >> one: which Decimal, you can guara

State of speeding up Python for full applications

2014-06-25 Thread CM
I occasionally hear about performance improvements for Python by various projects like psyco (now old), ShedSkin, Cython, PyPy, Nuitka, Numba, and probably many others. The benchmarks are out there, and they do make a difference, and sometimes a difference on par with C, from what I've heard.

Re: python 3.44 float addition bug?

2014-06-25 Thread Ben Finney
Steven D'Aprano writes: > On Wed, 25 Jun 2014 14:12:31 -0700, Maciej Dziardziel wrote: > > > Floating points values use finite amount of memory, and cannot > > accurately represent infinite amount of numbers, they are only > > approximations. This is limitation of float type and applies to any >

Re: python 3.44 float addition bug?

2014-06-25 Thread Chris Angelico
On Thu, Jun 26, 2014 at 12:56 PM, Steven D'Aprano wrote: > That's a myth. decimal.Decimal *is* a floating point value, and is > subject to *exactly* the same surprises as binary floats, except for one: > which Decimal, you can guarantee that any decimal string you enter will > appear exactly the s

Re: python 3.44 float addition bug?

2014-06-25 Thread Steven D'Aprano
On Wed, 25 Jun 2014 14:12:31 -0700, Maciej Dziardziel wrote: > Floating points values use finite amount of memory, and cannot > accurately represent infinite amount of numbers, they are only > approximations. This is limitation of float type and applies to any > languages that uses types supporte

Re: py2app dependency determination?

2014-06-25 Thread john
Steven D'Aprano wrote: > On Sat, 21 Jun 2014 16:50:22 -0800, john wrote: > >> Hi, trying to get py2app to work. It keeps saying that we need >> Pillow-PIL, which is wrong. And, anyways, Pillow-PIL fails to install. >> >> The program works fine as a normal python script, and it doesn't use >> Pil

Re: subprocess can not kill when app exit()

2014-06-25 Thread Michael Torrie
On 06/25/2014 06:07 PM, Jason Friedman wrote: >> code in below, when close the app window. the two ping process can not >> kill auto and keep in the windows 7 task list. >> >> During running, ping process under Python.exe as two thread. When app exit, >> this two process move the system proces

Re: subprocess can not kill when app exit()

2014-06-25 Thread Jason Friedman
> code in below, when close the app window. the two ping process can not kill > auto and keep in the windows 7 task list. > > During running, ping process under Python.exe as two thread. When app exit, > this two process move the system process and keep running there. > > could someone help to

Re: How to get Timezone from latitude/longitude ?

2014-06-25 Thread Gregory Ewing
Ethan Furman wrote: On 06/25/2014 07:24 AM, Grant Edwards wrote: On 2014-06-25, Marko Rauhamaa wrote: Some years back my employer switched ISPs in Southern California. The following morning Google displayed everything in Hebrew. It took a week or two to be corrected. Learning Hebrew in a we

Re: protect psycopg script from sql injection?

2014-06-25 Thread MRAB
On 2014-06-25 22:58, celati Laurent wrote: Hello, I coded this following python script via psycopg; web_service_test.py 1/ When i execute it, the result is 'bad resquest'. Could you tell me why? 2/ Could you tell me how to prot

protect psycopg script from sql injection?

2014-06-25 Thread dandrigo
Hello, I coded this following python script via psycopg; web_service_test.py 1/ When i execute it, the result is 'bad resquest'. Could you tell me why? 2/ Could you tell me how to protect this script from SQL injections please

protect psycopg script from sql injection?

2014-06-25 Thread celati Laurent
Hello, I coded this following python script via psycopg; web_service_test.py 1/ When i execute it, the result is 'bad resquest'. Could you tell me why? 2/ Could you tell me how to protect this script from SQL injections please?

Re: Single underscore in interactive mode

2014-06-25 Thread Dave Angel
Terry Reedy Wrote in message: > On 6/25/2014 11:20 AM, candide wrote: >> According to the official documentation (The Python Language Reference, >> Release 3.2): >> >> >> --- >> The special identifier _ is used in the interactive interpreter to >> store the result

Re: python 3.44 float addition bug?

2014-06-25 Thread Maciej Dziardziel
On Saturday, June 21, 2014 1:57:19 AM UTC+1, FraserL wrote: > I'm not hugely accustomed to Python, but this seems crazy to me. Floating points values use finite amount of memory, and cannot accurately represent infinite amount of numbers, they are only approximations. This is limitation of floa

Re: Passing a frame to pdb.Pdb.set_trace

2014-06-25 Thread Rotwang
On 24/06/2014 20:10, Rotwang wrote: Hi all, I've found something weird with pdb and I don't understand it. I want to define a function mydebugger() which starts the debugger in the caller's frame. The following is copied from IDLE with Python 2.7.3 (I've since tried it with 3.3.0 and the same thi

Re: Python 3.4.1 installer on Mac links Python to old Tcl/Tk

2014-06-25 Thread Christian Gollwitzer
Am 25.06.14 21:26, schrieb Peter Tomcsanyi: "Christian Gollwitzer" wrote in message news:lodruv$k45$1...@dont-email.me... may I ask which features of 8.6 you need in particular? I need two of them: - Angled text - PNG image support with alpha channel (even if it seems a bit limited, particula

Re: How to get Timezone from latitude/longitude ?

2014-06-25 Thread Akira Li
Larry Martell writes: > On Wed, Jun 25, 2014 at 8:53 AM, wrote: >> Hi, >> >> I'm looking for a python-library which can help me to get Timezone >> and Timezone-offset(UTC) from latitude/longitude. >> >> I'm not able to find an easy way to do it. >> >> Thanks in advance. > > It took me 30 second

Re: asyncio: wrapping a subprocess in a server

2014-06-25 Thread Akira Li
David Farler writes: > Hi all, > > I'm trying to vend some kind of server that spawns a client-unique > subprocess when a client connects. The server acts as a middleman, > receiving structure messages from the client, sending input to the > subprocess, and packaging up subprocess data before sen

Re: Single underscore in interactive mode

2014-06-25 Thread candide
> > Please say either in a tracker issue or here where you found this > > statement. https://docs.python.org/3.4/reference/lexical_analysis.html#reserved-classes-of-identifiers -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3.4.1 installer on Mac links Python to old Tcl/Tk

2014-06-25 Thread Peter Tomcsanyi
"Christian Gollwitzer" wrote in message news:lodruv$k45$1...@dont-email.me... Hi Peter, may I ask which features of 8.6 you need in particular? Hi Christian, I need two of them: - Angled text - PNG image support with alpha channel (even if it seems a bit limited, particularly I still did not

Re: Single underscore in interactive mode

2014-06-25 Thread Lie Ryan
On 25/06/14 16:20, candide wrote: As explained by the docs, an assignment statement_evaluates_ the expression on the right hand side. So we can deduce that at the very beginning of the 2nd prompt, "the result of the last evaluation" is 43. Nevertheless, calling _ raises a NameError exception

asyncio: wrapping a subprocess in a server

2014-06-25 Thread David Farler
Hi all, I'm trying to vend some kind of server that spawns a client-unique subprocess when a client connects. The server acts as a middleman, receiving structure messages from the client, sending input to the subprocess, and packaging up subprocess data before sending back to the client. The co

Re: Single underscore in interactive mode

2014-06-25 Thread Terry Reedy
On 6/25/2014 11:20 AM, candide wrote: According to the official documentation (The Python Language Reference, Release 3.2): --- The special identifier _ is used in the interactive interpreter to store the result of the last evaluation; --

[RELEASE] fastcache

2014-06-25 Thread ptb
Hello all, I am pleased to announce the release of fastcache v0.1. It is intended to be a drop in replacement for functools.lru_cache but it's written in C so it's 5-10x faster. Currently Python >= 3.3 is supported. It is available on pip via: pip install fastcache Or on github: https://gi

Re: Single underscore in interactive mode

2014-06-25 Thread Robert Kern
On 2014-06-25 16:20, candide wrote: According to the official documentation (The Python Language Reference, Release 3.2): --- The special identifier _ is used in the interactive interpreter to store the result of the last evaluation;

Single underscore in interactive mode

2014-06-25 Thread candide
According to the official documentation (The Python Language Reference, Release 3.2): --- The special identifier _ is used in the interactive interpreter to store the result of the last evaluation; --- This description is not very

Re: How to get Timezone from latitude/longitude ?

2014-06-25 Thread Ethan Furman
On 06/25/2014 07:24 AM, Grant Edwards wrote: On 2014-06-25, Marko Rauhamaa wrote: Some years back my employer switched ISPs in Southern California. The following morning Google displayed everything in Hebrew. It took a week or two to be corrected. Learning Hebrew in a week or two is a pretty

Re: Python 3.4.1 installer on Mac links Python to old Tcl/Tk

2014-06-25 Thread Kevin Walzer
On 6/25/14, 1:49 AM, wxjmfa...@gmail.com wrote: I can also add, tcl or tk or tkinter (8.6) is on Windows quite buggy. In fact, simply*unusable*. How so? Please report bugs at http://core.tcl.tk/tcl/reportlist or http://core.tcl.tk/tk/reportlist, as needed. --Kevin -- Kevin Walzer Code by K

Re: How to get Timezone from latitude/longitude ?

2014-06-25 Thread Grant Edwards
On 2014-06-25, Marko Rauhamaa wrote: > Chris Angelico : > >> Are you trying to use a user's IP geolocation data to pick a timezone? >> Because that's doomed to failure. > > Some years back my employer switched ISPs in Southern California. The > following morning Google displayed everything in Hebr

Re: How to get Timezone from latitude/longitude ?

2014-06-25 Thread Marko Rauhamaa
Chris Angelico : > Are you trying to use a user's IP geolocation data to pick a timezone? > Because that's doomed to failure. Some years back my employer switched ISPs in Southern California. The following morning Google displayed everything in Hebrew. It took a week or two to be corrected. Mar

Re: How to get Timezone from latitude/longitude ?

2014-06-25 Thread Chris Angelico
On Wed, Jun 25, 2014 at 10:53 PM, wrote: > I'm looking for a python-library which can help me to get Timezone and > Timezone-offset(UTC) from latitude/longitude. > > I'm not able to find an easy way to do it. There isn't an easy way to do it. At best, you would have to do a two-step lookup: fi

Re: How to get Timezone from latitude/longitude ?

2014-06-25 Thread Bernd Nawothnig
On 2014-06-25, codetars...@gmail.com wrote: > I'm looking for a python-library which can help me to get Timezone and > Timezone-offset(UTC) from latitude/longitude. > > I'm not able to find an easy way to do it. You can find the data as a zipped shapefile here: http://efele.net/maps/tz/world/ D

Re: How to get Timezone from latitude/longitude ?

2014-06-25 Thread Larry Martell
On Wed, Jun 25, 2014 at 8:53 AM, wrote: > Hi, > > I'm looking for a python-library which can help me to get Timezone and > Timezone-offset(UTC) from latitude/longitude. > > I'm not able to find an easy way to do it. > > Thanks in advance. It took me 30 seconds on google to find this: https://g

How to get Timezone from latitude/longitude ?

2014-06-25 Thread codetarsier
Hi, I'm looking for a python-library which can help me to get Timezone and Timezone-offset(UTC) from latitude/longitude. I'm not able to find an easy way to do it. Thanks in advance. -- https://mail.python.org/mailman/listinfo/python-list

Re: Qt and progressBar - how to update

2014-06-25 Thread 不坏阿峰
在 2010年5月17日星期一UTC+7上午2时38分04秒,OMS写道: > On 16 Maj, 20:52, Robert Kern wrote: > > On 2010-05-16 13:28 , OMS wrote: > > > > > > > > > I am quite new to Python and Qt and need very urgently advice on how > > > to update Qt progressBar while executing a process. I have went thrugh > > > number of 'goo

subprocess can not kill when app exit()

2014-06-25 Thread 不坏阿峰
Dear all code in below, when close the app window. the two ping process can not kill auto and keep in the windows 7 task list. During running, ping process under Python.exe as two thread. When app exit, this two process move the system process and keep running there. could someone help to c

Re: DHCP query script not work.

2014-06-25 Thread 不坏阿峰
anyone can help ? 在 2014年6月19日星期四UTC+7下午8时56分06秒,不坏阿峰写道: > On Thursday, June 19, 2014 8:49:21 PM UTC+7, Anssi Saari wrote: > > > 不坏阿峰 writes: > > > > > > > > > > > > > Dear all > > > > > > > > > > > > > > i got code recipes from here. and i want to run it on win 7. > > > > > > >

How to connect Python3.4.1 to Mysql 5.1 ?

2014-06-25 Thread Raja Sekhar
Can any body tell how to access data from mysql using python. I am using python version 3.4.1 and Mysql version 5.1 -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3.4.1 installer on Mac links Python to old Tcl/Tk

2014-06-25 Thread Ned Deily
In article , "Peter Tomcsanyi" wrote: > Many thanks for the quick reply. > I will try the MacPorts version, but I am quite Windows-based (I do the Mac > installation for somebody else), so I am not sure how to install all the > other packages that we use (NumPy, MatPlotLib, Pillow and maybe som

Re: Off-Topic: The Machine

2014-06-25 Thread Chris Angelico
On Wed, Jun 25, 2014 at 5:31 PM, Gregory Ewing wrote: > That's nice, but the question that comes to my mind is: > What happens when a zillion cores are all competing for > high-speed access to that memory? And what happens if some of those cores are corrupt? Can you initiate a core transfer? Will

Re: Off-Topic: The Machine

2014-06-25 Thread Gregory Ewing
Steven D'Aprano wrote: Heh, yes, it's a puff-piece, based on HP's publicity, not an in-depth review. Considering that The Machine isn't publicly available yet, that's hardly surprising. There's a talk here that goes into a bit more detail, although still not much: https://www.youtube.com/wat

Re: Python 3.4.1 installer on Mac links Python to old Tcl/Tk

2014-06-25 Thread Christian Gollwitzer
Hi Peter, Am 24.06.14 20:11, schrieb Peter Tomcsanyi: I use the Python 3.4.1 installer from https://www.python.org/downloads/release/python-341/ The Windows installation comes with Tcl/Tk version 8.6 which has some new features (compared to 8.5) that are very important to me. may I ask which