Bug report
Bug description:
detects "60403" as invalid decimal literal, Python 3.13.0 (tags/v3.13.0:60403a5, Oct 7 2024, 09:38:07) [MSC v.1941 64 bit (AMD64)] on win32 is already in the code when i start a new project
Full Code:
Python 3.13.0 (tags/v3.13.0:60403a5, Oct 7 2024, 09:38:07) [MSC v.1941 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> import serial
import time
import xpc
arduino_port = 'COM3' # Change this to the correct port for your system
baud_rate = 9600
ser = serial.Serial(arduino_port, baud_rate)
host = "127.0.0.1" # Localhost (X-Plane running on the same machine)
port = 49009 # Default X-Plane Connect port
xp = xpc.XPlaneConnect(host=host, port=port)
try:
while True:
if ser.in_waiting > 0:
button_state = int(ser.readline().strip())
print("Button state: ", button_state)
xp.sendDREF("sim/flightmodel/controls/gear_handle", button_state) # Example: control gear
time.sleep(0.1)
except KeyboardInterrupt:
print("Exiting program.")
finally:
ser.close()
xp.close()
CPython versions tested on:
3.13
Operating systems tested on:
Windows