xsebek / karel Goto Github PK
View Code? Open in Web Editor NEWThis project forked from alts/karel
A Python Karel the ๐ค for teaching programming basics ๐ฅ
License: GNU General Public License v3.0
This project forked from alts/karel
A Python Karel the ๐ค for teaching programming basics ๐ฅ
License: GNU General Public License v3.0
Hey,
I got this exception when trying to run your code using Python 3.9:
Exception unrelated to screen was raised:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/karel_robot/run/startup.py", line 47, in try_end_window
endwin()
_curses.error: must call initscr() first
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/Michal/PycharmProjects/pythonProject/main.py", line 1, in <module>
from karel_robot.run import *
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/karel_robot/run/__init__.py", line 23, in <module>
from .main import *
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/karel_robot/run/main.py", line 131, in <module>
from .interactive import *
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/karel_robot/run/interactive.py", line 4, in <module>
from .functions import *
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/karel_robot/run/functions.py", line 7, in <module>
window: Window = setup_window(cli_args=argv)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/karel_robot/run/startup.py", line 96, in setup_window
try_end_window(exception=e)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/karel_robot/run/startup.py", line 50, in try_end_window
raise exception
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/karel_robot/run/startup.py", line 79, in setup_window
window_opt = Window(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/karel_robot/window.py", line 109, in __init__
self.screen = curses.initscr()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/curses/__init__.py", line 29, in initscr
setupterm(term=_os.environ.get("TERM", "unknown"),
_curses.error: setupterm: could not find terminal
There are a few issues that need to be fixed for Karel to run on Windows:
`
instead of \
as line continuation in shell, so use neithersave() function should be write_map() in the documentation
For educational purposes, it would be great to go back and forward in history.
Viewing of history is the main feature of "just printing to terminal" missing here with curses.
A "simple" solution could be to create a list of (pairs of) actions to go (forward and) backward.
The message line is easy to overlook at the bottom of the window.
Possible improvements:
The setup.py
specifies that the minimal required version of Python is 3.6.
However, with Python 3.6, Karel does not work due to from __future__ import annotations
. The actual minimal required version is 3.7.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.