π
<-

PythonExtra v0.4.0 Bêta

Programmation et implémentation d'algorithmes.

PythonExtra v0.4.0 Bêta

Unread postby SlyVTT » 20 Apr 2025, 09:07

Hello,

juste un petit mot pour signaler la sortie de PythonExtra v0.4.0 Bêta.

Pour ceux qui ne sauraient pas ce qu'est PythonExtra, il s'agit d'une implémentation de MicroPython fonctionnant au dessus de gint, un unikernel permettant de coder des addins fonctionnant sur les machines Casio (avec écrans monochromes - série fx9860G et avec écrans couleurs - série fx-CG).

PythonExtra embarque la version 1.25.0 preview de MicroPython ainsi que divers modules qui ne sont pas proposés par la concurrence:
- une compatibilité avec le fx-CP400 / fx-CP400+E ou fx-CG500 (ClassPad) si jailbreaké avec HollyHock 2. Ouvrant enfin la voie au Python sur ces superbes machines, vu que Casio ne fait pas officiellement l'effort pour elles.
- un module gint qui permet d'avoir accès à des routines optimisées de rendu graphique et une gestion fine des événements claviers, et nouvellement des fontes de caractères et la gestion du TouchScreen du ClassPad.
- un module de compatibilité Numworks et Upsilon pour les fx-CG10 / 20 / 50 et Math+ (pas sur monochrome et ClassPad à ce stade)
- un module permettant l'accès au système de fichier (open(), write(), read() et compagnie)
- un moteur de gris pour les machines monochromes permettant d'utiliser 4 tons (blanc, gris clair, gris foncé, noir) au lieu de seulement 2 (noir, blanc) sur l'écran.

La version 0.4.0 est disponible pour téléchargement ici : PythonExtra-pe-0.4.0-beta.zip

Démo de Magical Meltdown tournant sur Math+ :



Images de PythonExtra tournant sur fx-CP400+E jailbreaké :

Image
Image
Image
Some works in progress :
The GUI Toolkit NF for nSpireMyShmup for fxCG-50Magic Light for Casio Graph 90+E
and
Magic Light for nSpire CX/CX-II
Simple Text Editor for nSpireOutRun for Casio Graph 90+E
95%
50%
100%
75%
100%
And more to come ... stay tuned
User avatar
SlyVTTPremium
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Level up: 48.7%
 
Posts: 552
Images: 32
Joined: 19 Jan 2021, 09:41
Location: France
Gender: Male
Calculator(s):
MyCalcs profile
GitHub: SlyVTT

Re: PythonExtra v0.4.0 Bêta

Unread postby Adriweb » 23 Apr 2025, 12:56

Merci pour l'info - c'est clairement du bon boulot qui a été fait ! :)

MyCalcs: Help the community's calculator documentations by filling out your calculators info!
MyCalcs: Aidez la communauté à documenter les calculatrices en donnant des infos sur vos calculatrices !
Inspired-Lua.org: All about TI-Nspire Lua programming (tutorials, wiki/docs...)
My calculator programs
Mes programmes pour calculatrices
User avatar
AdriwebAdmin
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Level up: 79.7%
 
Posts: 14822
Images: 1131
Joined: 01 Jun 2007, 00:00
Location: France
Gender: Male
Calculator(s):
MyCalcs profile
Twitter: adriweb
GitHub: adriweb

Re: PythonExtra v0.4.0 Bêta

Unread postby SlyVTT » 23 Apr 2025, 19:09

Merci Adrien :D
Some works in progress :
The GUI Toolkit NF for nSpireMyShmup for fxCG-50Magic Light for Casio Graph 90+E
and
Magic Light for nSpire CX/CX-II
Simple Text Editor for nSpireOutRun for Casio Graph 90+E
95%
50%
100%
75%
100%
And more to come ... stay tuned
User avatar
SlyVTTPremium
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Level up: 48.7%
 
Posts: 552
Images: 32
Joined: 19 Jan 2021, 09:41
Location: France
Gender: Male
Calculator(s):
MyCalcs profile
GitHub: SlyVTT

Re: PythonExtra v0.4.0 Bêta

Unread postby batzaier » Today, 03:39

Français :
Bonjour, je rencontre des difficultés pour exécuter le code suivant en Python :
Code: Select all
from math import sqrt
from kandinsky import set_pixel

Color = (100, 150, 100)

Velocidad = int(input("Velocidad en x (m/s): "))
Altura = int(input("Altura sobre el suelo (m): "))

g = 9.8  # gravité

Tiempo = sqrt(2 * Altura / g)
i = 0
dt = Tiempo / 25  # incréments de temps

while i <= Tiempo:
    x = int(Velocidad * i)
    y = int(Altura - 0.5 * g * i * i)
    # Comme sur l’écran l’axe Y augmente vers le bas
    pantalla_y = 220 - y  # en supposant que l’écran fait 240 px de haut
   
    set_pixel(x, pantalla_y, Color)
   
    i += dt

