Re: President Bush Meets Pope Before Heading to Paris

2014-11-01 Thread michel88
Out of the list of US presidents , George Bush remains my least favorite. Even though people are saying that Obama is losing popularity over the war on terrorism and his approach to it, I still support him. -- View this mess

Re: what can i do to improve my skill after finished python course on codecademy

2014-11-01 Thread Chris Angelico
On Sun, Nov 2, 2014 at 11:31 AM, Grant Edwards wrote: > On 2014-11-01, alister wrote: > > "The IETF motto is 'rouch consesus and running code'" > > -- Scott Bradner (Open Sources, 1999 O'Reilly and Associates) > > I don't get it, and googling didn't help. What is "rouch" consensus? Presumably

Re: what can i do to improve my skill after finished python course on codecademy

2014-11-01 Thread MRAB
On 2014-11-02 00:31, Grant Edwards wrote: On 2014-11-01, alister wrote: "The IETF motto is 'rouch consesus and running code'" -- Scott Bradner (Open Sources, 1999 O'Reilly and Associates) I don't get it, and googling didn't help. What is "rouch" consensus? I googled for: "Scott Bra

Re: what can i do to improve my skill after finished python course on codecademy

2014-11-01 Thread Grant Edwards
On 2014-11-01, alister wrote: "The IETF motto is 'rouch consesus and running code'" -- Scott Bradner (Open Sources, 1999 O'Reilly and Associates) I don't get it, and googling didn't help. What is "rouch" consensus? -- Grant -- https://mail.python.org/mailman/listinfo/python-list

Re: When using a decorator exceptions raised reference the decorator not the function

2014-11-01 Thread Néstor Boscán
So actually what I ended up doing was a function that will return the last tb_next and this will always give me the reference to the py and line number where the exception was raised. Regards, Néstor On Thu, Oct 30, 2014 at 4:42 PM, Néstor Boscán wrote: > Thanks Terry > > Yes both lines where

Re: Build Question: How to Add -Wl, --option Before Objects In Setup.py?

2014-11-01 Thread Ned Deily
In article , Cyd Haselton wrote: > On Sat, Nov 1, 2014 at 1:47 PM, Cyd Haselton wrote: [...] > > Sure enough, nm -D libm.so shows that sincos is NOT available in that > > library on my Android device. Now to figure out what to do about it. [...] > UPDATE: After doing a bit of research it looks

Re: what can i do to improve my skill after finished python course on codecademy

2014-11-01 Thread Chris Angelico
On Sun, Nov 2, 2014 at 9:01 AM, alister wrote: > find a task you need a solution too. > are there any regular admin task you perform that could be automated? > do you have any hobbies that could benefit from computerisation? > > genuine tasks are always better that those created purely to teach I

Re: what can i do to improve my skill after finished python course on codecademy

2014-11-01 Thread alister
On Sat, 01 Nov 2014 08:01:12 -0700, fanhuhuai wrote: > i will finish the python course on codecademy soon,i dont konw how to > improve my skill and what can i do to use it ,some projects ? should i > learn others course ? find a task you need a solution too. are there any regular admin task you p

Python Namibia 2015

2014-11-01 Thread D.M. Procida
Python Namibia 2015 will be Namibia's first-ever Python conference. http://python-namibia.org We're building an interesting programme of talks and other activities, and we're seeking more. You can find more information about the kind of thing we're looking for, with a link to the propos

Re: Installing Parsers/Tree Builders to, and accessing these packages from Python2.7

2014-11-01 Thread Terry Reedy
On 11/1/2014 10:17 AM, Simon Evans wrote: Hi Programmers, I have downloaded, installed, and can access the LXMLTreeBuilder/lxml, from Python2.7. however I have also downloaded HTMLTreeBuilder/html5lib but cannot get console to recognize the download, even using the code the download site suggests

Re: Build Question: How to Add -Wl, --option Before Objects In Setup.py?

2014-11-01 Thread Cyd Haselton
On Sat, Nov 1, 2014 at 1:47 PM, Cyd Haselton wrote: > On Sat, Nov 1, 2014 at 5:52 AM, Ned Deily wrote: >> In article >> , >> Cyd Haselton wrote: >>> So, after trying various ways to add that flag before lpython in >>> setup.py, I stripped all --allow-shlib-undefined >>> --no-allow-shlib-undefin

Re: __index__

2014-11-01 Thread Ethan Furman
On 11/01/2014 11:29 AM, Ethan Furman wrote: But I agree with Net ... Oops, should have ben 'Ned' -- apologies! -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: __index__

2014-11-01 Thread duncan smith
On 01/11/14 18:29, Ethan Furman wrote: > On 11/01/2014 10:11 AM, Ned Batchelder wrote: >> On 11/1/14 12:56 PM, duncan smith wrote: >>> >>>I have a Bloom filter class and want to (partially) serialize >>> instances using hex() or oct(). Instances are mutable, so I can't >>> inherit from long

Re: Build Question: How to Add -Wl, --option Before Objects In Setup.py?

2014-11-01 Thread Cyd Haselton
On Sat, Nov 1, 2014 at 5:52 AM, Ned Deily wrote: > In article > , > Cyd Haselton wrote: >> So, after trying various ways to add that flag before lpython in >> setup.py, I stripped all --allow-shlib-undefined >> --no-allow-shlib-undefined feom the Makefile, ran make clean, and >> make. >> >> I st

Re: __index__

2014-11-01 Thread Ethan Furman
On 11/01/2014 10:11 AM, Ned Batchelder wrote: On 11/1/14 12:56 PM, duncan smith wrote: I have a Bloom filter class and want to (partially) serialize instances using hex() or oct(). Instances are mutable, so I can't inherit from long. I thought I'd found the answer when I came across __in

Re: __index__

2014-11-01 Thread duncan smith
On 01/11/14 16:56, duncan smith wrote: [snip] Sorry, forgot to add that I'm using Python 2.7.6 on Ubuntu 14.04. Cheers. Duncan -- https://mail.python.org/mailman/listinfo/python-list

Re: __index__

2014-11-01 Thread Ned Batchelder
On 11/1/14 12:56 PM, duncan smith wrote: Hello, I have a Bloom filter class and want to (partially) serialize instances using hex() or oct(). Instances are mutable, so I can't inherit from long. I thought I'd found the answer when I came across __index__, https://docs.python.org/2/referenc

__index__

2014-11-01 Thread duncan smith
Hello, I have a Bloom filter class and want to (partially) serialize instances using hex() or oct(). Instances are mutable, so I can't inherit from long. I thought I'd found the answer when I came across __index__, https://docs.python.org/2/reference/datamodel.html#object.__index__. But it do

Re: Classes

2014-11-01 Thread Seymore4Head
On Sat, 01 Nov 2014 12:00:46 -0400, Dennis Lee Bieber wrote: >On Fri, 31 Oct 2014 19:32:13 -0400, Seymore4Head > declaimed the following: > >> >>class Rectangle(object): >>def __init__(self, length, width=None): >>self.length = length >>if width is None: >>self.wid

Re: set environmental variable from python

2014-11-01 Thread Alexander Blinne
Am 31.10.2014 um 02:22 schrieb Artur Bercik: > I have to set environmental variable in my windows PC as follows: > > variable name: GISBASE > > value: C:\GRASS-64 > > Is it possible to set it from python? > > import sys > > sys.path.append("C:\\GRASS-64") > > But how to give variable name? I

Re: pySerial works in miniterm but not in my app

2014-11-01 Thread Dario
Ehm sorry for the neverending spam, anyway I tried from my raspberry pi and it works there: root@pi:/home/pi# python3 ./test.py b's' b'w' b' ' b'o' b'0' b'1' b' ' b'+' b' ' b'C' b'o' b'm' b'm' b'a' b'n' b'd' b' ' b'O' b'K' b'\r' b'\n' Since I need it to work on the rpi and I was using Mint only

Re: pySerial works in miniterm but not in my app

2014-11-01 Thread Dario
Il giorno sabato 1 novembre 2014 16:04:06 UTC+1, Dario ha scritto: > BUT.. plot twist: in Windows XP, the very same python code and usb adapter > are working just right (python 2.7 and pySerial 2.7). Also with c#, no issues. I compared the behaviour of mono and python (2.7 and 3.3) on the same h

what can i do to improve my skill after finished python course on codecademy

2014-11-01 Thread fanhuhuai
i will finish the python course on codecademy soon,i dont konw how to improve my skill and what can i do to use it ,some projects ? should i learn others course ? -- https://mail.python.org/mailman/listinfo/python-list

Re: pySerial works in miniterm but not in my app

2014-11-01 Thread Dario
Il giorno venerdì 31 ottobre 2014 19:00:26 UTC+1, Dennis Lee Bieber ha scritto: > Didn't quite answer my question. If the comm line is using remote I understand your point, I didn't mention but I also tried sending one char at a time and listening at the same time, nothing changed. BUT.. plot

Installing Parsers/Tree Builders to, and accessing these packages from Python2.7

2014-11-01 Thread Simon Evans
Hi Programmers, I have downloaded, installed, and can access the LXMLTreeBuilder/lxml, from Python2.7. however I have also downloaded HTMLTreeBuilder/html5lib but cannot get console to recognize the download, even using the code the download site suggests. I did put it in the Python2.7 directo

PYQT4 referer in javascript still blank

2014-11-01 Thread Peter Irbizon
Hello, I am trying to set referrer for my script this way in PYQT4: class NetworkManager(QNetworkAccessManager): def createRequest(self, op, req, outgoing_data): req.setRawHeader('Referer', 'http://www.my-university.com/') req.setRawHeader('Accept-Language', 'en') retur

Re: Python Fabric on Windows :

2014-11-01 Thread Ganesh Pal
On Tue, Oct 28, 2014 at 5:00 PM, Robin Becker wrote: > > I found fabric on windows quite hard, but I have managed to use it. For > ssh I think I had to use the putty tools eg plink to do remote work. > > On the other hand I find plumbum much easier > > http://tomerfiliba.com/blog/Plumbum/ > > Than

Re: Python 3.4.2 + PyQt4 + PyCharm 3.4.1

2014-11-01 Thread Juan Christian
No one here uses PyCharm and Qt? =/ On Wed, Oct 29, 2014 at 8:45 PM, Juan Christian wrote: > It only occurs whule using PyCharm I tried it via pure terminal and > everything works... =/ > > On Tue, Oct 28, 2014 at 7:45 PM, Juan Christian > wrote: > >> Python 3.4.2 Windows x64 >> PyQt4 4.11.2 Py

Re: Build Question: How to Add -Wl, --option Before Objects In Setup.py?

2014-11-01 Thread Ned Deily
In article , Cyd Haselton wrote: > So, after trying various ways to add that flag before lpython in > setup.py, I stripped all --allow-shlib-undefined > --no-allow-shlib-undefined feom the Makefile, ran make clean, and > make. > > I still get the following error: > Modules/python.o \ >

Python tarfile module

2014-11-01 Thread eploughe
I am looking see if anyone knows if/how I can enable the selinux option in the tarfile module.  I have looked around and I don't specifically see how this is done.  Any insight would be extremely helpful as I have pretty much come up empty handed everywhere I look.ThanksEric -- https://mail.python

Re: Challenge: optimizing isqrt

2014-11-01 Thread Akira Li
Steven D'Aprano writes: > There is an algorithm for calculating the integer square root of any > positive integer using only integer operations: > > def isqrt(n): > if n < 0: raise ValueError > if n == 0: > return 0 > bits = n.bit_length() > a, b = divmod(bits, 2) > x

Re: Challenge: optimizing isqrt

2014-11-01 Thread Chris Angelico
On Sat, Nov 1, 2014 at 7:38 PM, Christian Gollwitzer wrote: > Am 01.11.14 09:33, schrieb Chris Angelico: >> >> On Sat, Nov 1, 2014 at 7:25 PM, Christian Gollwitzer >> wrote: Part of the point of that algorithm is that it never uses FP, and is therefore not limited by FP restriction

Re: Challenge: optimizing isqrt

2014-11-01 Thread Christian Gollwitzer
Am 01.11.14 09:33, schrieb Chris Angelico: On Sat, Nov 1, 2014 at 7:25 PM, Christian Gollwitzer wrote: Part of the point of that algorithm is that it never uses FP, and is therefore not limited by FP restrictions. which are??? Most notably, the inability to represent every integer beyond 2

Re: Challenge: optimizing isqrt

2014-11-01 Thread Chris Angelico
On Sat, Nov 1, 2014 at 7:25 PM, Christian Gollwitzer wrote: >> Part of the point of that algorithm is that it never uses FP, and is >> therefore not limited by FP restrictions. > > > which are??? Most notably, the inability to represent every integer beyond 2**53, and the inability to represent a

Re: Challenge: optimizing isqrt

2014-11-01 Thread Christian Gollwitzer
Am 01.11.14 09:13, schrieb Chris Angelico: On Sat, Nov 1, 2014 at 7:02 PM, Christian Gollwitzer wrote: Your above algorithm is obviously doing Heron- or Newton-Raphson iterations, so the same as with floating point math. The first line before the while loop computes some approximation to sqrt(n

Re: Challenge: optimizing isqrt

2014-11-01 Thread Chris Angelico
On Sat, Nov 1, 2014 at 7:02 PM, Christian Gollwitzer wrote: > Your above algorithm is obviously doing Heron- or Newton-Raphson iterations, > so the same as with floating point math. The first line before the while > loop computes some approximation to sqrt(n). Instead of doing bit shuffling, > you

Re: Challenge: optimizing isqrt

2014-11-01 Thread Christian Gollwitzer
Addendum: If my method below works, you can also use it to speed up computations for n>2*1022, by splitting off an even power of two from the integer and computing the FP sqrt of the mantissa for the seed, i.e. doing the FP manually. Am 01.11.14 09:02, schrieb Christian Gollwitzer: Hi Steven,

Re: Challenge: optimizing isqrt

2014-11-01 Thread Christian Gollwitzer
Hi Steven, let me start by answering from reverse: > Q3: What is the largest value of n beyond which you can never use the float > optimization? > A3: There is no such value, besides the upper limit of floats (DBL_MAX~ 10^308) P3: If you feed a perfect square into the floating point square