[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Pmw Use and Grayson's Book

wolf_tracks

2/18/2008 3:34:00 AM

I don't have Grayson's Tkinter book, but I see he uses something called Pmw.
Why is it needed with Tkinter?
--
Wayne Watson (Nevada City, CA)

Web Page: <speckledwithStars.net>
4 Answers

Mike Driscoll

2/18/2008 4:09:00 AM

0

On Feb 17, 9:33 pm, "W. Watson" <wolf_tra...@invalid.com> wrote:
> I don't have Grayson's Tkinter book, but I see he uses something called Pmw.
> Why is it needed with Tkinter?
> --
> Wayne Watson (Nevada City, CA)
>
> Web Page: <speckledwithStars.net>

It's not needed. It's just an extra set of widgets that are not
included in the standard set. As I recall, PMW = Python Mega-Widgets.
Check out their site:

http://pmw.source...

You'll probably also come across Tix, another subset of widgets, which
I think is now included with Python be default from 2.4 on up. It
should be noted that PMW is not included with the standard Python
distro though.

Mike

wolf_tracks

2/18/2008 4:31:00 AM

0

I wonder why he uses it? If I want to run his examples, where do I put the
lib he includes? Same folder as the example?

Mike Driscoll wrote:
> On Feb 17, 9:33 pm, "W. Watson" <wolf_tra...@invalid.com> wrote:
>> I don't have Grayson's Tkinter book, but I see he uses something called Pmw.
>> Why is it needed with Tkinter?
>> --
>> Wayne Watson (Nevada City, CA)
>>
>> Web Page: <speckledwithStars.net>
>
> It's not needed. It's just an extra set of widgets that are not
> included in the standard set. As I recall, PMW = Python Mega-Widgets.
> Check out their site:
>
> http://pmw.source...
>
> You'll probably also come across Tix, another subset of widgets, which
> I think is now included with Python be default from 2.4 on up. It
> should be noted that PMW is not included with the standard Python
> distro though.
>
> Mike

--
Wayne Watson (Nevada City, CA)

Web Page: <speckledwithStars.net>

petercable@gmail.com

2/18/2008 8:30:00 AM

0

On Feb 18, 5:30 am, "W. Watson" <wolf_tra...@invalid.com> wrote:
> I wonder why he uses it?

He uses it because Pmw does a lot of heavy lifting for you when
designing Tkinter apps. Pmw adds things like widgets pre-populated
with scrollbars and labels and automatic widget/label alignment. I use
Pmw for all but the most trivial Tkinter applications. That said,
there is nothing in Pmw that you couldn't implement yourself in plain
Tkinter, it's just already been done for you. Check out the Pmw site
for lots of examples and details. Also, if you do install the module,
it comes with a demo directory. Run all.py to see Pmw in action.

http://pmw.sourc...

> If I want to run his examples, where do I put the
> lib he includes? Same folder as the example?

Library modules (like Pmw) generally belong in site-packages (/usr/lib/
python2.x/site-packages in most unixes... not sure about windows).

HTH,

Pete

Mike Driscoll

2/18/2008 1:50:00 PM

0

On Feb 18, 2:29 am, "peterca...@gmail.com" <peterca...@gmail.com>
wrote:
> On Feb 18, 5:30 am, "W. Watson" <wolf_tra...@invalid.com> wrote:
>
> > I wonder why he uses it?
>
> He uses it because Pmw does a lot of heavy lifting for you when
> designing Tkinter apps. Pmw adds things like widgets pre-populated
> with scrollbars and labels and automatic widget/label alignment. I use
> Pmw for all but the most trivial Tkinter applications. That said,
> there is nothing in Pmw that you couldn't implement yourself in plain
> Tkinter, it's just already been done for you. Check out the Pmw site
> for lots of examples and details. Also, if you do install the module,
> it comes with a demo directory. Run all.py to see Pmw in action.
>
> http://pmw.sourc...
>
> > If I want to run his examples, where do I put the
> > lib he includes? Same folder as the example?
>
> Library modules (like Pmw) generally belong in site-packages (/usr/lib/
> python2.x/site-packages in most unixes... not sure about windows).
>
> HTH,
>
> Pete

On Windows, most packages go here (adjust as needed for your setup):

C:\Python24\Lib\site-packages

Mike