Re: dependency algorithm

2007-11-14 Thread Henry
if adj[i][1] == True: return adj[i][1] = True for child in adj[i][0]: visit( child, adj, order ) order.append( i ) HTH, Henry On 14/11/2007, Tom Jones <[EMAIL PROTECTED]> wrote: > > Hi, > > Consider tuples of the above numbers in the form: >

Re: Recursive insertion of a line

2007-11-19 Thread Henry
x27;t water), which would probably be neater, but is left as an exercise for the reader :) There are probably much better idiomatic ways to do this, and I defer to much more experienced Python programmers to show you them. HTH, Henry -- http://mail.python.org/mailman/listinfo/python-list

Re: Regular Expression for Prime Numbers (or How I came to fail at them, and love the bomb)

2008-02-14 Thread Henry
rexamples, left as easy exercise!). Consider w = x.y^l.z Then l | |w|. But since l >= 2, that means that |w| is not prime. Therefore w is not in P, contradicting our assumption. Sorry for slightly OT post :) Henry -- http://mail.python.org/mailman/listinfo/python-list

Determine actually given command line arguments

2013-05-14 Thread Henry Leyh
place. Thanks && Greetings, Henry -- http://mail.python.org/mailman/listinfo/python-list

Re: Determine actually given command line arguments

2013-05-15 Thread Henry Leyh
On 15.05.2013 14:24, Roy Smith wrote: In article , Henry Leyh wrote: Is there a simple way to determine which command line arguments were actually given on the commandline, i.e. does argparse.ArgumentParser() know which of its namespace members were actually hit during parse_args(). I

Re: Determine actually given command line arguments

2013-05-15 Thread Henry Leyh
On 15.05.2013 15:00, Oscar Benjamin wrote: On 15 May 2013 13:52, Henry Leyh wrote: On 15.05.2013 14:24, Roy Smith wrote: In article , Henry Leyh wrote: Is there a simple way to determine which command line arguments were actually given on the commandline, i.e. does

Re: Determine actually given command line arguments

2013-05-15 Thread Henry Leyh
fault=None) I'd then have to check for string 'True' rather than for boolean True, though. Regards, Henry -- http://mail.python.org/mailman/listinfo/python-list

Re: Determine actually given command line arguments

2013-05-15 Thread Henry Leyh
On 15.05.2013 17:29, Roy Smith wrote: In article , Henry Leyh wrote: On 15.05.2013 14:24, Roy Smith wrote: In article , Henry Leyh wrote: Is there a simple way to determine which command line arguments were actually given on the commandline, i.e. does argparse.ArgumentParser() know

Re: Determine actually given command line arguments

2013-05-16 Thread Henry Leyh
On 16.05.2013 08:08, Jussi Piitulainen wrote: Henry Leyh writes: But now I would also like to be able to _write_ such a config file FILE that can be read in a later run. And FILE should contain only those arguments that were given on the command line. Say, I tell argparse to look for

Re: Why 'files.py' does not print the filenames into a table format?

2013-06-15 Thread Jarrod Henry
Nick, at this point, you need to hire someone to do your work for you. We are not here to do your job. I would suggest finding a coder for hire and letting them do this job correctly. Thanks. On Sat, Jun 15, 2013 at 2:38 PM, Nick the Gr33k wrote: > Hello, > > Trying to browse > http://superh

Pushing for Pythoncard 1.0

2011-05-02 Thread John Henry
Attempt to push Pythoncard to a 1.0 status is now underway. A temporary website has been created at: http://code.google.com/p/pythoncard-1-0/ The official website continues to be http://pythoncard.sourceforge.net/ Pythoncard is such a wonderful package that it would be a shame to allow developm

scope of function parameters

2011-05-29 Thread Henry Olders
nd is to call a function with a copy of the list, eg in fnc1 I would have the statement "return fnc2(b[:]". But this seems ugly. Are there others who feel as I do that a function parameter should always be local to the function? Or am I missing something here? Henry -- http://mail.python.org/mailman/listinfo/python-list

Re: scope of function parameters

