Re: "py" command for Linux and Mac?
On Sat, 21 May 2022 at 11:22, Michael Torrie wrote: > And of course the answer given by the grandparent is that Dan should use > a normal linux shebang line in his scripts and on Windows the py > launcher will read that shebang and guestimate the proper python > interpreter to use and execute the script with that. Thus if I'm reading > this correctly, a Linux shebang line should function as expected on > Windows when python files are associated and launched with the py.exe > launcher, even though there's no such thing as /usr/bin/python3 on > Windows. Py launcher makes it work as if there was. > That's correct, and when the py.exe launcher was first, well, launched, the main thrust of it was "it uses the shebang that you already include for the sake of Unix systems". You don't need extra directives to tell it what to do. ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Re: "py" command for Linux and Mac?
On 5/12/22 11:59, De ongekruisigde wrote: > On 2022-05-12, Mats Wichmann wrote: >> On 5/12/22 10:25, Dan Stromberg wrote: >>> Hi folks. >>> >>> I heard there's a Windows-like "py" command for Linux (and Mac?). >>> >>> I'm finally getting to porting a particular project's Python 2.7 code to >>> 3.x, and one of the first steps will probably be changing a lot of "python2 >>> script.py" to use #!/usr/bin/env python2 and chmod +x. Then we can update >>> the scripts one at a time to use #!/usr/bin/env python3. >>> >>> However, would this be Linux-and-Mac-only? I'm not at all sure this code >>> will ever move to Windows, but in case it does, would a "py" command work >>> on all 3 if I use #!/usr/bin/env py? >> >> The py command (python lanucher) respects shebang lines. > > Linux by itself respects shebang lines, so you don't need a separate > launcher program. Just put e.g.: Dan knows this already. His question is about whether the shebang should instead refer to a py launcher so that this script will run on Windows or Linux. And of course the answer given by the grandparent is that Dan should use a normal linux shebang line in his scripts and on Windows the py launcher will read that shebang and guestimate the proper python interpreter to use and execute the script with that. Thus if I'm reading this correctly, a Linux shebang line should function as expected on Windows when python files are associated and launched with the py.exe launcher, even though there's no such thing as /usr/bin/python3 on Windows. Py launcher makes it work as if there was. -- https://mail.python.org/mailman/listinfo/python-list
[Python-announce] ANN: psutil 5.9.1 released
Hello all, I'm glad to announce the release of psutil 5.9.1: https://github.com/giampaolo/psutil About = psutil (process and system utilities) is a cross-platform library for retrieving information on running processes and system utilization (CPU, memory, disks, network) in Python. It is useful mainly for system monitoring, profiling and limiting process resources and management of running processes. It implements many functionalities offered by command line tools such as: ps, top, lsof, netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime, pidof, tty, taskset, pmap. It currently supports Linux, Windows, macOS, Sun Solaris, FreeBSD, OpenBSD, NetBSD and AIX, both 32-bit and 64-bit architectures. Supported Python versions are 2.7 and 3.4+. PyPy is also known to work. What's new == 2022-05-20 **Enhancements** - #1053: drop Python 2.6 support. (patches by Matthieu Darbois and Hugo van Kemenade) - #2050, [Linux]: increase ``read(2)`` buffer size from 1k to 32k when reading ``/proc`` pseudo files line by line. This should help having more consistent results. - #2057, [OpenBSD]: add support for `cpu_freq()`_. - #2107, [Linux]: `Process.memory_full_info()`_ (reporting process USS/PSS/Swap memory) now reads ``/proc/pid/smaps_rollup`` instead of ``/proc/pids/smaps``, which makes it 5 times faster. **Bug fixes** - #2048: ``AttributeError`` is raised if ``psutil.Error`` class is raised manually and passed through ``str``. - #2049, [Linux]: `cpu_freq()`_ erroneously returns ``curr`` value in GHz while ``min`` and ``max`` are in MHz. - #2050, [Linux]: `virtual_memory()`_ may raise ``ValueError`` if running in a LCX container. Links = - Home page: https://github.com/giampaolo/psutil - Download: https://pypi.org/project/psutil/#files - Documentation: http://psutil.readthedocs.io - What's new: https://github.com/giampaolo/psutil/blob/master/HISTORY.rst Hashes == psutil-5.9.1-cp27-cp27m-manylinux2010_i686.whl md5: 7a1242ebbc4b120e82aee13d9900089b sha256: 799759d809c31aab5fe4579e50addf84565e71c1dc9f1c31258f159ff70d3f87 psutil-5.9.1-cp27-cp27m-manylinux2010_x86_64.whl md5: a73889261651d0668ecafb3106517d38 sha256: 9272167b5f5fbfe16945be3db475b3ce8d792386907e673a209da686176552af psutil-5.9.1-cp27-cp27m-win32.whl md5: e207f375e71890db65bd38d3d97b052d sha256: 0904727e0b0a038830b019551cf3204dd48ef5c6868adc776e06e93d615fc5fc psutil-5.9.1-cp27-cp27m-win_amd64.whl md5: 7fcdecb7cf7f1414d32ef6be4bb67f98 sha256: e7e10454cb1ab62cc6ce776e1c135a64045a11ec4c6d254d3f7689c16eb3efd2 psutil-5.9.1-cp27-cp27mu-manylinux2010_i686.whl md5: debfdb618e51c8952d7d4e8456d8a134 sha256: 56960b9e8edcca1456f8c86a196f0c3d8e3e361320071c93378d41445ffd28b0 psutil-5.9.1-cp27-cp27mu-manylinux2010_x86_64.whl md5: 5023ea6226dcc3b9ba731478de6ae961 sha256: 44d1826150d49ffd62035785a9e2c56afcea66e55b43b8b630d7706276e87f22 psutil-5.9.1-cp310-cp310-macosx_10_9_x86_64.whl md5: 62571c4f43d5098b30b3662bb3ca59c3 sha256: c7be9d7f5b0d206f0bbc3794b8e16fb7dbc53ec9e40bbe8787c6f2d38efcf6c9 psutil-5.9.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl md5: e6e1dfa3d5a277e631ff323011611287 sha256: abd9246e4cdd5b554a2ddd97c157e292ac11ef3e7af25ac56b08b455c829dca8 psutil-5.9.1-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl md5: 871ebac7263c173487d358bf00737980 sha256: 29a442e25fab1f4d05e2655bb1b8ab6887981838d22effa2396d584b740194de psutil-5.9.1-cp310-cp310-win32.whl md5: e0e89fb12b79806cae4f0f3637fbdd32 sha256: 20b27771b077dcaa0de1de3ad52d22538fe101f9946d6dc7869e6f694f079329 psutil-5.9.1-cp310-cp310-win_amd64.whl md5: 0696f2e92814fa7a563f4f2d14470401 sha256: 58678bbadae12e0db55186dc58f239228ac9f41cc7848853539b70490021 psutil-5.9.1-cp36-cp36m-macosx_10_9_x86_64.whl md5: d030410b4e45975ac45ae22ce2818b7a sha256: 3a76ad658641172d9c6e593de6fe248ddde825b5866464c3b2ee26c35da9d237 psutil-5.9.1-cp36-cp36m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl md5: df5a7143b0177f911dd2880e59bb22fb sha256: a6a11e48cb93a5fa606306493f439b4aa7c56cb03fc9ace7f6bfa21aaf07c453 psutil-5.9.1-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl md5: 69c6fd60db5140cdc9bf2d8a26075f59 sha256: 068935df39055bf27a29824b95c801c7a5130f118b806eee663cad28dca97685 psutil-5.9.1-cp36-cp36m-win32.whl md5: 045872c718d8dbdc53b2ee34b31277b4 sha256: 0f15a19a05f39a09327345bc279c1ba4a8cfb0172cc0d3c7f7d16c813b2e7d36 psutil-5.9.1-cp36-cp36m-win_amd64.whl md5: fbff07ef1c54c582565c23273b20097f sha256: db417f0865f90bdc07fa30e1aadc69b6f4cad7f86324b02aa842034efe8d8c4d psutil-5.9.1-cp37-cp37m-macosx_10_9_x86_64.whl md5: 24b14789585376ebc524b72f546ea75c sha256: 91c7ff2a40c373d0cc9121d54bc5f31c4fa09c346528e6a08d1845bce5771ffc psutil-5.9.1-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl md5: 781ee24c78defb6fc4d2fae5532f0f1c
Re: Python & nmap
Lars Liedtke writes: > Ansible has got a shell module, so you could run custom commands on all > hosts. But it gets more difficult in parsing the output afterwards. If you just want to copy files, pdsh[1] or clush[2] might be enough. Cheers, Loris Footnotes: [1] https://github.com/chaos/pdsh [2] https://clustershell.readthedocs.io/en/latest/tools/clush.html -- This signature is currently under construction. -- https://mail.python.org/mailman/listinfo/python-list
Re: Python & nmap
Ansible has got a shell module, so you could run custom commands on all hosts. But it gets more difficult in parsing the output afterwards. -- Lars Liedtke Software Entwickler Phone: Fax:+49 721 98993- E-mail: l...@solute.de solute GmbH Zeppelinstraße 15 76185 Karlsruhe Germany Marken der solute GmbH | brands of solute GmbH billiger.de | Shopping.de Geschäftsführer | Managing Director: Dr. Thilo Gans, Bernd Vermaaten Webseite | www.solute.de Sitz | Registered Office: Karlsruhe Registergericht | Register Court: Amtsgericht Mannheim Registernummer | Register No.: HRB 110579 USt-ID | VAT ID: DE234663798 Informationen zum Datenschutz | Information about privacy policy http://solute.de/ger/datenschutz/grundsaetze-der-datenverarbeitung.php Am 19.05.22 um 21:16 schrieb ^Bart: Maybe it could be a good idea to look at Ansible for copying the Files to all the hosts, because that is one thing ansible is made for. I didn't know it... thanks to share it but... I should start to study it and I don't have not enought free time... but maybe in the future I'll do it! :) For the nmap part: Ansible does not have a module for that (sadly) but is very extensible, so if you start developing something like that in Python, you could as well write an ansible module and combine both, because Ansible itself is written in Python. Ah ok, maybe now I just start to write a bash script because I need to start this work asap, when I'll have one minute I'll try to move the script in Python and after it I could "upload" the work on Ansible! :) Cheers Lars Thanks! ^Bart -- https://mail.python.org/mailman/listinfo/python-list
[Python-announce] ANN: A new version (0.4.9) of python-gnupg has been released.
What Changed? = This is an enhancement and bug-fix release, and all users are encouraged to upgrade. Brief summary: * Fixed #161: Added a status attribute to the returned object from gen_key() which is set to 'ok' if a key was successfully created, or 'key not created' if that was reported by gpg, or None in any other case. * Fixed #164: Provided the ability to add subkeys. Thanks to Daniel Kilimnik for the feature request and patch. * Fixed #166: Added keygrip values to the information collected when keys are listed. Thanks to Daniel Kilimnik for the feature request and patch. * Fixed #173: Added extra_args to send_keys(), recv_keys() and search_keys() to allow passing options relating to key servers. This release [2] has been signed with my code signing key: Vinay Sajip (CODE SIGNING KEY) Fingerprint: CA74 9061 914E AC13 8E66 EADB 9147 B477 339A 9B86 Recent changes to PyPI don't show the GPG signature with the download links. The source code repository is at [1]. An alternative download source where the signatures are available is at [4]. Documentation is available at [5]. As always, your feedback is most welcome (especially bug reports [3], patches and suggestions for improvement, or any other points via this group). Enjoy! Cheers Vinay Sajip [1] https://github.com/vsajip/python-gnupg [2] https://pypi.org/project/python-gnupg/0.4.9 [3] https://github.com/vsajip/python-gnupg/issues [4] https://github.com/vsajip/python-gnupg/releases/ [5] https://docs.red-dove.com/python-gnupg/ ___ Python-announce-list mailing list -- python-announce-list@python.org To unsubscribe send an email to python-announce-list-le...@python.org https://mail.python.org/mailman3/lists/python-announce-list.python.org/ Member address: arch...@mail-archive.com
ANN: A new version (0.4.9) of python-gnupg has been released.
What Changed? = This is an enhancement and bug-fix release, and all users are encouraged to upgrade. Brief summary: * Fixed #161: Added a status attribute to the returned object from gen_key() which is set to 'ok' if a key was successfully created, or 'key not created' if that was reported by gpg, or None in any other case. * Fixed #164: Provided the ability to add subkeys. Thanks to Daniel Kilimnik for the feature request and patch. * Fixed #166: Added keygrip values to the information collected when keys are listed. Thanks to Daniel Kilimnik for the feature request and patch. * Fixed #173: Added extra_args to send_keys(), recv_keys() and search_keys() to allow passing options relating to key servers. This release [2] has been signed with my code signing key: Vinay Sajip (CODE SIGNING KEY) Fingerprint: CA74 9061 914E AC13 8E66 EADB 9147 B477 339A 9B86 Recent changes to PyPI don't show the GPG signature with the download links. The source code repository is at [1]. An alternative download source where the signatures are available is at [4]. Documentation is available at [5]. As always, your feedback is most welcome (especially bug reports [3], patches and suggestions for improvement, or any other points via this group). Enjoy! Cheers Vinay Sajip [1] https://github.com/vsajip/python-gnupg [2] https://pypi.org/project/python-gnupg/0.4.9 [3] https://github.com/vsajip/python-gnupg/issues [4] https://github.com/vsajip/python-gnupg/releases/ [5] https://docs.red-dove.com/python-gnupg/ -- https://mail.python.org/mailman/listinfo/python-list