Re: New computer, new Python
It sounds like on your old computer, you used some kind of program to write python code and perhaps to run it too. It would help if you could say what that program was. Python itself - the actual program called "python.exe" on Windows - runs a Python interpreter inside a Windows console window. That's what you see when you run "python". You probably would like to run the same editor as you used on the old computer, but unless you can say what that program was, we can't help you. The best we can do is to suggest various alternative programs and editors, as several people have already done. On 12/9/2022 12:13 PM, ker...@polaris.net wrote: Hello. I've downloaded the new Python to my new Computer, and the new Python mystifies me. Instead of an editor, it looks like a Dos executable program. How can I write my own Python Functions and subroutines in the new Python? It is version 3.11 (64 bit). Kermit -Original Message- From: python-list-requ...@python.org Sent: Friday, December 9, 2022 12:00pm To: python-list@python.org Subject: Python-list Digest, Vol 231, Issue 9 Send Python-list mailing list submissions to python-list@python.org To subscribe or unsubscribe via the World Wide Web, visit https://mail.python.org/mailman/listinfo/python-list or, via email, send a message with subject or body 'help' to python-list-requ...@python.org You can reach the person managing the list at python-list-ow...@python.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Python-list digest..." Today's Topics: 1. Re: How to convert a raw string r'\xdd' to '\xdd' more gracefully? (Jach Feng) 2. Re: Nonuniform PRNG? (Stefan Ram) 3. Panoptisch - A way to understand your project's dependencies and find malicious packages (Aarnav Mahavir Bos) 4. MinecraftEdu (Jelena Ili?) 5. Re: MinecraftEdu (Cameron Simpson) 6. Re: How to convert a raw string r'\xdd' to '\xdd' more gracefully? (Jach Feng) 7. Re: Panoptisch - A way to understand your project's dependencies and find malicious packages (Axy) 8. Re: How to convert a raw string r'\xdd' to '\xdd' more gracefully? (Weatherby,Gerard) 9. Re: Panoptisch - A way to understand your project's dependencies and find malicious packages (Dan Kolis) -- Message: 1 Date: Thu, 8 Dec 2022 00:56:42 -0800 (PST) From: Jach Feng To: python-list@python.org Subject: Re: How to convert a raw string r'\xdd' to '\xdd' more gracefully? Message-ID: Content-Type: text/plain; charset="UTF-8" Jach Feng ? 2022?12?7? ?10:23:20 [UTC+8] ?? s0 = r'\x0a' At this moment it was done by def to1byte(matchobj): return chr(int('0x' + matchobj.group(1), 16)) s1 = re.sub(r'\\x([0-9a-fA-F]{2})', to1byte, s0) But, is it that difficult on doing this simple thing? --Jach I find another answer on the web. s0 = r'\x0a' s0.encode('Latin-1').decode('unicode-escape') '\n' -- Message: 2 Date: 8 Dec 2022 12:17:22 GMT From: r...@zedat.fu-berlin.de (Stefan Ram) To: python-list@python.org Subject: Re: Nonuniform PRNG? Message-ID: Content-Type: text/plain; charset=UTF-8 "Robert E. Beaudoin" writes: One thing you could do is to apply von Neumann de-biasing to convert a string of output bits from your biased PRNG to an unbiased string, and test the de-biased output. Some non-uniform generators are based on uniform generators whose output then is warped by the application of some function. If one has access to the underlying uniform generator used, one can test this with the algorithms for uniform generators. -- Message: 3 Date: Thu, 8 Dec 2022 18:52:29 +0100 From: Aarnav Mahavir Bos To: python-list@python.org Subject: Panoptisch - A way to understand your project's dependencies and find malicious packages Message-ID: Content-Type: text/plain; charset="UTF-8" Hello all, I would like to share Panoptisch, a FOSS(Free and Open Source Software) tool I've been working on. We all may have encountered the issue of not having a clear dependency tree or not being sure of the modules our dependencies and sub-dependencies are using. Some of us may have also heard of supply chain attacks, where open source projects are hijacked to distribute malicious code masquerading as the original package. This can happen deep down in the dependency chain. Panoptisch was born out of the need to accurately verify the modules used in my project. It recursively scans a Python module or file to find modules used and exports a report in JSON which can be parsed for analysis. For examp
Re: New computer, new Python
On 12/9/22 14:56, rbowman wrote: On Fri, 9 Dec 2022 12:13:16 -0500 (EST), ker...@polaris.net wrote: How can I write my own Python Functions and subroutines in the new Python? Personally, I would go with VS Code: https://learn.microsoft.com/en-us/training/modules/python-install-vscode/ It supports virtual environments nicely: https://code.visualstudio.com/docs/python/environments Possibly in some previous setup, IDLE was the thing you opened. IDLE *is* an IDE - maybe not the fanciest one available, but it's written in Python and comes with the Python distribution. I don't disagree with the two fine editors/IESs suggested previously (I use both of them, in slightly different circumstances), but IDLE works well too. Try telling windows to find and open idle and see if that's more what you are expecting? -- https://mail.python.org/mailman/listinfo/python-list
Re: New computer, new Python
On Fri, 9 Dec 2022 12:13:16 -0500 (EST), ker...@polaris.net wrote: > How can I write my own Python Functions and subroutines in the new > Python? Personally, I would go with VS Code: https://learn.microsoft.com/en-us/training/modules/python-install-vscode/ It supports virtual environments nicely: https://code.visualstudio.com/docs/python/environments -- https://mail.python.org/mailman/listinfo/python-list
Re: New computer, new Python
Python in an IDE is much easier in the long run. We use PyCharm – there’s a free version: https://www.jetbrains.com/pycharm/download/#section=windows From: Python-list on behalf of DFS Date: Friday, December 9, 2022 at 4:36 PM To: python-list@python.org Subject: Re: New computer, new Python *** Attention: This is an external email. Use caution responding, opening attachments or clicking on links. *** On 12/9/2022 12:13 PM, ker...@polaris.net wrote: > > > Hello. I've downloaded the new Python to my new Computer, and the new > Python mystifies me. > > Instead of an editor, it looks like a Dos executable program. python.exe is a Windows executable. > How can I write my own Python Functions and subroutines in the new Python? Open a text editor and write your own functions and subs. Save the file as prog.py. From the command line (not from inside the Python shell), type: $ python prog.py > It is version 3.11 (64 bit). The latest and greatest. Significantly sped up vs 3.10. -- https://urldefense.com/v3/__https://mail.python.org/mailman/listinfo/python-list__;!!Cn_UX_p3!ncQETnsgLM_I29jKwV8WUZPhvn7g3Q5jBnkT_S0CmOf0KCORpl5xSLtMM8ZtE8gMsORNxCKhq01pCww$<https://urldefense.com/v3/__https:/mail.python.org/mailman/listinfo/python-list__;!!Cn_UX_p3!ncQETnsgLM_I29jKwV8WUZPhvn7g3Q5jBnkT_S0CmOf0KCORpl5xSLtMM8ZtE8gMsORNxCKhq01pCww$> -- https://mail.python.org/mailman/listinfo/python-list
Re: New computer, new Python
On 12/9/2022 12:13 PM, ker...@polaris.net wrote: Hello. I've downloaded the new Python to my new Computer, and the new Python mystifies me. Instead of an editor, it looks like a Dos executable program. python.exe is a Windows executable. How can I write my own Python Functions and subroutines in the new Python? Open a text editor and write your own functions and subs. Save the file as prog.py. From the command line (not from inside the Python shell), type: $ python prog.py It is version 3.11 (64 bit). The latest and greatest. Significantly sped up vs 3.10. -- https://mail.python.org/mailman/listinfo/python-list
Re: New computer, new Python
On 10/12/2022 06.13, ker...@polaris.net wrote: Hello. I've downloaded the new Python to my new Computer, and the new Python mystifies me. Instead of an editor, it looks like a Dos executable program. How can I write my own Python Functions and subroutines in the new Python? It is version 3.11 (64 bit). Have you invested time in the documentation? https://docs.python.org/3/using/windows.html -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list
New computer, new Python
Hello. I've downloaded the new Python to my new Computer, and the new Python mystifies me. Instead of an editor, it looks like a Dos executable program. How can I write my own Python Functions and subroutines in the new Python? It is version 3.11 (64 bit). Kermit -Original Message- From: python-list-requ...@python.org Sent: Friday, December 9, 2022 12:00pm To: python-list@python.org Subject: Python-list Digest, Vol 231, Issue 9 Send Python-list mailing list submissions to python-list@python.org To subscribe or unsubscribe via the World Wide Web, visit https://mail.python.org/mailman/listinfo/python-list or, via email, send a message with subject or body 'help' to python-list-requ...@python.org You can reach the person managing the list at python-list-ow...@python.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Python-list digest..." Today's Topics: 1. Re: How to convert a raw string r'\xdd' to '\xdd' more gracefully? (Jach Feng) 2. Re: Nonuniform PRNG? (Stefan Ram) 3. Panoptisch - A way to understand your project's dependencies and find malicious packages (Aarnav Mahavir Bos) 4. MinecraftEdu (Jelena Ili?) 5. Re: MinecraftEdu (Cameron Simpson) 6. Re: How to convert a raw string r'\xdd' to '\xdd' more gracefully? (Jach Feng) 7. Re: Panoptisch - A way to understand your project's dependencies and find malicious packages (Axy) 8. Re: How to convert a raw string r'\xdd' to '\xdd' more gracefully? (Weatherby,Gerard) 9. Re: Panoptisch - A way to understand your project's dependencies and find malicious packages (Dan Kolis) -- Message: 1 Date: Thu, 8 Dec 2022 00:56:42 -0800 (PST) From: Jach Feng To: python-list@python.org Subject: Re: How to convert a raw string r'\xdd' to '\xdd' more gracefully? Message-ID: Content-Type: text/plain; charset="UTF-8" Jach Feng ? 2022?12?7? ?10:23:20 [UTC+8] ?? > s0 = r'\x0a' > At this moment it was done by > > def to1byte(matchobj): > return chr(int('0x' + matchobj.group(1), 16)) > s1 = re.sub(r'\\x([0-9a-fA-F]{2})', to1byte, s0) > > But, is it that difficult on doing this simple thing? > > --Jach I find another answer on the web. >>> s0 = r'\x0a' >>> s0.encode('Latin-1').decode('unicode-escape') '\n' -- Message: 2 Date: 8 Dec 2022 12:17:22 GMT From: r...@zedat.fu-berlin.de (Stefan Ram) To: python-list@python.org Subject: Re: Nonuniform PRNG? Message-ID: Content-Type: text/plain; charset=UTF-8 "Robert E. Beaudoin" writes: >One thing you could do is to apply von Neumann de-biasing to convert a >string of output bits from your biased PRNG to an unbiased string, and >test the de-biased output. Some non-uniform generators are based on uniform generators whose output then is warped by the application of some function. If one has access to the underlying uniform generator used, one can test this with the algorithms for uniform generators. -- Message: 3 Date: Thu, 8 Dec 2022 18:52:29 +0100 From: Aarnav Mahavir Bos To: python-list@python.org Subject: Panoptisch - A way to understand your project's dependencies and find malicious packages Message-ID: Content-Type: text/plain; charset="UTF-8" Hello all, I would like to share Panoptisch, a FOSS(Free and Open Source Software) tool I've been working on. We all may have encountered the issue of not having a clear dependency tree or not being sure of the modules our dependencies and sub-dependencies are using. Some of us may have also heard of supply chain attacks, where open source projects are hijacked to distribute malicious code masquerading as the original package. This can happen deep down in the dependency chain. Panoptisch was born out of the need to accurately verify the modules used in my project. It recursively scans a Python module or file to find modules used and exports a report in JSON which can be parsed for analysis. For example, should your yaml parser, or it's sub-dependencies import socket/os? should your markdown renderer or it's sub-dependencies import sys/importlib? *Probably not.* Panoptisch is in early stages, has known limitations and is looking for help! I would love feedback, contributions, and most important of all, rigorous testing! I would also love to help you integrate this tool in your workflow to write more secure software. Link: https://github.com/R9295/panoptisch Short Demo: https://www.youtube.com/watch?v=bDJWl_odXx0 Thanks and Regards, aarnav -- Message: 4 Date: Thu, 8 Dec 2022 12:12:47 -0800 (P
Re: using a new computer and bringing needed libraries to it
Rustom Mody writes: > On Sunday, May 18, 2014 5:47:05 AM UTC+5:30, Ned Batchelder wrote: > > Make a list of the [Python-specific] packages you need. Put it in a > > file called requirements.txt. […] > > What about things installed at a lower level than pip, eg apt-get? That's an important issue. Requirements of a project, such as packages that need to be installed from the operating system (e.g. “you need Python 3.2 or later for this project”), are ideal for documenting in plain human-targeted text in a document called “requirements.txt”. Which is why I advocate using a *different* filename, more explicit about its special purpose (e.g. ‘pip_requirements’), for the Pip-specific (and thereby Python-specific) machine-readable configuration file. -- \ “But Marge, what if we chose the wrong religion? Each week we | `\ just make God madder and madder.” —Homer, _The Simpsons_ | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list
Re: using a new computer and bringing needed libraries to it
On Sunday, May 18, 2014 5:47:05 AM UTC+5:30, Ned Batchelder wrote: > On 5/17/14 7:53 PM, CM wrote: > > > If I want to switch my work from one computer to a new one, and I > > have lots of various libraries installed on the original computer, > > what's the best way to switch that all to the new computer? I'm > > hoping there is some simple way like just copying the > > Python/Lib/site-packages folder, but I'm also guessing this isn't > > sufficient. I was hoping I wouldn't have to just one-by-one > > install all of those libraries again on the newer computer. > > I probably want to develop on BOTH these computers for the time > > being, too. One is at home and one is at a "remote site"/secret > > lair. And then I'll be doing it again when I buy a newer computer > > at some point. > > Make a list of the packages you need. Put it in a file called > requirements.txt. Then install them with: > > > $ pip install -r requirements.txt > > > Keep that file up-to-date as you add new requirements. What about things installed at a lower level than pip, eg apt-get? -- https://mail.python.org/mailman/listinfo/python-list
Pip requirements: Machine-readable configuration versus human-audience documentation (was: using a new computer and bringing needed libraries to it)
Ned Batchelder writes: > Make a list of the packages you need. Put it in a file called > requirements.txt. Then install them with: > > $ pip install -r requirements.txt > > Keep that file up-to-date as you add new requirements. Since these requirements are specifically for Python, more specifically for Pip, and even more specifically are supposed to be in a machine-readable foramt and not just an arbitrary free-form text document, can we recommend instead some more specific filename? ‘requirements.txt’ is already used in many projects to document *for a human reader* the project-wide requirements, not jsut for Python, and we should not arrogate a general name like that to a specific tool like Pip. I'd recommend (and have already begun to use) the name ‘pip_requirements’ or the like. I know that there is heaps of Pip-specific documentation out there already recommending the more general name, but I'd like that to change. -- \ “I believe our future depends powerfully on how well we | `\ understand this cosmos, in which we float like a mote of dust | _o__) in the morning sky.” —Carl Sagan, _Cosmos_, 1980 | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list
Re: using a new computer and bringing needed libraries to it
On Sun, May 18, 2014 at 10:17 AM, Ned Batchelder wrote: > Make a list of the packages you need. Put it in a file called > requirements.txt. Then install them with: > > $ pip install -r requirements.txt > > Keep that file up-to-date as you add new requirements. +1. And the "keep up-to-date" bit can be done very well with source control; that way, you don't need to wonder whether you added one over here or deleted one over there - the commit history will tell you. ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Re: using a new computer and bringing needed libraries to it
On 5/17/2014 7:53 PM, CM wrote: If I want to switch my work from one computer to a new one, and I have lots of various libraries installed on the original computer, what's the best way to switch that all to the new computer? I'm hoping there is some simple way like just copying the Python/Lib/site-packages folder, but I'm also guessing this isn't sufficient. Have your tried it? Since Python only cares about the contents of site-packages, copying should be fine, at least as far as python is concerned. I have copied pythonx.y/Lib/site-packages to pythonx.(y+1)/Lib/site-packages more than once. In each site-packages, I also have python.pth containing, in my case, "F:/Python". packages and modules in F:/Python are imported the same as if they were in each site-packages. This avoids copying and lets me try the same file on multiple versions. Copying does not copy registry entries or anything outside of site-packages. I do not know whether pip, for instance, does either. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list
Re: using a new computer and bringing needed libraries to it
On 5/17/14 7:53 PM, CM wrote: If I want to switch my work from one computer to a new one, and I have lots of various libraries installed on the original computer, what's the best way to switch that all to the new computer? I'm hoping there is some simple way like just copying the Python/Lib/site-packages folder, but I'm also guessing this isn't sufficient. I was hoping I wouldn't have to just one-by-one install all of those libraries again on the newer computer. I probably want to develop on BOTH these computers for the time being, too. One is at home and one is at a "remote site"/secret lair. And then I'll be doing it again when I buy a newer computer at some point. Thanks. Make a list of the packages you need. Put it in a file called requirements.txt. Then install them with: $ pip install -r requirements.txt Keep that file up-to-date as you add new requirements. -- Ned Batchelder, http://nedbatchelder.com -- https://mail.python.org/mailman/listinfo/python-list
using a new computer and bringing needed libraries to it
If I want to switch my work from one computer to a new one, and I have lots of various libraries installed on the original computer, what's the best way to switch that all to the new computer? I'm hoping there is some simple way like just copying the Python/Lib/site-packages folder, but I'm also guessing this isn't sufficient. I was hoping I wouldn't have to just one-by-one install all of those libraries again on the newer computer. I probably want to develop on BOTH these computers for the time being, too. One is at home and one is at a "remote site"/secret lair. And then I'll be doing it again when I buy a newer computer at some point. Thanks. -- https://mail.python.org/mailman/listinfo/python-list
New computer
Hey- Check out this great site that is giving away totally FREE Desktop PCs! I've joined and I think you should as well. It's a completely legitimate offer, and this company has already given away $4 million in FREE stuff! All you have to do is join, complete an online offer, and refer friends to do the same. That's it! Here is my referral link. To help me get my Desktop PC, click this exact link to join, or copy and paste it into a browser: http://www.FreeDesktopPC.com/?r=13995904 this is my second free computer. Its awesome. Get it and sell it or use it. Its free. Who cares. -- http://mail.python.org/mailman/listinfo/python-list