Le programme me demande correctement les données initiales, mais il ne passe pas ensuite à l'affichage graphique. Je vous serais reconnaissant de m’aider à comprendre l’erreur commise ou de me proposer une solution possible pour que le code fonctionne comme prévu.
P.S. : J’admire votre travail.

English:
Hello, I’m having trouble running the following Python code:
Code: Select all
from math import sqrt
from kandinsky import set_pixel

Color = (100, 150, 100)

Velocidad = int(input("Velocidad en x (m/s): "))
Altura = int(input("Altura sobre el suelo (m): "))

g = 9.8  # gravity

Tiempo = sqrt(2 * Altura / g)
i = 0
dt = Tiempo / 25  # time steps

while i <= Tiempo:
    x = int(Velocidad * i)
    y = int(Altura - 0.5 * g * i * i)
   
    # Since on screen the Y-axis increases downward
    pantalla_y = 220 - y  # assuming the screen height is 240 px
   
    set_pixel(x, pantalla_y, Color)
   
    i += dt

The program correctly asks for the initial data, but then it doesn’t proceed to the graphical display. I would appreciate your help in understanding the error or finding a possible solution so that the code works as expected.
P.S.: I admire your work.
User avatar
batzaier
Niveau 0: MI (Membre Inactif)
Niveau 0: MI (Membre Inactif)
Level up: 0%
 
Posts: 1
Joined: Today, 03:32
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: PythonExtra v0.4.0 Bêta

Unread postby SlyVTT » Today, 07:41

I haven't checked the content of the program by itself, but it is clear that if something is plot, it will not show (or at least will not remain on the screen) cause it is returning directly to the console (SHELL).

You need to stop the program at the end with a loop asking for a press to EXE for example :

while not keydown(KEY_EXE) : 1

so it becomes (also don't forget to add ion in imports)

Code: Select all
from math import sqrt
from kandinsky import set_pixel
from ion import keydown

Color = (100, 150, 100)

Velocidad = int(input("Velocidad en x (m/s): "))
Altura = int(input("Altura sobre el suelo (m): "))

g = 9.8  # gravity

Tiempo = sqrt(2 * Altura / g)
i = 0
dt = Tiempo / 25  # time steps

while i <= Tiempo:
    x = int(Velocidad * i)
    y = int(Altura - 0.5 * g * i * i)
   
    # Since on screen the Y-axis increases downward
    pantalla_y = 220 - y  # assuming the screen height is 240 px
   
    set_pixel(x, pantalla_y, Color)
   
    i += dt

while not keydown(KEY_EXE) : 1
Some works in progress :
The GUI Toolkit NF for nSpireMyShmup for fxCG-50Magic Light for Casio Graph 90+E
and
Magic Light for nSpire CX/CX-II
Simple Text Editor for nSpireOutRun for Casio Graph 90+E
95%
50%
100%
75%
100%
And more to come ... stay tuned
User avatar
SlyVTTPremium
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Level up: 48.7%
 
Posts: 552
Images: 32
Joined: 19 Jan 2021, 09:41
Location: France
Gender: Male
Calculator(s):
MyCalcs profile
GitHub: SlyVTT


Return to Programmation

Who is online

Users browsing this forum: No registered users and 9 guests

-
Search
-
Social TI-Planet
-
Featured topics
Comparaisons des meilleurs prix pour acheter sa calculatrice !
"1 calculatrice pour tous", le programme solidaire de Texas Instruments. Reçois gratuitement et sans aucune obligation d'achat, 5 calculatrices couleur programmables en Python à donner aux élèves les plus nécessiteux de ton lycée. Tu peux recevoir au choix 5 TI-82 Advanced Edition Python ou bien 5 TI-83 Premium CE Edition Python.
Enseignant(e), reçois gratuitement 1 exemplaire de test de la TI-82 Advanced Edition Python. À demander d'ici le 31 décembre 2024.
Aidez la communauté à documenter les révisions matérielles en listant vos calculatrices graphiques !
1234
-
Donations / Premium
For more contests, prizes, reviews, helping us pay the server and domains...
Donate
Discover the the advantages of a donor account !
JoinRejoignez the donors and/or premium!les donateurs et/ou premium !


Partner and ad
Notre partenaire Jarrety Calculatrices à acheter chez Calcuso
-
Stats.
1366 utilisateurs:
>1341 invités
>19 membres
>6 robots
Record simultané (sur 6 mois):
6892 utilisateurs (le 07/06/2017)
-
Other interesting websites
Texas Instruments Education
Global | France
 (English / Français)
Banque de programmes TI
ticalc.org
 (English)
La communauté TI-82
tout82.free.fr
 (Français)