Re: [Tutor] help with list permutations

2008-01-03 Thread Chris Fuller
This is a good case for recursion. My solution is in two steps. A straightforward application of recursion (I was casting about semi-randomly) yields a attractive tree structure: root a b c d e c de f f f f ff g h

[Tutor] Test

2008-01-03 Thread PyProg PyProg
It's just a test message -- http://ekd.tolosano.info ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Review and criticism of python project

2008-01-03 Thread bob gailer
GTXY20 wrote: > > Hello all, > > Is there a forum or group where I can upload my python project for review? Others on this list can guide you to web sites for uploading code. If the program is relatively small you can just email it to this list as body text. How small? For me I'd rather wade thru

Re: [Tutor] Review and criticism of python project

2008-01-03 Thread bhaaluu
If you have a web page, you can upload the code to your web page, then post here with a link to the code and a request for reviews. That's one way to do it. -- b h a a l u u at g m a i l dot c o m On Jan 3, 2008 5:00 PM, GTXY20 <[EMAIL PROTECTED]> wrote: > > Hello all, > > Is there a forum or gro

[Tutor] Review and criticism of python project

2008-01-03 Thread GTXY20
Hello all, Is there a forum or group where I can upload my python project for review? I am new at Python and at this point my program is doing what it needs to I just can't help but feeling I have some errors or improper coding going on inside. Any advice is very much appreciated. Thanks. GTXY

Re: [Tutor] Tutor Digest, Vol 47, Issue 8

2008-01-03 Thread Marc Tompkins
Let me clarify this: > But if, to achieve the proper level of proficiency with the designer, I > have to invest many hours of study and practice... well, it's going to be a > hard sell. I'd rather be coding. > An hour spent learning something new in Python makes me a better programmer, and proba

Re: [Tutor] Tutor Digest, Vol 47, Issue 8

2008-01-03 Thread Marc Tompkins
On Jan 3, 2008 1:24 PM, Tony Cappellini <[EMAIL PROTECTED]> wrote: > The point I was trying to make that didn't come across is: > Until one has enough experience to hand code the GUIs, the designers are > helpful and a good place to begin. > > The problem with widgets not appearing where they shou

Re: [Tutor] Tutor Digest, Vol 47, Issue 8

2008-01-03 Thread Tony Cappellini
The point I was trying to make that didn't come across is: Until one has enough experience to hand code the GUIs, the designers are helpful and a good place to begin. The problem with widgets not appearing where they should is not a problem with the GUI designer, but the lack experience with the p

Re: [Tutor] Tutor Digest, Vol 47, Issue 8

2008-01-03 Thread Marc Tompkins
On Jan 3, 2008 10:31 AM, Tony Cappellini <[EMAIL PROTECTED]> wrote: > Putting widgets into sizers is easy with the designers. Not knowing how > to fix your code when the widgets don't appear as you want them is a > problem. I've never seen any docs written to help overcome this for any > framewor

Re: [Tutor] is it legal to have a class within a def

2008-01-03 Thread Kent Johnson
johnf wrote: > So I started thinking why would I need the class outside of the function. If > I instead used "import class" would I get a performance improvement? The > function creates an instance each time it is required and then releases and > closes. > > I am very interested in this pos

Re: [Tutor] Choice of GUI builders

2008-01-03 Thread Kent Johnson
Alan Gauld wrote: > "Kent Johnson" <[EMAIL PROTECTED]> wrote > >> I'm surprised no one else has chimed in for Dabo yet ;-) > > You missed it! > John F already did the Dabo recommendation. Funny, I didn't miss it, for some reason I thought that was a different thread! OK, back to my cave :-)

[Tutor] help with list permutations

