Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Python

most efficient way of populating a combobox (in maya)

 

 

Python python RSS feed   Index | Next | Previous | View Threaded


astan.chee at rhubarbfizz

May 3, 2012, 7:07 PM

Post #1 of 3 (145 views)
Permalink
most efficient way of populating a combobox (in maya)

Hi,
I'm making a GUI in maya using python only and I'm trying to see which
is more efficient. I'm trying to populate an optionMenuGrp / combo box
whose contents come from os.listdir(folder). Now this is fine if the
folder isn't that full but the folder has a few hundred items (almost
in the thousands), it is also on the (work) network and people are
constantly reading from it as well. Now I'm trying to write the GUI so
that it makes the interface, and using threading - Thread, populate
the box. Is this a good idea? Has anyone done this before and have
experience with any limitations on it? Is the performance not
significant?
Thanks for any advice
--
http://mail.python.org/mailman/listinfo/python-list


steve+comp.lang.python at pearwood

May 3, 2012, 8:19 PM

Post #2 of 3 (141 views)
Permalink
Re: most efficient way of populating a combobox (in maya) [In reply to]

On Thu, 03 May 2012 19:07:51 -0700, astan.chee Astan wrote:

> Hi,
> I'm making a GUI in maya using python only and I'm trying to see which
> is more efficient. I'm trying to populate an optionMenuGrp / combo box
> whose contents come from os.listdir(folder). Now this is fine if the
> folder isn't that full but the folder has a few hundred items (almost in
> the thousands), it is also on the (work) network and people are
> constantly reading from it as well. Now I'm trying to write the GUI so
> that it makes the interface, and using threading - Thread, populate the
> box. Is this a good idea? Has anyone done this before and have
> experience with any limitations on it? Is the performance not
> significant?
> Thanks for any advice


Why don't you try it and see?


It's not like populating a combobox in Tkinter with the contents of
os.listdir requires a large amount of effort. Just try it and see whether
it performs well enough.



--
Steven


--
http://mail.python.org/mailman/listinfo/python-list


ramit.prasad at jpmorgan

May 4, 2012, 11:19 AM

Post #3 of 3 (134 views)
Permalink
RE: most efficient way of populating a combobox (in maya) [In reply to]

> > I'm making a GUI in maya using python only and I'm trying to see which
> > is more efficient. I'm trying to populate an optionMenuGrp / combo box
> > whose contents come from os.listdir(folder). Now this is fine if the
> > folder isn't that full but the folder has a few hundred items (almost in
> > the thousands), it is also on the (work) network and people are
> > constantly reading from it as well. Now I'm trying to write the GUI so
> > that it makes the interface, and using threading - Thread, populate the
> > box. Is this a good idea? Has anyone done this before and have
> > experience with any limitations on it? Is the performance not
> > significant?
> > Thanks for any advice
>
>
> Why don't you try it and see?
>
>
> It's not like populating a combobox in Tkinter with the contents of
> os.listdir requires a large amount of effort. Just try it and see whether
> it performs well enough.

In my experience, a generic combobox with hundreds or thousands of elements is difficult and annoying to use. Not sure if the Tkinter version has scroll bars or auto-completion, but if not you may want to subclass and add those features.

Ramit


Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology
712 Main Street | Houston, TX 77002
work phone: 713 - 216 - 5423

--

This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entity disclaimers,
available at http://www.jpmorgan.com/pages/disclosures/email.
--
http://mail.python.org/mailman/listinfo/python-list

Python python RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.