Jeong YunWon
19ed4f85e7
clean up vm::builtins
2020-10-13 15:42:11 +09:00
Jeong YunWon
ca9326f95d
expose bulitins items on builtins module and hide submodules
2020-10-12 11:43:24 +09:00
Jeong YunWon
9e6dfca9e9
Fix build with new builtins path
2020-10-11 21:16:16 +09:00
Jeong YunWon
b0445396f4
compactize invoke args
2020-10-11 09:38:06 +09:00
Jeong YunWon
3cd0a1118d
Fix nightly clippy
2020-10-01 07:08:55 +09:00
Jeong YunWon
f81ad04ce3
PyString -> PyStr
2020-09-26 00:20:02 +09:00
Noah
60a523e411
Implement a bunch of sys.flags kinda stuff
2020-09-19 00:20:49 -05:00
Noah
ee2dff68b3
Implement atexit functionality
2020-09-18 12:00:24 -05:00
Noah
c7f5da6ddd
Rework VM initialization some more; make more stuff private
2020-09-17 12:05:29 -05:00
Noah
18273da108
Interpreter struct for managing thread-local vm stack
2020-09-15 16:44:39 -05:00
Jeong YunWon
e62a164f4d
Move tests -> extra_tests
2020-09-13 06:58:57 +09:00
Noah
717784d38a
Fix test_calendar tests
2020-09-01 15:21:29 -05:00
Noah
72123c65ec
Use siphash24 + PYTHONHASHSEED
2020-08-27 20:47:47 -05:00
Noah
1385c06e25
Fix some minor things required for unittest
2020-08-12 16:03:20 -05:00
Jeong YunWon
e253095f75
new_str allows &str and &String
2020-08-10 02:16:50 +09:00
Jeong YunWon
7b6ab8da72
Replace vm.new_{int,str,bool} with vm.new_pyobj
2020-08-10 02:16:29 +09:00
Jeong YunWon
a846338395
BorrowValue for PyTuple
2020-08-09 14:55:09 +09:00
Jeong YunWon
ab37e455f3
BorrowValue for PyString
2020-08-09 14:14:55 +09:00
Jeong YunWon
7a8045fea1
BorrowValue for PyInt and PyList
2020-08-09 13:44:31 +09:00
Noah
dd8e9a6508
Use pylib as a dependency of the rustpython binary in order to get a Lib path
2020-08-03 13:20:06 -05:00
Noah
4bd1153b24
Add/fix a bunch of sysmodule attributes
2020-08-02 20:59:36 -05:00
Noah
ba8c0d9a82
Use sys.excepthook when exceptions bubble to the top level
2020-08-02 12:23:12 -05:00
HyeockJinKim
cdd98135ee
EOF after \\ raise EOF Error
...
Return EOF Error to get the next line after` \\ `in the shell.
Closes #1928
2020-05-16 09:45:44 +09:00
Windel Bouwman
3814b5cb22
Merge pull request #1908 from RustPython/coolreader18/doctests
...
Allow doctest to be imported and run
2020-05-07 23:19:24 +02:00
Noah
a34951dc1b
Fix clippy and unittest error
2020-05-06 21:33:25 -05:00
Noah
0fef85ad61
Implement sys.displayhook
2020-05-05 12:22:19 -05:00
Noah
5f6c7152b3
Have a default sys.path value pointing to <checkout>/Lib
2020-05-05 10:57:35 -05:00
Noah
126f41e003
Make rustpython -i script.py work like it does in CPython
2020-03-27 15:24:08 -05:00
Noah
5849e0d5bc
Fix sys.argv in interactive mode
2020-03-08 22:47:56 -05:00
Noah
645314b215
Move readline.rs into the vm crate
2020-02-29 12:02:36 -06:00
Jeong YunWon
7d0d313aa5
&str::to_string -> &str::to_owned for variables
2020-02-05 22:55:34 +09:00
Jeong YunWon
1bac582921
&str::to_string -> &str::to_owned for literals
2020-02-05 22:55:33 +09:00
Arnav Borborah
c44f04b57e
Fallback exit code to 0 in case of overflow
2020-02-04 18:21:33 -05:00
coolreader18
ddf5c9aade
Compile for redox
2020-01-14 19:07:05 -06:00
Jeong YunWon
9f4f8ad0ec
PyTuple::elements into private
2020-01-06 02:34:56 +09:00
coolreader18
777542f7ec
Directly instantiate exceptions in the vm.new_*_error functions
2019-12-28 01:31:24 -06:00
Noah
97c8d11092
Make PyResult<T> = Result<T, PyBaseExceptionRef>
2019-12-27 11:22:52 -06:00
Noah
cd726a2818
Cleanup exceptions a bit
2019-12-27 11:17:26 -06:00
yanganto
4c3642d19c
Use enum for initialize parameters
2019-12-11 10:58:59 +08:00
yanganto
edf70924a9
Set initial parameter in PySettings
...
- Initialize VM after VM created
- Some(true):
VM will be created and initialized with the importers, which require external
filesystem access
- Some(false):
VM will be created and initialized with the importers wihout external filesystem access
- None:
VM will be created but not initialized, so it is ready to be injected with modules.
After injection, the `initialize_as_external` or `initialize_without_external`
should be called, such that the VM will be ready to use.
- Prevent double initialize VM by `initialized` flag
2019-12-05 10:14:40 +08:00
yanganto
4003013026
Initalize VM in VirtualMachine::default()
...
- new and initalize as external in VirtualMachine::default()
- Implement VirtualMachine::without_external
- new, setup stdlib_inits, Initialize vm for wasm
2019-12-05 10:13:41 +08:00
yanganto
8a14abc445
Initialize hardcore modules and importlib
...
Initialize hardcore modules and importlib after vm created and
stdlib_inits setup
2019-12-05 10:13:41 +08:00
coolreader18
a07e0a14bd
Use a BufWriter for dumping profile output
2019-12-03 23:09:07 -06:00
coolreader18
1edf7c85aa
Cleanup some stuff related to the repl
2019-10-14 20:20:13 +00:00
coolreader18
e7a6b79023
Allow indenting by pressing tab
2019-10-08 21:32:02 -05:00
coolreader18
2220ed7e81
Abstract over the readline implementation
2019-10-08 21:32:02 -05:00
coolreader18
04a5aecc3d
Move ShellHelper into another module
2019-10-08 18:28:26 -05:00
Noah
de7002a3e7
Don't show builtins when tabbing on an empty line
2019-10-08 17:51:16 -05:00
Noah
fc3e8c2483
Add tab autocompletion to the REPL
2019-10-08 17:50:38 -05:00
Syrus
32123b56d4
Improved PR based on feedback
2019-10-08 00:54:41 -07:00