help with some problems on Tutorial 1 for GladeVcp

More
20 Dec 2013 20:25 - 20 Dec 2013 20:41 #41871 by BigJohnT
I also ran the first part of the file in a python terminal with no errors. I suspect a typo.
#!/usr/bin/env python

import gtk
import gobject
import gladevcp.makepins
from gladevcp.gladebuilder import GladeBuilder
import hal
import sys,os

# set up paths to files
BASE = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), ".."))
libdir = os.path.join(BASE, "lib", "python")
sys.path.insert(0, libdir)
datadir = os.path.join(BASE, "share", "linuxcnc")
xmlname = os.path.join(datadir,"gui3.glade")

I also just ran the example from a RIP with no errors.

JT
Last edit: 20 Dec 2013 20:41 by BigJohnT.

Please Log in or Create an account to join the conversation.

More
21 Dec 2013 08:30 #41894 by gww250
I never did find a problem in that code but after switching over to my other computer it runs with only a minor error which is as follows:

Traceback (most recent call last):
File "laser5-alone.py", line 19, in <module>
class laser5(object):
File "laser5-alone.py", line 79, in laser5
app = laser5()
NameError: name 'laser5' is not defined

Do I need to change the name of the python program to match the name of the Glade file? I.E. use laser5.py and laser5.glade.

Please Log in or Create an account to join the conversation.

Moderators: mhaberlerHansU
Time to create page: 0.119 seconds
Powered by Kunena Forum