python bytecode questions.

2007-10-09 Thread warhero
First question, I can't seem to get any python bytecode to be
produced. I've tried different techniques from chapter 30.8 to chapter
31 of the python guide.. I was under the assumption that after
compiling a file, it would output a pyc file, but where does it go?
Any help would be appreciated.

Second, Are there any other projects out for bundling python bytecode
files, making it able to use a couple files to distribute an entire
app??  I saw one of the effbot site but it's old as it was written for
1.4..

Third, can distributing code in pyc files, speed up the application?
Or would speed increases only be seen upon application initialization?
As an example, let's say I'm running an application server, would
distributing the source in some pyc files with a bootstrapper be any
faster overall, or just on init??

Thanks

-- 
http://mail.python.org/mailman/listinfo/python-list


importing modules question

2007-10-17 Thread warhero
Hey all, sorry for the totally newb question. I recently switched over
to python from ruby. I'm having problems figuring out how module
importing works.. as a simple example I've got these files:

/example/loader.py
/example/loadee.py

loadee.py
class loadee(object):
def __init__(self):
print "loadee"

loader.py
import loadee
if __name__ == "__main__":
l = loadee()


When I run the loader file I get a TypeError: TypeError: 'module'
object is not callable

hm. Sorry, this is totally newb, this is the only switching pains I've
had.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: importing modules question

2007-10-17 Thread warhero
got it figured out. nevermind.

-- 
http://mail.python.org/mailman/listinfo/python-list