After update to pip 10 I get: Cache entry deserialization failed, entry ignored

2018-04-18 Thread Cecil Westerhof
After I updated pip2/3 to 10 from 9 I sometimes get: Cache entry deserialization failed, entry ignored For example when I execute: pip3 list --outdated But not always. What could be happening here? And how would I solve this? -- Cecil Westerhof Senior Software Engineer LinkedIn: http:/

Regex for changing :variable to ${variable} in sql query

2018-04-18 Thread zljubisic
Hi, I have a sql query in which all variables declared as :variable should be changed to ${variable}. for example this sql: select * from table where ":x" = "1" and :y=2 and field in (:string) and time between :from and :to should be translated to: select * from table where "${x}"

Flask test generator code review?

2018-04-18 Thread Albert-Jan Roskam
Hi, I am writing my first unittests for a Flask app. First modest goal is to test whether a selected subset of the templates return the expected status 200. I am using a nose test generator in a class for this. Is the code below the correct way to do this? And is there a way to dynamically set

how to create auto generated mail from robo framework upon execution completion of TCs

2018-04-18 Thread supswain
Hi, I am having below setup robofraemwork setup info -> Robot Framework 2.8.1 32 bit python->Python 2.7.6 32 bit OS->windows 7 64 bit I am running test cases from Robo framework and want to create any library proc through which I can get auto generated mail from robo-framework regarding

Re: New PyPI launched, legacy PyPI shutting down April 30

2018-04-18 Thread Noah
Awesome On Mon, Apr 16, 2018 at 8:21 PM, Laura Hampton wrote: > New PyPI launched, legacy PyPI shutting down April 30[1] > > Starting today, the canonical Python Package Index is at https://pypi.org > and uses the new Warehouse codebase. We announced the https://pypi.org > beta on March

Re: New PyPI launched, legacy PyPI shutting down April 30

2018-04-18 Thread Jon Ribbens
Going live with the new site while its search function is mostly inoperative seems a bit brave. https://github.com/pypa/warehouse/issues/3746 On 2018-04-18, Noah wrote: > Awesome > > On Mon, Apr 16, 2018 at 8:21 PM, Laura Hampton > wrote: > >> New PyPI launched, legacy PyPI shutting dow

Re: please test the new PyPI (now in beta)

2018-04-18 Thread Jon Ribbens
On 2018-03-27, Chris Angelico wrote: > Any time you see something that requires JavaScript for this, you know > you've found a web site that dates back to... uhh, actually I don't > know. I only have versioning info on MDN back as far as HTML 4.01 ergo > 1999, and the placeholder attribute is ther

Re: Finding set difference between ranges

2018-04-18 Thread Neil Cerutti
On 2018-04-18, tejaswi prakash wrote: > Hello all, > I have 3 continuous (steps of 1) ranges a,a1,a2. All of them sorted. > I am performing the following operations on them > > a = a.difference (a1) > a = a.difference(a2) If they are each stored as a set I don't see how they can be sorted. Are yo

Re: New PyPI launched, legacy PyPI shutting down April 30

2018-04-18 Thread Zbigniew Jędrzejewski-Szmek
On Mon, Apr 16, 2018 at 01:21:50PM -0400, Laura Hampton wrote: > New PyPI launched, legacy PyPI shutting down April 30[1] > > Starting today, the canonical Python Package Index is at https://pypi.org and > uses the new Warehouse codebase. We announced the https://pypi.org beta on > March 26 a

Re: New PyPI launched, legacy PyPI shutting down April 30

2018-04-18 Thread Tony van der Hoff
On 18/04/18 13:15, Zbigniew Jędrzejewski-Szmek wrote: > On Mon, Apr 16, 2018 at 01:21:50PM -0400, Laura Hampton wrote: >> New PyPI launched, legacy PyPI shutting down April 30[1] >> >> Starting today, the canonical Python Package Index is at https://pypi.org >> and uses the new Warehouse codebas

Generating list of rsquared_adj regression values for variating i with loop

