#python - Mon 19 Feb 2007 between 00:02 and 01:16

NY Lost Funds



ironfroggyanyone have very good knowledge of del.icio.us? particularly, are there tag conventions for foo:bar and @baz ?
MrNormSurgh... somewhere in my code some function is returning None instead of what it is supposed to return... I hate when I do that
terr_IF there is a python programmer here (familiar with perhaps IDLE) I'd like to know how to list a program I created interactively... I get the entire log of the session. Code is embedded... I want to separate the code and save it.
darkgreen|fwiw, ipython has a history
terr_I'm a python newbie. I used idle. Is this running ipython?
darkgreen|ipython is an interactive interpreter, run on command line
terr_darkgreen|: Well - I have no idea what version of python idle ran. It seems to work ok tho... I can't find a history command or any command to list the code I wrote
darkgreen|my information won't help you recover your program, I don't think IDLE has a history, but I havn't used it for awhile
terr_I havn't lost it - I logged the session and I can pull it into emacs and clip it out.
darkgreen|OK, I see what you mean with the '>>>' and extraneous output... looks like a messy job. :)
terr_the code is sitting in the interpreter. it will allow me to edit it nicely... so it has it.
there has to be a way for it to spill its gutz
I'm looking in help()... under topics. I don't see anything much of interest
ironfroggyterr_: basically, thats not how it works. interactive is interactive, not static. if you want to keep your code, write it in a file in the first place.
terr_huh?
ironfroggy: its GOT the code... how else can it execute it?
its in pyshell I think... if I can find it.
can I list all objects in a program?
ironfroggyyeah its there, in the readline history.
terr_the interpreter is not running the readline history.
ironfroggyyou can get a list of names combined from the current local scope and module with dir()
no, its running the line as you hit enter, then its just in the history.
do you think, for example, that the body of a function still has its source code, and that otherwise you couldnt execute that function when its called?
terr_ya. its got my code in a few objects and dir() listed them.
how can I print an object
ironfroggyit does not execute your source
terr_>>> print V_SGI
<function V_SGI at 0x408b0684>
ironfroggyyou enter the source, and it compiles it into bytecode, and it throws away your source and executes the bytecode.
there are ways of getting the source of a function, but they actually just extract it from the source file.
terr_however if I click on any line in the buffer I get to edit the code....
ironfroggythe source file which, in this case, does not exist.
terr_so how does the shell find the source for the function-object?
ironfroggyit doesnt need the source.
it never uses that
i mean, not after the initial compiling.
terr_so where does it find the text for me to edit?
ironfroggyits just in the buffer of the shell
terr_ironfroggy: are you saying the shell parses the buffer?
ironfroggypython has little or nothing to do with that at all

Page: 2 9 16 23 30 37 44 51 58 65 72 79 86 

IrcArchive

NY Lost Funds