newbie - How do I import automatically?

Claudio Grondi claudio.grondi at freenet.de
Wed Nov 16 15:46:29 EST 2005


Probably you have inbetween already found the 'def runsource(' line in the
PyShell.py , but maybe you still wait for a reply, so here it is:

yes, you put the two lines at the beginning of in PyShell.py existing
runsource() method of the class ModifiedInterpreter(InteractiveInterpreter)

If in my Windows IDLE version the things are different from yours, sorry,
I can't help in that case having no Linux installation available.

Claudio

<bobueland at yahoo.com> schrieb im Newsbeitrag
news:1132167930.785898.172070 at o13g2000cwo.googlegroups.com...
> Where do I put
>
>  def runsource(self, source):
>         if(source == ''):
>            source = 'from btools import *'
>         "Extend base class method: Stuff the source in the line cache
> first"
>         filename = self.stuffsource(source)
>
> Do I put it in Pyshell.py or somewhere else?
>
> Bob
>






More information about the Python-list mailing list