Partial Parsing of Python

Peter Eckersley pde at cs.mu.oz.au
Mon Jul 1 05:13:43 EDT 2002


 
> But you certainly know that this isn't generally possible? Take
> 
>     somestrangefile.read().<tab>
> 
> for example.  The next best bet (read: hack) is to fork off a process
> which does the evaluation of an Subexpression.  This way you'd catch
> 90% of in-place modifications.  Doesn't work for files.  But then how
> often are you doing dynamic network/file communication on the commandline?   

I think this case is really important if you're implementing a command
shell; it may be less important if the progarm is only used as a
coding environment.  Lots of shell programs will do things like
open("filename").read().find("blah") -- with lots of nice shorthand, of
course :)

> This might change once we have multiline editing.  But one after three
> others :-) 
-- 
Peter Eckersley
Department of Computer Science   &                  mailto:pde at cs.mu.oz.au 
IP Research Institute of Australia             http://www.cs.mu.oz.au/~pde
The University of Melbourne               





More information about the Python-list mailing list