Re: Same function but different names with different set of default arguments

2016-01-20 Thread Yann Kaiser
partial treats keyword arguments as default values, though they become keyword-only as a result : f1 = functools.partial(g, p="p1") On Thu, Jan 21, 2016, 08:35 Paulo da Silva wrote: > Hi all. > > What is the fastest implementation of the following code? > > def g(p): > ... > ret

Same function but different names with different set of default arguments

2016-01-20 Thread Paulo da Silva
Hi all. What is the fastest implementation of the following code? def g(p): ... return something def f1(p="p1"): return g(p) def f2(p="p2"): return g(p) Thanks Paulo -- https://mail.python.org/mailman/listinfo/python-list

Re: Installing on linux - missing devel packages

2016-01-20 Thread Chris Angelico
On Thu, Jan 21, 2016 at 6:18 PM, Frank Millman wrote: > Fedora 22 comes standard with Python 3.4.2. I want to install 3.5.1. > > It is easy enough to download the source and run ./configure;make;make > altinstall. But then I find that I cannot import gzip because zlib-devel is > missing. I fix tha

Installing on linux - missing devel packages

2016-01-20 Thread Frank Millman
Hi all Fedora 22 comes standard with Python 3.4.2. I want to install 3.5.1. It is easy enough to download the source and run ./configure;make;make altinstall. But then I find that I cannot import gzip because zlib-devel is missing. I fix that, then I find that sqlite-devel is missing. Is the

Re: How to use the docstring in this property example

2016-01-20 Thread Steven D'Aprano
On Thursday 21 January 2016 15:00, Robert wrote: > Hi, > > I read below code snippet on link: > https://docs.python.org/2/library/functions.html#property Property docstrings are hard to get to. But with the class C you gave, this works in the interactive interpreter: help(C.__dict__['x']) dis

Re: How to fix my imports/file structure

2016-01-20 Thread Terry Reedy
On 1/20/2016 8:26 PM, Travis Griggs wrote: I wrote a simple set of python3 files for emulating a small set of mongodb features on a 32 bit platform. I fired up PyCharm and put together a directory that looked like: minu/ client.py database.py collection.py test_client.py

How to use the docstring in this property example

2016-01-20 Thread Robert
Hi, I read below code snippet on link: https://docs.python.org/2/library/functions.html#property -- class C(object): def __init__(self): self._x = None def getx(self): return self._x def setx(self, value): self._x = value def delx(self):

Re: How to fix my imports/file structure

2016-01-20 Thread Steven D'Aprano
On Thursday 21 January 2016 12:26, Travis Griggs wrote: > I wrote a simple set of python3 files for emulating a small set of mongodb > features on a 32 bit platform. I fired up PyCharm and put together a > directory that looked like: > > minu/ > client.py > database.py > collection.py

How to fix my imports/file structure

2016-01-20 Thread Travis Griggs
I wrote a simple set of python3 files for emulating a small set of mongodb features on a 32 bit platform. I fired up PyCharm and put together a directory that looked like: minu/ client.py database.py collection.py test_client.py test_database.py test_client.py My imports

Re: installing

2016-01-20 Thread Terry Reedy
On 1/20/2016 3:41 PM, navneet bhatele wrote: Whenever i try to install python-3.5.1-amd64 a problem occur , picture of which has attached. This is a text only, no attachments allowed mailing list. So picture was discarded. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/

Re: Recurring Prompt

2016-01-20 Thread Mark Lawrence
On 20/01/2016 19:30, Mansi wrote: Hello, I just installed Python 3.5.1 but anytime I use Pycharm, a prompt of whether I want to modify, repair or uninstall Python keeps on coming up. Even while I'm in the midst of typing a program. Please advise. Sincerely, Mansi This has been asked and an

Re: installing

2016-01-20 Thread Mark Lawrence
On 20/01/2016 20:41, navneet bhatele wrote: Whenever i try to install python-3.5.1-amd64 a problem occur , picture of which has attached. Sometimes "0*80070002 file error" also occur. WHAT SHOULD I DO This has been asked and answered repeatedly over the last few months so search the arch

Re: libre office

