User Tools

Site Tools


python_code

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
python_code [2025/03/27 15:02] – add button flag byte code brandonpython_code [2025/05/15 03:28] (current) – add notes about how to use this page brandon
Line 1: Line 1:
 ====== Python Code ====== ====== Python Code ======
  
-===== Create Button Flag Byte=====+This a hub page for Python code linked to other pages using the ''section'' tag.
  
---> Python Create Button Flag Byte #+Example of how to embed a code section in another page in DokuWiki: \\ 
 +''{ {section>:python_code#user_string&noheader&nofooter} }'' \\ 
 +<wrap lo>Remove the spaces between the curly brackets.</wrap> 
 + 
 +Any script with dependencies should use [[https://packaging.python.org/en/latest/specifications/inline-script-metadata|inline script metadata]]. 
 + 
 +===== Create Button Flag ===== 
 + 
 +--> Python Create Button Flag #
 <code python asi_create_button_flag.py> <code python asi_create_button_flag.py>
 def create_button_code(at: int = 0, home: int = 0, joystick: int = 0, zero_halt: int = 0) -> int: def create_button_code(at: int = 0, home: int = 0, joystick: int = 0, zero_halt: int = 0) -> int:
Line 45: Line 53:
 <-- <--
  
-===== Parse Button Flag Byte =====+===== Parse Button Flag =====
  
---> Python Parse Button Flag Byte+--> Python Parse Button Flag
 <code python asi_parse_button_flag.py> <code python asi_parse_button_flag.py>
 # the value returned from EXTRA M? # the value returned from EXTRA M?
Address: 29391 W Enid Rd. Eugene, OR 97402, USA | Phone: +1 (541) 461-8181
python_code.1743102161.txt.gz · Last modified: by brandon