breaking code up into seperate files

"Winterflood, Jonathan" <[email protected]>
Newsgroups gmane.comp.web.zope.cps.devel
Message-ID <2A5D32A4E4678A4D8A8AF34E3B0A785F26DDCF@CORPMAIL31.corp.capgemini.com>
Hi all,
 
I have a number of .py files in my product that need to use the same set of functions; So far i've been resorting to copy/paste to make them work...
 
Obviously this isn't a good idea, so i created a file containing (so far) one function
this file is placed at the root of my product, and is organised as such:
 
""" my file's comment
"""
 
def myfunc():
    """myfunc's comment
    """
    etc...
 
EOF(myfile.py)
 
To use this, I'm trying to import it in the .py that's using it:
from myfile import myfunc
 
This gives me a traceback whenever I try to use it...:
ImportError: import of "csv_render" is unauthorized
 
What should I do to allow the import?
 
TIA,
Jonathan


This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient,  you are not authorized to read, print, retain, copy, disseminate,  distribute, or use this message or any part thereof. If you receive this  message in error, please notify the sender immediately and delete all  copies of this message.

_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.