Re: Where are the moderators?

2018-01-19 Thread Terry Reedy

On 1/18/2018 11:05 PM, Dennis Lee Bieber wrote:

On Thu, 18 Jan 2018 18:42:35 -0700, Bob van der Poel 
declaimed the following:


On Thu, Jan 18, 2018 at 4:28 PM,  wrote:


On Thursday, January 18, 2018 at 10:38:18 PM UTC, Mike Driscoll wrote:

Hi,

What happened to the moderators? I have always liked this forum, but

there's so much spam now. Is there a way to become a moderator so this can
be cleaned up?


Thanks,
Mike


Simply point your email client at news.gmane.org


Mark meant, or should have meant, news or combined mail/news client. 
Thunderbird (and Outlook Express, for instance) are the latter.  I read 
and post to this list and others through my Thunderbird news account



and take your pick from
hundreds of Python lists and thousands of other technical lists that are
all spam free.



Actually, this link is broken.


news.gmane.org is a news server, and the server I am sending this 
through.  It is not an html web page server.



But, gmane.org (without the news prefix)
does work.


In a browser, but not as a news server.


While I can't speak for /email client/, Agent has been running well for
some years now using news.gmane.org.


Ditto for Thunderbird news (as opposed to mail) account.


--
Terry Jan Reedy

--
https://mail.python.org/mailman/listinfo/python-list


Re: Very strange issues with collections.Mapping

2018-01-19 Thread Terry Reedy

On 1/18/2018 4:37 PM, Jason Swails wrote:

Hello!

I am running into a very perplexing issue that is very rare, but creeps up
and is crashing my app.

The root cause of the issue comes down to the following check returning
true:

isinstance([], collections.Mapping)


I confirmed that one *can* register 'list' as a Mapping so that the 
above returns True.  I also discovered that doing so does not change 
Mapping._abc_registry.


Have you grepped the dependencies (snipped) for '.register'?

Alternatively, the abc module doc says

"""
Changed in version 3.4: To detect calls to register(), you can use the 
get_cache_token() function.

...
abc.get_cache_token()

Returns the current abstract base class cache token.

The token is an opaque object (that supports equality testing) 
identifying the current version of the abstract base class cache for 
virtual subclasses. The token changes with every call to 
ABCMeta.register() on any ABC.

"""

You could call this before, between, and after all your imports, and add 
such calls to the guilty import.


--
Terry Jan Reedy

--
https://mail.python.org/mailman/listinfo/python-list


Re: Where are the moderators?

2018-01-19 Thread Anssi Saari
Skip Montanaro  writes:

> Neither works for me. The news link clearly fails, but the gmane.org
> link has no search functionality either. Do you have a direct URL to
> comp.lang.python?

Gmane seems to be in the middle of a massive rebuild at the
moment. Comp.lang.python's webpage is
http://dir.gmane.org/gmane.comp.python.general but none of the links to
read or search the list seem to be working at the moment. NNTP access to
news.gmane.org and group gmane.comp.python.general works for me. For
reading at least, I don't know if this message goes anywhere...

-- 
https://mail.python.org/mailman/listinfo/python-list


pyinstaller not finding external fortran executable

2018-01-19 Thread Heli
Dear all, 

My code consists of a graphical user interface written in PySide. This GUI will 
then call a FORTRAN executable. 

I run the FORTRAN executable using the following lines in my script:

