ActiveState Community

Python in Komodo

Posted by romankrv on 2008-10-08 03:35

Hello.

Help me please.
My Komodo Edit v4.4.1 incorrect autolist complete somtimes.

for example:
python code:

from os import environ
def env(request):
    raw_a = {'q':1, 'w':2,'r':4}
    
    a = raw_a.items()
    b = environ.items()
    c=dir(environ)
    return render_to_response('env.html', {
        'env' : b,
        'dop' : c
    })

but I render my template which content it:

html-template:

{% for i in dop %}
    
  • {{ i }}
  • {% endfor %}

    then it exist there

    As example that I attach screen here.

    Help me with advice How it fix

    Thanks!

    ps
    sorry me English

    AttachmentSize
    P1010033_.JPG23.21 KB
    P1010042_.JPG22.33 KB
    P1010043_.JPG34.92 KB

    toddw | Wed, 2008-10-08 11:39

    Yes you are right, Komodo is getting this wrong for "os.environ.".

    It seems that os.environ is not an instance of dict, but is rather an instance of:
    class os._Environ(UserDict.IterableUserDict)

    But in Komodo's "python-2.5.cix" API catalog file, this is listed as:
    class os._Environ(IterableUserDict) # missing the UserDict namespace

    I've logged this as a bug here:
    http://bugs.activestate.com/show_bug.cgi?id=80321

    Thanks for this report.

    Cheers,
    Todd