[Geany] Detecting symbols

Enrico Tröger enrico.troeger at xxxxx
Tue May 19 21:14:47 UTC 2009


On Tue, 19 May 2009 23:12:28 +0200, spir wrote:

>Le Tue, 19 May 2009 22:33:07 +0200,
>Enrico Tröger <enrico.troeger at uvena.de> s'exprima ainsi:
>
>> For testing the parser, I mainly used the following code snippet:
>> import os, sys, errno, re, glob, gc, datetime, shutil
>> try: import cPickle
>> except: import pickle as cPickle
>> import Runner, TaskGen, Node, Scripting, Utils, Environment, Task,
>> Logs, Options
>> from Logs import debug, error, info
>> from Constants import *
>> 
>> Are there other variants of "import" statements possible? You know,
>> my Python knowledge is very limited :).
>
>Yes, sadly, there's a variant that will complicate a bit your table
>updating:
>   from soup import foo as f, bar as b, ...
>renames (in local scope) while importing.
>
>There are also imports from sub packages (read: sub-dir):
>  import foo.bar
>  from foo.bar import fish, chips as crisps
>
>And recently (python 2.5 I guess) relative imports using leading dot
>(s), in a form similar to *nix filesystems:
>  from ..foo import bar

Yay, would have been too cool if my code would have been working :).
I'll took into your example later (read end of the week or next week).

If anyone wants to improve it, have a look at parseImports() in
tagmanager/python.c.


Regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/users/attachments/20090519/3ab460d4/attachment.pgp>


More information about the Users mailing list