curPath = os.path.dirname(os.path.realpath(__file__))
execPath = os.path.join(curPath, "myFORTRAN.out")
returnValue = subprocess.call([execPath, self.runConfig]


The script works fine and finds executable. The problem is when I use 
pyinstaller. I use the following command to create standalone executable that 
bundles my script, the external FORTRAN executable and all necessary python 
modules/libraries in to one standalone executable.  

pyinstaller --hidden-import=h5py.defs --hidden-import=h5py.utils 
--hidden-import=h5py.h5ac --hidden-import=h5pyl_proxy main_script.py --onefile

I get the following error running this standalone executable:


  File "subprocess.py", line 534, in call
  File "subprocess.py", line 856, in __init__
  File "subprocess.py", line 1464, in _execute_child
FileNotFoundError: [Errno 2] No such file or directory: 
/myFORTRAN.out'

If I manually copy myFORTRAN.out in to the same directory as the standalone 
executable created by pyinstaller, then it works. 

Does anybody know how to fix this?

Thanks in Advance for your help, 





-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Anaconda installation problem

2018-01-19 Thread Abdur-Rahmaan Janhangeer
i suggest using version of py 3.6

On 19 Jan 2018 08:54, "Jingshen Tai (jingshen)"  wrote:

>
> Hi,
>
> When  I was installing windows Anaconda 3 64 bit, there is a pop up window
> saying that the 'python program is closing'. I ignored it and continued the
> installation.
>
> When the Anaconda Prompt is launched, I have this error popped at the top
> (refer to attached doc.) Does that mean that the batch file is missing?
> I have tried re-installing and restarted my PC, however, the problem still
> persists.
>
> Also, I further checked that the python version installed is python 2.3.4
> instead ( refer to Python 2.3.4 existance).
> Kindly advise.
>
> Regards,
> JS (Jing Shen)
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Anaconda installation problem

2018-01-19 Thread Thomas Jollans
On 2018-01-19 05:47, Jingshen Tai (jingshen) wrote:
> 
> Hi,
> 
> When  I was installing windows Anaconda 3 64 bit, there is a pop up window 
> saying that the 'python program is closing'. I ignored it and continued the 
> installation.
> 
> When the Anaconda Prompt is launched, I have this error popped at the top

> (refer to attached doc.)

This mailing list does not support attachments.

> Does that mean that the batch file is missing?
> I have tried re-installing and restarted my PC, however, the problem still 
> persists.
> 
> Also, I further checked that the python version installed is python 2.3.4 
> instead ( refer to Python 2.3.4 existance).
> Kindly advise.

Are you sure? Python 2.3 was released in July 2003, 14½ years ago.



> 
> Regards,
> JS (Jing Shen)
> 

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Where are the moderators?

2018-01-19 Thread Percival John Hackworth
On 18-Jan-2018, Mike Driscoll wrote
(in article<[email protected]>):

> Hi,
>
> What happened to the moderators? I have always liked this forum, but there's
> so much spam now. Is there a way to become a moderator so this can be cleaned
> up?
>
> Thanks,
> Mike

Google Groups is unmoderated, as has already been said here. I use a 
commercial news service but individual.net offers a year of the non-binary 
groups for €10 but there are free accounts out there. The individual.net 
account isn't filtered by my news reader takes care of most of the spam.

YMMV

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Where are the moderators?

2018-01-19 Thread Grant Edwards
On 2018-01-19, Anssi Saari  wrote:
> Skip Montanaro  writes:
>
>> Neither works for me. The news link clearly fails, but the gmane.org
>> link has no search functionality either. Do you have a direct URL to
>> comp.lang.python?
>
> Gmane seems to be in the middle of a massive rebuild at the
> moment.

It's a massive "rebuild" that has been stalled for years.  I do not
expect Gmanes web UI to be revived.

> Comp.lang.python's webpage is
> http://dir.gmane.org/gmane.comp.python.general but none of the links
> to read or search the list seem to be working at the moment.

They've been that way for years.

> NNTP access to news.gmane.org and group gmane.comp.python.general
> works for me. For reading at least, I don't know if this message
> goes anywhere...

For most groups/lists, gmane's mail<->nntp service seems to be
working.  There are some "groups" where I've noticed that posting
works, but traffic in the other direction mail->nntp is intermittent.

-- 
Grant Edwards   grant.b.edwardsYow! Did something bad
  at   happen or am I in a
  gmail.comdrive-in movie??

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to use asyncore with SSL?

2018-01-19 Thread Grant Edwards
On 2018-01-19, Marko Rauhamaa  wrote:
> Grant Edwards :
>
>> I've been trying to use the secure smtpd module from
>> https://github.com/bcoe/secure-smtpd, but the SSL support seems to be
>> fundamentally broken.
[...]
>> I'm trying to fix that, but I can't find any information or
>> documentation about using asyncore with SSL.
>
> I'm all in for asynchronous programming, but asyncore is a bit too naive
> of an approach and shouldn't be used for anything serious. Python3, of
> course, has the asyncio framework.

I would definitely not use it were I writing something from scratch.
But it's what's used by the only secure (SSL+AUTH) smtpd
implementation I can find.

> Additionally, I seem to recall Python's TLS support really supported
> synchronous processing only (based on some experimentation of my own). I
> hope I'm wrong on that.

That depends on what you mean by "support".  You can use ssl-wrapped
sockets in non-blocking mode to build an asynchronous application, but
the API and semantics for ssl-sockets in non-blocking mode are not
identical to plain TCP sockets, so the event-handling or dispatcher
needs to be SSL-aware (which asyn{core,chat} definitely are not).

>> Alternatively, a pointer to a simpler smtp server library that
>> supports SSL would be great. The use of asyncore and multiprocessing
>> process pools by this module is _way_ overkill for my needs and
>> results in something that 1) doesn't work, and 2) can't be debugged.
>
> Haven't tried it myself, but I supposed Twisted might be what you're
> looking for.

It is certianly more SSL-aware than asyncore:

  http://twistedmatrix.com/documents/current/core/howto/ssl.html

