First time here? Check out the FAQ!

Revision history  [back]

It all works now. Thanks! It was just beginner issues. I took your advice and went to /usr/local/bin/python3 and pasted the .py file there and then ran it from that folder from a terminal window I opened up at that folder. I used someone else's code that tested good on their different system, but it was not text formatted properly and I had to make some changes. I had been getting indentation, syntax, and missing file errors and worked through them all with Wing IDE. Wing IDE has a good debugger. Thanks. I didn't know indentation was that much of an issue, but read that it is important in Python. The .py code is referencing the .ui code and I don't know if it is done differently elsewhere, but that is what worked for me.

This is at the top of the .py file:

import sys from PyQt5.QtWidgets import QMainWindow, QApplication from PyQt5 import uic

Ui_MainWindow, QtBaseClass = uic.loadUiType("Test.ui")

My workspace had the Test.py and Test.ui files together and when I finally ran the .py from Wing the GUI app leapt off the IDE. I put both .py and .ui files at /usr/local/bin/python3, also. I then ran it from the terminal at /usr/local/bin/python3 and it worked there, too. I wrote all this so someone else might find it useful. Thanks again for the advice. I am very happy.

It all works now. Thanks! It was just beginner issues. I took your advice and went to /usr/local/bin/python3 and pasted the .py file there and then ran it from that folder from a terminal window I opened up at that folder. I used someone else's code that tested good on their different system, but it was not text formatted properly and I had to make some changes. I had been getting indentation, syntax, and missing file errors and worked through them all with Wing IDE. Wing IDE has a good debugger. Thanks. I didn't know indentation was that much of an issue, but read that it is important in Python. The .py code is referencing the .ui code and I don't know if it is done differently elsewhere, but that is what worked for me.

This is at the top of the .py file:

import sys from PyQt5.QtWidgets import QMainWindow, QApplication from PyQt5 import uic

Ui_MainWindow, QtBaseClass = uic.loadUiType("Test.ui")

My workspace had the Test.py and Test.ui files together and when I finally ran the .py from Wing the GUI app leapt off the IDE. I put both .py and .ui files at /usr/local/bin/python3, also. I then ran it from the terminal at /usr/local/bin/python3 and it worked there, too. I wrote all this so someone else might find it useful. Thanks again for the advice. I am very happy.

It all works now. Thanks! It was just beginner issues. I took your advice went to /usr/local/bin/python3 and pasted the .py file there and then ran it from that folder from a terminal window I opened up at that folder. I used someone else's code that tested good on their different system, but it was not text formatted properly and I had to make some changes. I had been getting indentation, syntax, and missing file indentation and syntax errors and worked through them all with Wing IDE. Wing IDE has a good debugger. Thanks. I didn't know indentation was that much of an issue, but read that it is important in Python. The .py code is referencing the .ui code and I don't know if it is done differently elsewhere, but that is what worked for me.

This is at the top of the .py file:

import sys from PyQt5.QtWidgets import QMainWindow, QApplication from PyQt5 import uic

Ui_MainWindow, QtBaseClass = uic.loadUiType("Test.ui")

My workspace had the Test.py and Test.ui files together and when I finally ran the .py from Wing the GUI app leapt off the IDE. I put both .py and .ui files at /usr/local/bin/python3, also. I then ran it from the terminal at /usr/local/bin/python3 and it worked there, too. I wrote all this so someone else might find it useful. Thanks again for the advice. I am very happy.