Python User Interface Error
25 Nov 2023 14:29 - 25 Nov 2023 15:39 #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:
for i in range(len(sys.argv)):
if sys.argv[i].endswith('.ini'):
inifile = linuxcnc.ini(sys.argv[i])
JT
Last edit: 25 Nov 2023 15:39 by JT.
Please Log in or Create an account to join the conversation.
25 Nov 2023 15:12 #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
/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
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
Time to create page: 0.098 seconds