And it has smtp server-side support examples:

https://twistedmatrix.com/documents/current/mail/examples/#smtp-servers

> Myself, I've written several "asyncore" replacements in Python as
> well as an SMTP server for my personal email needs. You could also
> consider writing your own implementation.  For async, there's
> select.epoll and the like (assuming Linux), and SMTP is rather a
> simple protocol.

I don't think a simple, low-volume SMTP server needs to be
asynchronous.  The protocol is completely half-duplex command/response
so jumping through hoops to use an async framework seems pointless.
Adding in multiprocessing the way secure-smtpd is really over-the-top
unless you're designing for really high message volumes and connection
counts.

I plan on handling several messages per week and am fine with
supporting only one connection at a time.

So twisted may be overkill also, but at least it looks like it
supports SSL.

-- 
Grant Edwards   grant.b.edwardsYow! I'm sitting on my
  at   SPEED QUEEN ... To me,
  gmail.comit's ENJOYABLE ... I'm WARM
   ... I'm VIBRATORY ...

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Very strange issues with collections.Mapping

2018-01-19 Thread John Krukoff via Python-list
Have you ruled out the possibility that collections.Mapping has been
(perhaps temporarily) assigned to something else?

On Thu, Jan 18, 2018 at 2:37 PM, Jason Swails 
wrote:

> Hello!
>
> I am running into a very perplexing issue that is very rare, but creeps up
> and is crashing my app.
>
> The root cause of the issue comes down to the following check returning
> true:
>
> isinstance([], collections.Mapping)
>
> Obviously you can get this behavior if you register `list` as a subclass of
> the Mapping ABC, but I'm not doing that.  Because the issue is so rare (but
> still common enough that I need to address it), it's hard to reproduce in a
> bench test.
>
> What I am going to try is to essentially monkey-patch
> collections.Mapping.register with a method that dumps a stack trace
> whenever it's called at the time of initial import so I can get an idea of
> where this method could *possibly* be getting called with a list as its
> argument.
>
> The annoying thing here is that wherever the bug is happening, the crash
> happens *way* far away (in a third-party library).  I've also determined it
> as the root cause of two crashes that seem completely unrelated (except
> that the crash is caused by a list not behaving like a dict shortly after
> isinstance(obj, collections.Mapping) returns True).  These are the
> libraries I'm using:
>
> amqp
> billiard
> celery
> dj-database-url
> Django
> django-redis-cache
> enum34
> gunicorn
> kombu
> newrelic
> psycopg2
> pyasn1
> pytz
> redis
> requests
> rsa
> six
> vine
> voluptuous
>
> It's a web application, as you can probably tell.  The main reason I ask
> here is because I'm wondering if anybody has encountered this before and
> managed to hunt down which of these libraries is doing something naughty?
>
> Thanks!
> Jason
>
> --
> Jason M. Swails
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


error message by installation

2018-01-19 Thread ‪Ibrahim Nasr‬ ‪ via Python-list
kindly inform me what to do.




   
-- 
https://mail.python.org/mailman/listinfo/python-list


Fourth example from PEP 342

2018-01-19 Thread Léo El Amri
Hello list,

I am currently trying to learn co-routine/asynchronous mechanisms in
Python. I read the PEP 342, but I stumble on the fourth example.
I don't understand what the lines "data = yield nonblocking_read(sock)"
in echo_handler() and "connected_socket = yield
nonblocking_accept(sock)" in listen_on() are trying to do.

For example, can someone explain me how the returned value in the line
"connected_socket = yield nonblocking_accept(sock)" can be used on the
next line ("trampoline.add(handler(connected_socket))") ? To me, it
looks like the returned value is lost in the Trampoline, when resume()
gets the returned value of the yield expression.

Léo
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: error message by installation

2018-01-19 Thread breamoreboy
On Friday, January 19, 2018 at 8:47:52 PM UTC, [email protected] wrote:
> kindly inform me what to do.

Please read this http://www.catb.org/esr/faqs/smart-questions.html and then try 
asking again.

--
Kindest regards.

Mark Lawrence.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: error message by installation

2018-01-19 Thread Ben Finney
‪Ibrahim Nasr‬ ‪ via Python-list  writes:

> kindly inform me what to do.

Welcome to this discussion forum, and congratulations on trying Python.

Can you write a new message that describes exactly what you've tried,
exactly what happened (please copy-and-paste any error messages), and
what you expected to happen?

-- 
 \ “Pinky, are you pondering what I'm pondering?” “Um, I think so, |
  `\Brainie, but why would anyone want to Pierce Brosnan?” —_Pinky |
_o__)   and The Brain_ |
Ben Finney

-- 
https://mail.python.org/mailman/listinfo/python-list