2018-04-18 Thread Alexander Hempfing via Python-list
Dear all, I am wondering if someone could please help me with an issue I am currently trying to solve: I have a "static" code which looks as follows: tsd_res_fra_08 =res_fra_08['D_Cummulative'][100] tsd_res_fra_09 =res_fra_09['D_Cummulative'][100] tsd_res_fra_10 =res_fra_10['D_Cummulative'][10

Re: Regex for changing :variable to ${variable} in sql query

2018-04-18 Thread MRAB
On 2018-04-18 08:25, zljubi...@gmail.com wrote: Hi, I have a sql query in which all variables declared as :variable should be changed to ${variable}. for example this sql: select * from table where ":x" = "1" and :y=2 and field in (:string) and time between :from and :to should be tran

unittest.Testsuite and execution order

2018-04-18 Thread Francesco Russo
Hello! I'm reading the documentation of unittest.TestSuite (Python 2 and 3), but I can't find any explicit sentence stating that TestSuite will honor the order. I can only read that TestSuite can group test cases together. Please blame it on my poor English skills if I'm not interpreting the docum

Re: unittest.Testsuite and execution order

2018-04-18 Thread Chris Angelico
On Thu, Apr 19, 2018 at 2:51 AM, Francesco Russo wrote: > My use case: my SUT is split into modules. Besides writing unit tests for > each module, I want to write an integration test, and I also need to > perform some actions between two calls to the SUT. In my case, the order of > the execution i

RE newbie question

2018-04-18 Thread TUA
import re compval = 'A123456_8' regex = '[a-zA-Z]\w{0,7}' if re.match(regex, compval): print('Yes') else: print('No') My intention is to implement a max. length of 8 for an input string. The above works well in all other respects, but does allow for strings that are too long. What is

Re: RE newbie question

2018-04-18 Thread Rob Gaddi
On 04/18/2018 12:37 PM, TUA wrote: import re compval = 'A123456_8' regex = '[a-zA-Z]\w{0,7}' if re.match(regex, compval): print('Yes') else: print('No') My intention is to implement a max. length of 8 for an input string. The above works well in all other respects, but does allow for

Re: Regex for changing :variable to ${variable} in sql query

2018-04-18 Thread zljubisic
On Wednesday, 18 April 2018 19:34:37 UTC+2, MRAB wrote: > > Hi, > > > > I have a sql query in which all variables declared as :variable should be > > changed to ${variable}. > > > > for example this sql: > > > > select * > > from table > > where ":x" = "1" and :y=2 > > and field in (:string)

Re: RE newbie question

2018-04-18 Thread Ian Kelly
On Wed, Apr 18, 2018 at 1:57 PM, Rob Gaddi wrote: > On 04/18/2018 12:37 PM, TUA wrote: >> >> import re >> >> compval = 'A123456_8' >> regex = '[a-zA-Z]\w{0,7}' >> >> if re.match(regex, compval): >> print('Yes') >> else: >> print('No') >> >> >> My intention is to implement a max. length of

python 3 creating hard links on ntfs

2018-04-18 Thread zljubisic
Is it possible to create hard links on windows with ntfs? On linux I can use os.link, but how about windows? Regards. -- https://mail.python.org/mailman/listinfo/python-list

Re: RE newbie question

2018-04-18 Thread TUA
Thanks much! -- https://mail.python.org/mailman/listinfo/python-list

Re: RE newbie question

2018-04-18 Thread Albert-Jan Roskam
On Apr 18, 2018 21:42, TUA wrote: > > import re > > compval = 'A123456_8' > regex = '[a-zA-Z]\w{0,7}' > > if re.match(regex, compval): >print('Yes') > else: >print('No') > > > My intention is to implement a max. length of 8 for an input string. The > above works well in all other respect

Re: RE newbie question

2018-04-18 Thread Steven D'Aprano
On Wed, 18 Apr 2018 12:37:29 -0700, TUA wrote: > My intention is to implement a max. length of 8 for an input string. The > above works well in all other respects, but does allow for strings that > are too long. if len(input_string) > 8: raise ValueError('string is too long') -- Steve --

Re: python 3 creating hard links on ntfs

2018-04-18 Thread Steven D'Aprano
On Wed, 18 Apr 2018 13:06:37 -0700, zljubisic wrote: > Is it possible to create hard links on windows with ntfs? On linux I can > use os.link, but how about windows? According to the documentation, creating hard links on Windows has worked since version 3.2: https://docs.python.org/3/library/os

Re: python 3 creating hard links on ntfs

2018-04-18 Thread eryk sun
On Wed, Apr 18, 2018 at 8:06 PM, wrote: > Is it possible to create hard links on windows with ntfs? > On linux I can use os.link, but how about windows? Windows support was added for os.link years ago in version 3.2. Internally it's implemented via WinAPI CreateHardLink, which in turn calls NTAP

The basics of the logging module mystify me

2018-04-18 Thread Skip Montanaro
This session is from Python 3.6.5 on Linux: >>> import logging >>> log = logging.getLogger() >>> log.level 30 >>> logging.WARN 30 >>> log.warn("Awk! Goodbye...") Awk! Goodbye... >>> log.level = logging.INFO >>> log.info("Awk! Goodbye...") >>> log.level 20 >>> log.level == logging.INFO True >>> log

best parallelisation strategy on python

2018-04-18 Thread simona bellavista
I have a code fortran 90 that is parallelised with MPI. I would like to traslate it in python, but I am not sure on the parallelisation strategy and libraries. I work on clusters, with each node with 5GB memory and 12 processors or 24 processors (depending on the cluster I am using). Ideally I w

Re: The basics of the logging module mystify me

2018-04-18 Thread Chris Angelico
On Thu, Apr 19, 2018 at 11:00 AM, Skip Montanaro wrote: > This session is from Python 3.6.5 on Linux: > import logging log = logging.getLogger() log.level > 30 logging.WARN > 30 log.warn("Awk! Goodbye...") > Awk! Goodbye... log.level = logging.INFO log.info("Awk!