Unfindable module: code
I've just spent half an hour trying to figure out how to mess with the Python REPL (specifically, how to implement a line-by-line interactive interpreter within a larger app). It's rather hard to find it, but the key module is "code". https://docs.python.org/3/library/code.html (How did I end up finding it? By searching the CPython source code for "ps1", since interactive mode looks at sys.ps1/sys.ps2 for its prompts.) In the module index, it is listed thus: Custom Python Interpreters * code — Interpreter base classes * codeop — Compile Python code While this isn't *wrong*, per se, it does hide the fact that this is where the REPL can be found. IMO it would be helpful to say that in the summary, but I'm not sure what would be good wording. What do people think of calling it "Interactive interpreter and REPL implementation"? ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Xarray smoothing data
Hi, I'm using xarray to read and plot my netcdf data. Please someone could help me, dow can I smooth my data before to plot i. Thanks, Conrado -- https://mail.python.org/mailman/listinfo/python-list
Re: Unfindable module: code
On 02/07/2021 11:44, Chris Angelico wrote: I've just spent half an hour trying to figure out how to mess with the Python REPL (specifically, how to implement a line-by-line interactive interpreter within a larger app). It's rather hard to find it, but the key module is "code". https://docs.python.org/3/library/code.html (How did I end up finding it? By searching the CPython source code for "ps1", since interactive mode looks at sys.ps1/sys.ps2 for its prompts.) I would probably have done that too, but for "interpreter". However, googling for "python interactive interpreter module" has the code documentation as its second hit and https://docs.python.org/3/library/custominterp.html as its third. In the module index, it is listed thus: Custom Python Interpreters * code — Interpreter base classes * codeop — Compile Python code While this isn't *wrong*, per se, it does hide the fact that this is where the REPL can be found. IMO it would be helpful to say that in the summary, but I'm not sure what would be good wording. What do people think of calling it "Interactive interpreter and REPL implementation"? To be honest, I think the "unfindable" part are the module names; I don't see a big difference between your suggested and the current description. -- https://mail.python.org/mailman/listinfo/python-list
Re: Unfindable module: code
On Fri, Jul 2, 2021 at 11:01 PM Peter Otten <__pete...@web.de> wrote: > > On 02/07/2021 11:44, Chris Angelico wrote: > > I've just spent half an hour trying to figure out how to mess with the > > Python REPL (specifically, how to implement a line-by-line interactive > > interpreter within a larger app). It's rather hard to find it, but the > > key module is "code". > > > > https://docs.python.org/3/library/code.html > > > > (How did I end up finding it? By searching the CPython source code for > > "ps1", since interactive mode looks at sys.ps1/sys.ps2 for its > > prompts.) > > I would probably have done that too, but for "interpreter". Fair enough, but "interpreter" comes up in a lot of contexts. > However, googling for "python interactive interpreter module" has the > code documentation as its second hit and > > https://docs.python.org/3/library/custominterp.html > > as its third. Good point. Unfortunately, "python repl module" mainly has hits for the "cmd" module, which is quite different. I don't understand this, actually. Strange results. Part of the problem was that I didn't know for sure that I was looking for a *module* per se, and trying to find anything about "python interactive interpreter" will of course just give results about how to invoke Python without an argument, or with "-i script.py". > > In the module index, it is listed thus: > > > > Custom Python Interpreters > > * code — Interpreter base classes > > * codeop — Compile Python code > > > > While this isn't *wrong*, per se, it does hide the fact that this is > > where the REPL can be found. IMO it would be helpful to say that in > > the summary, but I'm not sure what would be good wording. > > > > What do people think of calling it "Interactive interpreter and REPL > > implementation"? > > To be honest, I think the "unfindable" part are the module names; I > don't see a big difference between your suggested and the current > description. > Fair enough! Just wondered. ChrisA -- https://mail.python.org/mailman/listinfo/python-list
pyttsx3 installation error
Traceback (most recent call last): File "f:\Nikita\Python programming\Iron Man Jarvis AL\jarvis.py", line 1, in import pyttsx3 ModuleNotFoundError: No module named 'pyttsx3' -- https://mail.python.org/mailman/listinfo/python-list
Re: pyttsx3 installation error
Congratulations on trying out something new in Python. The first step to debugging errors is try and Google them. Unless it's a brand new package, chances are, you'll find a solution there almost immediately. In case you've already installed this missing package, and it's not getting imported, I'd suggest reading up on Virtual environments, how to create one, how to activate one and how to install packages in them. These might seem tedious if you're just starting off, but it's going to pay off. Happy programming! Abhiram R abhiramr.com On Sat, Jul 3, 2021, 2:13 AM Nikita Lohale wrote: > Traceback (most recent call last): > File "f:\Nikita\Python programming\Iron Man Jarvis AL\jarvis.py", line > 1, in > import pyttsx3 > ModuleNotFoundError: No module named 'pyttsx3' > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list
Re: pyttsx3 installation error
What's about installing? https://pypi.org/project/pyttsx3/ pe 2. heinäk. 2021 klo 23.41 Nikita Lohale (nikitalohal...@gmail.com) kirjoitti: > Traceback (most recent call last): > File "f:\Nikita\Python programming\Iron Man Jarvis AL\jarvis.py", line > 1, in > import pyttsx3 > ModuleNotFoundError: No module named 'pyttsx3' > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list
[ANN] Austin -- CPython frame stack sampler v3.0.0 is now available
I am delighted to announce the release 3.0.0 of Austin. If you haven't heard of Austin before, it is an open-source frame stack sampler for CPython, distributed under the GPLv3 license. It can be used to obtain statistical profiling data out of a running Python application without a single line of instrumentation. This means that you can start profiling a Python application straight away, even while it's running in a production environment, with minimal impact on performance. The best way to leverage Austin is to use the new extension for VS Code, which brings interactive flame graphs straight into the text editor to allow you to quickly jump to the source code with a simple click. You can find the extension on the Visual Studio Marketplace and install it directly from VS Code: https://marketplace.visualstudio.com/items?itemName=p403n1x87.austin-vscode To see how to make the best of Austin with VS Code to find and fix performance issues, check out this blog post, which shows you the editor extension in action on a real Python project: https://p403n1x87.github.io/how-to-bust-python-performance-issues.html The latest release comes with many improvements, including a re-worked sleepless mode that now gives an estimate of CPU time, initial support for Python 3.10, better support for Python-based binaries like gunicorn, uWSGI, etc. on all supported platforms. Austin is a pure C application that has no dependencies other than the C standard library. Its source code is hosted on GitHub at https://github.com/P403n1x87/austin The README contains installation and usage details, as well as some examples of Austin in action. Details on how to contribute to Austin's development can be found at the bottom of the page. Austin can be installed easily on the following platforms and from the following sources: Linux: - Snap Store - Debian repositories macOS: - Homebrew Windows: - Chocolatey - Scoop An Austin image, based on Ubuntu 20.04, is also available from Docker Hub: https://hub.docker.com/r/p403n1x87/austin Austin is also simple to compile from sources as it only depends on the standard C library if you don't have access to the above-listed sources. You can stay up-to-date with the project's development by following Austin on Twitter (https://twitter.com/AustinSampler). All the best, Gabriele -- https://mail.python.org/mailman/listinfo/python-list
Re: [ANN] Austin -- CPython frame stack sampler v3.0.0 is now available
Very nice. I used rbspy for Ruby programs https://rbspy.github.io/ and it can give you some insights about the running code that other profiling techniques may not give you. I'll use it in my next performance-bottleneck challenge. On Fri, Jul 02, 2021 at 04:04:24PM -0700, Gabriele Tornetta wrote: I am delighted to announce the release 3.0.0 of Austin. If you haven't heard of Austin before, it is an open-source frame stack sampler for CPython, distributed under the GPLv3 license. It can be used to obtain statistical profiling data out of a running Python application without a single line of instrumentation. This means that you can start profiling a Python application straight away, even while it's running in a production environment, with minimal impact on performance. The best way to leverage Austin is to use the new extension for VS Code, which brings interactive flame graphs straight into the text editor to allow you to quickly jump to the source code with a simple click. You can find the extension on the Visual Studio Marketplace and install it directly from VS Code: https://marketplace.visualstudio.com/items?itemName=p403n1x87.austin-vscode To see how to make the best of Austin with VS Code to find and fix performance issues, check out this blog post, which shows you the editor extension in action on a real Python project: https://p403n1x87.github.io/how-to-bust-python-performance-issues.html The latest release comes with many improvements, including a re-worked sleepless mode that now gives an estimate of CPU time, initial support for Python 3.10, better support for Python-based binaries like gunicorn, uWSGI, etc. on all supported platforms. Austin is a pure C application that has no dependencies other than the C standard library. Its source code is hosted on GitHub at https://github.com/P403n1x87/austin The README contains installation and usage details, as well as some examples of Austin in action. Details on how to contribute to Austin's development can be found at the bottom of the page. Austin can be installed easily on the following platforms and from the following sources: Linux: - Snap Store - Debian repositories macOS: - Homebrew Windows: - Chocolatey - Scoop An Austin image, based on Ubuntu 20.04, is also available from Docker Hub: https://hub.docker.com/r/p403n1x87/austin Austin is also simple to compile from sources as it only depends on the standard C library if you don't have access to the above-listed sources. You can stay up-to-date with the project's development by following Austin on Twitter (https://twitter.com/AustinSampler). All the best, Gabriele -- https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list