This website requires JavaScript.
Explore
Help
Sign in
mirrors
/
cosmopolitan
Watch
1
Star
0
Fork
You've already forked cosmopolitan
0
mirror of
https://github.com/jart/cosmopolitan.git
synced
2025-02-07 15:03:34 +00:00
Code
Issues
Projects
Releases
Packages
Wiki
Activity
Actions
96185e1ac0
cosmopolitan
/
third_party
/
python
/
Lib
/
_bootlocale.py
3 lines
64 B
Python
Raw
Normal View
History
Unescape
Escape
Decentralize Python native module linkage We can now link even smaller Python binaries. For example, the hello.com program in the Python build directory is a compiled linked executable of hello.py which just prints hello world. Using decentralized sections, we can make that binary 1.9mb in size (noting that python.com is 6.3 megs!) This works for nontrivial programs too. For example, say we want an APE binary that's equivalent to python.com -m http.server. Our makefile now builds such a binary using the new launcher and it's only 3.2mb in size since Python sources get turned into ELF objects, which tell our linker that we need things like native hashing algorithm code.
2021-09-07 18:40:11 +00:00
def
getpreferredencoding
(
do_setlocale
=
True
)
:
Improve Python and Linenoise This change reinvents all the GNU Readline features I discovered that I couldn't live without, e.g. UTF-8, CTRL-R search and CTRL-Y yanking. It now feels just as good in terms of user interface from the subconscious workflow perspective. It's real nice to finally have an embeddable line reader that's actually good with a 30 kb footprint and a bsd-2 license. This change adds a directory to the examples folder, explaining how the new Python compiler may be used. Some of the bugs with Python binaries have been addressed but overall it's still a work in progress.
2021-09-12 05:30:37 +00:00
return
'
UTF-8
'
Reference in a new issue
Copy permalink