Op Mon, 10 Dec 2007 16:00:04 -0800, schreef Matimus:
better written:
python -mpy_compile FILENAME
The -m option doesn't work in all versions of cpython (I think since
v2.4, or maybe 2.3?).
--
JanC
--
http://mail.python.org/mailman/listinfo/python-list
Jeremy C B Nicoll a écrit :
Bruno Desthuilliers [EMAIL PROTECTED] wrote:
Jeremy C B Nicoll a écrit :
Figuring out how IDLE works is a bit beyond me at this stage.
Did you try out, or is it just an a priori ?
Sort of, no and yes...
A few weeks ago I started trying to use Python
On Dec 8, 6:45 pm, Jeremy C B Nicoll [EMAIL PROTECTED] wrote:
Steve Howell [EMAIL PROTECTED] wrote:
--- Jeremy C B Nicoll [EMAIL PROTECTED] wrote:
What command (in XP) does one need to issue to
syntaxcheck a saved python
script without running it?
Perhaps oversimplifying a bit,
Bruno,
Please explain why the NOP import is a GoodThing. Use small words
please. I'm not as young as I used to be.
I didn't know about reload(), but now that I'm informed on that point
I'm still using
os.remove('foo.pyc')
reload(foo)
A single command to do that would be nice.
Martin
Bruno
[EMAIL PROTECTED] wrote:
Bruno,
Please explain why the NOP import is a GoodThing. Use small words
please. I'm not as young as I used to be.
Because otherwise every import would result in overhead without any benefit.
Think of a module like this:
A_GLOBAL_VARIABLE =
[EMAIL PROTECTED] a écrit :
Bruno,
Please explain why the NOP import is a GoodThing. Use small words
please. I'm not as young as I used to be.
Each module that need access to another module must explicitely import
it. This means that, in a typical program, your main script will import
a
Simon Forman [EMAIL PROTECTED] wrote:
On Dec 8, 6:45 pm, Jeremy C B Nicoll [EMAIL PROTECTED] wrote:
Ah, I've been using IDLE so far (but would probably prefer to write
Python in my normal text editor). In IDLE Alt-X syntax checks the saved
copy of the file being edited (at least it seems
Jeremy C B Nicoll a écrit :
Simon Forman [EMAIL PROTECTED] wrote:
On Dec 8, 6:45 pm, Jeremy C B Nicoll [EMAIL PROTECTED] wrote:
Ah, I've been using IDLE so far (but would probably prefer to write
Python in my normal text editor). In IDLE Alt-X syntax checks the saved
copy of the file
python -c import py_compile; py_compile.compile(r'FILENAME')
... where FILENAME is the filename of the python script you want to check.
What this does in practice is (trying to) compile the source, and any
errors or warnings will be reported.
better written:
python -mpy_compile FILENAME
Bruno Desthuilliers [EMAIL PROTECTED] wrote:
Jeremy C B Nicoll a écrit :
Figuring out how IDLE works is a bit beyond me at this stage.
Did you try out, or is it just an a priori ?
Sort of, no and yes...
A few weeks ago I started trying to use Python IDLE and found a bug (which
I
On Dec 9, 1:26 pm, [EMAIL PROTECTED] wrote:
Thanks for all the help. Thought I'd spend my newbie days right in the
Python shell (there's lots to test when you're just starting) but I
guess that's not going to happen.
It would be a shame not to use the shell.
Everyone told me to get out of
Thanks for all the help. Thought I'd spend my newbie days right in the
Python shell (there's lots to test when you're just starting) but I
guess that's not going to happen.
Everyone told me to get out of the Python shell, one way or another.
OK. But this means that every execution must first load
[EMAIL PROTECTED] a écrit :
Thanks for all the help. Thought I'd spend my newbie days right in the
Python shell (there's lots to test when you're just starting) but I
guess that's not going to happen.
Everyone told me to get out of the Python shell, one way or another.
Everyone told you to
[EMAIL PROTECTED] schrieb:
Thanks for all the help. Thought I'd spend my newbie days right in the
Python shell (there's lots to test when you're just starting) but I
guess that's not going to happen.
Everyone told me to get out of the Python shell, one way or another.
OK. But this means
Steve Howell [EMAIL PROTECTED] wrote:
--- Jeremy C B Nicoll [EMAIL PROTECTED] wrote:
Steve Howell [EMAIL PROTECTED] wrote:
--- Jeremy C B Nicoll [EMAIL PROTECTED]
wrote:
What command (in XP) does one need to issue to syntax check a saved
python script without running
Op Sun, 09 Dec 2007 01:11:28 +, schreef Jeremy C B Nicoll:
What command (in XP) does one need to issue to syntax check a saved
python script without running it?
Does a syntax check report all syntax errors or just the first one
found?
python -c import py_compile;
I'm a java guy used to the effective edit/run cycle you get with a
good IDE.
Today I'm writing my first Python, but can't seem to find the way to
use Python's inherent edit/run cycle.
I edit my source, import it into Python, run it. Fine. Then I edit
again, but the next import doesn't notice
[EMAIL PROTECTED] a écrit :
I'm a java guy used to the effective edit/run cycle you get with a
good IDE.
Today I'm writing my first Python, but can't seem to find the way to
use Python's inherent edit/run cycle.
I edit my source, import it into Python, run it. Fine. Then I edit
again,
--- [EMAIL PROTECTED] wrote:
What don't I know that I should know to just
edit/run, preferably at
the tap of a function key?
Most good editors let you do these things:
1) Save a file.
2) Run a script from the shell.
3) Turn steps 1 and 2 into a macro.
4) Allow you to map the
--- Bruno Desthuilliers
[EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] a écrit :
I'm a java guy used to the effective edit/run
cycle you get with a
good IDE.
Today I'm writing my first Python, but can't seem
to find the way to
use Python's inherent edit/run cycle.
Use an IDE
[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
| What don't I know that I should know to just edit/run, preferably at
| the tap of a function key?
In IDLE, which come with Python, it is F5. (See Options/General/Autosave)
Startup is about .1 sec since the program runs in a window of
Steve Howell [EMAIL PROTECTED] wrote:
There are a zillion powerful editors out there. I've
been productive in EditPlus, MultiEdit, SlickEdit,
vim, and emacs, just to throw out a few examples.
What command (in XP) does one need to issue to syntax check a saved python
script without running
--- Jeremy C B Nicoll [EMAIL PROTECTED] wrote:
Steve Howell [EMAIL PROTECTED] wrote:
There are a zillion powerful editors out there.
I've
been productive in EditPlus, MultiEdit, SlickEdit,
vim, and emacs, just to throw out a few examples.
What command (in XP) does one need to issue
Steve Howell [EMAIL PROTECTED] wrote:
--- Jeremy C B Nicoll [EMAIL PROTECTED] wrote:
What command (in XP) does one need to issue to
syntax check a saved python
script without running it?
Perhaps oversimplifying a bit, running python does a
syntax check, and if it passes, moves on
--- Jeremy C B Nicoll [EMAIL PROTECTED] wrote:
Steve Howell [EMAIL PROTECTED] wrote:
--- Jeremy C B Nicoll [EMAIL PROTECTED]
wrote:
What command (in XP) does one need to issue to
syntax check a saved python
script without running it?
Perhaps oversimplifying a bit,
25 matches
Mail list logo