zetamap / kandinsky-numworks Goto Github PK
View Code? Open in Web Editor NEWA small module allowing to link the kandinsky module, from the Numworks, to a window.
Home Page: https://github.com/ZetaMap/Ion-numworks
A small module allowing to link the kandinsky module, from the Numworks, to a window.
Home Page: https://github.com/ZetaMap/Ion-numworks
Why doesn't the simple code
from kandinsky import *
red = color(255, 0, 0)
set_pixel(50, 50, red)
print(get_pixel(50, 50) == red)
Output
> True
As it does when ran on a Numworks calculator ?
Why ???
Here the error:
~$ python3 -m kandinsky
pygame 2.1.2 (SDL 2.0.16, Python 3.10.4)
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 187, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.10/runpy.py", line 146, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/lib/python3.10/runpy.py", line 110, in _get_module_details
import(pkg_name)
File "/home/bastien/.local/lib/python3.10/site-packages/kandinsky/init.py", line 5, in
from .util.Core import Core as __Core
File "/home/bastien/.local/lib/python3.10/site-packages/kandinsky/util/Core.py", line 18, in
class Core:
File "/home/bastien/.local/lib/python3.10/site-packages/kandinsky/util/Core.py", line 24, in Core
PATH = file[:file.rindex('\')]+'\'
ValueError: substring not found
I did: pip install kandinsky
And got:
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Utilisateur\PycharmProjects\pythonProject\venv\Scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:\\users\\utilis~1\
\appdata\\local\\temp\\pip-install-hyf1qy\\kandinsky\\setup.py'"'"'; __file__='"'"'c:\\users\\utilis~1\\appdata\\local\\temp\\pip-install-hyf1qy\\kandinsky\\setup.py'"'
"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'c:\users\utilis~1\appdata\local\temp\pip-pip-egg-info-sr7xyn'
cwd: c:\users\utilis~1\appdata\local\temp\pip-install-hyf1qy\kandinsky\
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\utilis~1\appdata\local\temp\pip-install-hyf1qy\kandinsky\setup.py", line 3, in <module>
with open("README.md", "r", encoding="utf-8") as fh:
TypeError: 'encoding' is an invalid keyword argument for this function
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Can you please add the functions that they are supported on the Upsilon version of the Numworks calculator ?
There is draw_line, draw_circle, ...
If you can, it will be really nice !
Sorry for potential errors, I'm French :)
Normally, the draw_string function takes an extra argument who specify the size of the text. I see you take in parameter the font size, but you don't do anything with. Is it normal ? Are you going to implement it ?
Else, I think it's a really good job !
So thanks !
Hi, i dont know since when, but the numworks calculator use the same RGB system as kandinsky module, so the conversion to numworks is not necessary (now if i put a 255,255,255 pixel on the Numworks and i get it back, it will output 255,255,255 and not 248,252,248 anymore) so you get differents outputs based on PC or Numworks.
Bonjour, j'ai remarqué que la petite police n'est pas disponible. pouvez vous la rajouter ?
Un exemple est quand on écris draw_string("Exemple",0,0,(0,0,0),(255,255,255),1)
Le 1 à la fin permet de choisir la seconde police d'écriture, plus petite. Essayez sur Numworks, vous verrez
Merci
Bonjour, j'ai remarqué que le taux de rafraichissement de l'écran est nettement supérieur à celui d'une Numworks, une possibilité de choisir un délai de rafraichissement serait alors la bienvenue pour simuler en conditions réelles. Cordialement
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.