Commit 82251510 authored by Guillaume Seguin's avatar Guillaume Seguin

Detect Python3 nicely

parent f7cd5380
...@@ -15,6 +15,20 @@ ...@@ -15,6 +15,20 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Printrun. If not, see <http://www.gnu.org/licenses/>. # along with Printrun. If not, see <http://www.gnu.org/licenses/>.
import sys
try:
import wx
except:
print("wxPython is not installed. This program requires wxPython to run.")
if sys.version_info.major >= 3:
print("""\
As you are currently running python3, this is most likely because wxPython is
not yet available for python3. You should try running with python2 instead.""")
sys.exit(-1)
else:
raise
from printrun.pronterface import PronterApp from printrun.pronterface import PronterApp
if __name__ == '__main__': if __name__ == '__main__':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment