Re: python documentation
On Fri, Mar 26, 2021 at 10:37 PM Chris Angelico wrote: > On Sat, Mar 27, 2021 at 4:20 PM wrote: > > By the way, some months ago I started trying to migrate to Python 3 and > > gave up in favor of creating said compilation. Compatibility of Python > > and its Packages decreased with V3 significantly. A whole lot of minor > > and major incompatibilities between your subversions and belonging > > packages. This was one reason, why Java took the route to its own death. > > FUD. Lots and lots of FUD. More reasons to not promote your > distribution. Use it if you will, but it doesn't merit any further > visibility. > Chris, not everything you dislike is anti-Python FUD. Dominik, if you want something like Python 2.7, you likely should try Tauthon or Pypy2. Don't expect pip to work well on Tauthon; last I heard that was not happening. Also Pypy2 has some issues with C extension modules, and I'm not confident it'll pip well either. It's very worthwhile to move to 3.x, but CPython has a rather sad compatibility story when it comes to C extension modules; hopefully CFFI is going to fix that in the long term. If you're avoiding porting pure Python code, then that feels to me a bit like foot dragging, as the pure Python changes are not that big and are pretty much limited to the 2.7 -> 3.0 transition. I like to build versions of Python from 0.9 to 3.10alpha, for the sake of quickly ascertaining what features were introduced in what versions of CPython. IOW, there are good reasons to keep around old Pythons. Python history is interesting. -- https://mail.python.org/mailman/listinfo/python-list
Re: python documentation
On Sat, Mar 27, 2021 at 4:20 PM wrote: > > Chris, > > you seem to imply, that I have compiled said versions without reason and > that the same would be possible on basis of Python 3 - which is simply > not true. Maybe you are not enough acquainted with Qt and belonging > libraries alike PyQtGraph. Maybe you are just not willing to see / > accept these arguments. > > By the way, some months ago I started trying to migrate to Python 3 and > gave up in favor of creating said compilation. Compatibility of Python > and its Packages decreased with V3 significantly. A whole lot of minor > and major incompatibilities between your subversions and belonging > packages. This was one reason, why Java took the route to its own death. FUD. Lots and lots of FUD. More reasons to not promote your distribution. Use it if you will, but it doesn't merit any further visibility. > With a view to the mid and long term future, this discussion even gives > me cause to ponder about whether it doesn't make more sense to rely more > on C# and WinForms for professional projects from now on. I am fluent in > both too and it always makes sense to bet on the right horse at an early > stage. If you prefer, go for it. Everyone claims that it's easier to move to rather than to migrate to Python 3, and I'm calling people's bluffs now. Go ahead and move to another language if it's easier - it's no skin off my nose. Or maybe it isn't easier, and that's just an empty argument. Funny how it keeps coming up. ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Re: python documentation
Chris, you seem to imply, that I have compiled said versions without reason and that the same would be possible on basis of Python 3 - which is simply not true. Maybe you are not enough acquainted with Qt and belonging libraries alike PyQtGraph. Maybe you are just not willing to see / accept these arguments. By the way, some months ago I started trying to migrate to Python 3 and gave up in favor of creating said compilation. Compatibility of Python and its Packages decreased with V3 significantly. A whole lot of minor and major incompatibilities between your subversions and belonging packages. This was one reason, why Java took the route to its own death. With a view to the mid and long term future, this discussion even gives me cause to ponder about whether it doesn't make more sense to rely more on C# and WinForms for professional projects from now on. I am fluent in both too and it always makes sense to bet on the right horse at an early stage. But to be honest, I see no reason to discuss that further, you seem to be quite determined - so be it. Ignore Blythooon. I have no disadvantage by that, as I would not have an advantage the other way round, so I am fine with it. Best Regards Dominik On 2021-03-27 04:44, Chris Angelico wrote: On Sat, Mar 27, 2021 at 2:15 PM wrote: No, I am not encouraging, I am just offering the possibility. Python and its community once was not dogmatic. At least this was my impression when I started - after all Python originally had been designed to be multi paradigmatic. This spirit of freedom was one mayor reason for Python to grow so fast - from my POV. But freedom is constituted by freedom of choice. It might be a good thing to recommend people to switch to Python 3.*, it might be a bad idea to FORCE people to do so by taking away the possibility to install Python 2.7.*; some people tend to react badly when infantilised. Why do you install 2.7.18? Isn't it a bad idea to FORCE people onto that particular version, instead of letting them run 2.7.9 or 2.7.1 if they choose? Does it infringe on their freedoms by offering only one version? If people want a specific version, they can get it. There's no reason to promote the use of outdated versions. If I am right, the Python 2.7.* installers still are provided on the python.org website. So long as this is done, I cannot see a reason not to list a 'distribution' using Python 2.7.* in said list, right? You have a pre-1.0 distribution of an end-of-life version of Python that works on a very specific platform. That's fine. But there's no reason to have it promoted anywhere. By the way, there is more, Blythooon offers beyond what I already have written in the last email. Otherwise please name me another comparable MINIMAL 'distribution', which is compiled specifically for scientific FRONTend development? In terms of diversity I also cannot see, why Blythooon MUST have something special to be listed? Is it not enough, that it is another one? Nope, not enough for it to be promoted. The page you linked to originally is a very short list of only those which are notable enough to be worth promoting. And from what I'm seeing, yours isn't. Move to Python 3 and leave the old version behind. It has been a year since Python 2 received any updates at all, and over a decade since 2.7 was originally released. Isn't it time it was finally permitted to rest in peace? ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Re: python documentation
On 2021-03-27 03:44, Chris Angelico wrote: On Sat, Mar 27, 2021 at 2:15 PM wrote: [snip] By the way, there is more, Blythooon offers beyond what I already have written in the last email. Otherwise please name me another comparable MINIMAL 'distribution', which is compiled specifically for scientific FRONTend development? In terms of diversity I also cannot see, why Blythooon MUST have something special to be listed? Is it not enough, that it is another one? Nope, not enough for it to be promoted. The page you linked to originally is a very short list of only those which are notable enough to be worth promoting. And from what I'm seeing, yours isn't. Move to Python 3 and leave the old version behind. It has been a year since Python 2 received any updates at all, and over a decade since 2.7 was originally released. Isn't it time it was finally permitted to rest in peace? It's not dead; it's just pining for the fjords. :-) -- https://mail.python.org/mailman/listinfo/python-list
Re: python documentation
On Sat, Mar 27, 2021 at 2:15 PM wrote: > > No, I am not encouraging, I am just offering the possibility. > > Python and its community once was not dogmatic. At least this was my > impression when I started - after all Python originally had been > designed to be multi paradigmatic. This spirit of freedom was one mayor > reason for Python to grow so fast - from my POV. > > But freedom is constituted by freedom of choice. > > It might be a good thing to recommend people to switch to Python 3.*, it > might be a bad idea to FORCE people to do so by taking away the > possibility to install Python 2.7.*; some people tend to react badly > when infantilised. Why do you install 2.7.18? Isn't it a bad idea to FORCE people onto that particular version, instead of letting them run 2.7.9 or 2.7.1 if they choose? Does it infringe on their freedoms by offering only one version? If people want a specific version, they can get it. There's no reason to promote the use of outdated versions. > If I am right, the Python 2.7.* installers still are provided on the > python.org website. So long as this is done, I cannot see a reason not > to list a 'distribution' using Python 2.7.* in said list, right? You have a pre-1.0 distribution of an end-of-life version of Python that works on a very specific platform. That's fine. But there's no reason to have it promoted anywhere. > By the way, there is more, Blythooon offers beyond what I already have > written in the last email. Otherwise please name me another comparable > MINIMAL 'distribution', which is compiled specifically for scientific > FRONTend development? In terms of diversity I also cannot see, why > Blythooon MUST have something special to be listed? Is it not enough, > that it is another one? > Nope, not enough for it to be promoted. The page you linked to originally is a very short list of only those which are notable enough to be worth promoting. And from what I'm seeing, yours isn't. Move to Python 3 and leave the old version behind. It has been a year since Python 2 received any updates at all, and over a decade since 2.7 was originally released. Isn't it time it was finally permitted to rest in peace? ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Re: python documentation
No, I am not encouraging, I am just offering the possibility. Python and its community once was not dogmatic. At least this was my impression when I started - after all Python originally had been designed to be multi paradigmatic. This spirit of freedom was one mayor reason for Python to grow so fast - from my POV. But freedom is constituted by freedom of choice. It might be a good thing to recommend people to switch to Python 3.*, it might be a bad idea to FORCE people to do so by taking away the possibility to install Python 2.7.*; some people tend to react badly when infantilised. If I am right, the Python 2.7.* installers still are provided on the python.org website. So long as this is done, I cannot see a reason not to list a 'distribution' using Python 2.7.* in said list, right? By the way, there is more, Blythooon offers beyond what I already have written in the last email. Otherwise please name me another comparable MINIMAL 'distribution', which is compiled specifically for scientific FRONTend development? In terms of diversity I also cannot see, why Blythooon MUST have something special to be listed? Is it not enough, that it is another one? But, in the end, this naturally is not my decision. Cheers, Dominik On 2021-03-26 22:57, Chris Angelico wrote: On Sat, Mar 27, 2021 at 7:49 AM wrote: Hi Chris, thank you for your interest and thanks for asking. Blythooon is notable due to several reasons; let's compare it with some of the already listed (and thus obviously notable) 'distributions': 2) winpython seems not to support Python 2.7.* anymore. Blythooon supports Python 2.7.18. Ah. That is indeed notable, but not in a good way. You are encouraging the use of an end-of-life version of Python, and your installer has very little to boast beyond that. ChrisA -- https://mail.python.org/mailman/listinfo/python-list
RE: convert script awk in python
https://docs.python.org/3/library/fileinput.html Dan, Yes, fileinput sounds like what I described and more. It does indeed seem to emulate the interface in programs like AWK including using "-" as a placeholder for standard input. Now all you need is to have it also do the split! ∀vi ∃. Grθß -Original Message- From: Python-list On Behalf Of 2qdxy4rzwzuui...@potatochowder.com Sent: Friday, March 26, 2021 9:43 PM To: python-list@python.org Subject: Re: convert script awk in python On 2021-03-26 at 21:06:19 -0400, Avi Gross via Python-list wrote: > A generator that opens one file at a time (or STDIN) in a consistent > manner, would be a reasonable thing to have as part of emulating AWK. https://docs.python.org/3/library/fileinput.html -- https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list
Re: convert script awk in python
On 2021-03-26 at 21:06:19 -0400, Avi Gross via Python-list wrote: > A generator that opens one file at a time (or STDIN) in a consistent > manner, would be a reasonable thing to have as part of emulating AWK. https://docs.python.org/3/library/fileinput.html -- https://mail.python.org/mailman/listinfo/python-list
RE: convert script awk in python
Michael, A generator that opens one file at a time (or STDIN) in a consistent manner, would be a reasonable thing to have as part of emulating AWK. As I see it, you may want a bit more that includes having it know how to parse each line it reads into some version of names that in Python might not be $1 and $2 types of names but may be an array of strings with the complete line perhaps being in array[0] and each of the parts. Clearly you would place whatever equivalent BEGIN statements in your code above the call to the generator then have something like a for loop assigning the result of the generator to a variable and your multiple condition/action parts in the loop. You then have the END outside the loop. But it is far from as simple as that to emulate what AWK does such as deciding whether you stop matching patterns once the first match is found and executed. As I noted, some AWK features do not line up with normal python such as assuming variables not initialized are zero or "" depending on context. There may well be scoping issues and other things to consider. And clearly you need to do things by hand if you want a character string to be treated as an integer, ... But all fairly doable, albeit not sure an easy translation between an AWK script into python is trivial, or even a good idea. You could do a similar concept with other utilities like sed or grep or other such filter utilities where the same generator, or a variant, might automate things. I am pretty sure some module or other has done things like this. It is common in a language like PERL to do something like this: while(<>) { # get rid of the pesky newline character chomp; # read the fields in the current record into an array @fields = split(':', $_); # DO stuff } The <> diamond operator is a sort of generator that reads in a line at a time from as many files as needed and sticks it in $_ by default and then you throw away the newline and split the line and then do what you wish after that. No reason python cannot have something similar, maybe more wordy. Disclaimer: I am not suggesting people use AWK or PERL or anything else. The focus is if people come from other programming environments and are looking at how to do common tasks in python. -Original Message- From: Python-list On Behalf Of Michael Torrie Sent: Friday, March 26, 2021 8:32 PM To: python-list@python.org Subject: Re: convert script awk in python On 3/25/21 1:14 AM, Loris Bennett wrote: > Does any one have a better approach? Not as such. Running a command and parsing its output is a relatively common task. Years ago I wrote my own simple python wrapper function that would make it easier to run a program with arguments, and capture its output. I ended up using that wrapper many times, which saved a lot of time. When it comes to converting a bash pipeline process to Python, it's worth considering that most of pipelines seem to involve parsing using sed or awk (as yours do), which is way easier to do from python without that kind of pipelining. However there is a fantastic article I read years ago about how generators are python's equivalent to a pipe. Anyone wanting to replace a bash script with python should read this: https://www.dabeaz.com/generators/Generators.pdf Also there's an interesting shell scripting language based on Python called xonsh which makes it much easier to interact with processes like bash does, but still leveraging Python to process the output. https://xon.sh/ . -- https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list
Re: convert script awk in python
On 3/25/21 1:14 AM, Loris Bennett wrote: > Does any one have a better approach? Not as such. Running a command and parsing its output is a relatively common task. Years ago I wrote my own simple python wrapper function that would make it easier to run a program with arguments, and capture its output. I ended up using that wrapper many times, which saved a lot of time. When it comes to converting a bash pipeline process to Python, it's worth considering that most of pipelines seem to involve parsing using sed or awk (as yours do), which is way easier to do from python without that kind of pipelining. However there is a fantastic article I read years ago about how generators are python's equivalent to a pipe. Anyone wanting to replace a bash script with python should read this: https://www.dabeaz.com/generators/Generators.pdf Also there's an interesting shell scripting language based on Python called xonsh which makes it much easier to interact with processes like bash does, but still leveraging Python to process the output. https://xon.sh/ . -- https://mail.python.org/mailman/listinfo/python-list
Re: python documentation
On Sat, Mar 27, 2021 at 7:49 AM wrote: > > Hi Chris, > > > thank you for your interest and thanks for asking. > > > Blythooon is notable due to several reasons; let's compare it with some > of the already listed (and thus obviously notable) 'distributions': > > 2) winpython seems not to support Python 2.7.* anymore. > > Blythooon supports Python 2.7.18. > Ah. That is indeed notable, but not in a good way. You are encouraging the use of an end-of-life version of Python, and your installer has very little to boast beyond that. ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Re: python documentation - addendum
Sorry, copy & paste obviously failed, here is the link I wanted to include: https://www.anaconda.com/terms-of-service On 2021-03-26 17:33, Chris Angelico wrote: On Sat, Mar 27, 2021 at 3:31 AM wrote: Howdy Folks, I would like to suggest adding "Blythooon" to the list under "Other parties have re-packaged CPython" listed here: What makes it notable? ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Re: python documentation
Hi Chris, thank you for your interest and thanks for asking. Blythooon is notable due to several reasons; let's compare it with some of the already listed (and thus obviously notable) 'distributions': 1) pythonxy seems not to be maintained anymore - the last version I found is from 2015. Blythooon is still maintained and the last version is from February 2021. 2) winpython seems not to support Python 2.7.* anymore. Blythooon supports Python 2.7.18. 3) When using Anaconda Python you might not only have to respect the anaconda/miniconda licenses but also the terms of service of the belonging website. For commercial uses that might pose some problems. If you have a peek into the text: https://www.python.org/download/alternatives/ You may find statements alike "we are not granting you permission to use the Repository for commercial activities" or "Your use of the Repository is at the sole discretion of Anaconda, which may deny you further use of the Repository or terminate this license at any time, for any reason, with or without cause." there... Companies tend to have problems with this :) Blythooon is a netinstaller which downloads from python.org and pypi.org. No comparable limitations are known to me for these sources. 4) Blythooon is not a distribution in the original sense; it is a netinstaller, which is able to download, (md5-)check and install a 'snapshot' of packages/versions: - Python 2.7.18 - Virtualenv 20.2.2 - PySide 1.2.2 - NumPy 1.16.6 - PyQtGraph 0.10.0 - Matplotlib 2.2.5 - SciPy 1.1.0 - PySerial 3.5 - Pyadaaah 0.90 and some further packages supporting said ones. This compilation has been carefully assembled to allow the development of advanced, production quality, scientific, Python 2.7 applications with Qt 4.8 based GUIs and the ability to display nice (live) plots (via PyQtGraph and/or Matplotlib). Blythooon obviously comes with some mathematical stuff alike NumPy or SciPy too. Said versions work together well. The developer does not need to find out, which versions work together well. Because that is not easy. Try e.g. PyQtGraph 0.11.* with PySide 1.2.* - you might be disappointed then, as well as if you would be trying PyQtGraph 0.10.* with PySide 1.2.4. All Blythooon installations, if not manually modified, are 100% compatible, as I said, it is more a 'snapshot' then a permanently self-updating distribution... Blythooon does not focus on up-to-dateness but on proven stability and compatibility. But, as Blythooon sets up a Python Runtime Environment just based on PIP, the developer naturally can tailor his installation further (e.g. by installing further packages or upgrading the existing). Blythooon is a (nearly fully) automatic netinstaller for Windows 10 only (at least yet, depending on the feedback, porting to Linux / macOS could be done easily - the netinstaller is based on the platform independent powershell). I hope, some aspects are notable enough... Best Regards Dominik On 2021-03-26 17:33, Chris Angelico wrote: On Sat, Mar 27, 2021 at 3:31 AM wrote: Howdy Folks, I would like to suggest adding "Blythooon" to the list under "Other parties have re-packaged CPython" listed here: What makes it notable? ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Re: Help Please
Hi, On Fri, Mar 26, 2021 at 11:36 AM Anis4Games wrote: > Hello python support team , i need help about packages and python modules > > That Video Will Explain My Problem > Please don't send any attachment to the list - it will be dropped from the E-mail. Cut'n'paste any errors you receive directly in the body of the message. On top of that - usual stanza applies: 1. OS - Windows, Linux, Mac? 2. OS version? 3. Python version? 4. Are you able to run python interpretor? 5. Socks version you are trying to install? 6. Was install successful? Thank you. > The Problem : Is Im Installed [Socks] Alredy With Command => pip install > socks > > But When i run some script using socks pack its show a error with message " > import socks " no socks modules found > > So Please Help Me😫 > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list
Re: convert script awk in python
Christian Gollwitzer writes: > The closest equivalent I can come up with in Python is this: > > == > import sys > > s=0 > for line in sys.stdin: > try: > s += float(line.split()[1]) > except: > pass > print(s) > === > > > I don't want to cram this into a python -c " " line, if it even is > possible; how do you handle indentation levels and loops?? > I agree. Perhaps we need a ‘awk’ module/package. I see that there is one in PyPI but that was last updated in 2016. -- Regards, Pankaj Jangid -- https://mail.python.org/mailman/listinfo/python-list
Help Please
Hello python support team , i need help about packages and python modules That Video Will Explain My Problem The Problem : Is Im Installed [Socks] Alredy With Command => pip install socks But When i run some script using socks pack its show a error with message " import socks " no socks modules found So Please Help Me😫 -- https://mail.python.org/mailman/listinfo/python-list
Re: python documentation
On Sat, Mar 27, 2021 at 3:31 AM wrote: > > Howdy Folks, > > > I would like to suggest adding "Blythooon" to the list under "Other > parties have re-packaged CPython" listed here: > What makes it notable? ChrisA -- https://mail.python.org/mailman/listinfo/python-list
python documentation
Howdy Folks, I would like to suggest adding "Blythooon" to the list under "Other parties have re-packaged CPython" listed here: https://www.python.org/download/alternatives/ Blythooon can be found here: https://pypi.org/project/blythooon/ and the belonging installation step-by-step-guide video here: https://www.youtube.com/channel/UCOE8xqYS_2azFsFjBVEwVMg May I ask - how can I do that best? Thanks in advance and Best Regards Dominik -- https://mail.python.org/mailman/listinfo/python-list