2008-01-03 Thread c t
Greeting from a real newbie, I think that their might exist an easy way, in Python, for my list permutation issue. I need to be able to permute all elements from across several lists, while ensuring order is maintained across the lists. For example: list1=[a b] list2=[c d e] list3=[f] list4=[

Re: [Tutor] Tutor Digest, Vol 47, Issue 8

2008-01-03 Thread Tony Cappellini
Message: 1 Date: Thu, 3 Jan 2008 10:06:01 -0200 From: Tiago Saboga <[EMAIL PROTECTED]> Subject: Re: [Tutor] Choice of GUI builders To: tutor@python.org Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=us-ascii >>But since 2005, according to wikipedia, the Qt Windows is also >>lice

Re: [Tutor] Choice of GUI builders

2008-01-03 Thread Alan Gauld
"Marc Tompkins" <[EMAIL PROTECTED]> wrote > on, and its idiom felt more comfortable to me than the others. > Also, unlike > Qt, it's free... I hate to be a cheapskate, but I'm a very small > business > and I need to put food on my family, so the Qt license is a major > hurdle. Umm, so do the f

Re: [Tutor] is it legal to have a class within a def

2008-01-03 Thread johnf
On Thursday 03 January 2008 10:13:18 am Alan Gauld wrote: > "johnf" <[EMAIL PROTECTED]> wrote > > > If the user types in a partial of the key then the dialog > > appears and the user picks from the list. The details of the dialog > > are > > dynamic for each call (based on some meta data) of

Re: [Tutor] Choice of GUI builders

2008-01-03 Thread Marc Tompkins
On Jan 3, 2008 4:06 AM, Tiago Saboga <[EMAIL PROTECTED]> wrote: > But since 2005, according to wikipedia, the Qt Windows is also > licensed under the GPL. Am I missing something? > >From the Trolltech website: > *Qt Open Source Edition* is provided under the GNU General Public License > version 2

Re: [Tutor] open email client from Help menu

2008-01-03 Thread Alan Gauld
"Kakada" <[EMAIL PROTECTED]> wrote > In my program, I want to have "Report Bug..." under Help menu. So, > whenever > user clicks on it, it will open an email client for reporting bugs > with the > given address. How can I do this? Which OS? Which GUI toolkit? Which email client? You might be

Re: [Tutor] is it legal to have a class within a def

2008-01-03 Thread Alan Gauld
"johnf" <[EMAIL PROTECTED]> wrote > If the user types in a partial of the key then the dialog > appears and the user picks from the list. The details of the dialog > are > dynamic for each call (based on some meta data) of the showModal(). This might be a valid case for defining the class

Re: [Tutor] Choice of GUI builders

2008-01-03 Thread Alan Gauld
"Kent Johnson" <[EMAIL PROTECTED]> wrote > I'm surprised no one else has chimed in for Dabo yet ;-) You missed it! John F already did the Dabo recommendation. The downside is that it comes with its own variety of widget set on top of wxPython But, it does look good and if I was starting from

Re: [Tutor] is it legal to have a class within a def

2008-01-03 Thread johnf
On Thursday 03 January 2008 12:22:25 am Alan Gauld wrote: > Are you sure you made it a modal dialog? > Any dialog will do that if it is opened modelessly, you need to > use the modal version to make it block the app. Yes. I believe the way I have coded the dialog causes a bug. If I create a sta

Re: [Tutor] Choice of GUI builders

2008-01-03 Thread Kent Johnson
Tony Cappellini wrote: >>> OK, wxPython is a fine toolkt. Just be aware that it does not have a GUI >>> builder per se, you have to write the GUI as source code or use a >>> third party GUI builder. > It's a shame that someone with adequate resources doesn't come up with > a nice commercial WYSIW

Re: [Tutor] Choice of GUI builders

2008-01-03 Thread Tony Cappellini
Message: 1 Date: Thu, 3 Jan 2008 08:11:05 - From: "Alan Gauld" <[EMAIL PROTECTED]> Subject: Re: [Tutor] Choice of GUI builders To: tutor@python.org Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original >>OK, wxPython is a fin

[Tutor] How to convert ogg to MP3

2008-01-03 Thread János Juhász
> "goldgod a" <[EMAIL PROTECTED]> wrote in > >I would like to convert ogg files to mp3 files. how can I do > > that. > > Is there any inbuilt package. > > I think Lame can do that. > You would need to access Lame via its command line (using the > subprocess module?) or maybe someone has a pyt

Re: [Tutor] Choice of GUI builders

2008-01-03 Thread Tiago Saboga
On Thu, Jan 03, 2008 at 02:11:03AM -0800, Marc Tompkins wrote: > on, and its idiom felt more comfortable to me than the others. Also, unlike > Qt, it's free... I hate to be a cheapskate, but I'm a very small business > and I need to put food on my family, so the Qt license is a major hurdle. But

Re: [Tutor] Choice of GUI builders

2008-01-03 Thread Marc Tompkins
I'm using wxPython, after very brief forays into Tk and Qt, and I like it a lot. wx generally wraps the native widgets of whatever OS/desktop it runs on, and its idiom felt more comfortable to me than the others. Also, unlike Qt, it's free... I hate to be a cheapskate, but I'm a very small busines

[Tutor] open email client from Help menu

2008-01-03 Thread Kakada
Hi every one, In my program, I want to have "Report Bug..." under Help menu. So, whenever user clicks on it, it will open an email client for reporting bugs with the given address. How can I do this? I set text to actionReportBug like this: Report Bug... but it doesn't support html tag. Any m

Re: [Tutor] is it legal to have a class within a def

2008-01-03 Thread Alan Gauld
"johnf" <[EMAIL PROTECTED]> wrote > 1 and 3 are my reasons. I'm creating a Dabo app. When I attempted > to create > a special class that contained a dialog box I discovered that the > dialog > class created an indepentant type of window and allowed my program > to > continue running without

Re: [Tutor] How to convert ogg to MP3

2008-01-03 Thread Alan Gauld
"goldgod a" <[EMAIL PROTECTED]> wrote in >I would like to convert ogg files to mp3 files. how can I do > that. > Is there any inbuilt package. I think Lame can do that. You would need to access Lame via its command line (using the subprocess module?) or maybe someone has a python library to

Re: [Tutor] is it legal to have a class within a def

2008-01-03 Thread Alan Gauld
"bob gailer" <[EMAIL PROTECTED]> wrote > So the question becomes "why would you want to do that?" The main reason I could think of was to create a factory method for dynamically creating classes based on input parameters - for example currency convertors or similar. Equally you could change me

Re: [Tutor] is it legal to have a class within a def

2008-01-03 Thread Alan Gauld
"johnf" <[EMAIL PROTECTED]> wrote > def someMethod(): > class MyClass(object): > . > if something: > . > return someval Did you try it? >>> def f(): ... class C: pass ... return C ... >>> def g(x): ... class C: pass ... if x == 42: ... return C ... else:

Re: [Tutor] Choice of GUI builders

2008-01-03 Thread Alan Gauld
"Roy Chen" <[EMAIL PROTECTED]> wrote > I suppose with any GUI toolkit/builder, you're going to have learn > some part > of the API anyway. I might just see how I go with wxPython for now. OK, wxPython is a fine toolkt. Just be aware that it does not have a GUI builder per se, you have to write