4 ms·
Holy shit, this is frigging cool. Python is my language of choice and I'm amazed at the result here. Wow, even the socket implementation works. Python 3.6.14+
by Uptrenda 4y ago
Holy shit, this is frigging cool. Python is my language of choice and I'm amazed at the result here. Wow, even the socket implementation works.
Python 3.6.14+ (Actually Portable Python) [GCC 9.2.0] on cosmo
Type "help", "copyright", "credits" or "license" for more information.
>>: print("hello world")
hello world
>>: import asyncio
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'asyncio'
>>: import socket
>>: s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
>>: s.connect(("www.google.com", 80))
>>: s
<socket.socket fd=3, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('192.168.21.19', 63468), raddr=('142.250.70.196', 80)>
This work is going to be of interest to a lot of Python devs!
Edit: here's the link to the file: https://justine.lol/ftrace/python.com https://justine.lol/ftrace/python.com
Download it and see if it will run on your OS. I'm getting the standard prompt on every OS so far. On Windows you just type python.com. On Mac OS X I had to chmod +x, allow it in security settings, and use bash -c './hello.com' to execute it. Simple chmod +x python.com; ./python.com on Linux.
- flohofwoe 4y ago...in addition, on my ARM Mac I had to start the program like this, otherwise there's an "exec format error": arch -x86_64 ./python.com
- woodrowbarlow 4y agothe APE format and cosmo libc provide operating system portability, not instruction set portability.
- Abishek_Muthian 4y agoDoes this mean I can build portable Python applications like I do with Go without having to worry about the glibc version on the running machine in case I had used CGO?