Is there any way to see the variables/classes/objects/functions in the RPEL?
What about editing an existing function without feeding it back in?
I really like the interactive mode of programming and hope it is/will be powerful enough to prototype with.
REPL docs?
Re: RPEL docs?
What is RPEL?
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Re: REPL docs?
I corrected the spelling in the title.
REPL, for the uninitiated means Read-Eval-Print-Loop.
Python has several introspection capabilities.
You can use the dir command to examine objects. For example, suppose you'd like to know which modules are implemented in pyb.
You can examine objects:
You can use dir with no arguments to discover what's currently defined:
REPL, for the uninitiated means Read-Eval-Print-Loop.
Python has several introspection capabilities.
You can use the dir command to examine objects. For example, suppose you'd like to know which modules are implemented in pyb.
Code: Select all
>>> import pyb
>>> dir(pyb)
['__name__', 'info', 'unique_id', 'freq', 'gc', 'repl_info', 'wfi', 'disable_irq', 'enable_irq', 'stop', 'standby', 'source_dir', 'main', 'usb_mode', 'have_cdc', 'hid', 'millis', 'delay', 'udelay', 'sync', 'Timer', 'rng', 'RTC', 'Pin', 'ExtInt', 'pwm', 'servo', 'Servo', 'Switch', 'SD', 'LED', 'I2C', 'SPI', 'UART', 'ADC', 'ADCAll', 'DAC', 'Accel']
Code: Select all
>>> foo=3
>>> dir(foo)
['from_bytes', 'to_bytes']
>>> type(foo)
<class 'int'>
Code: Select all
>>> dir()
['sys', 'LCD', '__name__', 'pyb', 'foo']
Re: REPL docs?
Thanks for the reply, REPL-coding became much easier!
Hopefully this info will also end up in the documentation soon? Or is there any other reference documentation regarding REPL?
Hopefully this info will also end up in the documentation soon? Or is there any other reference documentation regarding REPL?