Re: unable to import pip installed packages and modules in python 3.7.3

2019-07-09 Thread Barry Scott
If you included an image of the screen it was striped from your email. Use the mouse to select the text in the cmd window and paste that into the email. Show the command you issued and all the messages it prints. There i no need for upper case text. Barry > On 9 Jul 2019, at 17:13, pro_ bro

Difficulties configuring LTO on macOS with clang

2019-07-09 Thread Scott Colby
ith clang but could not be found. If I change the command to `... CC=cc` configuration appears to happen normally. On my version of macOS, cc is a symlink to clang. Why is this happening? What should I be doing differently to explicitly specify clang as my compiler? Thank you, S

Re: Difficulties configuring LTO on macOS with clang

2019-07-09 Thread Barry Scott
> On 9 Jul 2019, at 19:28, Scott Colby wrote: > > Hello all, > > I am having difficulty building Python with `--with-lto` on macOS 10.14.5. > With a clean checkout of the CPython source at the tagged release for 3.7.4, > I ran: > > $ ./configure --prefi

Re: Difficulties configuring LTO on macOS with clang

2019-07-10 Thread Scott Colby
, Scott On Tue, Jul 9, 2019, at 15:39, Barry Scott wrote: > > > > On 9 Jul 2019, at 19:28, Scott Colby wrote: > > > > Hello all, > > > > I am having difficulty building Python with `--with-lto` on macOS 10.14.5. > > With a clean checkout of the CPython s

Re: Difficulties configuring LTO on macOS with clang

2019-07-10 Thread Barry Scott
> On 10 Jul 2019, at 15:25, Scott Colby wrote: > > Unfortunately that path is absent on my system. Could the issue be that the > llvm version of ar is not present at all on macOS? What remains confusing in > that case is that by using CC=cc (and I assume just ar) the

Re: super or not super?

2019-07-15 Thread Barry Scott
> On 12 Jul 2019, at 15:12, Paulo da Silva > wrote: > > Hi all! > > Is there any difference between using the base class name or super to > call __init__ from base class? > > class C1: > def __init__(self): > ... > > class C2(C1): > def __init__(self): >

PyPi twine check does not like my README.rst files anymore

2019-07-15 Thread Barry Scott
on https://github.com/barry-scott/namedstruct where you can see the README.rst rendered in full. Where as at https://pypi.org/project/namedstruct/ only the first line is rendered. Checking distribution dist\namedstruct-1.2.1-py3-none-any.whl: warning: `long_description_content_type` missing

Re: PyPi twine check does not like my README.rst files anymore

2019-07-16 Thread Barry Scott
> On 16 Jul 2019, at 05:43, dieter wrote: > > Barry Scott writes: >> I am update some PyPI projects and found that twine was refusing the upload. >> ... >> Failed >> The project's long_description has invalid markup which will not be rendered >&g

Re: Class initialization with multiple inheritance

2019-07-16 Thread Barry Scott
> On 16 Jul 2019, at 01:13, Joseph L. Casale wrote: > > I am trying to find explicit documentation on the initialization logic for a > Base class when multiple exist. For the example in the documentation at > https://docs.python.org/3/tutorial/classes.html#multiple-inheritance, > if Base1 and

Re: Counting Python threads vs C/C++ threads

2019-07-16 Thread Barry Scott
I'm going to assume you are on linux. On 16 Jul 2019, at 18:35, Dan Stromberg wrote: > > I'm looking at a performance problem in a large CPython 2.x/3.x codebase > with quite a few dependencies. > > I'm not sure what's causing the slowness yet. The CPU isn't getting hit > hard, and I/O on the

Re: Counting Python threads vs C/C++ threads

2019-07-17 Thread Barry Scott
> On 16 Jul 2019, at 20:48, Dan Stromberg wrote: > > > > On Tue, Jul 16, 2019 at 11:13 AM Barry Scott <mailto:ba...@barrys-emacs.org>> wrote: > I'm going to assume you are on linux. > Yes, I am. Ubuntu 16.04.6 LTS sometimes, Mint 19.1 other times.

Re: Embedding Python in C

