Re: Psycopg2 pool clarification

2017-06-07 Thread dieter
israel writes: > On 2017-06-06 22:53, dieter wrote: > ... > As such, using psycopg2's pool is essentially > worthless for me (plenty of use for it, i'm sure, just not for me/my > use case). Could you not simply adjust the value for the "min" parameter? If you want at least "n" open connections, t

Re: Access flles on a Android device from Windows PC << YES! Thanks

2017-06-07 Thread Fred Fishbin
Yup, that seems to be the deal, and there doesn't seem tpo be a really simple way to deal with this. ...but at least I know what I need to look for. thanks! Freddie eryk sun wrote: >On Tue, Jun 6, 2017 at 7:36 PM, Fred Fishbin wrote: >> >> I want to write little program that my friend can ru

Re: Hello from a super noob!

2017-06-07 Thread Steve D'Aprano
On Thu, 8 Jun 2017 09:56 am, CB wrote: > Can anyone try to run it? Yes, you can. Doctor to patient: "So, what seems to be the problem?" Patient: "You're the doctor, you tell me." -- Steve “Cheer up,” they said, “things could be worse.” So I cheered up, and sure enough, things got worse.

Re: New to Python - Career question

2017-06-07 Thread Matt
On Tuesday, June 6, 2017 at 3:37:56 PM UTC-7, Marko Rauhamaa wrote: > pta...@gmail.com: > > > New to Python and have been at it for about a month now. I'm doing > > well and like it very much. Considering a career change down the road > > and have been wondering... What are the job prospects for a

Re: Hello from a super noob!

2017-06-07 Thread MRAB
On 2017-06-08 00:56, CB wrote: Hi everyone, I am taking a python class and I'm stuck in an exercise. what am i doing wrong? Can anyone try to run it? Thanks so much! #Description:Input validation and while loops. import random def main(): #main function need in all programs for automated test

Hello from a super noob!

2017-06-07 Thread CB
Hi everyone, I am taking a python class and I'm stuck in an exercise. what am i doing wrong? Can anyone try to run it? Thanks so much! #Description:Input validation and while loops. import random def main(): #main function need in all programs for automated testing #your program goes

Time Calculation to Tag a Sentence/File

2017-06-07 Thread subhabangalore
I am trying to calculate the time required to tag one sentence/file by one trained NLTK HMM Tagger. To do this I am writing the following code, please suggest if I need to revise anything here. import nltk from nltk.corpus.reader import TaggedCorpusReader import time #HMM reader = TaggedCorpusR

Re: Error in initialization of IDLE.

2017-06-07 Thread Terry Reedy
On 6/7/2017 7:59 AM, Mohit Soni via Python-list wrote: I have python 3.5.2 installed and recently I installed python 3.6 and after installing the problem seems to occur. What OS are you using? Did IDLE run correctly before adding 3.6? How did you start IDLE? Whenever I start IDLE it shows a

!RE: Namedtuple problem #32.11.d

2017-06-07 Thread Deborah Swanson
Neil Cerutti wrote, on Wednesday, June 07, 2017 10:36 AM > > On 2017-06-06, Deborah Swanson wrote: > >> I too have sometimes started with a namedtuple and then found I > >> needed to make changes to the records. I typically abandon > namedtuple > >> at this point, after only one bad experience

Re: Generator and return value

2017-06-07 Thread Ian Kelly
On Wed, Jun 7, 2017 at 10:00 AM, Rob Gaddi wrote: > > On 06/06/2017 11:13 PM, Frank Millman wrote: >> >> Hi all >> >> It would be nice to write a generator in such a way that, in addition to 'yielding' each value, it performs some additional work and then 'returns' a final result at the end. >> >>

Re: Namedtuple problem #32.11.d

2017-06-07 Thread Neil Cerutti
On 2017-06-06, Deborah Swanson wrote: >> I too have sometimes started with a namedtuple and then found >> I needed to make changes to the records. I typically abandon >> namedtuple at this point, after only one bad experience trying >> to work around my choice of container. > > I can appreciate th

Re: Bug or intended behavior?

2017-06-07 Thread Chris Angelico
On Thu, Jun 8, 2017 at 2:27 AM, Peter Pearson wrote: > More seriously, I thought "format" was the Cool New Thing toward which > all the cool kids were moving. But here I tried to be cool and put in a > plug for "format", and the hip community seems to be sticking up for > "%". Can I never get wi

Re: Bug or intended behavior?

2017-06-07 Thread Skip Montanaro
On Wed, Jun 7, 2017 at 11:27 AM, Peter Pearson wrote: > I thought "format" was the Cool New Thing toward which > all the cool kids were moving. But here I tried to be cool and put in a > plug for "format", and the hip community seems to be sticking up for > "%". The f"..." string is pretty new.

