G
Gary
If this is inappropriate here, please advise...
I'm having some difficulty getting ZODB to play nice with Boa.
Specifically, after creating a simple interface with a text field &
btn, I added a python module and imported it into the main (wxFrame)
code:
(python module code)
import ZODB.config
db = ZODB.config.databaseFromURL('calendar.conf')
conn = db.open()
dbroot = conn.root()
dbname = 'calendar_db'
sched = dbroot[dbname]
from persistent import Persistent
#from persistent.list import PersistentList
#from persistent.mapping import PersistentMapping
class Calendr(Persistent):
def __init__(self):
self.date = 0
self.datedata = ()
self.fds = []
self.first = []
self.second = []
self.third = []
self.all = []
self.stats = {}
abc = sched[20050101]
efg = abc.first
print efg
(end code)
When run (from the wxFrame), the textbox value set to 'efg,' an err
msg states that 'first' is not an attribute of Calendr.
When the textbox value is set to str(abc), the err msg states:
<persistent broken __main__.Calendar instance
'\x00\x00\x00\x00\x00\x00\x00\x1c'>
When the python module is run directly (thru Boa), it seems to work
fine, and the print value seen in the code above appears in the Output
section of the Boa Editor frame.
Any direction appreciated.
--
I'm having some difficulty getting ZODB to play nice with Boa.
Specifically, after creating a simple interface with a text field &
btn, I added a python module and imported it into the main (wxFrame)
code:
(python module code)
import ZODB.config
db = ZODB.config.databaseFromURL('calendar.conf')
conn = db.open()
dbroot = conn.root()
dbname = 'calendar_db'
sched = dbroot[dbname]
from persistent import Persistent
#from persistent.list import PersistentList
#from persistent.mapping import PersistentMapping
class Calendr(Persistent):
def __init__(self):
self.date = 0
self.datedata = ()
self.fds = []
self.first = []
self.second = []
self.third = []
self.all = []
self.stats = {}
abc = sched[20050101]
efg = abc.first
print efg
(end code)
When run (from the wxFrame), the textbox value set to 'efg,' an err
msg states that 'first' is not an attribute of Calendr.
When the textbox value is set to str(abc), the err msg states:
<persistent broken __main__.Calendar instance
'\x00\x00\x00\x00\x00\x00\x00\x1c'>
When the python module is run directly (thru Boa), it seems to work
fine, and the print value seen in the code above appears in the Output
section of the Boa Editor frame.
Any direction appreciated.
--