On Jun 6, 8:59 pm, "Ali Afshar" <[EMAIL PROTECTED]> wrote:
> On 06/06/07, Stani's Python Editor <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Hi,
> > A good point. I think we all have been thinking about this. Important
> > issues for the design is the extraction method and the sources.
>
> > *the method*
> > Importing is a lazy, but accurate way of importing, but is security wise
> > not such a good idea. Parsing throught an AST compiler is better,
> > however more difficult. Here are two options.
>
> > From version 2.5 the standard Python compiler converts internally the
> > source code to an abstract syntax tree (AST) before producing the
> > bytecode. So probably that is a good way to go as every python
> > distribution has this battery included.
>
> > As Nicolas suggested earlier on this mailing list, there is another
> > option: the AST compiler in python or PyPy:
>
> What concerns me about these is whether they would work in a module
> which has a syntax error.
>
> I believe Wing's compiler bit of their code completion is open source.
> I remember having seen the code.
It is indeed, but is implemented in C, which means an extra dependency
and not a 100% python solution. Normally modules (especially in the
pythonpath) which you import don't have syntax errors. Maybe logilabs
implementation handles syntax errors well as it is developed for
PyLint. Nicolas?

Stani

Reply via email to