2011-05-29 Thread Henry Olders
Henry On 2011-05-29, at 5:47 , Wolfgang Rohdewald wrote: > On Sonntag 29 Mai 2011, Henry Olders wrote: >> It seems that in Python, a variable inside a function is >> global unless it's assigned. > > no, they are local > >> I would have thou

Re: scope of function parameters (take two)

2011-05-30 Thread Henry Olders
On 2011-05-29, at 4:30 , Henry Olders wrote: > I just spent a considerable amount of time and effort debugging a program. > The made-up code snippet below illustrates the problem I encountered: > > def main(): > a = ['a list','with','three element

Re: scope of function parameters (take two)

2011-05-30 Thread Henry Olders
added in python 2.0, according to wikipedia. I like list comprehensions and use them all the time because they are powerful and concise. > > did you read the link Steven gave you? > http://mail.python.org/pipermail/tutor/2010-December/080505.html Yes, I did, thanks. Henry -- http://mail.pytho

Re: scope of function parameters (take two)

2011-05-31 Thread Henry Olders
On 2011-05-30, at 20:52 , Benjamin Kaplan wrote: > On Mon, May 30, 2011 at 5:28 PM, Henry Olders wrote: >> >> On 2011-05-29, at 4:30 , Henry Olders wrote: >> > > Python doesn't have true globals. When we say "global" what we mean is > "modul

Re: scope of function parameters (take two)

2011-05-31 Thread Henry Olders
On 2011-05-31, at 24:35 , Dan Stromberg wrote: > > On Mon, May 30, 2011 at 5:28 PM, Henry Olders wrote: > > Be careful not to conflate global scoping or global lifetime, with mutability > or pure, side-effect-free functions (callables). It sounds like what you > want is i

Invoking Python from Python

2005-11-08 Thread John Henry
Hi all, I have a need to create a Python script on the fly from another Python program and then execute the script so created. Do I need to invoke Python through os.spawnl or is there a better way? Thanks, -- John -- http://mail.python.org/mailman/listinfo/python-list

Cut and paste an EPS file

2005-12-02 Thread John Henry
I am looking for a Python tookit that will enable me to cut section of a picture out from an EPS file and create another EPS file. I am using a proprietary package for doing certain engineering calculations. It creates single page x-y line plots that has too much blank spaces around the plotted a

Re: Cut and paste an EPS file

2005-12-02 Thread John Henry
Thanks for the reply. Yes, that would have been too easy :=) If I change the bbox, I would cut out the lower 1/3 of the plot. I only want to apply it to the top 2/3 of the page. Regards, -- JH -- http://mail.python.org/mailman/listinfo/python-list

Re: Writing portable applications (Was: Jargons of Info Tech industry)

2005-08-29 Thread Henry Law
fit to post it there, and now all your posts are going there too. -- Henry Law <>< Manchester, England -- http://mail.python.org/mailman/listinfo/python-list

optparse alternative

2005-03-14 Thread Henry Ludemann
I've been writing an optparse alternative (using getopt) that is at a stage where I'd be interested in people's opinions. It allows you to easily creating command line interfaces to existing functions, using flags (which are optional) and arguments. It will automatically print a nicely formatted us

Re: optparse alternative

2005-03-14 Thread Henry Ludemann
Thanks for the comments... Steven Bethard wrote: Looks interesting, but is it really that different from optparse? In the sense that they both do the same thing, no, not really. But the way they do it is quite different; optparse bases itself on setting variables, while this module is for invoking

Re: optparse alternative

2005-03-14 Thread Henry Ludemann
* The more I think about it, the more I like that you're basically constructing options to match a function signature. But I can imagine that this might be too restrictive for some uses. It might be worth having an alternate interface that provides an options object like optparse does. It i

Re: optparse alternative

2005-03-14 Thread Henry Ludemann
As far as I can tell, your module has one functional advantage over optparse--it validates arguments as well as options. Functionality wise, that is probably about it. It is more from a seperation of command line / functionality code that I wrote this; that the command line code should be sepera

Re: Program Translation - Nov. 14, 2013

