Re: How to catch a fatal error in Python 2.7?

2024-12-09 Thread Michael Torrie via Python-list
On 12/9/24 12:19 PM, marc nicole via Python-list wrote: > Hello, > > The fatal error exits the program with a code -1 while referencing the > memory address involved and nothing else. > > How to catch it in Python 2.7? Does the problem occur with Python 3.x? At this date,

How to catch a fatal error in Python 2.7?

2024-12-09 Thread marc nicole via Python-list
Hello, The fatal error exits the program with a code -1 while referencing the memory address involved and nothing else. How to catch it in Python 2.7? PS: please not I am not talking about exceptions but an error resulting from the disconnection of my bluetooth microphone abruptly and leading

How to break while loop based on events raised in a thread (Python 2.7)

2024-11-27 Thread marc nicole via Python-list
I am using the below class1 code to detect some event through the method check_for_the_event() # Some class1def check_for_the_event(self): thread1 = threading.Timer(2, self.check_for_the_event) thread1.start()# some processingif event is detected: self.event_ok = Trueelse: self.event_o

Re: [Tutor] How to stop a specific thread in Python 2.7?

2024-10-11 Thread Dan Ciprus (dciprus) via Python-list
Thank you for the hint ! On Fri, Oct 04, 2024 at 09:17:19AM GMT, Cameron Simpson wrote: On 03Oct2024 22:12, Dan Ciprus (dciprus) wrote: I'd be interested too :-). Untested sketch: def make_thread(target, *a, E=None, **kw): ''' Make a new Event E and Thread T, pass `[E,*a]`

Re: [Tutor] How to stop a specific thread in Python 2.7?

2024-10-03 Thread Cameron Simpson via Python-list
On 03Oct2024 22:12, Dan Ciprus (dciprus) wrote: I'd be interested too :-). Untested sketch: def make_thread(target, *a, E=None, **kw): ''' Make a new Event E and Thread T, pass `[E,*a]` as the target positional arguments. A shared preexisting Event may be

Re: [Tutor] How to stop a specific thread in Python 2.7?

2024-10-03 Thread Dan Ciprus (dciprus) via Python-list
I'd be interested too :-). On Thu, Sep 26, 2024 at 03:34:05AM GMT, marc nicole via Python-list wrote: Could you show a python code example of this? On Thu, 26 Sept 2024, 03:08 Cameron Simpson, wrote: On 25Sep2024 22:56, marc nicole wrote: >How to create a per-thread event in Py

Re: How to stop a specific thread in Python 2.7?

2024-09-26 Thread Left Right via Python-list
That's one of the "disadvantages" of threads: you cannot safely stop a thread. Of course you could try, but that's never a good idea. The reason for this is that threads share memory. They might be holding locks that, if killed, will never be unlocked. They might (partially) modify the shared state

Re: [Tutor] How to stop a specific thread in Python 2.7?

2024-09-25 Thread marc nicole via Python-list
Could you show a python code example of this? On Thu, 26 Sept 2024, 03:08 Cameron Simpson, wrote: > On 25Sep2024 22:56, marc nicole wrote: > >How to create a per-thread event in Python 2.7? > > Every time you make a Thread, make an Event. Pass it to the thread > worker funct

Re: How to stop a specific thread in Python 2.7?

2024-09-25 Thread Cameron Simpson via Python-list
On 25Sep2024 22:56, marc nicole wrote: How to create a per-thread event in Python 2.7? Every time you make a Thread, make an Event. Pass it to the thread worker function and keep it to hand for your use outside the thread. -- https://mail.python.org/mailman/listinfo/python-list

Re: How to stop a specific thread in Python 2.7?

2024-09-25 Thread marc nicole via Python-list
How to create a per-thread event in Python 2.7? On Wed, 25 Sept 2024, 22:47 Cameron Simpson via Python-list, < python-list@python.org> wrote: > On 25Sep2024 19:24, marc nicole wrote: > >I want to know how to kill a specific running thread (say by its id) > > > >for

Re: How to stop a specific thread in Python 2.7?

2024-09-25 Thread Cameron Simpson via Python-list
On 25Sep2024 19:24, marc nicole wrote: I want to know how to kill a specific running thread (say by its id) for now I run and kill a thread like the following: # start thread thread1 = threading.Thread(target= self.some_func(), args=( ...,), ) thread1.start() # kill the thread event_thread1 = t

How to stop a specific thread in Python 2.7?

2024-09-25 Thread marc nicole via Python-list
Hello guys, I want to know how to kill a specific running thread (say by its id) for now I run and kill a thread like the following: # start thread thread1 = threading.Thread(target= self.some_func(), args=( ...,), ) thread1.start() # kill the thread event_thread1 = threading.Event() event_thread

RE: [Tutor] Getting a Process.start() error pickle.PicklingError: Can't pickle : it's not found as __builtin__.module with Python 2.7

