- Posts: 1107
- Thank you received: 3
Python User Interface Error
2 years 11 months ago #286460
by JT
Python User Interface Error was created by JT
I'm trying to use the python interface to create a new GUI using PyQt6 but I can't seem to figure out how to load the ini file without an error inifile(-ini_ failed.
Edit: repo was just a scratch repo so I deleted it.
One way to get the ini file into the python module for both local testing and as the DISPLAY entry is:
JT
Edit: repo was just a scratch repo so I deleted it.
One way to get the ini file into the python module for both local testing and as the DISPLAY entry is:
Code:
for i in range(len(sys.argv)):
if sys.argv[i].endswith('.ini'):
inifile = linuxcnc.ini(sys.argv[i])
JT
Please Log in to join the conversation.
2 years 11 months ago #286465
by JT
Replied by JT on topic Python User Interface Error
I did figure it out, I was using the docs and the sys.argv is not correct if you are running the GUI directly in LinuxCNC.
So the docs say to use inifile = linuxcnc.ini(sys.argv[1]) but that's not correct. Qtvcp has a better approach to getting the ini file location.
JT
Code:
/usr/bin/emc3
-ini
/home/john/linuxcnc/configs/emc/emc.ini
So the docs say to use inifile = linuxcnc.ini(sys.argv[1]) but that's not correct. Qtvcp has a better approach to getting the ini file location.
JT
Please Log in to join the conversation.
Time to create page: 0.070 seconds