2013-11-17 Thread Henry Law
code. I've got an idea; why not re-write it all in C? -- Henry LawManchester, England -- https://mail.python.org/mailman/listinfo/python-list

Error in IDLE

2015-08-17 Thread Henry Quansah
I just installed python. But I'm unable to access IDLE after several clicks and double clicks. I even tried repairing by trying to reinstall but I have the same issue. -- https://mail.python.org/mailman/listinfo/python-list

Re: Why do Perl programmers make more money than Python programmers

2013-05-05 Thread Henry Law
On 05/05/13 18:11, Ignoramus16992 wrote: According to CIO.com What an amusing thread; lightened my (non-programmer) day. -- Henry LawManchester, England -- http://mail.python.org/mailman/listinfo/python-list

testing array of logicals

2006-07-12 Thread John Henry
Hi list, Is there a more elagant way of doing this? # logflags is an array of logicals test=True for x in logflags: test = test and x print test -- Thanks, -- http://mail.python.org/mailman/listinfo/python-list

Re: testing array of logicals

2006-07-13 Thread John Henry
Simon Brunning wrote: > On 12 Jul 2006 11:14:43 -0700, John Henry <[EMAIL PROTECTED]> wrote: > > Is there a more elagant way of doing this? > > > > # logflags is an array of logicals > > test=True > > for x in logflags: > >test = test and x >

Better utilization of duo-core?