Re: plot time on X axis

2017-06-07 Thread Peter Pearson
On Wed, 07 Jun 2017 09:20:25 -0300, jorge.conr...@cptec.inpe.br wrote: [snip] > I was an IDL user and I'm using Python. I have several meteorological > daily time seriee for several years. Please can someone help me. I would > like to plot on X axis only the values o the year. Is matplotlib allo

Re: Psycopg2 pool clarification

2017-06-07 Thread israel
On 2017-06-06 22:53, dieter wrote: israel writes: Since I've gotten no replies to this, I was wondering if someone could at least confirm which behavior (my expected or my observed) is *supposed* to be the correct? Should a psycopg2 pool keep connections open when returned to the pool (if close

Re: Bug or intended behavior?

2017-06-07 Thread Peter Pearson
On Tue, 6 Jun 2017 13:16:00 -0400, Terry Reedy wrote: > On 6/5/2017 1:01 PM, Peter Pearson wrote: >> On Fri, 2 Jun 2017 10:17:05 -0700 (PDT), sean.diza...@gmail.com wrote: >> [snip] >> print "foo %s" % 1-2 >>> Traceback (most recent call last): >>>File "", line 1, in >>> TypeError: unsupp

Re: Generator and return value

2017-06-07 Thread Rob Gaddi
On 06/06/2017 11:13 PM, Frank Millman wrote: Hi all It would be nice to write a generator in such a way that, in addition to 'yielding' each value, it performs some additional work and then 'returns' a final result at the end. From Python 3.3, anything 'returned' becomes the value of the St

Re: script output appears correct but still raises, AssertionError

2017-06-07 Thread john polo
ChrisA, Thank you for pointing out my error: using print() when I should have used return(). John -- https://mail.python.org/mailman/listinfo/python-list

Re: how to decrypt encrypted text to a clear text

2017-06-07 Thread blue
Test again your chain programming way , because : >>> dir(RSA.importKey) ['__call__', '__class__', '__cmp__', '__delattr__', '__doc__', '__format__', '__func__', '__get__', '__getattribute__', '__hash__', '__init__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__self__', '__setattr__',

Re: plot time on X axis

2017-06-07 Thread Paul Barry
Take a look at Jake VanderPlas's book, which is available online as free-to-read: https://github.com/jakevdp/PythonDataScienceHandbook See Chapter 3 (and 4). On 7 June 2017 at 13:20, wrote: > > Hi, > > I was an IDL user and I'm using Python. I have several meteorological > daily time seriee for

Re: Generator and return value

2017-06-07 Thread Cameron Simpson
On 07Jun2017 19:19, Steve D'Aprano wrote: Frank Millman writes: It would be nice to write a generator in such a way that, in addition to 'yielding' each value, it performs some additional work and then 'returns' a final result at the end. From Python 3.3, anything 'returned' becomes the value

plot time on X axis

2017-06-07 Thread jorge . conrado
Hi, I was an IDL user and I'm using Python. I have several meteorological daily time seriee for several years. Please can someone help me. I would like to plot on X axis only the values o the year. Thanks, Conrado -- https://mail.python.org/mailman/listinfo/python-list

Re: Error in initialization of IDLE.

2017-06-07 Thread Mohit Soni via Python-list
Sent from Yahoo Mail on Android I have python 3.5.2 installed and recently I installed python 3.6 and after installing the problem seems to occur. Whenever I start IDLE it shows an error message like "IDLE can't create a sub process or windows firewall might be blocking it" I did a fresh inst

Re: Generator and return value

2017-06-07 Thread Steve D'Aprano
On Wed, 7 Jun 2017 05:09 pm, Jussi Piitulainen wrote: > Frank Millman writes: > >> It would be nice to write a generator in such a way that, in addition >> to 'yielding' each value, it performs some additional work and then >> 'returns' a final result at the end. >> >>> From Python 3.3, anything

Re: Generator and return value

2017-06-07 Thread Frank Millman
"Jussi Piitulainen" wrote: Frank Millman writes: > It would be nice to write a generator in such a way that, in addition > to 'yielding' each value, it performs some additional work and then > 'returns' a final result at the end. > > From Python 3.3, anything 'returned' becomes the value of th

Re: Generator and return value

2017-06-07 Thread Jussi Piitulainen
Frank Millman writes: > It would be nice to write a generator in such a way that, in addition > to 'yielding' each value, it performs some additional work and then > 'returns' a final result at the end. > >> From Python 3.3, anything 'returned' becomes the value of the >> StopIteration > exceptio