Directly executing from an egg

RVince rvince99 at gmail.com
Tue Aug 23 09:45:17 EDT 2011


I have created an egg file with one source file in it, hello.py (I
just want to go through the entire uild/install/execute cycle using
egg files). I create it fine, and now I want to execute the eg file
directly (i.e. run it without unpacking or easy_install'ing it). So
when I invoke it from the directory the egg is in with:

python 'hello-1.0-py2.6.egg

I get:

can't find '__main__.py' in 'hello-1.0-py2.6.egg'

How do I remedy this? I've looked through the docs but it seems
ambiguous on this point to me. Below is the setup section from my
setup.py which I used to create this egg. Thank you, RVince

setup(
    name='hello',
    version='1.0',
    description='',
    author='',
    author_email='',
    install_requires=[
        "SQLAlchemy>=0.4",
        "psycopg2",
    ],
    zip_safe=False,
    entry_points="""
    [hello]
    hello = hello:hello_app
    """,
)



More information about the Python-list mailing list