2006-07-13 Thread John Henry
Hi list, I have a Python ap that starts another non-Pythoon ap for number crunching. My new notebook comes with a duo-core CPU. I tried manually running 2 copies of my ap at the same time) and it appears to run the whole job faster (or at least the CPU loading level as show by the task manager a

Re: testing array of logicals

2006-07-13 Thread John Henry
Simon Forman wrote: > > > > False not in logflags > > > > Or, if your values aren't already bools > > False not in (bool(n) for n in logflags) > > > > Peace, > ~Simon Very intriguing use of "not in"... Thanks, -- http://mail.python.org/mailman/listinfo/python-list

Cyclic class definations

2006-07-18 Thread John Henry
Hi list, I am trying to understand better Python packaging. This might be a messed up class hierachy but how would I break this cyclic relatioship? In file A: from B import B_Class Class_A_Main(): def def SomeMethod(self): res=B_Class(self) Class_A_SubClass(Class_A_Main):

Re: Cyclic class definations

2006-07-18 Thread John Henry
Regards, John Henry wrote: > Hi list, > > I am trying to understand better Python packaging. This might be a > messed up class hierachy but how would I break this cyclic relatioship? > > In file A: > > from B import B_Class > > Class_A_Main(): >def >

Re: Cyclic class definations

2006-07-18 Thread John Henry
s, if they make your code hard to understand so > try to not introduce them if possible. > > Hope this helps, > Nick V. > > > John Henry wrote: > > Hi list, > > > > I am trying to understand better Python packaging. This might be a > > messed up class hier

Can thread start other threads?

2006-07-18 Thread John Henry
Can Python thread start threads? It appears not. When I do that, the sub-threads gets to certain point and just sit there. If I run the code serially and not run the sub-thread code as threads, everything is fine. I throught the problem is when you run multiple processes of Pythons... -- http

Re: Can thread start other threads?

2006-07-18 Thread John Henry
Thanks for the confirmation. I will see if I can reduce the code down to something managable and post the failing code. Diez B. Roggisch wrote: > John Henry schrieb: > > Can Python thread start threads? It appears not. When I do that, the > > sub-threads gets to certain poi

Re: Threads vs Processes

2006-07-26 Thread John Henry
Chance Ginger wrote: > On Wed, 26 Jul 2006 10:54:48 -0700, Carl J. Van Arsdall wrote: > > > Alright, based a on discussion on this mailing list, I've started to > > wonder, why use threads vs processes. So, If I have a system that has a > > large area of shared memory, which would be better? I'v

Re: Threads vs Processes

2006-07-26 Thread John Henry
> > Carl, > OS writers provide much more tools for debugging, tracing, changing > the priority of, sand-boxing processes than threads (in general) It > *should* be easier to get a process based solution up and running > andhave it be more robust, when compared to a threaded solution. > > - Paddy

Re: Threads vs Processes

2006-07-27 Thread John Henry
[EMAIL PROTECTED] wrote: > [EMAIL PROTECTED] wrote: > > John Henry wrote: > > > Granted. Threaded program forces you to think and design your > > > application much more carefully (to avoid race conditions, dead-locks, > > > ...) but there is nothing in

Re: Threads vs Processes

2006-07-27 Thread John Henry
Nick Craig-Wood wrote: > > Here is test prog... > Here's a more real-life like program done in both single threaded mode and multi-threaded mode. You'll need PythonCard to try this. Just to make the point, you will notice that the core code is identical between the two (method on_menuFileStart

Pywin32 Excel question

2006-08-04 Thread John Henry
I posted the following message to the Pywin32 list but if anybody here can help, it would be appreciated very much. Hi list, I have a need to copy 3 rows of data from the top of my Excel spreadsheet to another location. I would have throught that this should be very

Re: Pywin32 Excel question

2006-08-05 Thread John Henry
e entire workbook and you end up with a new workbook. But you have to do xlSheet.Paste(). Go figure! [EMAIL PROTECTED] wrote: > John Henry wrote: > > I posted the following message to the Pywin32 list but if anybody here > > can help, it would be appreciated very much. > >

What's the cleanest way to compare 2 dictionary?

2006-08-09 Thread John Henry
Hi list, I am sure there are many ways of doing comparision but I like to see what you would do if you have 2 dictionary sets (containing lots of data - like 2 keys and each key contains a dozen or so of records) and you want to build a list of differences about these two sets. I like to end

Re: What's the cleanest way to compare 2 dictionary?

2006-08-09 Thread John Henry
Paddy wrote: > John Henry wrote: > > Hi list, > > > > I am sure there are many ways of doing comparision but I like to see > > what you would do if you have 2 dictionary sets (containing lots of > > data - like 2 keys and each key contains a dozen or so of rec

Re: What's the cleanest way to compare 2 dictionary?

2006-08-09 Thread John Henry
John Henry wrote: > Paddy wrote: > > John Henry wrote: > > > Hi list, > > > > > > I am sure there are many ways of doing comparision but I like to see > > > what you would do if you have 2 dictionary sets (containing lots of > > > data -

Re: What's the cleanest way to compare 2 dictionary?

2006-08-10 Thread John Henry
, and if I wish to know if the records are the same, I would have to do record by record comparsion. However, since there are only a handful of records per key, this wouldn't be so bad. Maybe I just overload the compare operator or something. John Machin wrote: > John Henry wrote: > &g

Re: using python to edit a word file?

2006-08-10 Thread John Henry
John Salerno wrote: > I figured my first step is to install the win32 extension, which I did, > but I can't seem to find any documentation for it. A couple of the links > on Mark Hammond's site don't seem to work. > > Anyway, all I need to do is search in the Word document for certain > strings and

Re: What's the cleanest way to compare 2 dictionary?

2006-08-11 Thread John Henry
John Machin wrote: > John Henry wrote: > > John, > > > > Yes, there are several scenerios. > > > > a) Comparing keys only. > > > > That's been answered (although I haven't gotten it to work under 2.3 > > yet) > > (1) What

Re: What's the cleanest way to compare 2 dictionary?

2006-08-11 Thread John Henry
Thank you. That works. Marc 'BlackJack' Rintsch wrote: > In <[EMAIL PROTECTED]>, John Henry > wrote: > > > When I do it under 2.3, I get: > > > > common_eq = set(k for k in _common if a[k] == b[k]) > >^ &

Re: Easy to use distributed system?

2006-08-14 Thread John Henry
I've been using Pyro and it does what I needs it to do for me. I don't know if it's as fancy as other packages but the price is right. Jim Jones wrote: > I am looking for a system in Python that will easily allow me to distribute > processes across multiple systems?So, if I have a function 'f

Re: inheritance?

2006-08-15 Thread John Henry
Is this what you're looking for? class baseClass: def __init__(self): def fromfile(self, fileObj, byteOrder=None): def getVR(self): def getGroup(self): def getElement(self): def getSize(self): def getData(self): class implicitClass(baseClass): def __init__(self): bas

Re: inheritance?

2006-08-16 Thread John Henry
As others pointed out already, this kind of "if then else" determination of type is best avoided. If it looks like a duck, quakes like a duck, must be a duck. KraftDiner wrote: > Steven D'Aprano wrote: > > On Tue, 15 Aug 2006 19:35:11 -0700, KraftDiner wrote: > > > > > I have two classes: > > > >

Re: inheritance?

2006-08-16 Thread John Henry
> Here I tried this example and maybe this will explain the difficulties > I'm having. > 1) at the time the baseClass is constructed shouldn't the constructor > of the appropriate > type be called. Not automatically. > 2) getName is doing nothing... > > class baseClass: > def __init__(sel

Re: inheritance?

2006-08-16 Thread John Henry
Oops! Forgot to remove fromfile from baseClass. Wouldn't matter though. John Henry wrote: > > Here I tried this example and maybe this will explain the difficulties > > I'm having. > > 1) at the time the baseClass is constructed shouldn't the constructor &

Re: Find out the name of a variable passed as an argument

2006-10-04 Thread John Henry
Algol, anyone? Andreas Huesgen wrote: > Hello everybody, > > is there a way to receive the name of an object passed to a function > from within the function. > > something like > > def foo(param): > print theNameOfTheVariablePassedToParam > > var1 = "hello" > var2 = "world" > > >>> foo(var

Re: Need array help

2006-10-06 Thread John Henry
Others posted answer to your question. If you are serious about programming in Python, I highly recommend that you don't try to think in terms of "I did this in Visual Basic, how do I do this in Python". You'll end up with Python code that are nothing but a VB look alike. As recommended by oth

Re: Converting existing module/objects to threads

2006-10-18 Thread John Henry
Making your code run in thread mode isn't the hard part. Just add this: import threading class subcontrollerThread(threading.Thread, subcontroller): def __init__(self,id,configurationFile): threading.Thread.__init__(self) subcontroller.__init__(self,id,co

Re: python GUIs comparison (want)

2006-10-23 Thread John Henry
[EMAIL PROTECTED] wrote: > Now i began to learn GUI programming. There are so many > choices of GUI in the python world, wxPython, pyGTK, PyQT, > Tkinter, .etc, it's difficult for a novice to decide, however. > Can you draw a comparison among them on easy coding, pythonish design, > beautiful and

Dealing with multiple sets

2006-10-25 Thread John Henry
Hi list, If I have a bunch of sets: a = set((1, 2, 3)) b = set((2, 3)) c = set((1, 3)) What's the cleanest way to say: 1) Give me a list of the items that are in all of the sets? (3 in the above example) 2) Give me a list of the items that are not in all of the sets? (1,2 in the above exam

Re: Dealing with multiple sets

2006-10-25 Thread John Henry
Oops. Forgot to mention, I am still using 2.3. John Henry wrote: > Hi list, > > If I have a bunch of sets: > > a = set((1, 2, 3)) > b = set((2, 3)) > c = set((1, 3)) > > > What's the cleanest way to say: > > 1) Give me a list of the items that

Re: Dealing with multiple sets

2006-10-25 Thread John Henry
Aye! I did a: a and b and c Bonk! Thanks, Tim Peters wrote: > [John Henry] > > If I have a bunch of sets: > > > > a = set((1, 2, 3)) > > b = set((2, 3)) > > c = set((1, 3)) > > > > > > What's the cleanest way to say: > > >

Re: Dealing with multiple sets

2006-10-26 Thread John Henry
Oh, great. Learn something new everyday. For this, what I did was to build up a string, and then use eval on the string. Very ugly. Now I can simply do a reduce. Thanks, Brian Beck wrote: > John Henry wrote: > > What's the cleanest way to say: > > > > 1) Give m

Re: ANN: Leo 4.4.2.1 final released

2006-10-29 Thread John Henry
I downloaded the Windows exe, ran it and a small blank message window poped up and that was it. I am still running 2.3. Edward K. Ream wrote: > Leo 4.4.2.1 final is now available at: > http://sourceforge.net/project/showfiles.php?group_id=3458&package_id=29106 > > Leo 4.4.2.1 final fixes a recent

Re: scared about refrences...

2006-10-30 Thread John Henry
I am no Python guru - just an ordinary user. There is nothing "scary" about this. There are (many) situations where this is actually *desirable* but of course there are (many) situations where this is an unwelcomed side-effect. In situations where I don't want this to happen, I simply pass down

Re: ANN: Leo 4.4.2.1 final released

2006-10-31 Thread John Henry
Yes, it's Python 2.3, running under Windows XP. I managed to get it working using the ZIP file. Thanks, Edward K. Ream wrote: > >I downloaded the Windows exe, ran it and a small blank message window poped > >up and that was it. > > I am still running 2.3. > > I assume you mean Python 2.3, not Le

Re: ANN: Leo 4.4.2.1 final released

2006-10-31 Thread John Henry
Yes, it's Python 2.3, running under Windows XP. I managed to get it working using the ZIP file. Thanks, Edward K. Ream wrote: > >I downloaded the Windows exe, ran it and a small blank message window poped > >up and that was it. > > I am still running 2.3. > > I assume you mean Python 2.3, not Le

Re: python GUIs comparison (want)

2006-11-06 Thread John Henry
Yes, from a easy of use standpoint, I agree that PythonCard is very high on the list. Unfortunately there isn't more "activities" as one would like to see. On the other hand, that's typical of open-source projects. We can always roll up our sleeves and do it ourselves. At least the multicolumn

Re: adding python scripting to my application

2006-11-06 Thread John Henry
Take a look at: http://www.swig.org/ Julian wrote: > Hi, first of all, I have to say I am new to Python. I have been working > with a finite element analysis program written in c++. now, I am trying > to 'rebuild' this code (possibly a full re-write) with scripting > capability. I did some readin

Re: auto indent

2006-11-06 Thread John Henry
M.N.Smadi wrote: > Hi there; > > i have a script that is not indented properly. Is there a way that i can > have it auto indented. > > thanks > moe smadi It depends what exactly you mean. I use Textpad and they have an "indent selected block" feature. -- http://mail.python.org/mailman/listinfo

Re: shutil: permission denied errors on windows

2006-11-06 Thread John Henry
I use the copy function a lot and never have problem. I suggest that you write a no brainer standalone test code and if it still fails there, then you have a problem with your installation. Antoine De Groote wrote: > Google tells quite some things about it, but none of them are satisfactory. > >

Re: wing ide vs. komodo?

2006-11-06 Thread John Henry
"cool" is in the eyes of the beholder. While I agree that this can be useful in some situations, I find it very annoying when all I want (and need) to do is a simple dumber search and yet it tells me tons of useless searches that I don't care for. The inability to debug multi-threaded application

Re: shutil: permission denied errors on windows

2006-11-07 Thread John Henry
ther. It seems now > to be only the case for folders. A very simple > > shutil.copy('a', 'b') > > already fails with the error message. > > I reinstalled Python, but that didn't change anything... > > Regards, > antoine > > John Henry wrot

Re: Pyro stability

2006-11-07 Thread John Henry
Being a non-professional programmer, I've managed to use Pyro to do what I need to do with very minimal fuss. In fact, I don't even understand a lot of what's under the cover. All I did was to mimic what one of the sample program is doing and adapted it to my need. So far I am very happy with Py

Re: How to choose the right GUI toolkit ?

2006-11-08 Thread John Henry
John Salerno wrote: > Dan Lenski wrote: > > > So, is there another toolkit I should be looking at? > > I highly recommend wxPython. It's very mature, full-featured, and > portable, and fairly easy to learn as well. I can't really compare it to > other toolkits (not having used any of them, except

decorators

2006-11-08 Thread John Henry
I must be very thick. I keep reading about what decorators are and I still don't have a good feel about it. See, for example: http://alex.dojotoolkit.org/?p=564 What exactly do I use decorators for? -- http://mail.python.org/mailman/listinfo/python-list

decorators

2006-11-08 Thread John Henry
I must be very thick. I keep reading about what decorators are and I still don't have a good feel about it. See, for example: http://alex.dojotoolkit.org/?p=564 and: http://soiland.no/software/decorator What exactly do I use decorators for? -- http://mail.python.org/mailman/listinfo/python-

Re: How to choose the right GUI toolkit ?

2006-11-09 Thread John Henry
Dan Lenski wrote: > > John H.: thanks for pointing out pythoncard. This looks like it might > be an excellent substitute for LabView-like GUIs, which all my > coworkers like. I personally refuse to read or write LabView code, on > the grounds that its syntax causes severe brain damage and is > c

Re: How to choose the right GUI toolkit ?

2006-11-09 Thread John Henry
Steve Holden wrote: > > > You may find that it starts out fine, but becomes less satisfactory as > the sophistication of your interfaces increases. Then the problem will > be that migration to another platform demands a substantial rewrite of > your application (I have done this for a fairly sma

Re: How to choose the right GUI toolkit ?

2006-11-09 Thread John Henry
Bill Maxwell wrote: > On 8 Nov 2006 11:49:07 -0800, "John Henry" <[EMAIL PROTECTED]> > wrote: > > > > >John Salerno wrote: > >> Dan Lenski wrote: > >> > >> > So, is there another toolkit I should be looking at? > >

Re: How to choose the right GUI toolkit ?

2006-11-09 Thread John Henry
Upon closer look, the walkthrough did say: *** from PythonCard import model Change that so it says: from PythonCard import dialog, model Save the code. *** So, it works. John Henry wrote: > Bill Maxwell wrote: > > On 8 Nov 2006 11:49

Re: how is python not the same as java?

2006-11-09 Thread John Henry
gavino wrote: > both are interpreted oo langauges.. I remember the days when I got all excited about Java (many many moons ago when Java first came out). I brought a whole truckload of books on it, even spent 5 days attending a seminar on the subject. To my great disappointment, I never g

Re: How to choose the right GUI toolkit ?

2006-11-11 Thread John Henry
try: canvas.setFillColor('gray') except: pass and then ran it. Works! So, yes, you can do Notebook in Python. I believe what they are saying is that Notebook isn't supported fully (yet) in the resourceeditor. Bill Maxwell wrote: > On 9 Nov 2006

Re: How to choose the right GUI toolkit ?

2006-11-12 Thread John Henry
Nice example. Jussi Salmela wrote: > John Henry wrote: > > BTW: I did a search and found the testnotebook example from: > > > > http://prdownloads.sourceforge.net/pythoncard/testNotebook.zip?download > > > > and tried it out. There is one error in the widget

Re: Yield

2006-11-15 Thread John Henry
Thank you. This is very clear. I can see that this is useful in lots of situations. Fredrik Lundh wrote: > Mateuszk87 wrote: > > > may someone explain "yield" function, please. how does it actually work > > and when do you use it? > > it returns a value from a function without actually terminati

Re: About alternatives to Matlab

2006-11-16 Thread John Henry
Bill Gates will have you jailed! :-) On a more serious note, is there any alternative to Simulink though? sturlamolden wrote: >and is infinitely > more expensive. > > Does anyone wonder why I am not paying for Matlab maintenance anymore? > > Sorry Mathworks, I have used your product for years, bu

How fuzzy is get_close_matches() in difflib?

2006-11-16 Thread John Henry
I am just wondering what's with get_close_matches() in difflib. What's the magic? How fuzzy do I need to get in order to get a match? -- http://mail.python.org/mailman/listinfo/python-list

Re: How fuzzy is get_close_matches() in difflib?

2006-11-16 Thread John Henry
I did try them and I am impressed. It helped me found a lot of useful info. I just want to get a feel as to what constitutes a "match". Steven D'Aprano wrote: > On Thu, 16 Nov 2006 16:40:49 -0800, John Henry wrote: > > > I am just wondering what's with get_clo

Re: How fuzzy is get_close_matches() in difflib?

2006-11-16 Thread John Henry
for. I don't understand why "HIDESCT1" would not hit "HIDEDCT1" as a first choice. Steven D'Aprano wrote: > On Thu, 16 Nov 2006 20:19:50 -0800, John Henry wrote: > > > I did try them and I am impressed. It helped me found a lot of useful > > info.

Concatenating strings

2006-06-30 Thread John Henry
Sorry if this is a dumb question. I have a list of strings (some 10,000+) and I need to concatenate them together into one very long string. The obvious method would be, for example: alist=["ab","cd","ef",.,"zzz"] blist = "" for x in alist: blist += x But is there a cleaner and faster wa

Concatenating strings

2006-06-30 Thread John Henry
Sorry if this is a dumb question. I have a list of strings (some 10,000+) and I need to concatenate them together into one very long string. The obvious method would be, for example: alist=["ab","cd","ef",.,"zzz"] blist = "" for x in alist: blist += x But is there a cleaner and faster wa

Re: Building Python Based Web Application

2006-09-08 Thread John Henry
Hi folks. I am interested on this topic as well. If my application is not database related, what would be a good choice? I have clients that wish to use my Python applications but I am not willing to give them the code. So, I am thinking about setting it up as a web based application and let th

Re: Building Python Based Web Application

2006-09-09 Thread John Henry
Adam Jones wrote: > John Henry wrote: > > Hi folks. > > > > I am interested on this topic as well. > > > > If my application is not database related, what would be a good choice? > > > > I have clients that wish to use my Python applications but I am

Re: Help me use my Dual Core CPU!

2006-09-12 Thread John Henry
I don't know what CPython is but I have developed a Python application under Windows that utilize the Dure Core CPU when it's present. I don't know that I can say for sure that "threads won't help". Have you done some testing before using other approaches to see if it indeed won't help? Simon W

When is it a pointer (aka reference) - when is it a copy?

2006-09-13 Thread John Henry
Hi list, Just to make sure I understand this. Since there is no "pointer" type in Python, I like to know how I do that. For instance, if I do: ...some_huge_list is a huge list... some_huge_list[0]=1 aref = some_huge_list aref[0]=0 print some_huge_list[0] we know that the answere

Re: When is it a pointer (aka reference) - when is it a copy?

2006-09-13 Thread John Henry
print i and you get 1 printed. So, if I understand you correctly, I must make the reference to a more elaborate representation. Like: i=[1,] j=i j[0]=2 print i in order to get 2 printed. Correct? Steve Holden wrote: > John Henry wrote: > > Hi list, > > >

Re: When is it a pointer (aka reference) - when is it a copy?

2006-09-13 Thread John Henry
Thanks for the reply, Grant. I am not doing things like that - I am just trying to clear up in my mind the Python concepts. I understand it now. Grant Edwards wrote: > On 2006-09-13, John Henry <[EMAIL PROTECTED]> wrote: > > Thanks for the reply, both to Laszlo and Steve.

Re: windev vs python SOS

2006-09-27 Thread John Henry
I don't know what windev is but presonally, I found Python to be incredibly productive. BTW: I recommend that you look into PythonCard. It sits on top of wxpython and I found it to be a very productive GUI tool. stéphane bard wrote: > hello, my boss ask me to prefer windev to python. > I have to

Re: windev vs python SOS

2006-09-29 Thread John Henry
Why are they all look so gloomy? I don't see a single smile on their faces. :=) [EMAIL PROTECTED] wrote: > Hi, > > Bruno Desthuilliers a écrit : > > I've never met a programmer that "loved" Windev. > > I have met some here (I'm the guy with a mustache-just kidding but > actually I was there). >

Re: How fuzzy is get_close_matches() in difflib?

2006-11-17 Thread John Henry
;HIDE*DS*T1", I thought you have to remove 2 characters *SC* from the source. Then I realize that it's not true. If you remove the "C" from the source, and the "D" from the *DS* of the destination, it's a match (!) So, yes, they have the same distance! Antoo

  1   2   3   >