2024-09-03 Thread AVI GROSS via Python-list
as __builtin__.module with Python 2.7 On 02/09/2024 15:00, marc nicole via Python-list wrote: > Hello, > > I am using Python 2.7 on Windows 10 Others have pointed out that 2.7 is unsupported and has been for many years now. Its also inferior in most respects including its error reporting

Re: Getting a Process.start() error pickle.PicklingError: Can't pickle : it's not found as __builtin__.module with Python 2.7

2024-09-03 Thread geodandw via Python-list
On 9/2/24 11:36, Barry Scott wrote: On 2 Sep 2024, at 15:00, marc nicole via Python-list wrote: I am using Python 2.7 on Windows 10 Why? Install Python 3.12 and it will be easier to get help and support. If you have legacy that still needs porting then you can install 3.12 along side the

Re: [Tutor] Getting a Process.start() error pickle.PicklingError: Can't pickle : it's not found as __builtin__.module with Python 2.7

2024-09-03 Thread marc nicole via Python-list
reading the console DID display the messages correctly! Thanks. Le mar. 3 sept. 2024 à 10:48, Alan Gauld via Tutor a écrit : > On 02/09/2024 15:00, marc nicole via Python-list wrote: > > Hello, > > > > I am using Python 2.7 on Windows 10 > > Others have pointed out th

Re: Getting a Process.start() error pickle.PicklingError: Can't pickle : it's not found as __builtin__.module with Python 2.7

2024-09-02 Thread Barry Scott via Python-list
> On 2 Sep 2024, at 15:00, marc nicole via Python-list > wrote: > > I am using Python 2.7 on Windows 10 Why? Install Python 3.12 and it will be easier to get help and support. If you have legacy that still needs porting then you can install 3.12 along side the unsupported 3

Getting a Process.start() error pickle.PicklingError: Can't pickle : it's not found as __builtin__.module with Python 2.7

