Module calling-newbie question

R

Roland Hedberg

Hi!

I'm having problems with using modules. I'lls start with the error as it
is presented:

Exception in Tree control callback
Traceback (most recent call last):
File "/local/develop/apacheadmin/Tree.py", line 427, in PVT_set_state
self.widget.get_contents_callback(self)
File "sexptree.py", line 11, in getelements
for element in spo.sublist(node):
File "/local/develop/apacheadmin/sexp.py", line 103, in sublist
ss = string.split( subspec, "/" )
File "/usr/local/lib/python2.3/string.py", line 121, in split
return s.split(sep, maxsplit)

I using the tkinter based Tree.py module Charles E. "Gene" Cash and have
built one module sexp.py which among other things tries to split a
string. Really nothing fancy but it fails when the sexp module is used
by a python program sexptree.py (also by me).

Sexp.py as well as sexptree.py imports string.

What more can I do ??
What am I doing wrong ??

-- Roland
 
P

Peter Otten

Roland said:
Hi!

I'm having problems with using modules. I'lls start with the error as it
is presented:

Exception in Tree control callback
Traceback (most recent call last):
File "/local/develop/apacheadmin/Tree.py", line 427, in PVT_set_state
self.widget.get_contents_callback(self)
File "sexptree.py", line 11, in getelements
for element in spo.sublist(node):
File "/local/develop/apacheadmin/sexp.py", line 103, in sublist
ss = string.split( subspec, "/" )
File "/usr/local/lib/python2.3/string.py", line 121, in split
return s.split(sep, maxsplit)

I using the tkinter based Tree.py module Charles E. "Gene" Cash and have
built one module sexp.py which among other things tries to split a
string. Really nothing fancy but it fails when the sexp module is used
by a python program sexptree.py (also by me).

Sexp.py as well as sexptree.py imports string.

What more can I do ??
What am I doing wrong ??

You could throw in a

print repr(subspec)

statement above

ss = string.split(subspec, "/") # ss = subspec.split("/") in current Python

to verify that subspec is really a string.

Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top