[issue7220] python -m no longer executes packages directly

Martijn Ras report at bugs.python.org
Tue Oct 27 13:48:18 CET 2009


New submission from Martijn Ras <Martijn.Ras at GMail.com>:

Heya Folks,

I've just started moving some of my projects from Python 2.5 to Python 2.6.

I used to start some of these packages using python -m <packagename>.

In Python 2.6 this results in the following error:

/usr/bin/python: <packagename> is a package and cannot be directly executed

I got everything running again, by using the following command:

python -m <packagename>.__init__

This strikes me as awkward, since every package should still have the
__init__.py file. Can this be fixed so running python -m <packagename>
will once more be equal to python -m <packagename>.__init__?

Mazzel,

Martijn.

----------
components: None
messages: 94555
nosy: Martijn
severity: normal
status: open
title: python -m no longer executes packages directly
versions: Python 2.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7220>
_______________________________________


More information about the Python-bugs-list mailing list