On Jul 26, 8:46 pm, Peter Otten <__pete...@web.de> wrote:
> Bevan Jenkins wrote:
> > Hello,
>
> > I am trying to create a tree structure for use with a PyQt QTreeView.
> > But first I need to get my head around how to create the tree
> > structure. I have a dictionary (for testing purposes) but I
Bevan Jenkins wrote:
> Hello,
>
> I am trying to create a tree structure for use with a PyQt QTreeView.
> But first I need to get my head around how to create the tree
> structure. I have a dictionary (for testing purposes) but I will
> later use a table via sqlalchemy.
>
> The use case is hydr
On Jul 26, 6:53 am, Bevan Jenkins wrote:
> Hello,
>
> I am trying to create a tree structure for use with a PyQt QTreeView.
> But first I need to get my head around how to create the tree
> structure. I have a dictionary (for testing purposes) but I will
> later use a table via sqlalchemy.
>
> Th
> Is there any python class to display the drive and folder structure as
> a tree(As you see in the windows explorer window)??
http://wiki.wxpython.org/TreeControls
S
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 9, 5:02 am, Girish wrote:
> Is there any python class to display the drive and folder structure as
> a tree(As you see in the windows explorer window)??
You could use a recursive function to print it out of course or you
will need to use a GUI kit. wxPython has a tree widget, i think TIX
> On Tue, Jul 7, 2009 at 1:28 AM, Antoine Pitrou wrote:
>>
>> mayank gupta gmail.com> writes:
>> >
>> > After a little analysis, I found out that in general it uses about
>> > 1.4 kb of memory for each node!!
>>
>> How did you measure memory use? Python objects are not very compact, but
>> 1.4KB
I worked out a small code which initializes about 1,000,000 nodes with some
attributes, and saw the memory usage on my linux machine (using 'top'
command). Then just later I averaged out the memory usage per node. I know
this is not the most accurate way but just for estimated value.
The kind of N
mayank gupta gmail.com> writes:
>
> After a little analysis, I found out that in general it uses about
> 1.4 kb of memory for each node!!
How did you measure memory use? Python objects are not very compact, but 1.4KB
per object seems a bit too much (I would expect more about 150-200 bytes/object
On Mon, Jul 6, 2009 at 6:12 AM, mayank gupta wrote:
> Thanks for the other possibilites. I would consider option (2) and (3) to
> improve my code.
>
> But out of curiosity, I would still like to know why does an object of a
> Python-class consume "so" much of memory (1.4 kb), and this memory usage
Thanks for the other possibilites. I would consider option (2) and (3) to
improve my code.
But out of curiosity, I would still like to know why does an object of a
Python-class consume "so" much of memory (1.4 kb), and this memory usage has
nothing to do with its attributes.
Thanks
Regards.
On
On Mon, Jul 6, 2009 at 2:55 AM, mayank gupta wrote:
> Hi,
>
> I am creating a tree data-structure in python; with nodes of the tree
> created by a simple class :
>
> class Node :
> def __init__(self , other attributes):
> # initialise the attributes here!!
>
> But the prob
11 matches
Mail list logo