Here is my add.py
from MiddleKit.Run.MySQLObjectStore import MySQLObjectStore
from Customer import Customer

def main():
        store = MySQLObjectStore(user='root', passwd='')
        store.readModelFileNamed('./Billing')
        l = store.fetchObjectsOfClass(Customer)
        print l

if __name__=='__main__':
        main()

Here is error

python add.py /var/Webware/WebKit/test/Billing$ 

Traceback (most recent call last):
  File "add.py", line 2, in ?
    from Middle.Customer import Customer
ImportError: No module named Middle.Customer

How could I fix this or how to get all records from Customer ???

I have such files
./Billing.mkmodel          
./GeneratedPy  
./GeneratedSQL       
./MiddleKit  - this is symlink to MiddleKit
./MiscUtils  - also symlink              
./Customer.py             
./Customer.pyc              
 __init__.py                
add.py     

Here is my csv:

Class,Attribute,Type,Default,isRequired,Min,Max,Notes                                  
              
Customer,,,,,,,                                                                        
              
,CustomerID,int,,,,,                                                                   
              
,CustomerName,string,"",,,250,                                                         
              
,CustomerType,string,"client",,,50,                                                    
              
,ContactName,string,,,,250,                                                            
              
,ContactTitul,string,,,,50,                                                            
              
,Addres,string,,,,250,                                                                 
              
,PostalCode,string,,,,50,                                                              
              
,City,string,,,,250,                                                                   
              
,Country,string,"CZ",,2,2,                                                             
              
,TelphoneNumber1,string,,,,250,                                                        
              
,TelphoneNumber2,string,,,,250,                                                        
              
,TelphoneNumber3,string,,,,250,                                                        
              
,FaxNumber,string,,,,250,                                                              
              
,EmailAddress1,string,,,,250,                                                          
              
,EmailAddress2,string,,,,250,                                                          
              
,EmailAddress3,string,,,,250,                                                          
              
,ICO,string,,,,50,                                                                     
              
,DIC,string,,,,50,                                                                     
              
,Inactive,int,0,,,50,



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to