2016-01-20 Thread Karim
On 20/01/2016 00:01, jim-pc wrote: How do I get data from libre office using python? Hello, The function below search and get text between 2 delimiters inside a libre office swriter document. It is given as an example. You still have to open a document object in Swriter server.(In the Lib

installing

2016-01-20 Thread navneet bhatele
Whenever i try to install python-3.5.1-amd64 a problem occur , picture of which has attached. Sometimes "0*80070002 file error" also occur. WHAT SHOULD I DO -- https://mail.python.org/mailman/listinfo/python-list

New user group: Rochester, MN, USA

2016-01-20 Thread Jonathan Hartley
http://www.meetup.com/PyRochesterMN First meeting planned for Thu 28th January 2016 -- Jonathan Hartley tart...@tartley.com +1 507-513-1101 -- https://mail.python.org/mailman/listinfo/python-list

Recurring Prompt

2016-01-20 Thread Mansi
Hello, I just installed Python 3.5.1 but anytime I use Pycharm, a prompt of whether I want to modify, repair or uninstall Python keeps on coming up. Even while I'm in the midst of typing a program. Please advise. Sincerely, Mansi -- https://mail.python.org/mailman/listinfo/python-list

paramiko transport and invoke_shell

2016-01-20 Thread greg . szewski
Hi, I've found below code which almost suits my needs but I need to interact via shell so can do stuff like sudo su - user then when sudo asks for password I need to send password and working as user run next commands . I'm pretty sure invoke_shell method is the solution but my programing skills

Re:

2016-01-20 Thread Joel Goldstick
On Wed, Jan 20, 2016 at 11:29 AM, John 111 wrote: > > > Sent from Windows Mail > I can’t use python. I just download it on my windows but > when I open it they show me three options only change,repair & uninstall. I > am looking forward for the solution from you. > > H

Re:

2016-01-20 Thread Igor Korot
Hi, John, On Wed, Jan 20, 2016 at 11:29 AM, John 111 wrote: > > > Sent from Windows Mail > I can’t use python. I just download it on my windows but when I > open it they show me three options only change,repair & uninstall. I am > looking forward for the solution from you. Did yo

[no subject]

2016-01-20 Thread John 111
Sent from Windows Mail I can’t use python. I just download it on my windows but when I open it they show me three options only change,repair & uninstall. I am looking forward for the solution from you. Hope to hear from you soon!!! -- https://mail.python.org/mai

RE: libre office

2016-01-20 Thread Albert-Jan Roskam
> From: ji...@frontier.com > To: python-list@python.org > Subject: libre office > Date: Tue, 19 Jan 2016 17:01:40 -0600 > > How do I get data from libre office using python? Does this help?http://www.openoffice.org/udk/python/python-bridge.html -- https://m

Re: Single format descriptor for list

2016-01-20 Thread Grobu
On 20/01/16 10:35, Paul Appleby wrote: In BASH, I can have a single format descriptor for a list: $ a='4 5 6 7' $ printf "%sth\n" $a 4th 5th 6th 7th Is this not possible in Python? Using "join" rather than "format" still doesn't quite do the job: a = range(4, 8) print ('th\n'.join(map(str,a))

Re: libre office

2016-01-20 Thread Michiel Overtoom
> On 2016-01-20, at 00:01, jim-pc wrote: > > How do I get data from libre office using python? Could you be a little more specific? What data? From which part of OpenOffice? OpenOffice files are actually ZIP files with XML documents in them, but there are other ways to interface with OpenOffi

libre office

2016-01-20 Thread jim-pc
How do I get data from libre office using python? -- https://mail.python.org/mailman/listinfo/python-list

Back links

2016-01-20 Thread Holly Rennels
There are back links here: https://mail.python.org/pipermail/python-list/2010-April/574035.html and here: https://mail.python.org/pipermail/python-list/2010-April/574036.html referencing one of our sites: countrysidecabinetry.com. Please remove this link. Thank you Holly Rennels | Webmaster &

Re: Single format descriptor for list

2016-01-20 Thread Mark Lawrence
On 20/01/2016 09:35, Paul Appleby wrote: In BASH, I can have a single format descriptor for a list: $ a='4 5 6 7' $ printf "%sth\n" $a 4th 5th 6th 7th Is this not possible in Python? Using "join" rather than "format" still doesn't quite do the job: a = range(4, 8) print ('th\n'.join(map(str,a

Re: Single format descriptor for list

2016-01-20 Thread Jussi Piitulainen
"Frank Millman" writes: > "Paul Appleby" wrote in message > news:pan.2016.01.20.09.35.09@nowhere.invalid... >> >> In BASH, I can have a single format descriptor for a list: >> >> $ a='4 5 6 7' >> $ printf "%sth\n" $a >> 4th >> 5th >> 6th >> 7th >> >> Is this not possible in Python? Using "join" r

Re: Single format descriptor for list

2016-01-20 Thread Oscar Benjamin
On 20 January 2016 at 09:35, Paul Appleby wrote: > In BASH, I can have a single format descriptor for a list: > > $ a='4 5 6 7' > $ printf "%sth\n" $a > 4th > 5th > 6th > 7th > > Is this not possible in Python? Using "join" rather than "format" still > doesn't quite do the job: > a = range(4,

Re: Single format descriptor for list

2016-01-20 Thread Chris Angelico
On Wed, Jan 20, 2016 at 8:35 PM, Paul Appleby wrote: > In BASH, I can have a single format descriptor for a list: > > $ a='4 5 6 7' > $ printf "%sth\n" $a > 4th > 5th > 6th > 7th > > Is this not possible in Python? Using "join" rather than "format" still > doesn't quite do the job: > a = rang

Re: Single format descriptor for list

2016-01-20 Thread Ben Finney
Paul Appleby writes: > In BASH, I can have a single format descriptor for a list: > […] > Is this not possible in Python? Not as such; you'll need to treat items differently from sequences of items. > Using "join" rather than "format" still doesn't quite do the job: Right, ‘str.join’ is meant

Re: Single format descriptor for list

2016-01-20 Thread Frank Millman
"Paul Appleby" wrote in message news:pan.2016.01.20.09.35.09@nowhere.invalid... In BASH, I can have a single format descriptor for a list: $ a='4 5 6 7' $ printf "%sth\n" $a 4th 5th 6th 7th Is this not possible in Python? Using "join" rather than "format" still doesn't quite do the job: >>

Single format descriptor for list

2016-01-20 Thread Paul Appleby
In BASH, I can have a single format descriptor for a list: $ a='4 5 6 7' $ printf "%sth\n" $a 4th 5th 6th 7th Is this not possible in Python? Using "join" rather than "format" still doesn't quite do the job: >>> a = range(4, 8) >>> print ('th\n'.join(map(str,a))) 4th 5th 6th 7 Is there an eleg