Martin Bless wrote:
[Nick Coghlan <[EMAIL PROTECTED]>]
One thing I stumbled across with the current implementation:
Why doesn't "python -m abc" work with
./abc/
./abc/__init__.py
assuming ./abc/ is directly on the path? In analogy to normal module
import?
It doesn't work because abc is a package, r
Martin Bless wrote:
> On my Windows machine this command line switch really makes my life so
> much easier.
if you use windows, chances are that what you really want is exemaker...
--
http://mail.python.org/mailman/listinfo/python-list
[Nick Coghlan <[EMAIL PROTECTED]>]
>Python 2.4's -m command line switch only works for modules directly on
>sys.path.
On my Windows machine this command line switch really makes my life so
much easier. I appreciate -m very much. Going further as proposed in
PEP 338 sounds good to me.
One thing
In article <[EMAIL PROTECTED]>,
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote:
> Just wrote:
>
>
> >> as for the rest of your arguments, I have to assume that you were joking.
> >> (or
> >> that you have no experience whatsoever of distribution of Python programs
> >> in
> >> Unix and Windows envi
In article <[EMAIL PROTECTED]>,
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote:
> Nick Coghlan wrote:
>
> >> $ python -c "import foo.bar" arg
> >
> > This doesn't work. Any code protected by "if __name__ == '__main__':" won't
> > run in this context
> > (since 'foo.bar' is being imported as a m
Fredrik Lundh wrote:
in my original post, I said
I'd say that for a typical user, "A" is a marginal improvement over
"B", compared to "C".
which, I thought, tried to say that for a user expecting "C", neither "A" nor
"B"
is good enough.
Ah, OK - that makes a lot more sense than the way I r
Just wrote:
> This subthread was specifically about your
>
> python -c "import foo.bar" arg
>
> suggestion.
in my original post, I said
I'd say that for a typical user, "A" is a marginal improvement over
"B", compared to "C".
which, I thought, tried to say that for a user expecting "C
Fredrik Lundh wrote:
my suggestion was to make sure that the user can type "bar arg" to start a
Python program called "bar" with the argument "arg". that's trivial, on all
major platforms, despite what Nick says -- and yes, you can start threads
from a program named "bar". try it.
The command lin
Just wrote:
>> as for the rest of your arguments, I have to assume that you were joking.
>> (or
>> that you have no experience whatsoever of distribution of Python programs in
>> Unix and Windows environments).
>
> Whatever. You suggestion does not work in many cases. How about a
> program that s
Nick Coghlan wrote:
>> $ python -c "import foo.bar" arg
>
> This doesn't work. Any code protected by "if __name__ == '__main__':" won't
> run in this context
> (since 'foo.bar' is being imported as a module, not run as a script).
I appreciate that you're taking the time to teach me about Py
Fredrik Lundh wrote:
I'd say that for a typical user,
$ python -m foo.bar arg
is a marginal improvement over
$ python -c "import foo.bar" arg
This doesn't work. Any code protected by "if __name__ == '__main__':" won't run
in this context (since 'foo.bar' is being imported as a module, not
[EMAIL PROTECTED] wrote:
> A useful feature that is a logical extension of current '-m' behaviour.
> (I'm actually surprised it was left out in the first place)
>
> This will definitely allow me and other python programmers to package
> our scripts better
>
> Sounds Good to me. (-;
/me too :)
[EMAIL PROTECTED] wrote:
> This will definitely allow me and other python programmers to package
> our scripts better
puzzling.
I'd say that for a typical user,
$ python -m foo.bar arg
is a marginal improvement over
$ python -c "import foo.bar" arg
compared to
$ bar arg
--
[EMAIL PROTECTED] wrote:
A useful feature that is a logical extension of current '-m' behaviour.
(I'm actually surprised it was left out in the first place)
That seems to be a common reaction :)
It was dropped for 2.4 because I wasn't sure exactly how it should work, and 2.4
was already in beta at
A useful feature that is a logical extension of current '-m' behaviour.
(I'm actually surprised it was left out in the first place)
This will definitely allow me and other python programmers to package
our scripts better
Sounds Good to me. (-;
Thank you for the PEP
AK
--
http://mail.python.or
Python 2.4's -m command line switch only works for modules directly on sys.path.
Trying to use it with modules inside packages will fail with a "Module not
found" error. This PEP aims to fix that for Python 2.5.
Previously, posting of a draft version of the PEP to python-dev and python-list
did
16 matches
Mail list logo