[Edu-sig] Bootable Python CDs?

kirby urner kirby.urner at gmail.com
Fri Apr 28 02:06:29 CEST 2006

> If you're using an IDE, or even taking the traditional text editor and
> console approach, I guess you wouldn't really need things like import
> hooks/hacks to get where you want to go. Still, they might come in handy
> for interactive work.

Why do you call import a hook/hack?  It's just standard Python,
typical at the top of any normal Python program.  sys.path is where
the interpreter searches.  Nothing could be simpler.  Adding a new
directory to sys.path is not any dark and mysterious hack.

> In the context of an import hook, uploading files wouldn't appear to make
> much sense, but it reminds me of the SAVE command I used to use in BASIC.
> It was more useful when programs were developed interactively as listings
> at the command line, but I notice that ipython has a save command, even if
> it does something quite different.

Typically you test things interactively but build your saved classes
and functions in a module (a .py file).  Saving the interactive
session directly is not very useful, except for later reference.  It's
not executable code.  The prompt characters (>>>) get in the way.

> A save command (export hook?) that pickled and uploaded user-created objects
> to a remote server might be useful in certain situations.
> David

This all sounds very baroque and like making something very simple
into something very complicated.  I also don't recognize your jargon. 
Been using Python long?  Just asking.


More information about the Edu-sig mailing list