forked from Rust-related/RustPython
Update __hello__ and __phello__ from cpython
This commit is contained in:
16
Lib/__hello__.py
vendored
Normal file
16
Lib/__hello__.py
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
initialized = True
|
||||
|
||||
class TestFrozenUtf8_1:
|
||||
"""\u00b6"""
|
||||
|
||||
class TestFrozenUtf8_2:
|
||||
"""\u03c0"""
|
||||
|
||||
class TestFrozenUtf8_4:
|
||||
"""\U0001f600"""
|
||||
|
||||
def main():
|
||||
print("Hello world!")
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
7
Lib/__phello__/__init__.py
vendored
Normal file
7
Lib/__phello__/__init__.py
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
initialized = True
|
||||
|
||||
def main():
|
||||
print("Hello world!")
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
0
Lib/__phello__/ham/__init__.py
vendored
Normal file
0
Lib/__phello__/ham/__init__.py
vendored
Normal file
0
Lib/__phello__/ham/eggs.py
vendored
Normal file
0
Lib/__phello__/ham/eggs.py
vendored
Normal file
7
Lib/__phello__/spam.py
vendored
Normal file
7
Lib/__phello__/spam.py
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
initialized = True
|
||||
|
||||
def main():
|
||||
print("Hello world!")
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
1
vm/Lib/python_builtins/__hello__.py
Symbolic link
1
vm/Lib/python_builtins/__hello__.py
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../Lib/__hello__.py
|
||||
1
vm/Lib/python_builtins/__phello__
Symbolic link
1
vm/Lib/python_builtins/__phello__
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../Lib/__phello__
|
||||
@@ -11,11 +11,12 @@ pub fn core_frozen_inits() -> impl Iterator<Item = (String, FrozenModule)> {
|
||||
};
|
||||
}
|
||||
|
||||
ext_modules!(
|
||||
iter,
|
||||
source = "initialized = True; print(\"Hello world!\")\n",
|
||||
module_name = "__hello__",
|
||||
);
|
||||
// keep as example but use file one now
|
||||
// ext_modules!(
|
||||
// iter,
|
||||
// source = "initialized = True; print(\"Hello world!\")\n",
|
||||
// module_name = "__hello__",
|
||||
// );
|
||||
|
||||
// Python modules that the vm calls into, but are not actually part of the stdlib. They could
|
||||
// in theory be implemented in Rust, but are easiest to do in Python for one reason or another.
|
||||
|
||||
Reference in New Issue
Block a user