2019-07-17 Thread Barry Scott
> On 17 Jul 2019, at 16:57, jesse.ibarra.1...@gmail.com wrote: > > I am using Python3.6: > > [jibarra@redsky ~]$ python3.6 > Python 3.6.8 (default, Apr 25 2019, 21:02:35) > [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux > Type "help", "copyright", "credits" or "license" for more information

Re: Embedding Python in C

2019-07-18 Thread Barry Scott
> On 17 Jul 2019, at 19:39, Jesse Ibarra wrote: > > On Wednesday, July 17, 2019 at 11:55:28 AM UTC-6, Barry Scott wrote: >>> On 17 Jul 2019, at 16:57, wrote: >>> >>> I am using Python3.6: >>> >>> [jibarra@redsky ~]$ python3.6 >&

Re: Proper shebang for python3

2019-07-21 Thread Barry Scott
> On 21 Jul 2019, at 08:29, Christian Gollwitzer wrote: > > Am 21.07.19 um 07:31 schrieb Tim Daneliuk: >> On 7/20/19 6:04 PM, Chris Angelico wrote: >>> Are you aware of every systemwide command that happens to be >>> implemented in Python, such that you won't execute any of them while >>> you

Re: PyPi twine check does not like my README.rst files anymore

2019-07-23 Thread Barry Scott
I tried the twine check on Fedora and the test pass. This looks looks like a bug in twine on Windows which I have reported in https://github.com/pypa/twine/issues/476 Barry -- https://mail.python.org/mailman/listinfo/python-list

Re: Proper shebang for python3

2019-07-24 Thread Barry Scott
> On 23 Jul 2019, at 00:13, Cameron Simpson wrote: > > Why _any_ modern system has anything other than /bin in the base install > escapes me. In the distant past /sbin and a distinct /usr with its own bin > had their values, but these days? Bah! On fedora its all in /usr these days with s

Re: Using pycurl to obtain the download speed in real-time for a huge file.

2019-08-02 Thread Barry Scott
> On 2 Aug 2019, at 08:37, Hongyi Zhao wrote: > > Hi, > > I want to use pycurl to obtain the download speed in real-time for a huge > file. Is this possible or not? Yes > Any hints on this issue? Google for python pycurl progress Barry > > Regards > -- > .: Hongyi Zhao [ hongyi.zha

Re: Application Preferences

2019-08-19 Thread Barry Scott
% that is named after your app. You should find the folder by doing a win32 API call to get the value. See getPreferencesDir() in https://github.com/barry-scott/scm-workbench/blob/master/Source/Common/wb_platform_win32_specific.py <https://github.com/barry-scott/scm-workbench/blob/master/Source

Re: Application Preferences

2019-08-20 Thread Barry Scott
> On 19 Aug 2019, at 20:37, Dennis Lee Bieber wrote: > > On Mon, 19 Aug 2019 18:01:17 +, dboland9 via Python-list > declaimed the following: > >> Wow, what happened here? I posted this to the Python discussion group as it >> is a Python question, not an SQL question. That said, I agre

Announcing Scm Workbench 0.9.3 for Git, Mercurial and Subversion

2019-09-02 Thread Barry Scott
SCM Workbench features • Support Subversion (svn), Mercurial (hg) and Git projects. • Experimental support for Perforce (P4) • Easy to learn and use • Builtin User Guide describes the operation and features of the application. • Add project wizard can scan

CVE-2019-9636 - Can this be exploit over the wire?

2019-09-04 Thread Barry Scott
I have been looking into CVE-2019-9636 and I'm not sure that python code that works in bytes is vulnerable to this. The "trick" that to make the CVE dangerous assumes that you have a unicode string with \uff03 (FULLWIDTH NUMBER SIGN') that under NFKC turns into '#'. The discussion in https://bugs

Re: CVE-2019-9636 - Can this be exploit over the wire?

2019-09-05 Thread Barry Scott
> On 5 Sep 2019, at 16:18, Random832 wrote: Thanks for taking the time to reply. > > On Wed, Sep 4, 2019, at 13:36, Barry Scott wrote: >> The conclusion I reached is that the CVE only applies to client code >> that allows a URL in unicode to be entered. >>

Re: fileinput module not yielding expected results

2019-09-07 Thread Barry Scott
> On 7 Sep 2019, at 16:33, Dan Sommers <2qdxy4rzwzuui...@potatochowder.com> > wrote: > >with fileinput ...: >for line in f: >if fileinput.isfirstline(): >headers = extract_headers(line) >else: >pass # process a non-header line

Re: WedWonder: Scripts and Modules

2019-09-12 Thread Barry Scott
> On 11 Sep 2019, at 21:24, DL Neil via Python-list > wrote: > > In this day-and-age do you have a script in live/production-use, which is > also a module? What is the justification/use case? > > (discounting distutils and similar installation tools, or unit testing > methodology) > > >

Re: Email messages from grouped email using IMAPClient in Python.

2019-09-12 Thread Barry Scott
> On 12 Sep 2019, at 06:06, Srinivas Pullabhotla wrote: > > Hello, > > I am trying to fetch email messages from a gmail inbox. So, there will be > 1000s of messages sent to Inbox and since they are 1000s, the emails are > grouped 100 per each email item. > > When I tried this method, the p

Re: regular expressions help

2019-09-20 Thread Barry Scott
When I'm debugging a regex I make the regex shorter and shorter to figure out what the problem is. Try starting with re.compile(r'm') and then add the chars one by one seeing what happens as the string gets longer. Barry > On 19 Sep 2019, at 09:41, Pradeep Patra wrote: > > I am using python 2

Re: Synchronous and Asynchronous callbacks

2019-09-29 Thread Barry Scott
> On 29 Sep 2019, at 14:14, Eko palypse wrote: > > Unfortunately, I can't make all callbacks synchronous or asynchronous because > this has negative effects on the application in one way or another. Surely you can make all callbacks async? You do not have to have them wait, they can complete

Re: pathlib

2019-09-30 Thread Barry Scott
> On 30 Sep 2019, at 05:40, DL Neil via Python-list > wrote: > > Should pathlib reflect changes it has made to the file-system? I think it should not. A Path() is the name of a file it is not the file itself. Why should it track changes in the file system for the name? Here is code to show

Re: Synchronous and Asynchronous callbacks

2019-09-30 Thread Barry Scott
> On 29 Sep 2019, at 21:41, Eko palypse wrote: > > Am Sonntag, 29. September 2019 19:18:32 UTC+2 schrieb Barry Scott: >>> On 29 Sep 2019, at 14:14, Eko palypse wrote: >>> >>> Unfortunately, I can't make all callbacks synchronous or asynchronous >

Re: pathlib

2019-09-30 Thread Barry Scott
> On 30 Sep 2019, at 09:55, Peter Otten <__pete...@web.de> wrote: > > DL Neil via Python-list wrote: > >> Should pathlib reflect changes it has made to the file-system? >> >> >> Sample code, below, shows pathlib identifying a data-file and then >> renaming it. Yet, after the rename operation

Announcing config-path an OS independent configuration file paths

2019-09-30 Thread Barry Scott
See https://pypi.org/project/config-path/ for documentation. Install using pip: python -m pip install config-path I write tools that run on macOS, Unix and Windows systems. Each operating system has its own conventions on where config files should be stored. Following the conventions is

Announcing colour-text and colour-print

2019-09-30 Thread Barry Scott
See https://pypi.org/project/colour-text/ for documentation with colourful examples. Install using pip: python -m pip install colour-text Many command line tools now colour there output to make it easier to pick out important details. I want to do the same for my commands that I tend t

Re: pathlib

2019-09-30 Thread Barry Scott
> On 30 Sep 2019, at 12:51, Dan Sommers <2qdxy4rzwzuui...@potatochowder.com> > wrote: > > On 9/30/19 4:28 AM, Barry Scott wrote: >>> On 30 Sep 2019, at 05:40, DL Neil via Python-list >>> wrote: >>> Should pathlib reflect changes it has made to th

Re: pathlib

2019-09-30 Thread Barry Scott
> On 30 Sep 2019, at 14:20, Dan Sommers <2qdxy4rzwzuui...@potatochowder.com> > wrote: > > That's the wording I read. I inferred that "path-handling operations > which don't actually access a filesystem" meant an object that didn't > necessarily represent an actual file, and that "provide meth

Re: Announcing config-path an OS independent configuration file paths

2019-09-30 Thread Barry Scott
> On 30 Sep 2019, at 14:17, Paul Moore wrote: > > How does this compare to the existing appdirs module on PyPI? > I did not know about appdirs. It does not seem to have separate read vs. save paths. Required for XDG specification where a path of config folder is defined. On 1st run the con

Re: pathlib

2019-09-30 Thread Barry Scott
> On 30 Sep 2019, at 16:49, Dan Sommers <2qdxy4rzwzuui...@potatochowder.com> > wrote: > > That's an interesting question. If you phrase the question like > that, then you're right: expecting a string to track the content > of a file is a mistake. > > In the totality of a Path object that

Re: pathlib

2019-10-02 Thread Barry Scott
> On 2 Oct 2019, at 09:14, DL Neil via Python-list > wrote: > > On 2/10/19 12:52 AM, Rhodri James wrote: >> On 01/10/2019 06:03, DL Neil via Python-list wrote: >>> On 30/09/19 9:28 PM, Barry Scott wrote: >>>>> On 30 Sep 2019, at 05

Re: pathlib

2019-10-04 Thread Barry Scott
> On 3 Oct 2019, at 13:04, Richard Damon wrote: > > I am not sure that Concrete is really the right term here, but the > beginning of the documentation for Pathlib does sort of define what it > means here: There is a need to describe three ideas. The PurePath The OS Specific PurePath's, Wind

Re: pathlib

2019-10-04 Thread Barry Scott
> On 2 Oct 2019, at 23:58, DL Neil via Python-list > wrote: > > In my mind, I'm wondering if it will come to that (having 'got past' the > original observation/issue, I'm concerned by .rename()'s silent errors, for > example). However, that 'outside' research, eg StackOverflow, shows that

Re: Get __name__ in C extension module

2019-10-06 Thread Barry Scott
> On 5 Oct 2019, at 18:55, Ian Pilcher wrote: > > On 10/4/19 4:30 PM, Ian Pilcher wrote: >> Ideally, I would pass my existing Logging.logger object into my C >> function and use PyObject_CallMethod to call the appropriate method on >> it (info, debug, etc.). > > As I've researched this furthe

Re: Get __name__ in C extension module

2019-10-07 Thread Barry Scott
> On 7 Oct 2019, at 04:34, MRAB wrote: > > On 2019-10-07 00:38, Ian Pilcher wrote: >> On 10/6/19 11:55 AM, MRAB wrote: >> > Don't you already have the module's name? You have to specify it in the > >> > PyModuleDef struct that you pass to PyModule_Create. >> >> I do. Perhaps I'm trying to b

Re: Get __name__ in C extension module

2019-10-07 Thread Barry Scott
> On 7 Oct 2019, at 00:44, Ian Pilcher wrote: > > On 10/6/19 12:55 PM, Barry Scott wrote: >> Then the answer to your question is simple. Do it in python and passt >> logger into the C++ module. > > Funny thing, that's exactly where I started this journey. I

Re: Get __name__ in C extension module

2019-10-08 Thread Barry Scott
> On 7 Oct 2019, at 00:44, Ian Pilcher wrote: > > On 10/6/19 12:55 PM, Barry Scott wrote: >> Then the answer to your question is simple. Do it in python and passt >> logger into the C++ module. > > Funny thing, that's exactly where I started this journey. I

Re: Instantiating sub-class from super

2019-10-16 Thread Barry Scott
> On 14 Oct 2019, at 21:55, DL Neil via Python-list > wrote: > > Is there a technique or pattern for taking a (partially-) populated instance > of a class, and re-creating it as an instance of one of its sub-classes? The pattern I know is to use a factory function to choose between a number

Re: Friday finking: TDD and EAFP

2019-11-05 Thread Barry Scott
> On 1 Nov 2019, at 05:40, DL Neil via Python-list > wrote: > > Is the practice of TDD fundamentally, if not philosophically, somewhat > contrary to Python's EAFP approach? > > > TDD = Test-Driven Development > EAFP = it's easier to ask forgiveness than permission > * WebRefs as footnote >

Re: Using Makefiles in Python projects

2019-11-10 Thread Barry Scott
> On 10 Nov 2019, at 00:09, Skip Montanaro wrote: > > (Sorry, not 100% sure of the credit for this quote, Vitaly, perhaps?) > If your software runs on Windows, of you think it might run on Windows in the future, maybe consider writing simple Python scripts for platform-independ

Re: How to delay until a next increment of time occurs ?

2019-11-17 Thread Barry Scott
> On 13 Nov 2019, at 22:36, Dietmar Schwertberger > wrote: > > On 13.11.2019 23:20, Dennis Lee Bieber wrote: >> For Windows it may require coding a busy-wait sleep function using the >> high-performance counter and computing a counter value (modulo?) on which >> to exit the loop. > time.perf_

Re: Launching a Script on the Linux Platform

2019-11-17 Thread Barry Scott
> On 12 Nov 2019, at 20:24, Wildman via Python-list > wrote: > > Yes, I prefer to envoke env in the shebang line instead of > depending on the path. Paths can change especially in a > multi-user system but env will always know where to find > the executable. The path to python will not chan

Re: array and struct 64-bit Linux change in behavior Python 3.7 and 2.7

2019-12-02 Thread Barry Scott
> On 2 Dec 2019, at 17:55, Rob Gaddi wrote: > > On 12/2/19 9:26 AM, Chris Clark wrote: >> Test case: >>import array >>array.array('L', [0]) >> # x.itemsize == 8 rather than 4 >> This works fine (returns 4) under Windows Python 3.7.3 64-bit build. >> Under Ubunt

Re: array and struct 64-bit Linux change in behavior Python 3.7 and 2.7

2019-12-05 Thread Barry Scott
> On 3 Dec 2019, at 01:50, Richard Damon wrote: > > On 12/2/19 4:25 PM, Barry Scott wrote: >> >>> On 2 Dec 2019, at 17:55, Rob Gaddi >>> wrote: >>> >>> On 12/2/19 9:26 AM, Chris Clark wrote: >>>> Test case: >>

Re: Zipapp can't find sqlite db

2019-12-07 Thread Barry Scott
> On 7 Dec 2019, at 10:07, dieter wrote: > > Abdur-Rahmaan Janhangeer writes: >> I'm using zipapp to include a gui + db >> >> __main__.py >> dbs/ >>file.db >> >> When packaging, the db is there. When querying through sqlalchemy, it says >> can't open db file. Help appreciated! > > I am

Re: Unicode filenames

2019-12-07 Thread Barry Scott
> On 6 Dec 2019, at 18:17, Bob van der Poel wrote: > > I have some files which came off the net with, I'm assuming, unicode > characters in the names. I have a very short program which takes the > filename and puts into an emacs buffer, and then lets me add information to > that new file (it's

Re: Setting Pythonpath programmatic

2019-12-16 Thread Barry Scott
> On 14 Dec 2019, at 16:00, Prasad Rajassekaran > wrote: > > 0 > > > Aim:- > > I would want to set python path programmatic in my project. So that, all > other directories files can be imported without any issues. > > Problem statement:- > > I used to add all the folders & sub-folders i

Re: strptime for different languages

2019-12-17 Thread Barry Scott
> On 17 Dec 2019, at 10:37, Ulrich Goebel wrote: > > Hi, > > I need to interpret a date string to get a datetime object. That should be > done with strptime from the module datetime. > > But I don't know enough about the locale settings from where the date sting > comes. Actually the date_s

Re: How to improve epoll speed when recv from kernel via netlink?

2019-12-20 Thread Barry Scott
> On 20 Dec 2019, at 04:33, lampahome wrote: > > I tried to receive msg from kernel via netlink of socket. > > And I use epoll to receive netlink events whenever it comes from kernel to > user space. > > But I found the performance is poor e.g. epoll costs 90% time of execution > time after

Re: Friday Finking: Source code organisation

2019-12-30 Thread Barry Scott
> On 28 Dec 2019, at 22:49, Chris Angelico wrote: > > On Sun, Dec 29, 2019 at 9:37 AM DL Neil via Python-list > wrote: >> >> Is it helpful to, and thus, do you have a style/convention for ordering >> the methods within each class in your code? >> >> A major difference however, is that if ou

Re: Friday Finking: Source code organisation

2019-12-30 Thread Barry Scott
> On 30 Dec 2019, at 15:35, Chris Angelico wrote: > > On Tue, Dec 31, 2019 at 1:47 AM Barry Scott wrote: >> >> >> >>> On 28 Dec 2019, at 22:49, Chris Angelico wrote: >>> >>> On Sun, Dec 29, 2019 at 9:37 AM DL Neil via Python-list >

Re: Python, Be Bold!

2020-01-02 Thread Barry Scott
> On 2 Jan 2020, at 21:17, Abdur-Rahmaan Janhangeer > wrote: > > On Fri, 3 Jan 2020, 01:05 Chris Angelico, wrote: > >> >> They are still FAR better than trying to create a single bloated >> executable that contains everything and magically knows how and when >> to update itself. >> > > P

Re: Python, Be Bold!

2020-01-03 Thread Barry Scott
> On 3 Jan 2020, at 02:31, Abdur-Rahmaan Janhangeer > wrote: > > > > On Fri, 3 Jan 2020, 02:50 Barry Scott, <mailto:ba...@barrys-emacs.org>> wrote: > Expect for trivial programs you cannot distribute a single file python exe > for windows. > > You

Re: [Python-ideas] Enhancing Zipapp

2020-01-06 Thread Barry Scott
> On 6 Jan 2020, at 19:34, Abdur-Rahmaan Janhangeer > wrote: > > Note: draft simplified Please cover the pro's and con's of the alernatives that have been raised as comments on this idea, as is usually done for a PEP style document. Also beware that zip file format does not include the enc

Re: [Python-ideas] Re: Enhancing Zipapp

2020-01-08 Thread Barry Scott
> On 8 Jan 2020, at 16:02, Christopher Barker wrote: > > On Wed, Jan 8, 2020 at 1:49 AM Abdur-Rahmaan Janhangeer > wrote: > Have a look at this write up about the horror that is zip file name handling. > > https://marcosc.com/2008/12/zip-files-and-encoding-i-hate

Re: Simple Python github library to push/pull files?

2020-01-28 Thread Barry Scott
> On 28 Jan 2020, at 16:40, Chris Angelico wrote: > > On Wed, Jan 29, 2020 at 3:38 AM Malcolm Greene wrote: >> >> Any recommendations on a library providing a simple interface to Github > for basic push/pull type of actions? I know there's a native GitHub RESTful > API but wondering if anyon

Re: Pyqt5 help

2020-02-01 Thread Barry Scott
> On 1 Feb 2020, at 12:06, Souvik Dutta wrote: > > I was making a pyqt5 project and I ran into a problem. I want a button in > one window to add a label in another window when clicked upon. But that is > not happening. Now the no. Of labels depend upon something, so I decided to > use a for lo

Re: Change in behaviour Python 3.7 > 3.8

2020-02-07 Thread Barry Scott
> On 7 Feb 2020, at 05:27, Frank Millman wrote: > > @Barry > I agree that __del__() is rarely useful, but I have not come up with an > alternative to achieve what I want to do. My app is a long-running server, > and creates many objects on-the-fly depending on user input. They should be > s

Re: datetime seems to be broken WRT timezones (even when you add them)

2020-02-11 Thread Barry Scott
> On 10 Feb 2020, at 23:01, Python wrote: > > As best I can tell, Python has no means to make use of the system's > timezone info. In order to make datetime "timezone aware", you need > to manually create a subclass of datetime.tzinfo, whose methods return > the correct values for the timezone

Re: Technical debt - was Re: datetime seems to be broken WRT timezones (even when you add them)

2020-02-11 Thread Barry Scott
> On 11 Feb 2020, at 20:01, Michael Torrie wrote: > > On 2/11/20 4:05 AM, Chris Angelico wrote: >> Or just the recognition that, eventually, technical debt has to be >> paid. > > Speaking about technical debt is certainly fashionable these days. As > if we've somehow discovered a brand new

Re: Error while installing a python code

2020-03-09 Thread Barry Scott
> On 9 Mar 2020, at 14:18, Tim Ko wrote: > > Hello, > > I am trying to install a custom Python code but ran into an error. The error > presumably associated with cython. I tried a different compiler since Intel > compiler often crashes when using cython, but couldn't get it working. > > At

Re: Lock acquisition by the same thread - deadlock protection

2020-03-10 Thread Barry Scott
> On 9 Mar 2020, at 22:53, Yonatan Goldschmidt > wrote: > > I recently debugged a program hang, eventually finding out it's a deadlock of > a single thread, > resulting from my usage of 2 libraries. One of them - call it library A - is > reentrant & runs code in > GC finalizers, while the o

Re: How does the super type present itself and do lookups?

2020-03-10 Thread Barry Scott
> On 4 Mar 2020, at 17:12, Adam Preble wrote: > > Months ago, I asked a bunch of stuff about super() and managed to fake it > well enough to move on to other things for awhile. The day of reckoning came > this week and I was forced to implement it better for my personal Python > project. I

Re: Lock acquisition by the same thread - deadlock protection

2020-03-11 Thread Barry Scott
ug. It used to be the case that using the NORMAL locks was higher performance then the ERRORCHECK or RECURSIVE locks. No idea if this is still true of that it matters for cpython. Maybe changing from NORMAL to ERRORCHECK would be a benefit. Barry > > > On Tue, Mar 10, 2020 at 5:07 PM Ba

Re: Profiler showing path dependency?

2020-03-16 Thread Barry Scott
> On 15 Mar 2020, at 21:05, Marco Sulla wrote: > > https://docs.python.org/3/library/profile.html#pstats.Stats.print_callers And also look at print_callees. Between callers and callees you can usually find some insight. Barry > > On Sat, 14 Mar 2020 at 00:54, Go Luhng wrote: > >> Consid

Re: Reduce waiting queue at supermarket from Corona with Python-Webapp

2020-03-16 Thread Barry Scott
> On 16 Mar 2020, at 17:38, Orges Leka wrote: > > Dear Python developers, > > I am a data scientist and use Python regularly. I have a question: > How difficult is it to write a Python web-app, with the following basic > functionality: > > The user writes anonymously without registration wher

Re: Reduce waiting queue at supermarket from Corona with Python-Webapp

2020-03-16 Thread Barry Scott
> On 16 Mar 2020, at 17:38, Orges Leka wrote: > > Dear Python developers, > > I am a data scientist and use Python regularly. I have a question: > How difficult is it to write a Python web-app, with the following basic > functionality: Am I right in thinking that you are wondering how to help

Re: How to fit & predict in Cat-boost Algorithm

2020-03-18 Thread Barry Scott
> On 18 Mar 2020, at 08:59, princit wrote: > > I am new in python. I am trying to predict the "time_to_failure" for given > "acoustic_data" in the test CSV file using catboost algorithm. > > > def catbostregtest(X_train, y_train): ># submission format >submission = pd.read_csv('sa

Re: Intermittent bug with asyncio and MS Edge

2020-03-21 Thread Barry Scott
> On 21 Mar 2020, at 13:43, Frank Millman wrote: > > Hi all > > I have a strange intermittent bug. > > The role-players - >asyncio on Python 3.8 running on Windows 10 >Microsoft Edge running as a browser on the same machine > > The bug does not occur with Python 3.7. > It does not o

Re: Python 3.8.2 on MacOSX Sierra?

2020-03-22 Thread Barry Scott
> On 22 Mar 2020, at 04:47, Greg Ewing wrote: > > I'm trying to compile a framework build of Python 3.8.2 on > MacOSX 10.12.6 (Sierra). I guess you are using an old Mac that will not update to something newer? > I'm getting: > > ./Modules/posixmodule.c:4696:12: warning: 'utimensat' is only

Re: Intermittent bug with asyncio and MS Edge

2020-03-22 Thread Barry Scott
> On 22 Mar 2020, at 07:56, Frank Millman wrote: > > On 2020-03-21 8:04 PM, Barry Scott wrote: >>> On 21 Mar 2020, at 13:43, Frank Millman wrote: >>> >>> Hi all >>> >>> I have a strange intermittent bug. >>> >>&g

Re: Intermittent bug with asyncio and MS Edge

2020-03-22 Thread Barry Scott
> On 22 Mar 2020, at 11:59, Frank Millman wrote: > > On 2020-03-22 1:01 PM, Chris Angelico wrote: >> On Sun, Mar 22, 2020 at 12:45 AM Frank Millman wrote: >>> >>> Hi all >>> >>> I have a strange intermittent bug. >>> >>> The role-players - >>> asyncio on Python 3.8 running on Windows

Re: Intermittent bug with asyncio and MS Edge

2020-03-22 Thread Barry Scott
> On 22 Mar 2020, at 09:41, Frank Millman wrote: > > On 2020-03-22 11:00 AM, Barry Scott wrote: >>> On 22 Mar 2020, at 07:56, Frank Millman wrote: >>> >>> On 2020-03-21 8:04 PM, Barry Scott wrote: >>>> I'd look at the netwo

Re: Intermittent bug with asyncio and MS Edge

2020-03-23 Thread Barry Scott
> On 23 Mar 2020, at 09:02, Frank Millman wrote: > > On 2020-03-22 12:11 PM, Chris Angelico wrote: >> On Sun, Mar 22, 2020 at 8:30 PM Frank Millman wrote: >>> >>> On 2020-03-22 10:45 AM, Chris Angelico wrote: >> If you can recreate the problem with a single socket and multiple >> requests, t

Re: Like c enumeration in python3

2020-03-23 Thread Barry Scott
> On 23 Mar 2020, at 11:52, Rhodri James wrote: > > On 23/03/2020 02:18, Paulo da Silva wrote: >> Hi! >> Suppose a class C. >> I want something like this: >> class C: >> KA=0 >> KB=1 >> KC=1 >> ... >> Kn=n >> def __init__ ... >> ... >> These constants

Re: Intermittent bug with asyncio and MS Edge

2020-03-24 Thread Barry Scott
> On 24 Mar 2020, at 11:54, Frank Millman wrote: > > On 2020-03-23 1:56 PM, Frank Millman wrote: >> On 2020-03-23 12:57 PM, Chris Angelico wrote: >>> On Mon, Mar 23, 2020 at 8:03 PM Frank Millman wrote: On 2020-03-22 12:11 PM, Chris Angelico wrote: > On Sun, Mar 22, 2020 at 8:3

Re: Intermittent bug with asyncio and MS Edge

2020-03-25 Thread Barry Scott
> On 25 Mar 2020, at 06:12, Frank Millman wrote: > > On 2020-03-24 8:39 PM, Barry Scott wrote: >>> On 24 Mar 2020, at 11:54, Frank Millman wrote: >>> >>> >>> I decided to concentrate on using Wireshark to detect the difference >>&g

Re: How to uninstall Python3.7 in Windows using cmd ?

2020-04-01 Thread Barry Scott
> On 30 Mar 2020, at 02:03, Dennis Lee Bieber wrote: > > On Sun, 29 Mar 2020 07:24:03 -0400, Terry Reedy > declaimed the following: > >> To clarify, the pydev/python.org installer does not use msi. I don't >> know that anyone else does. And if someone did, why do you think it >> would al

Windows python 3.8 module finder problem.

2020-04-05 Thread Barry Scott
I have code that uses the modulefinder: mf = modulefinder.ModuleFinder() mf.run_script( self.main_program ) with python 3.7 all works without problems. But python 3.8 tracebacks (TB), here is the end of the TB: File "C:\Python38.Win64\lib\modulefinder.py", line 326, in

Re: python script to give a list of prime no.

2020-04-05 Thread Barry Scott
> On 5 Apr 2020, at 14:08, Sathvik Babu Veligatla > wrote: > > On Sunday, April 5, 2020 at 6:09:04 PM UTC+5:30, Chris Angelico wrote: >> On Sun, Apr 5, 2020 at 10:26 PM Sathvik Babu Veligatla >> wrote: >>> >>> hi, >>> I am new to python, and i am trying to output the prime numbers beginning

Re: Threading module and embedded python

2020-04-15 Thread Barry Scott
> On 15 Apr 2020, at 13:30, Eko palypse wrote: > > Hi everyone, > > the following happens on Windows7 x64 and Python37 x64 > > I have a plugin DLL for a C++ application in which Python37 is embedded. > The plugin itself works, except when I want to use the threading module. > > If I start a

Re: difficulty in using the python 3.8

2020-04-15 Thread Barry Scott
> On 15 Apr 2020, at 04:07, Gloryebube wrote: > > It keeps showing these three options > >1. Modify >2. Repair >3. Uninstall > > Please what seems to be the problem As Souvk said you are running the setup program that installs python on to your system. In the Start Menu y

Helping Windows first time users

2020-04-15 Thread Barry Scott
I post some suggestion to improve the Python installer for Windows to better sign post users on the next steps. https://mail.python.org/archives/list/python-id...@python.org/message/TKHID7PMKN5TK5QDQ2BL3G45FYAJNYJX/ It also seems like we could do with drafting the text of a helpful reply to help

Re: ERROR GENERATED AFTER INSTALLING PYTHON 3.5.2 64-BIT

2020-04-15 Thread Barry Scott
> On 15 Apr 2020, at 09:28, ogunleye ayobami > wrote: > > Dear Python Team, > > After downloading and installing python on my system, error generated on > command prompt is > C:\Users\Olakunle Johnson>python > > *'python' is not recognized as an internal or external command,operable > progr

Re: Helping Windows first time users

2020-04-16 Thread Barry Scott
> On 16 Apr 2020, at 08:45, Mike Dewhirst wrote: > > On 16/04/2020 2:46 pm, DL Neil via Python-list wrote: >> On 16/04/20 3:34 PM, Dennis Lee Bieber wrote: >>> On Wed, 15 Apr 2020 19:23:43 +0100, Barry Scott >>> declaimed the following: >>> >>

Re: Threading module and embedded python

2020-04-16 Thread Barry Scott
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-dialogboxindirectparamw >>> >> >> I assume you are a C++ developer and can look at the stack of the thread. >> What is the thread doing? Is it in python code? Is it in windows code? >> >&g

Re: Detect dotted (broken) lines only in an image using OpenCV

2020-04-16 Thread Barry Scott
> On 16 Apr 2020, at 00:36, Edu Py wrote: > > I am trying to learn techniques on image feature detection. Cool. > > I have managed to detect horizontal line(unbroken/continuous), however I am > having trouble detecting all the dotted/broken lines in an image. We can help with the python s

Re: Helping Windows first time users

2020-04-16 Thread Barry Scott
> On 16 Apr 2020, at 04:34, Dennis Lee Bieber wrote: > > On Wed, 15 Apr 2020 19:23:43 +0100, Barry Scott > declaimed the following: > >> I post some suggestion to improve the Python installer for Windows >> to better sign post users on the next steps. >> &g

Re: Helping Windows first time users

2020-04-19 Thread Barry Scott
> On 18 Apr 2020, at 21:00, boB Stepp wrote: > > On Wed, Apr 15, 2020 at 2:04 PM Barry Scott wrote: >> >> I post some suggestion to improve the Python installer for Windows >> to better sign post users on the next steps. >> >> https://mail.python.or

Re: Getting a 401 from requests.get, but not when logging in via the browser.

2020-04-21 Thread Barry Scott
> On 21 Apr 2020, at 18:11, dcwhat...@gmail.com wrote: > > On Tuesday, April 21, 2020 at 12:40:25 PM UTC-4, Dieter Maurer wrote: >> dc wrote at 2020-4-20 14:48 -0700: >>> ... >>> I tried telneting the landing page, i.e. without the specific node that >>> requires the login. So e.g. >>> >>> T

Re: Getting the dependencies of a function from a library

2020-04-21 Thread Barry Scott
> On 20 Apr 2020, at 22:40, elisha hollander wrote: > > I have a python library with a function. > This function call some other functions, classes and variable from the > library (and those functions and classes call other ones, etc)... > Can I automatically create a file with all of the depe

Re: Why is a generator expression called a expression?

2020-04-21 Thread Barry Scott
> On 20 Apr 2020, at 10:29, Veek M wrote: > > On Mon, 20 Apr 2020 19:19:31 +1000, Chris Angelico wrote: > >> In the case of a genexp, the expression has a value which is a generator >> object. When you pass that to all(), it takes it and then iterates over > > but an object is NOT THE SAME a

Re: Getting a 401 from requests.get, but not when logging in via the browser.

2020-04-21 Thread Barry Scott
> On 21 Apr 2020, at 20:47, dcwhat...@gmail.com wrote: > > On Tuesday, April 21, 2020 at 3:16:51 PM UTC-4, Barry Scott wrote: >>> On 21 Apr 2020, at 18:11, dc wrote: >>> >>> On Tuesday, April 21, 2020 at 12:40:25 PM UTC-4, Dieter Maurer wrote: &g

Re: why no camelCase in PEP 8?

2020-05-19 Thread Barry Scott
> On 18 May 2020, at 22:07, Eli the Bearded <*@eli.users.panix.com> wrote: > > camelCase -> noCamelCase > snake_case -> no_snake_case > > One of those is easier to "grep" for than the other. I guess you mean that a case-sensitive grep can tell camelCase from

<    1   2   3   4   5   6   7   8   9   10   >