Re: sys.modules

2019-02-21 Thread Terry Reedy
On 2/21/2019 11:40 AM, ast wrote: Hello Is it normal to have 151 entries in dictionary sys.modules just after starting IDLE or something goes wrong ? The is the right number. When Python starts, it imports around 50 modules. When it runs IDLE, most of idlelib modules are imported, plus abo

RE: python3.7.2 won't compile with SSL support (solved)

2019-02-21 Thread Felix Lazaro Carbonell
Incredibly: ./configure --with-ssl=/usr/include/openssl/ Made the trick!! Although --with-ssl is not documented in ./configure --help. Cheers, Felix. -- https://mail.python.org/mailman/listinfo/python-list

Re: sys.modules

2019-02-21 Thread DL Neil
Hello, On 22/02/19 5:40 AM, ast wrote: Is it normal to have 151 entries in dictionary sys.modules just after starting IDLE or something goes wrong ? >>> import sys >>> len(sys.modules) 151 I don't use Idle. Written in python, doesn't it require various packages to run before it even talks

Re: sys.modules

2019-02-21 Thread Chris Angelico
On Fri, Feb 22, 2019 at 6:03 AM Chris Warrick wrote: > > On Thu, 21 Feb 2019 at 18:57, ast wrote: > > > > Hello > > > > Is it normal to have 151 entries in dictionary sys.modules > > just after starting IDLE or something goes wrong ? > > > > >>> import sys > > >>> len(sys.modules) > > 151 > > >

Re: python3.7.2 won't compile with SSL support

2019-02-21 Thread Kushal Kumaran
"Felix Lazaro Carbonell" writes: > Hello: > > > > I'm trying to install python3.7.2 from source in debian9.8 but it doesn't > compile with SSL. > > > > I already installed openssl > > > > And ./configure -with-openssl=/usr/include/openssl/ yields: > > > > checking for openssl/ssl.h in /u

Re: Feature suggestion: "Using declarations" i.e. context managers ("with" blocks) tied to scope/lifetime of the variable rather than to nesting

2019-02-21 Thread Thomas Jollans
On 21/02/2019 19:35, mnl.p...@gmail.com wrote: > (I sent this a few days ago but got bounced without a reason—don’t see it > posted, so I’m trying one more time.) No, it got through. And it's in the archive: https://mail.python.org/pipermail/python-list/2019-February/739548.html -- https://mail

Re: sys.modules

2019-02-21 Thread Chris Warrick
On Thu, 21 Feb 2019 at 18:57, ast wrote: > > Hello > > Is it normal to have 151 entries in dictionary sys.modules > just after starting IDLE or something goes wrong ? > > >>> import sys > >>> len(sys.modules) > 151 > > Most of common modules seems to be already there, > os, itertools, random ...

Re: Feature suggestion: "Using declarations" i.e. context managers ("with" blocks) tied to scope/lifetime of the variable rather than to nesting

2019-02-21 Thread Rhodri James
On 21/02/2019 18:35, mnl.p...@gmail.com wrote: (I sent this a few days ago but got bounced without a reason—don’t see it posted, so I’m trying one more time.) It was posted, and commented on. You can see the thread in the mailing list archives, if you don't believe me: https://mail.python.or

Re: Multiprocessing performance question

2019-02-21 Thread DL Neil
George: apologies for mis-identifying yourself as OP. Israel: On 22/02/19 6:04 AM, Israel Brewster wrote: Actually not a ’toy example’ at all. It is simply the first step in gridding some data I am working with - a problem that is solved by tools like SatPy, but unfortunately I can’t use SatPy

Feature suggestion: "Using declarations" i.e. context managers ("with" blocks) tied to scope/lifetime of the variable rather than to nesting

2019-02-21 Thread mnl.p...@gmail.com
(I sent this a few days ago but got bounced without a reason—don’t see it posted, so I’m trying one more time.) I thought this new C# feature would be a good thing to add to Python: https://vcsjones.com/2019/01/30/csharp-8-using-declarations/ The nesting required by context managers can be at od

sys.modules

2019-02-21 Thread ast
Hello Is it normal to have 151 entries in dictionary sys.modules just after starting IDLE or something goes wrong ? >>> import sys >>> len(sys.modules) 151 Most of common modules seems to be already there, os, itertools, random I thought that sys.modules was containing loaded modules with

Re: Multiprocessing performance question

2019-02-21 Thread Israel Brewster
Actually not a ’toy example’ at all. It is simply the first step in gridding some data I am working with - a problem that is solved by tools like SatPy, but unfortunately I can’t use SatPy because it doesn’t recognize my file format, and you can’t load data directly. Writing a custom file import

Re: Help, Can't find the default proxy in requests by config

2019-02-21 Thread Evi1 T1me
On Thursday, February 21, 2019 at 7:12:40 AM UTC-5, Evi1 T1me wrote: > ```bash > ~ python3 > Python 3.7.0 (default, Oct 22 2018, 14:54:27) > [Clang 10.0.0 (clang-1000.11.45.2)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> import requests > >>> r = request

Re: using zip for transpose

2019-02-21 Thread Robin Becker
On 21/02/2019 13:49, Peter Otten wrote: Robin Becker wrote: ... Isn't df.values a numpy array? Then try the more direct and likely more efficient df.values.tolist() or, if you ever want to transpose df.values.T.tolist() The first seems to achieve what your sample code does. (In addit

python3.7.2 won't compile with SSL support

2019-02-21 Thread Felix Lazaro Carbonell
Hello: I'm trying to install python3.7.2 from source in debian9.8 but it doesn't compile with SSL. I already installed openssl And ./configure -with-openssl=/usr/include/openssl/ yields: checking for openssl/ssl.h in /usr/include/openssl/... no and ssl.h is certainly in /usr/in

Re: using zip for transpose

2019-02-21 Thread Peter Otten
Robin Becker wrote: > In conversion of pandas dataframe to reportlab table I suggested using > this expression > > [list(x) for x in map(list,zip(*[df[i].values for i in df]))] > > which effectively transposes the dataframe. However, it's not clear that > this works for a large number of rows. I

Help, Can't find the default proxy in requests by config

2019-02-21 Thread Evi1 T1me
```bash ~ python3 Python 3.7.0 (default, Oct 22 2018, 14:54:27) [Clang 10.0.0 (clang-1000.11.45.2)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import requests >>> r = requests.get('https://www.baidu.com') Traceback (most recent call last): File "/usr/loca

using zip for transpose

2019-02-21 Thread Robin Becker
In conversion of pandas dataframe to reportlab table I suggested using this expression [list(x) for x in map(list,zip(*[df[i].values for i in df]))] which effectively transposes the dataframe. However, it's not clear that this works for a large number of rows. Is the argument *A for A a large