I wrote vars() function using dir(). I added builtins to make the result 
same to Python. 
 

builtins=['__doc__', '__module__', '__main__', '__dict__', 
'__is_instance__', '__name__', '__number__', '__md5__', '__mro__', 
'__super_classes__', '__sub_classes__', '__args__']
def vars(obj):
    variables=dict()
    for name in dir(obj):
        v=getattr(obj, name)
        if name not in builtins and not callable(getattr(obj, name)):
            variables[name]=v
    return variables


It works well in both in web and desktop versions.  I looked at Pyjs source 
code, but it was not easy to find the right place to update. 

Thanks again. 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Pyjs.org Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyjs-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to