No pip3.5 bin after install python3.5.1 from source code

2017-07-12 Thread Dahui Jiang
Hi all: I installed python3.5.1 from source code, but found strange events. on RHEL6, before "make install", if I run "yum -y install openssl openssl-devel" even though the two lib is installed, then the pip bin would installed, else not installed; on SLES11 SP3, even though I run "rpm -i lib

pythonpath in ipython console

2017-07-12 Thread christoph
hello, I am a bit confused, i use spyder, when i execute in ipython console program start fails with message 'Attribute error' when I start same program via python console everything works fine, even start from terminal workes fine. It seems that i python does not load Pythonpath, although wdir

Re: Better Regex and exception handling for this small code

2017-07-12 Thread MRAB
On 2017-07-12 23:49, Nick Mellor wrote: On Wednesday, 12 July 2017 02:32:29 UTC+10, Ganesh Pal wrote: Dear Python friends I am trying to open a file and check if there is a pattern has changed after the task got completed? file data:

Re: Better Regex and exception handling for this small code

2017-07-12 Thread Nick Mellor
On Wednesday, 12 July 2017 02:32:29 UTC+10, Ganesh Pal wrote: > Dear Python friends > > I am trying to open a file and check if there is a pattern has changed > after the task got completed? > > file data: > > > #tail -f /file.txt > ...

Re: Test 0 and false since false is 0

2017-07-12 Thread Terry Reedy
On 7/12/2017 7:35 AM, Rhodri James wrote: On 12/07/17 03:29, Stefan Ram wrote: Grant Edwards writes: False is required to be a singleton. »singleton« usually means »the sole object of its class«. »Ensure a class only has one instance, and provide a global point of access to

Re: python 3.5 raiaing an error when import the class Manager in this module sayning name Manager is not define

2017-07-12 Thread WoFy The 95s
On Wednesday, 12 July 2017 18:01:35 UTC+5:30, WoFy The 95s wrote: > class Person: > def __init__(self, name, job=None, pay=0): > self.name = name > self.job = job > self.pay = pay > def lastName(self): > return self.name.split()[-1] > def giveRaise(self,

Re: python 3.5 raiaing an error when import the class Manager in this module sayning name Manager is not define

2017-07-12 Thread Peter Otten
WoFy The 95s wrote: > On Wednesday, 12 July 2017 18:57:11 UTC+5:30, Peter Otten wrote: >> WoFy The 95s wrote: >> >> > i tried from idle interpreter >> > >> > from person import Manager >> > >> > >> > >> from person import Manager >> > Traceback (most recent call last): >> > File "", lin

Re: python 3.5 raiaing an error when import the class Manager in this module sayning name Manager is not define

2017-07-12 Thread WoFy The 95s
On Wednesday, 12 July 2017 18:57:11 UTC+5:30, Peter Otten wrote: > WoFy The 95s wrote: > > > i tried from idle interpreter > > > > from person import Manager > > > > > > > from person import Manager > > Traceback (most recent call last): > > File "", line 1, in > > from person import Ma

Re: python 3.5 raiaing an error when import the class Manager in this module sayning name Manager is not define

2017-07-12 Thread Peter Otten
WoFy The 95s wrote: > i tried from idle interpreter > > from person import Manager > > > from person import Manager > Traceback (most recent call last): > File "", line 1, in > from person import Manager > ImportError: cannot import name 'Manager' Enter import person person.__file__

botlib - framework to program bots

2017-07-12 Thread Bart Thate
BOTLIB - Framework to program bots is released in the Public Domain - https://lnkd.in/ginB49K #publicdomain #python3 #xmpp #irc #bot Framework to program bots. -- https://mail.python.org/mailman/listinfo/python-list

Re: python 3.5 raiaing an error when import the class Manager in this module sayning name Manager is not define

2017-07-12 Thread WoFy The 95s
On Wednesday, 12 July 2017 18:20:32 UTC+5:30, Steve D'Aprano wrote: > Please COPY AND PASTE the FULL error, starting with the line "Traceback". > > The code you show below looks fine, and you don't need an import, so I don't > know what error you are getting. > > > On Wed, 12 Jul 2017 10:31 pm,

Re: python 3.5 raiaing an error when import the class Manager in this module sayning name Manager is not define

2017-07-12 Thread WoFy The 95s
On Wednesday, 12 July 2017 18:20:32 UTC+5:30, Steve D'Aprano wrote: > Please COPY AND PASTE the FULL error, starting with the line "Traceback". > > The code you show below looks fine, and you don't need an import, so I don't > know what error you are getting. > > > On Wed, 12 Jul 2017 10:31 pm,

Re: python 3.5 raiaing an error when import the class Manager in this module sayning name Manager is not define

2017-07-12 Thread Steve D'Aprano
Please COPY AND PASTE the FULL error, starting with the line "Traceback". The code you show below looks fine, and you don't need an import, so I don't know what error you are getting. On Wed, 12 Jul 2017 10:31 pm, lunkamba...@gmail.com wrote: > class Person: > def __init__(self, name, job=N

python 3.5 raiaing an error when import the class Manager in this module sayning name Manager is not define

2017-07-12 Thread lunkambamuk
class Person: def __init__(self, name, job=None, pay=0): self.name = name self.job = job self.pay = pay def lastName(self): return self.name.split()[-1] def giveRaise(self, percent): self.pay = int(self.pay * (1 + percent)) def __repr__(self):

Re: Test 0 and false since false is 0

2017-07-12 Thread Rhodri James
On 12/07/17 03:29, Stefan Ram wrote: Grant Edwards writes: False is required to be a singleton. »singleton« usually means »the sole object of its class«. »Ensure a class only has one instance, and provide a global point of access to it.« - Gamma et al. We are using the ter

Re: Write this accumuator in a functional style

2017-07-12 Thread Chris Angelico
On Wed, Jul 12, 2017 at 7:52 PM, Paul Rubin wrote: > Not so easily in Python since the built-in list and dict types are > designed for mutation update. In Haskell, the list type is a linked > list and the dictionary type is a balanced tree. So, you can make a new > list consisting of a new item

Re: Write this accumuator in a functional style

2017-07-12 Thread Paul Rubin
Steven D'Aprano writes: > for parrot in parrots: > accumulator[parrot.colour].append(parrot) > > That's pretty compact and understandable, but it require mutating a bunch > of pre-allocated lists inside an accumulator. Can we re-write this in a > functional style? Not so easily in Python si

Re: Write this accumuator in a functional style

2017-07-12 Thread Steven D'Aprano
On Wed, 12 Jul 2017 17:47:50 +1200, Gregory Ewing wrote: > Steve D'Aprano wrote: >> - Greg's dict comprehension version requires N+1 passes through the >> data, >> one to convert to a list, and 1 per each possible key. > > Just to be clear, my solution was a response to the requirement that it

Re: Write this accumuator in a functional style

2017-07-12 Thread Rustom Mody
On Tuesday, July 11, 2017 at 4:11:50 PM UTC+5:30, Alain Ketterlin wrote: > Steven D'Aprano writes: > > > I have a colleague who is allergic to mutating data structures. Yeah, I > > know, he needs to just HTFU but I thought I'd humour him. > > > > Suppose I have an iterator that yields named tuple