Re: [Tutor] How to calculate pi with another formula?

2005-04-14 Thread Bill Mill
that ensued from this request on comp.lang.python : http://groups-beta.google.com/group/comp.lang.python/browse_frm/thread/1839b7d733ae37d0/3b5f7138f0e5fbd1?q=pi+base+12rnum=1#3b5f7138f0e5fbd1 Peace Bill Mill bill.mill at gmail.com ___ Tutor maillist

Re: [Tutor] Pass By Reference

2005-04-12 Thread Bill Mill
in python. Why not use a list instead? 2) what's being printed is a function reference - i.e. you're doing: self.a_dir_instance.getSize instead of: self.a_dir_instance.getSize() which actually calls the function, instead of just returning a pointer to it. Peace Bill Mill bill.mill at gmail.com

Re: [Tutor] How and where to use pass and continue

2005-03-27 Thread Bill Mill
about what you don't understand. Peace Bill Mill bill.mill at gmail.com Thanks Kevin ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor

Re: [Tutor] problems with dictionary

2005-03-23 Thread Bill Mill
=tom self.text(END, str) return 'break' ) There is clearly a mistake in the first function, only thing is I cannot spot it and thus the thing does not work. Send us the exception python gives you and we may be able to help you more. Peace Bill Mill bill.mill at gmail.com

Re: [Tutor] Looking for a Pythonic way to pass variable

2005-03-22 Thread Bill Mill
showed you: L = [[1,2], [3,4]] K = [100, 200] [[b,c,a] for a,b,c in zip(K, *L)] [[1, 3, 100], [2, 4, 200]] which I think is pretty cool, if a little obtuse. Peace Bill Mill bill.mill at gmail.com ___ Tutor maillist - Tutor@python.org http

Re: [Tutor] Acessing files in Windows 2000

2005-03-09 Thread Bill Mill
mmm ... I kind of see what you mean. Does anyone have like a realy large shovel so I can dig a hole and hide ? No worries, we've all been there before. Sometimes you just can't see what's right in front of your face. Don't let it stop you, or stop you from asking questions. Peace Bill Mill

Re: [Tutor] variable name based on variables (expansion?)

2005-02-28 Thread Bill Mill
to use back ticks anyway). Double quotes are the same as single quotes. Please read the tutorial at http://docs.python.org/tut/tut.html . Peace Bill Mill bill.mill at gmail.com ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo

Re: [Tutor] threads

2005-02-25 Thread Bill Mill
. You might want to tighten this question up and ask it on python-list. This is pretty specialized knowledge for the python-tutors list, and I know for a fact that there are several people who have used greenlets on python-list. Just a thought. Peace Bill Mill bill.mill at gmail.com

Re: [Tutor] Functions Calling Functions

2005-02-25 Thread Bill Mill
you're doing, as long as you don't exceed the maximum recursion depth, but it's a pain to debug and takes up a whole bunch of memory you don't need. Peace Bill Mill bill.mill at gmail.com ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman

Re: [Tutor] Print text position problems when using triple quotes

2005-02-24 Thread Bill Mill
On Thu, 24 Feb 2005 13:14:13 -0500, Bill Mill [EMAIL PROTECTED] wrote: On Thu, 24 Feb 2005 10:02:44 -0800, Luke Jordan [EMAIL PROTECTED] wrote: Hi all, I've tried a lot of experimenting and searching through various tutorials, and I haven't been able to come up with a solution

Re: [Tutor] Print text position problems when using triple quotes

2005-02-24 Thread Bill Mill
On Thu, 24 Feb 2005 14:23:28 -0500, Kent Johnson [EMAIL PROTECTED] wrote: Bill Mill wrote: class foo: def bar(self): Sorry, I forgot that if it's in the module, you should declare prompt1 as global by using global prompt1 right here. print prompt1 % (var1, var2, var3

Re: [Tutor] killing a thread

2005-02-22 Thread Bill Mill
If I recall correctly, there is not a direct way. Instead, you're going to want to have your worker thread check a queue it shares with the parent every so often to see if the supervisor thread has sent a quit message to it. Peace Bill Mill bill.mill at gmail.com On Tue, 22 Feb 2005 14:23:17

Re: [Tutor] Re: Basic terminology

2005-02-16 Thread Bill Mill
On Wed, 16 Feb 2005 11:34:55 +0100, Roel Schroeven [EMAIL PROTECTED] wrote: Bill Mill wrote: However, where will it be pointing in 16 hours? Well, in 12 hours it will be at the one, then four more hours later it will be pointing at the five. This can be represented as: 1 + (16 % 12) = 1

Re: [Tutor] Help needed with script to batch-create shapefiles

2005-02-16 Thread Bill Mill
this script for me that I need? Boil your question down into something smaller, and then ask it with the appropriate information. I suggest reading http://www.catb.org/~esr/faqs/smart-questions.html . Peace Bill Mill bill.mill at gmail.com ___ Tutor

Re: [Tutor] count words

2005-02-15 Thread Bill Mill
in word_counts: word_counts[word] += 1 else: word_counts[word] = 1 for word in word_counts: print %s %d % (word, word_counts[word]) Peace Bill Mill bill.mill at gmail.com ___ Tutor maillist - Tutor@python.org http

