kopia lustrzana https://github.com/micropython/micropython-lib
code: Initial micropython support.
rodzic
eb30d317f3
commit
ae19d103b3
|
@ -201,14 +201,14 @@ class InteractiveConsole(InteractiveInterpreter):
|
||||||
a default message is printed.
|
a default message is printed.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
## MPY: Older versions of mpy don't support setting ps1 & ps2.
|
||||||
|
ps1 = ">>> "
|
||||||
|
ps2 = "... "
|
||||||
try:
|
try:
|
||||||
sys.ps1
|
ps1 = sys.ps1
|
||||||
except AttributeError:
|
ps2 = sys.ps2
|
||||||
sys.ps1 = ">>> "
|
except:
|
||||||
try:
|
pass
|
||||||
sys.ps2
|
|
||||||
except AttributeError:
|
|
||||||
sys.ps2 = "... "
|
|
||||||
cprt = 'Type "help", "copyright", "credits" or "license" for more information.'
|
cprt = 'Type "help", "copyright", "credits" or "license" for more information.'
|
||||||
if banner is None:
|
if banner is None:
|
||||||
self.write("Python %s on %s\n%s\n(%s)\n" %
|
self.write("Python %s on %s\n%s\n(%s)\n" %
|
||||||
|
@ -220,9 +220,9 @@ class InteractiveConsole(InteractiveInterpreter):
|
||||||
while 1:
|
while 1:
|
||||||
try:
|
try:
|
||||||
if more:
|
if more:
|
||||||
prompt = sys.ps2
|
prompt = ps2
|
||||||
else:
|
else:
|
||||||
prompt = sys.ps1
|
prompt = ps1
|
||||||
try:
|
try:
|
||||||
line = self.raw_input(prompt)
|
line = self.raw_input(prompt)
|
||||||
except EOFError:
|
except EOFError:
|
||||||
|
|
Ładowanie…
Reference in New Issue