2024-09-02 Thread marc nicole via Python-list
Hello, I am using Python 2.7 on Windows 10 and I want to launch a process independently of the rest of the code so that the execution continues while the started process proceeds. I am using Process().start() from Python 2.7 as follows: from multiprocessing import Process def do_something(text

Re: [Tutor] How to install tensorflow on Python 2.7 in Windows?

2024-06-26 Thread Mats Wichmann via Python-list
On 6/26/24 09:29, marc nicole wrote: Browsing the available version of tensorflow for the dates before January 2021 (date when Python 2.7 stopped being supported) I can't find a tensorflow version for Python 2.7 that works under Windows. The reference site I use is https://pypi.org/pr

How to install tensorflow on Python 2.7 in Windows?

2024-06-26 Thread marc nicole via Python-list
Browsing the available version of tensorflow for the dates before January 2021 (date when Python 2.7 stopped being supported) I can't find a tensorflow version for Python 2.7 that works under Windows. The reference site I use is https://pypi.org/project/tensorflow/ Anybody can point

Re: Couldn't install numpy on Python 2.7

2024-06-13 Thread Ethan Furman via Python-list
Hey, everyone! I believe the original question has been answered, and tempers seem to be flaring in sub-threads, so let's call this thread done and move on to other interesting topics. Thank you for your support! -- ~Ethan~ Moderator -- https://mail.python.org/mailman/listinfo/python-list

Re: Couldn't install numpy on Python 2.7

2024-06-13 Thread Chris Green via Python-list
Chris Angelico wrote: > On Thu, 13 Jun 2024 at 10:58, wrote: > > > > Chris, > > > > You seem to have perceived an insult that I remain unaware of. > > If you're not aware that you're saying this, then don't say it. > Er, um, that really makes no sense! :-) How can one not say something that on

Re: Couldn't install numpy on Python 2.7

2024-06-12 Thread Chris Angelico via Python-list
On Thu, 13 Jun 2024 at 10:58, wrote: > > Chris, > > You seem to have perceived an insult that I remain unaware of. If you're not aware that you're saying this, then don't say it. > I looked up FUD and sharply disagree with suggestions I am trying to somehow > cause Fear, Uncertainty or Doubt. I

RE: Couldn't install numpy on Python 2.7

2024-06-12 Thread AVI GROSS via Python-list
Subject: Re: Couldn't install numpy on Python 2.7 On Thu, 13 Jun 2024 at 09:20, wrote: > My point was that version 4 COULD HAPPEN one day and I meant INCOMPATIBLE > version not 4. Obviously we can make a version 4 that is not incompatible > too. This is still FUD. Back your words

Re: Couldn't install numpy on Python 2.7

2024-06-12 Thread Chris Angelico via Python-list
On Thu, 13 Jun 2024 at 09:20, wrote: > My point was that version 4 COULD HAPPEN one day and I meant INCOMPATIBLE > version not 4. Obviously we can make a version 4 that is not incompatible > too. This is still FUD. Back your words with something, or stop trying to imply that there's another incom

RE: Couldn't install numpy on Python 2.7

2024-06-12 Thread AVI GROSS via Python-list
anyone interested in keeping them up to date. You as a user, take your chances. -Original Message- From: Python-list On Behalf Of Chris Angelico via Python-list Sent: Wednesday, June 12, 2024 5:52 PM To: python-list@python.org Subject: Re: Couldn't install numpy on Python 2.7 On Thu, 13

Re: Couldn't install numpy on Python 2.7

2024-06-12 Thread Oscar Benjamin via Python-list
On Wed, 12 Jun 2024 at 23:52, Greg Ewing via Python-list wrote: > On 13/06/24 10:09 am, Chris Angelico wrote: > > So if anyone > > actually does need to use pip with Python 2.7, they probably need to > > set up a local server > > You should also be able to download

Re: Couldn't install numpy on Python 2.7

2024-06-12 Thread Chris Angelico via Python-list
t; happened like a new version of pip running on an old version of Python > or old Python on new OS (or old PyCharm...). > > There is no problem using Python 2.7 with pip and PyPI on this Linux > machine but I guess it has a newer SSL library provided by the OS: Sadly, I would NOT be sur

Re: Couldn't install numpy on Python 2.7

2024-06-12 Thread Greg Ewing via Python-list
have done with Windows in recent times is change it in ways that nobody wants, so there is understandable resistance to upgrading even if it's possible. On 13/06/24 10:09 am, Chris Angelico wrote: > So if anyone > actually does need to use pip with Python 2.7, they probably need to >

Re: Couldn't install numpy on Python 2.7

2024-06-12 Thread Oscar Benjamin via Python-list
t; download packages safely from the current pypi server. So if anyone > actually does need to use pip with Python 2.7, they probably need to > set up a local server, using older encryption protocols (which should > therefore NOT be made accessible to the internet). Since pip can't &g

Re: Couldn't install numpy on Python 2.7

2024-06-12 Thread Chris Angelico via Python-list
ions of numpy > but with the available information so far that seems like the first > thing to consider. I think it is; AIUI, with an ancient SSL library, pip is unable to download packages safely from the current pypi server. So if anyone actually does need to use pip with Python 2.7, they p

Re: Couldn't install numpy on Python 2.7

2024-06-12 Thread Oscar Benjamin via Python-list
e OP has not replied with any explanation as to why they are using Python 2.7 and has not said whether they have any existing code that only works with Python 2.7. It is unclear at this point whether there is any reason that they shouldn't just install a newer version of Python. They are seei

Re: Couldn't install numpy on Python 2.7

2024-06-12 Thread Chris Angelico via Python-list
On Thu, 13 Jun 2024 at 07:36, wrote: > But if the goal was to deprecate python 2 and in some sense phase it out, it > is perhaps not working well for some. Frankly, issuing so many updates like > 2.7 and including backporting of new features has helped make it possible to > delay any upgrade. The

RE: Couldn't install numpy on Python 2.7

2024-06-12 Thread AVI GROSS via Python-list
: Couldn't install numpy on Python 2.7 On Thu, 13 Jun 2024 at 03:41, AVI GROSS via Python-list wrote: > > Change is hard even when it may be necessary. > > The argument often is about whether some things are necessary or not. > > Python made a decision but clearly not a unanim

Re: Couldn't install numpy on Python 2.7

2024-06-12 Thread Chris Angelico via Python-list
On Thu, 13 Jun 2024 at 06:55, Thomas Passin via Python-list wrote: > The project cannot move to a Python-3 compatible version because Jython > 3.xx doesn't exist and may never exist. The saving grace is that my > project doesn't have to use packages like numpy, scipy, and so forth. Exactly. If y

Re: Couldn't install numpy on Python 2.7

2024-06-12 Thread Thomas Passin via Python-list
one. What decision? To not release any new versions of Python 2? That isn't actually the OP's problem here - the Python interpreter runs just fine. But there's no numpy build for the OP's hardware and Python 2.7. So if you want to complain about Python 2.7 being dead, all

Re: Couldn't install numpy on Python 2.7

2024-06-12 Thread Chris Angelico via Python-list
ny new versions of Python 2? That isn't actually the OP's problem here - the Python interpreter runs just fine. But there's no numpy build for the OP's hardware and Python 2.7. So if you want to complain about Python 2.7 being dead, all you have to do is go through all of the p

RE: Couldn't install numpy on Python 2.7

2024-06-12 Thread AVI GROSS via Python-list
lf Of MRAB via Python-list Sent: Wednesday, June 12, 2024 12:56 PM To: python-list@python.org Subject: Re: Couldn't install numpy on Python 2.7 On 2024-06-12 17:31, AVI GROSS via Python-list wrote: > I am sure there is inertia to move from an older product and some people > need a reason

Re: Couldn't install numpy on Python 2.7

2024-06-12 Thread MRAB via Python-list
ars should ... Indeed... -Original Message- From: Python-list On Behalf Of Gordinator via Python-list Sent: Wednesday, June 12, 2024 10:19 AM To: python-list@python.org Subject: Re: Couldn't install numpy on Python 2.7 On 12/06/2024 12:30, marc nicole wrote: I am trying to install n

RE: Couldn't install numpy on Python 2.7

2024-06-12 Thread AVI GROSS via Python-list
... -Original Message- From: Python-list On Behalf Of Gordinator via Python-list Sent: Wednesday, June 12, 2024 10:19 AM To: python-list@python.org Subject: Re: Couldn't install numpy on Python 2.7 On 12/06/2024 12:30, marc nicole wrote: > I am trying to install numpy library o

Re: Couldn't install numpy on Python 2.7

2024-06-12 Thread Gordinator via Python-list
On 12/06/2024 12:30, marc nicole wrote: I am trying to install numpy library on Python 2.7.15 in PyCharm but the error message I get is: ERROR: Could not find a version that satisfies the requirement numpy (from versions: none) ERROR: No matching distribution found for numpy c:\python27\lib\sit

Re: Couldn't install numpy on Python 2.7

2024-06-12 Thread Chris Angelico via Python-list
On Wed, 12 Jun 2024 at 21:32, marc nicole via Python-list wrote: > > I am trying to install numpy library on Python 2.7.15 in PyCharm but the > error message I get is: > > You can upgrade to a newer version of Python to solve this. The answer is right there in the error message. ChrisA -- https

Couldn't install numpy on Python 2.7

2024-06-12 Thread marc nicole via Python-list
I am trying to install numpy library on Python 2.7.15 in PyCharm but the error message I get is: ERROR: Could not find a version that satisfies the requirement numpy (from > versions: none) > ERROR: No matching distribution found for numpy > c:\python27\lib\site-packages\pip\_vendor\urllib3\util\s

Re: upgrade of pip on my python 2.7 version

2023-09-28 Thread Thomas Passin via Python-list
at. Depending on the code you may even be able to make it work with both Python 2.7 and 3.x. Often the biggest change is to print statements: Python 2: print a, b, c Python3: print(a, b, c) If you are very unlucky, your code will depend on some package that has never been ported to P

Re: upgrade of pip on my python 2.7 version

2023-09-28 Thread Zuri Shaddai Kuchipudi via Python-list
On Wednesday, 27 September 2023 at 23:33:02 UTC+2, Chris Angelico wrote: > On Thu, 28 Sept 2023 at 07:27, Mats Wichmann via Python-list > wrote: > > > > Upgrading to Python 3 is the best answer... except when it isn't. If > > you want to convert a small project it's usually not too hard; and us

Re: upgrade of pip on my python 2.7 version

2023-09-27 Thread Chris Angelico via Python-list
On Thu, 28 Sept 2023 at 07:27, Mats Wichmann via Python-list wrote: > > Upgrading to Python 3 is the best answer... except when it isn't. If > you want to convert a small project it's usually not too hard; and using > a conversion tool can work well. Just remember that Python 2.7.18, the very la

Re: upgrade of pip on my python 2.7 version

2023-09-27 Thread Mats Wichmann via Python-list
work well. If you have libraries "not under your control" expect a lot more work. You can upgrade pip to the latest available version for Python 2.7 - will take some research, I don't know what that version might be. Or you could try this: https://bootstrap.pypa.io/pip/2.

Re: upgrade of pip on my python 2.7 version

2023-09-27 Thread Zuri Shaddai Kuchipudi via Python-list
On Wednesday, 27 September 2023 at 21:32:53 UTC+2, Mats Wichmann wrote: > On 9/27/23 05:17, Zuri Shaddai Kuchipudi via Python-list wrote: > > hello everyone this the error that im getting while trying to install and > > upgrade pip on what is the solution for it? > > > > C:\repository\pst-utils

Re: upgrade of pip on my python 2.7 version

2023-09-27 Thread Mats Wichmann via Python-list
On 9/27/23 05:17, Zuri Shaddai Kuchipudi via Python-list wrote: hello everyone this the error that im getting while trying to install and upgrade pip on what is the solution for it? C:\repository\pst-utils-pc-davinci-simulator>pip install You are using pip version 7.0.1, however version 23.2.1

Re: upgrade of pip on my python 2.7 version

2023-09-27 Thread Chris Angelico via Python-list
On Thu, 28 Sept 2023 at 01:16, Zuri Shaddai Kuchipudi via Python-list wrote: > > hello everyone this the error that im getting while trying to install and > upgrade pip on what is the solution for it? > The solution is to upgrade to Python 3. https://pip.pypa.io/en/latest/development/release-pr

Re: upgrade of pip on my python 2.7 version

2023-09-27 Thread Thomas Passin via Python-list
On 9/27/2023 7:17 AM, Zuri Shaddai Kuchipudi via Python-list wrote: hello everyone this the error that im getting while trying to install and upgrade pip on what is the solution for it? C:\repository\pst-utils-pc-davinci-simulator>pip install You are using pip version 7.0.1, however version 23.

upgrade of pip on my python 2.7 version

2023-09-27 Thread Zuri Shaddai Kuchipudi via Python-list
hello everyone this the error that im getting while trying to install and upgrade pip on what is the solution for it? C:\repository\pst-utils-pc-davinci-simulator>pip install You are using pip version 7.0.1, however version 23.2.1 is available. You should consider upgrading via the 'pip install -

Re: Python 2.7 range Function provokes a Memory Error

2023-03-06 Thread Chris Angelico
On Tue, 7 Mar 2023 at 16:53, Stephen Tucker wrote: > > Hi again, > > I tried xrange, but I got an error telling me that my integer was too big > for a C long. > > Clearly, xrange in Py2 is not capable of dealing with Python (that is, > possibly very long) integers. That's because Py2 has two diff

Re: Python 2.7 range Function provokes a Memory Error

2023-03-06 Thread Stephen Tucker
Jon Ribbens via Python-list < python-list@python.org> wrote: > On 2023-03-02, Stephen Tucker wrote: > > The range function in Python 2.7 (and yes, I know that it is now > > superseded), provokes a Memory Error when asked to deiliver a very long > > list of values. > >

Re: Python 2.7 range Function provokes a Memory Error

2023-03-02 Thread Jon Ribbens via Python-list
On 2023-03-02, Stephen Tucker wrote: > The range function in Python 2.7 (and yes, I know that it is now > superseded), provokes a Memory Error when asked to deiliver a very long > list of values. > > I assume that this is because the function produces a list which it then >

Re: Python 2.7 range Function provokes a Memory Error

2023-03-02 Thread Chris Angelico
On Thu, 2 Mar 2023 at 22:27, Stephen Tucker wrote: > > Hi, > > The range function in Python 2.7 (and yes, I know that it is now > superseded), provokes a Memory Error when asked to deiliver a very long > list of values. > > I assume that this is because the function produ

Re: Python 2.7 range Function provokes a Memory Error

2023-03-02 Thread 2QdxY4RzWzUUiLuE
On 2023-03-02 at 11:25:49 +, Stephen Tucker wrote: > The range function in Python 2.7 (and yes, I know that it is now > superseded), provokes a Memory Error when asked to deiliver a very long > list of values. > > I assume that this is because the function produces a lis

Python 2.7 range Function provokes a Memory Error

2023-03-02 Thread Stephen Tucker
Hi, The range function in Python 2.7 (and yes, I know that it is now superseded), provokes a Memory Error when asked to deiliver a very long list of values. I assume that this is because the function produces a list which it then iterates through. 1. Does the range function in Python 3.x

Re: Python 2.7 and 3.9

2021-02-18 Thread Pieter van Oostrum
Ethan Furman writes: > On 2/16/21 12:09 PM, Kevin M. Wilson via Python-list wrote: > >> My employer has hundreds of scripts in 2.7, but I'm writing new >> scripts in 3.9! I'm running into 'invalid syntax' errors.I have to >> maintain the 'Legacy' stuff, and I need to mod the path et al., to >> ex

Re: Python 2.7 and 3.9

2021-02-17 Thread J. Pic
The best would be to upgrade the scripts, did you try them with 2to3 ? It should do most of the work, if not all. https://docs.python.org/3/library/2to3.html -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 2.7 and 3.9

2021-02-17 Thread MRAB
#x27;python' is python 2.7, and 'py' calls python 3.x. Have a look at the docs to figure about what other options py.exe gives you (such as shebang lines) Docs: https://docs.python.org/3/using/windows.html#python-launcher-for-windows PEP: https://www.python.org/dev/peps/pep-039

Re: Python 2.7 and 3.9

2021-02-17 Thread Thomas Jollans
er is always installed with recent versions of Python on Windows. You could set up the PATH such that 'python' is python 2.7, and 'py' calls python 3.x. Have a look at the docs to figure about what other options py.exe gives you (such as shebang lines) Docs: https:

Re: Python 2.7 and 3.9

2021-02-16 Thread Richard Damon
On 2/16/21 4:16 PM, Ethan Furman wrote: > Kevin, please reply to the list (preferably Reply-to-list, or > Reply-all), that way others can chime in with help. > > On 2/16/21 12:55 PM, Kevin M. Wilson wrote: > >> Windows 7 OS, and typically run in conjunction with testing SSD', as >> for stand alone

Re: Python 2.7 and 3.9

2021-02-16 Thread Ethan Furman
Kevin, please reply to the list (preferably Reply-to-list, or Reply-all), that way others can chime in with help. On 2/16/21 12:55 PM, Kevin M. Wilson wrote: Windows 7 OS, and typically run in conjunction with testing SSD', as for stand alone scripts. Those require: python BogusFile.py. I too

Re: Python 2.7 and 3.9

2021-02-16 Thread Ethan Furman
On 2/16/21 12:09 PM, Kevin M. Wilson via Python-list wrote: My employer has hundreds of scripts in 2.7, but I'm writing new scripts in 3.9! I'm running into 'invalid syntax' errors.I have to maintain the 'Legacy' stuff, and I need to mod the path et al., to execute 3.7 w/o doing damage to the

Python 2.7 and 3.9

2021-02-16 Thread Kevin M. Wilson via Python-list
My employer has hundreds of scripts in 2.7, but I'm writing new scripts in 3.9! I'm running into 'invalid syntax' errors.I have to maintain the 'Legacy' stuff, and I need to mod the path et al., to execute 3.7 w/o doing damage to the 'Legacy' stuff...IDEA' are Welcome! KMW John 1:4  "In him was

Re: Installing Python (2.7) 'by hand' on Ubuntu - possible?

2020-12-23 Thread Chris Green
Mirko wrote: > On 22.12.2020 at 20:24 Chris Green wrote: > > > Yes, I do have the Python source. The only thing I don't have the > > source for is a .so file and that's why I can't simply migrate the > > program(s) from Python 2 to Python 3. > > > > If it's just one .so and that library is com

Re: Installing Python (2.7) 'by hand' on Ubuntu - possible?

2020-12-22 Thread Mirko via Python-list
On 22.12.2020 at 20:24 Chris Green wrote: > Yes, I do have the Python source. The only thing I don't have the > source for is a .so file and that's why I can't simply migrate the > program(s) from Python 2 to Python 3. > If it's just one .so and that library is compatible with basic libs such a

Re: Installing Python (2.7) 'by hand' on Ubuntu - possible?

2020-12-22 Thread Grant Edwards
On 2020-12-22, Chris Green wrote: > Grant Edwards wrote: > >> I should have mentioned that bundlers like cx_freeze require that you >> have the Python source for the main app. I don't remember if you >> mentioned source or not... > > Yes, I do have the Python source. The only thing I don't have

Re: Installing Python (2.7) 'by hand' on Ubuntu - possible?

2020-12-22 Thread Chris Green
Grant Edwards wrote: > On 2020-12-22, Chris Green wrote: > > Grant Edwards wrote: > >> On 2020-12-22, Chris Green wrote: > >> > [...] > >> > > >> > How realistic/possible would it be to run the utility in a separate > >> > environment with its own copies of Python2 and any modules and > >> > li

Re: Installing Python (2.7) 'by hand' on Ubuntu - possible?

2020-12-22 Thread Grant Edwards
On 2020-12-22, Chris Green wrote: > Grant Edwards wrote: >> On 2020-12-22, Chris Green wrote: >> > [...] >> > >> > How realistic/possible would it be to run the utility in a separate >> > environment with its own copies of Python2 and any modules and >> > libraries needed? I would install these

Re: Installing Python (2.7) 'by hand' on Ubuntu - possible?

2020-12-22 Thread Chris Green
Grant Edwards wrote: > On 2020-12-22, Chris Green wrote: > > [...] > > > > How realistic/possible would it be to run the utility in a separate > > environment with its own copies of Python2 and any modules and > > libraries needed? I would install these 'by hand', i.e. not using > > 'apt' so the

Re: Installing Python (2.7) 'by hand' on Ubuntu - possible?

2020-12-22 Thread Chris Angelico
for converting it to Python 3 so now I'm looking at how to keep it > working on my [x]ubuntu Linux systems as Python 2.7 becomes unsupported. > > How realistic/possible would it be to run the utility in a separate > environment with its own copies of Python2 and any modules and >

Re: Installing Python (2.7) 'by hand' on Ubuntu - possible?

2020-12-22 Thread Grant Edwards
On 2020-12-22, Chris Green wrote: > [...] > > How realistic/possible would it be to run the utility in a separate > environment with its own copies of Python2 and any modules and > libraries needed? I would install these 'by hand', i.e. not using > 'apt' so they would stay as installed even as my

Re: Installing Python (2.7) 'by hand' on Ubuntu - possible?

2020-12-22 Thread Michael Torrie
On 12/22/20 9:44 AM, Chris Green wrote: > I have it running on 20.04 (with a couple of compatibility packages > from a PPA) but I know I start hitting problems as soon as I move to > 20.10. So that does sound like an excellent idea. Where can I find > information about building container type thi

Re: Installing Python (2.7) 'by hand' on Ubuntu - possible?

2020-12-22 Thread Chris Green
the possibilities > > for converting it to Python 3 so now I'm looking at how to keep it > > working on my [x]ubuntu Linux systems as Python 2.7 becomes unsupported. > > > > How realistic/possible would it be to run the utility in a separate > > environment wit

Re: Installing Python (2.7) 'by hand' on Ubuntu - possible?

2020-12-22 Thread Grant Edwards
thon 3 so now I'm looking at how to keep it > working on my [x]ubuntu Linux systems as Python 2.7 becomes unsupported. > > How realistic/possible would it be to run the utility in a separate > environment with its own copies of Python2 and any modules and > libraries needed? That

Re: Installing Python (2.7) 'by hand' on Ubuntu - possible?

2020-12-22 Thread Michael Torrie
o Python 3 so now I'm looking at how to keep it > working on my [x]ubuntu Linux systems as Python 2.7 becomes unsupported. > > How realistic/possible would it be to run the utility in a separate > environment with its own copies of Python2 and any modules and > libraries needed?

Installing Python (2.7) 'by hand' on Ubuntu - possible?

2020-12-22 Thread Chris Green
g on my [x]ubuntu Linux systems as Python 2.7 becomes unsupported. How realistic/possible would it be to run the utility in a separate environment with its own copies of Python2 and any modules and libraries needed? I would install these 'by hand', i.e. not using 'apt' so they w

Re: How to write differently to remove this type hint in Python 2.7?

2020-10-21 Thread Mats Wichmann
On 10/21/20 3:24 PM, Shaozhong SHI wrote: > Is there another way to do this? > > def greet(name: str) -> str: > return "Hello, " + name > greet > > File "", line 1 def greet(name: str) -> str: > ^ SyntaxError: invalid syntax > The hinting pep PEP (484) has an alternate syntax that doesn't b

Re: How to write differently to remove this type hint in Python 2.7?

2020-10-21 Thread Chris Angelico
On Thu, Oct 22, 2020 at 8:26 AM Shaozhong SHI wrote: > > Is there another way to do this? > > def greet(name: str) -> str: > return "Hello, " + name > greet > > File "", line 1 def greet(name: str) -> str: > ^ SyntaxError: invalid syntax If you need to support Python 2, don't use annotations.

How to write differently to remove this type hint in Python 2.7?

2020-10-21 Thread Shaozhong SHI
Is there another way to do this? def greet(name: str) -> str: return "Hello, " + name greet File "", line 1 def greet(name: str) -> str: ^ SyntaxError: invalid syntax -- https://mail.python.org/mailman/listinfo/python-list

Re: ubuntu python 2.7 variations

2019-07-29 Thread Robin Becker
On 29/07/2019 12:33, Chris Angelico wrote: . Should I always be using self build python versions? If you want to maintain your own Python, then by all means, go ahead. I don't maintain my own Python 2.7, but I have a number of Python 3.x builds, since Debian Stretch doesn't

Re: ubuntu python 2.7 variations

2019-07-29 Thread Chris Angelico
lf build python versions? If you want to maintain your own Python, then by all means, go ahead. I don't maintain my own Python 2.7, but I have a number of Python 3.x builds, since Debian Stretch doesn't ship with anything newer than 3.5. > It seems that ubuntu feels able to provide pa

ubuntu python 2.7 variations

2019-07-29 Thread Robin Becker
I help maintain apps on a number of machines and recently a bug surfaced which affected some of them using the preppy template module; the bug ended up being the way tokenize worked as in the following # from StringIO import StringIO import tokenize, token L = [] s='

Re: What is your experience porting Python 2.7.x scripts to Python 3.x?

2019-01-27 Thread sjmsoft
lready had 2.7, particularly Registry settings that wound up being wrong. The problems seemed to occur erratically, so YMMV. After some trial and error, we chose to leave Python 2.7 installed and install Python launcher for Windows (PyLauncher), to allow for easy fallback (which we never had

Re: What is your experience porting Python 2.7.x scripts to Python 3.x?

2019-01-24 Thread Tim Chase
On 2019-01-22 19:20, Grant Edwards wrote: > > For anyone who has moved a substantial bunch of Python 2 to Python > > 3, can you please reply with your experience? > > If you used bytes (or raw binary strings) at all (e.g. for doing > things like network or serial protocols) you're in for a lot o

Re: What is your experience porting Python 2.7.x scripts to Python 3.x?

2019-01-24 Thread Pete Forman
Robin Becker writes: > On 22/01/2019 19:00, Schachner, Joseph wrote: > .. >> For anyone who has moved a substantial bunch of Python 2 to Python 3, >> can you please reply with your experience? Did you run into any >> issues? Did 2to3 do its job well, or did you have to review its >> outpu

Re: What is your experience porting Python 2.7.x scripts to Python 3.x?

2019-01-24 Thread Robin Becker
On 23/01/2019 21:51, Ian Kelly wrote: On Wed, Jan 23, 2019 at 1:36 PM Stefan Behnel wrote: . All right, but apart from absolute imports, the print function, and true division, what has Python 3.x ever done for us? *ducks* headaches :) -- Robin Becker -- https://mail.python.org/m

Re: What is your experience porting Python 2.7.x scripts to Python 3.x?

2019-01-24 Thread Robin Becker
On 22/01/2019 19:00, Schachner, Joseph wrote: .. For anyone who has moved a substantial bunch of Python 2 to Python 3, can you please reply with your experience? Did you run into any issues? Did 2to3 do its job well, or did you have to review its output to eliminate some working b

Re: What is your experience porting Python 2.7.x scripts to Python 3.x?

2019-01-23 Thread Ian Kelly
On Wed, Jan 23, 2019 at 1:36 PM Stefan Behnel wrote: > > Cameron Simpson schrieb am 23.01.19 um 00:21: > > from __future__ import absolute_imports, print_function > > > > gets you a long way. > > ... and: division. All right, but apart from absolute imports, the print function, and true division

Re: What is your experience porting Python 2.7.x scripts to Python 3.x?

2019-01-23 Thread Stefan Behnel
Cameron Simpson schrieb am 23.01.19 um 00:21: >  from __future__ import absolute_imports, print_function > > gets you a long way. ... and: division. Stefan -- https://mail.python.org/mailman/listinfo/python-list

Re: What is your experience porting Python 2.7.x scripts to Python 3.x?

2019-01-23 Thread Cameron Simpson
On 23Jan2019 14:15, Grant Edwards wrote: On 2019-01-22, Cameron Simpson wrote: On 22Jan2019 19:20, Grant Edwards wrote: On 2019-01-22, Schachner, Joseph wrote: For anyone who has moved a substantial bunch of Python 2 to Python 3, can you please reply with your experience? If you used byt

Re: What is your experience porting Python 2.7.x scripts to Python 3.x?

2019-01-23 Thread Grant Edwards
On 2019-01-22, Cameron Simpson wrote: > On 22Jan2019 19:20, Grant Edwards wrote: >>On 2019-01-22, Schachner, Joseph wrote: >>> For anyone who has moved a substantial bunch of Python 2 to Python >>> 3, can you please reply with your experience? >> >>If you used bytes (or raw binary strings) at al

Re: What is your experience porting Python 2.7.x scripts to Python 3.x?

2019-01-22 Thread Chris Angelico
On Wed, Jan 23, 2019 at 6:10 PM dieter wrote: > > Did 2to3 do its job well > > I have not used "2to3" -- because I doubt, that it can handle > important cases, i.e. when a Python 2 "str" must become a Python 3 bytes > or when a "dict.{keys, values, items}" must be listified. Have you tried? It e

Re: What is your experience porting Python 2.7.x scripts to Python 3.x?

2019-01-22 Thread dieter
"Schachner, Joseph" writes: > ... > For anyone who has moved a substantial bunch of Python 2 to Python 3, can > you please reply with your experience? It can be simple and it can be difficult. I have found "http://python-future.org/compatible_idioms.html"; especially useful. > Did you run in

Re: What is your experience porting Python 2.7.x scripts to Python 3.x?

2019-01-22 Thread Cameron Simpson
On 22Jan2019 19:20, Grant Edwards wrote: On 2019-01-22, Schachner, Joseph wrote: For anyone who has moved a substantial bunch of Python 2 to Python 3, can you please reply with your experience? If you used bytes (or raw binary strings) at all (e.g. for doing things like network or serial pro

Re: What is your experience porting Python 2.7.x scripts to Python 3.x?

2019-01-22 Thread Chris Angelico
On Wed, Jan 23, 2019 at 9:43 AM Akkana Peck wrote: > > Grant Edwards writes: > > On 2019-01-22, Schachner, Joseph wrote: > > > > > For anyone who has moved a substantial bunch of Python 2 to Python > > > 3, can you please reply with your experience? > > > > If you used bytes (or raw binary string

Re: What is your experience porting Python 2.7.x scripts to Python 3.x?

2019-01-22 Thread Akkana Peck
Grant Edwards writes: > On 2019-01-22, Schachner, Joseph wrote: > > > For anyone who has moved a substantial bunch of Python 2 to Python > > 3, can you please reply with your experience? > > If you used bytes (or raw binary strings) at all (e.g. for doing > things like network or serial protocol

Re: What is your experience porting Python 2.7.x scripts to Python 3.x?

2019-01-22 Thread Grant Edwards
On 2019-01-22, Schachner, Joseph wrote: > For anyone who has moved a substantial bunch of Python 2 to Python > 3, can you please reply with your experience? If you used bytes (or raw binary strings) at all (e.g. for doing things like network or serial protocols) you're in for a lot of pain. Eve

What is your experience porting Python 2.7.x scripts to Python 3.x?

2019-01-22 Thread Schachner, Joseph
In the company I work for we have a program (free) that runs scripts (that we sell) to test according to particular standards. The program embeds a Python interpreter, and the scripts are Python (which uses functions revealed to Python from within the program). Well, this year must be time ...

  1   2   3   4   5   6   7   8   9   >