Search found 12 matches

by amar123deep
Thu Jan 19, 2017 1:48 pm
Forum: Development of MicroPython
Topic: Freeing an class instance from memory in the c code
Replies: 1
Views: 2042

Freeing an class instance from memory in the c code

Hi guys, I want to free a class instance from the memory in the c code. Can you please guide me how to do it? I have information about the QSTR of the instance. I had created the instance by calling mp_store_name function. For a module, one can get information with mp_module_get(qstr_name_of_the_mod...
by amar123deep
Thu Dec 08, 2016 8:50 am
Forum: Development of MicroPython
Topic: qstr pool in memory not garbage collected
Replies: 1
Views: 2125

qstr pool in memory not garbage collected

Hi, I am porting an IoT software stack with micropython as a library. Currently looking into garbage collection. I am able to release most of the stuff except qstr pool which is created after executing mp_store_name. I execute this function to fill the class instance. Any help in releasing this from...
by amar123deep
Wed Oct 05, 2016 2:13 pm
Forum: MicroPython pyboard
Topic: support for built-in function vars()
Replies: 19
Views: 13654

Re: support for built-in function vars()

Thanks :)
by amar123deep
Wed Oct 05, 2016 12:47 pm
Forum: MicroPython pyboard
Topic: support for built-in function vars()
Replies: 19
Views: 13654

Re: support for built-in function vars()

well, I meant user-defined module where a class is declared
by amar123deep
Wed Oct 05, 2016 11:32 am
Forum: MicroPython pyboard
Topic: support for built-in function vars()
Replies: 19
Views: 13654

Re: support for built-in function vars()

There is no getattr for a module imported in micropython
by amar123deep
Wed Oct 05, 2016 7:50 am
Forum: MicroPython pyboard
Topic: support for built-in function vars()
Replies: 19
Views: 13654

Re: support for built-in function vars()

A module example.py looks like: class ExampleClass: pass Now, I want to access the name of the class inside the module. In python 2.7, one can do: >>> import example >>> name = 'ExampleClass' >>> example.__dict__.get(name, None) <class example.ExampleClass at 0x7f2ed0c492c0> Any idea how it can be d...
by amar123deep
Mon Oct 03, 2016 1:39 pm
Forum: MicroPython pyboard
Topic: support for built-in function vars()
Replies: 19
Views: 13654

Re: support for built-in function vars()

Thanks! we found a way to get around few libraries that were creating issues.
by amar123deep
Fri Sep 30, 2016 8:35 am
Forum: MicroPython pyboard
Topic: support for built-in function vars()
Replies: 19
Views: 13654

Re: support for built-in function vars()

Thanks! Just wanted to give a brief info about the project. The idea is to run calvin on micropython for IoT applications. Calvin is a middleware and provides actor-based programming model to ease developers from complexity of distributed computing. One can follow https://github.com/EricssonResearch...
by amar123deep
Fri Sep 30, 2016 8:21 am
Forum: MicroPython pyboard
Topic: support for built-in function vars()
Replies: 19
Views: 13654

Re: support for built-in function vars()

I replied in another thread that the middleware that I want to port on micropython uses wrapt package (https://pypi.python.org/pypi/wrapt). And wrapt internally uses vars().
by amar123deep
Fri Sep 30, 2016 8:17 am
Forum: MicroPython pyboard
Topic: support for built-in function vars()
Replies: 19
Views: 13654

Re: Error while using __get__ in a class

Well, I think the error is because I can not assign attribute to function object. For example >>> def f(): ... pass >>> f.a = 1 Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'function' object has no attribute 'a' please make use of the code blocks :) - platfo...