Re: [Tutor] count words

2005-02-15 Thread Bill Mill
') plus any other characters that you'd like to strip. In action: word = ?testing..!.\n\t word.strip('?.!\n\t ') 'testing' Peace Bill Mill bill.mill at gmail.com -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 Look at you hacker... A pathetic creature of meat and bone, panting and sweating

Re: [Tutor] count words

2005-02-15 Thread Bill Mill
. Although that is no problem in this example, because split() strips its component strings automatically, people should be aware that punctuation won't work on strings that haven't had their whitespace stripped. Otherwise though, good stuff. Peace Bill Mill bill.mill at gmail.com

Re: [Tutor] Basic terminology

2005-02-15 Thread Bill Mill
/Modulus.html for more formal explanations. In particular, it explains some deeper meanings of the word modulus. Once you get into group theory, it can start to mean some related but different things. Peace Bill Mill bill.mill at gmail.com On Tue, 15 Feb 2005 16:16:44 -0500, [EMAIL PROTECTED

Re: [Tutor] Basic terminology

2005-02-15 Thread Bill Mill
? Well, in 12 hours it will be at the one, then four more hours later it will be pointing at the five. This can be represented as: 1 + (16 % 12) = 1 + 4 = 5 In general, the hour at some point in the future will be: (start time) + (hours in the future % 12) Peace Bill Mill bill.mill at gmail.com

Re: [Tutor] Perl Symbology (was: Are you allowed to shoot camels?)

2005-02-10 Thread Bill Mill
) x '0 0 0' And, of course, you can give Itpl.itpl a nicer name; I usually call it pp(). If you don't need to change the behavior of the print statement, then you don't need the Itpl.filter() line. [1] http://lfw.org/python/Itpl.py Peace Bill Mill bill.mill at gmail.com On Thu, 10 Feb 2005 10:22

Re: [Tutor] Re: Perl Symbology

2005-02-10 Thread Bill Mill
On Thu, 10 Feb 2005 18:22:30 +0100, Abel Daniel [EMAIL PROTECTED] wrote: Bill Mill writes: I get the impression that many pythonistas don't like string interpolation. I've never seen a clear definition of why. From import this: Explicit is better than implicit. And doesn't

Re: [Tutor] Perl Symbology (was: Are you allowed to shoot camels?)

2005-02-10 Thread Bill Mill
to do it. The googling shows that there are a myriad of other ways, which I haven't even looked at. They all seem to involve #{[symbol]variable} . Peace Bill Mill bill.mill at gmail.com ___ Tutor maillist - Tutor@python.org http://mail.python.org

Re: [Tutor] Perl Symbology

2005-02-10 Thread Bill Mill
either. the Itpl module has worked fine for me (and for the author of ipython) for quite a while. Peace Bill Mill bill.mill at gmail.com ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Hex to Str - still an open issue

2005-02-04 Thread Bill Mill
/comp.lang.python/browse_thread/thread/bdd85f1d1298a191 . Peace Bill Mill bill.mill at gmail.com On Fri, 4 Feb 2005 15:11:00 +0100, Tamm, Heiko [EMAIL PROTECTED] wrote: Ok, thank you. Does anybody know how to convert a HEX into a BINARY? Best regards Heiko -Original Message- From

Re: [Tutor] Comparing files, Counting Value

2005-01-31 Thread Bill Mill
pixels over %f % (bigpixels, THRESHOLD) end file== Peace Bill Mill bill.mill at gmail.com On Mon, 31 Jan 2005 15:27:24 -0800, Michiyo LaBerge [EMAIL PROTECTED] wrote: Hello all, I'm very new to Python and have been trying to write a script to compare

Re: [Tutor] Cluster algorithms

2005-01-27 Thread Bill Mill
to code well using OOP methods to apply these algorithms? I call some methods on matrix objects in the tutorial, but don't use any OOP. In fact, I often find that strict OOP is not so useful for numerical algorithms, where your code will often have to be optimized for speed. Peace Bill Mill

Re: [Tutor] Unique Items in Lists

2005-01-27 Thread Bill Mill
want it. Peace Bill Mill bill.mill at gmail.com On Thu, 27 Jan 2005 08:29:10 -0800 (PST), Srinivas Iyyer [EMAIL PROTECTED] wrote: Dear Danny, thank you for ur help. But a basic question ? In a table, more specifically a matrix 3X3, AppleFruitDenmark F-16 Fighter USA Taj

Re: [Tutor] counting no of words

2005-01-20 Thread Bill Mill
a macro in word where you count the words, then repeating it in python. I'd help you with that, but I'm on linux. Peace Bill Mill bill.mill at gmail.com On Thu, 20 Jan 2005 16:37:06 +0530, Gopinath V, ASDC Chennai [EMAIL PROTECTED] wrote: hi all, Is it possible to write a program

Re: [Tutor] Ooer, OT Lisp

2005-01-20 Thread Bill Mill
you out, but you might want to ask some more knowledgeable persons. Peace Bill Mill bill.mill at gmail.com ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor