1) why don't python / idle use numbered lines in their scripting, like
basic? how do you keep track of large batches of code without them?
Because BASIC was created in the days of paper teletypes with
minimal editors. In BASIC, you would correct a line by retyping it with
the line number and the interpreter was responsible for "reordering" the
lines in memory. You could actually type a program in from last line to
first (ie, upside down) and it would run.
NO other language that I know of uses line numbers to control source
code order. Heck, Visual BASIC doesn't use line numbers either (I don't
recall if AmigaBASIC required them either).
All other languages require one to use a text editor to create a
source file, and one uses the functions of the text editor to make sure
the source code is in the correct order.
2) in IDLE, how do you save a program such that it can be run, say from
windows the "run" function?
You don't enter the program in the console window (that's the one
with the >>> prompt). {At least, I seem to recall that being the first
window to come up with IDLE back when I tried it, but now I'm just
getting the IDLE editor window, and the console has to be explicitly
requested}
I don't use the "start/run" function for such... I either just
double-click the .py file (or .pyw if it is a GUI program that doesn't
need a command line shell), or I open a command line shell
(start/programs/accesories/command prompt -- if you haven't create a
shortcut on the start menu itself) and type "python whatever.py" {note,
I /can/ run them with just "whatever.py" but prefer not to -- Windows
has some glitch on how command line arguments and redirection are
handled}
3) are most of you doing your script editing in IDLE or something more
fully featured?
I've always installed the ActiveState version, and use PythonWin for
editing. For a simple editor, one could use SciTE...
4) how are you importing previously written blocks of code into your
code? cut and paste? what is the best way to organize snippets of
code?
In logical modules that one imports...
import snippet_module
snippet_module.function_x(some, argument)
--
Wulfraed Dennis Lee Bieber KD6MOG
(e-mail address removed) (e-mail address removed)
HTTP://wlfraed.home.netcom.com/
(Bestiaria Support Staff: (e-mail address removed))
HTTP://www.bestiaria.com/