Re: A desperate lunge for on-topic-ness

2012-10-18 Thread Den
cards, and character based terminals Should that really be the basis for a suggested style now? Den -- http://mail.python.org/mailman/listinfo/python-list

Re: name of a sorting algorithm

2012-02-14 Thread Den
through all the other elements, swapping the elements at the pointers when necessary. Then the one pointer moved down to the next element and the process repeats. This looks like the bubble sort to me. It was one of the first algorithms I had to program in my first programming class in 1969. Den -- http://mail.python.org/mailman/listinfo/python-list

Re: what gui designer is everyone using

2012-06-05 Thread Den
ced ready- to-run GUIs. But it's old and not well kept up. There's some new work being done on it but it seems to be mostly housekeeping work - how to best package it, etc. Den -- http://mail.python.org/mailman/listinfo/python-list

Programmer font

2011-06-05 Thread Den
ified the droid Sans Mono font to provide underlines which may be distinguished from each other. (I also augmented the slashed zero to be more to my liking). Give it a try. If you like it, great. If not, no big deal. http://code.google.com/p/droid-sans-mono-py/ Den -- http://mail.python.org/ma

Re: Learning Python

2011-08-24 Thread Den
s, etc it would be greatly appreciated. > Thanks, > User Learning Python, and Programming in Python by Lutz. They worked for me. Den -- http://mail.python.org/mailman/listinfo/python-list

Detecting Ctrl-Alt-Del in Windows

2011-09-01 Thread Den
those too? Den -- http://mail.python.org/mailman/listinfo/python-list

Re: Detecting Ctrl-Alt-Del in Windows

2011-09-02 Thread Den
On Sep 2, 5:27 am, sjm wrote: > On Sep 1, 12:52 pm, Den wrote: > > > Obviously, this is a windows-based question.  I know that Ctrl-Alt-Del > > is handled deep inside the OS, and I'm not trying to interrupt that. > > But is there some way to detect that a C-A-D

Re: Detecting Ctrl-Alt-Del in Windows

2011-09-02 Thread Den
On Sep 2, 5:27 am, sjm wrote: > On Sep 1, 12:52 pm, Den wrote: > > > Obviously, this is a windows-based question.  I know that Ctrl-Alt-Del > > is handled deep inside the OS, and I'm not trying to interrupt that. > > But is there some way to detect that a C-A-D

Re: Detecting Ctrl-Alt-Del in Windows

2011-09-02 Thread Den
On Sep 1, 8:52 am, Den wrote: > Obviously, this is a windows-based question.  I know that Ctrl-Alt-Del > is handled deep inside the OS, and I'm not trying to interrupt that. > But is there some way to detect that a C-A-D has been pressed? > > Also, is there a corresponding key

Re: Alternative to raw_input ?

2005-02-11 Thread den
BOOGIEMAN wrote: On Fri, 11 Feb 2005 16:35:19 +, Simon Brunning wrote: Err, why? It looks to ugly this way. I want to press any key without ENTER to continue Did you try this: import msvcrt msvcrt.getch() -- http://mail.python.org/mailman/listinfo/python-list

Re: Return of an old friend

2011-11-28 Thread Den
On Nov 25, 2:13 am, Noah Hall wrote: > On Fri, Nov 25, 2011 at 5:08 AM, Matt Joiner wrote: > > I haven't heard of you before, but feel like I've missed out on something. > > > Do you (or someone else) care to link to some of your more contentious work? > > Ignore him, he's a troll with an unjustl

Re: Pragmatics of the standard is() function

2011-11-28 Thread Den
On Nov 26, 3:01 pm, Steven D'Aprano wrote: > On Sat, 26 Nov 2011 22:20:36 +0100, candide wrote: >>SNIP<< > > That is correct. You probably should rarely use `is`. Apart from testing > for None, use of `is` should be rare. > > -- > Steven With respect, I disagree with advice that the use of a lang

Re: Pragmatics of the standard is() function

2011-11-29 Thread Den
On Nov 29, 12:41 am, Steven D'Aprano wrote: > On Mon, 28 Nov 2011 11:22:09 -0800, Den wrote: > > With respect, I disagree with advice that the use of a language > > construct should be rare.  All constructs should be used > > *appropriately*. > > And if those appro

Re: OT: Meaning of "monkey"

2010-03-29 Thread Den
om characters, which they compared to a selected set of Shakespeare's plays. Just before the site disappeared (or I lost track of it), they had received strings representing the first maybe 15 or 20 characters of several plays. Den -- http://mail.python.org/mailman/listinfo/python-list

Re: (a==b) ? 'Yes' : 'No'

2010-04-01 Thread Den
e post-fix (I know about Forth) or allow only +=, -=, /=, etc. assignments ONLY. (Just as no reasonable car designer would put the accelerator pedal on the left.) There are conventions which should span products. Yes python has the trinary operator and it's not going to change, but this seems like a bit of petulance on the part of the designer. Den -- http://mail.python.org/mailman/listinfo/python-list

Re: packaging multiple python scripts as Windows exe file

2010-04-14 Thread Den
and if you need them. By the way, I'd be interested to hear if there are any other such solutions for embedding binary files in a python program. Hope that helped. Den -- http://mail.python.org/mailman/listinfo/python-list

Re: Python "why" questions

2010-08-13 Thread Den
27;. The whole rest of the world understands that implicitly, even if their counting starts '1', '2', 'many'. 0-based lists are NOT common sense. They only make sense to the programmers of computer languages, and their fanbois. There may be loads of reasons for it, but don't throw common sense around as one of them. Den -- http://mail.python.org/mailman/listinfo/python-list

Re: This newsgroup (comp.lang.python) may soon be blocked by Google Groups

2018-02-01 Thread Jan van den Broek
On 2018-02-01, superchromix wrote: > > Our own programming discussion newsgroup, located at comp.lang.idl-pvwave, >started receiving spam messages several months ago. > > Two weeks ago, access to comp.lang.idl-pvwave was blocked by Google Groups. > > When trying to access comp.lang.idl-pvwave,

Re: python developer

2022-09-30 Thread Jan van den Broek
2022-09-29, Mike Dewhirst schrieb: > This is an OpenPGP/MIME signed message (RFC 4880 and 3156) Why? [Schnipp] -- Jan v/d Broek balgl...@dds.nl -- https://mail.python.org/mailman/listinfo/python-list

Re: python developer

2022-10-01 Thread Jan van den Broek
2022-10-01, Mike Dewhirst schrieb: >So the answer to your question is signed email is easy and if it becomes >popular it has potential to defeat hackers. Yes, but I'm reading this as a usenet-message (comp.lang.python), not as a mail. -- Jan v/d Broek balgl...@dds.nl -- https://mail.python.o

Re: python developer

2022-10-03 Thread Jan van den Broek
2022-10-01, orzodk schrieb: > Jan van den Broek writes: > >> 2022-10-01, Mike Dewhirst schrieb: >> >>>So the answer to your question is signed email is easy and if it becomes >>>popular it has potential to defeat hackers. >> >> Yes, but I'

Re: Unsubscribe/can't login

2021-05-05 Thread Jan van den Broek
On 2021-05-05, Peter Otten <__pete...@web.de> wrote: Perhaps there's something wrong on my side, but I'm seeing this message twice: Msg-ID: mailman.145.1620211376.3087.python-l...@python.org Return-Path: __pete...@web.de and Msg-ID: mailman.146.1620211381.3087.python-l...@python.org Return-Path

Re: Unsubscribe/can't login

2021-05-05 Thread Jan van den Broek
On 2021-05-05, Peter Otten <__pete...@web.de> wrote: > On 05/05/2021 13:03, Jan van den Broek wrote: >> On 2021-05-05, Peter Otten <__pete...@web.de> wrote: >> >> Perhaps there's something wrong on my side, but I'm >> seeing this message twice: [

Re: [OT] Annoying message duplication, was Re: Unsubscribe/can't login

2021-05-05 Thread Jan van den Broek
On 2021-05-05, Jim Byrnes wrote: > On 5/5/21 9:39 AM, Peter Otten wrote: >> On 05/05/2021 16:10, Ethan Furman wrote: >> >>> I see your messages twice (occasionally with other posters as well). >>> I have no idea how to fix it.?? :( >> >> OK, I'll try another option from Thunderbird's context m

Re: [OT] Annoying message duplication, was Re: Unsubscribe/can't login

2021-05-05 Thread Jan van den Broek
On 2021-05-05, Peter Otten <__pete...@web.de> wrote: > On 05/05/2021 16:10, Ethan Furman wrote: > >> I see your messages twice (occasionally with other posters as well).?? I >> have no idea how to fix it.?? :( > > OK, I'll try another option from Thunderbird's context menu: Followup to > Newsgrou

Re: Guido van Rossum resigns as Python leader

2018-07-14 Thread Jan van den Broek
On 2018-07-13, ElChino wrote: >> The important question we should ask ourselves: Do we have a replacement >> Dutch person to figure out the one obvious way to do things that may not >> be obvious at first? > > Skybuck?! Also Dutch. We try to deny that. It'll probably lead to ending every statemen

Re: Guido van Rossum resigns as Python leader

2018-07-14 Thread Jan van den Broek
On 2018-07-13, Larry Martell wrote: [Schnipp] > And while we're talking about the Dutch, why is the country called > Holland, but then also The Netherlands, but the people are Dutch? Be careful here, this is a somewhat delicate matter. Strictly speaking Holland is part of Nederland (the Netherl

Re: Recursive method in class

2019-09-27 Thread Jan van den Broek
On 2019-09-27, ast wrote: > Is it feasible to define a recursive method in a class ? > (I don't need it, it's just a trial) > > Here are failing codes: > > > class Test: > def fib(self, n): > if n < 2: return n > return fib(self, n-2) + fib(self, n-1) self.

__Classes and type tests

2005-10-09 Thread Brian van den Broek
Hi all, The code below exhibits an attempt to refer to the type of a __Class from within a method of that class. I've been unable to figure out how to make it work as I want, and would appreciate any insight. The problem emerged out of a bad design that the good folks on the tutor list helped

Re: __Classes and type tests

2005-10-09 Thread Brian van den Broek
Fredrik Lundh said unto the world upon 2005-10-09 17:49: > Brian van den Broek wrote: > > >>But the academic issue "How/Can it be done?" still itches. > > > class __TwoUnderBase(object): > def __init__(self): > if se

Re: how to think like a computer scientist

2005-11-13 Thread Brian van den Broek
john boy said unto the world upon 2005-11-11 22:25: > Question for the following program: sec 5.5 > > def factorial (n): >if n == 0: > return 1 >else: > recurse = factorial (n-1) > result = n * recurse > return result > > How come whenever I state the function wi

Re: tutorial example?????

2005-11-13 Thread Brian van den Broek
john boy said unto the world upon 2005-11-12 19:43: > OK...I have the following program > > i = 1 > while i <= 6: > print 2 * i,' ', > i = i + 1 > print > > this is supposed to give you a "new" blank line after the program runs > instead it just gives: > 2 4 6 8 10 12 > >

Re: compare list

2005-11-14 Thread Brian van den Broek
Ben Bush said unto the world upon 2005-11-14 05:51: > I have four lists: > lisA=[1,2,3,4,5,6,9] > lisB=[1,6,5] > lisC=[5,6,3] > lisD=[11,14,12,15] > how can I write a function to compare lisB, lisC and lisD with lisA, if they > share two continuous elements (the order does not matter), then return

Re: compare list

2005-11-14 Thread Brian van den Broek
Ben Bush said unto the world upon 2005-11-14 23:20: > > On 11/14/05, Brian van den Broek <[EMAIL PROTECTED]> wrote: > >>Ben Bush said unto the world upon 2005-11-14 05:51: >> >>>I have four lists: >>>lisA=[1,2,3,4,5,6,9] >>>lisB=[1,6

Re: compare list

2005-11-15 Thread Brian van den Broek
Shi Mu said unto the world upon 2005-11-15 01:30: >>Hey Ben, >> >>first, as expected, the other two answers you received are better. :-) >> >>Sets are much better optimized for things like membership testing than >>are lists. I'm not competent to explain why; indeed, I keep >>overlooking them mysel

Re: compare list

2005-11-15 Thread Brian van den Broek
Ben Bush said unto the world upon 2005-11-15 01:24: > > Unfortunately, the indents got screwed up along the way. But the part > >>of my code you asked about was: >> >>for item in list1: >>if item in list2: >>if item + 1 in list1 and item + 1 in list2: >>return True >>

puzzled about class attribute resolution and mangling

2005-12-09 Thread Brian van den Broek
Hi all, I've the following code snippet that puzzles me: class Base(object): __v, u = "Base v", "Base u" def __init__(self): print self.__v, self.u class Derived(Base): __v, u = "Derived v", "Derived u" def __init__(self): print self.__v, self.u sup

Re: Why tuples use parentheses ()'s instead of something else like <>'s?

2004-12-31 Thread Brian van den Broek
Hi all, a question about using parenthesis for tuples veered very far off topic before I returned from a trip and found the thread. I've a comment on the original topic, and then a comment off-topic even for the off-topic direction in which the thread ended up :-) The on-topic: the use of '(' a

Re: Cookbook 2nd ed Credits (was Re: The Industry choice)

2005-01-04 Thread Brian van den Broek
Alex Martelli said unto the world upon 2005-01-04 11:15: <[EMAIL PROTECTED]> wrote: But then I have THREE published recipes!! Does that mean that I get three free copies of the cookbook ? ;-) ...ti piacerebbe eh...?-) Sorry, "one each", even though you have _five_ credits. For the curious, here

Re: DOS problem (simple fix??)

2005-01-07 Thread Brian van den Broek
Gavin Bauer said unto the world upon 2005-01-07 15:47: My DOS window (running in windows ME) closes the second it finishes running my programs. As you can imagine, this makes it hard to see the Thank you, and please make all answers simple enough to be understood by a highschool student and his fa

Re: Index server

2005-01-14 Thread Marcel van den Dungen
[EMAIL PROTECTED] wrote: Is there an Index server available in Python? For example: I have large intranet with several servers and I would like to index documents like search engines do. Users then can search for a domument in ALL intranet servers like I do on Google. Thanks for answers L.A. Take

What's so funny? WAS Re: rotor replacement

2005-01-22 Thread Brian van den Broek
Paul Rubin said unto the world upon 2005-01-22 20:16: "Fredrik Lundh" <[EMAIL PROTECTED]> writes: You're not making any bloody sense. oh, I make perfect sense, and I think most people here understand why I found your little "lecture" so funny. if you still don't get it, maybe some- one can explain

Re: Python 2.1 - 2.4 differences

2005-01-24 Thread Brian van den Broek
"BOOGIEMAN" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] I found some e-book about Python 2.1, I want to print it but just to check first if sintax of Python 2.1 is same as 2.4 ? Also does anybody know where can I download any newer Python related e-book, because there isn't any p

Re: how to write a tutorial

2005-01-26 Thread Brian van den Broek
Terry Reedy said unto the world upon 2005-01-26 14:08: Xah the arrogant wrote, among other things, However, there are several errors in the above that would mislead a Python learner. I advise any such to ignore Xah's writings. Terry J. Reedy Hi all, here's a thought: There isn't any doubt that

Re: naive doc question

2005-01-29 Thread Brian van den Broek
Gabriel B. said unto the world upon 2005-01-29 19:38: Is it just me that can't find a full reference in the docs? I wanted a list of all the methods of dict for example... where can i find it? Thanks, and sorry if this question is just dumb, i really can't find it It's just you ;-) Try the Library

Re: Where are list methods documented?

2005-02-01 Thread Brian van den Broek
Grant Edwards said unto the world upon 2005-02-01 12:21: I'm trying to figure out how to sort a list, and I've run into a problem that that I have tripped over constantly for years: where are the methods of basic types documented? The only thing I can find on a list's sort() method is in the tutor

Re: Basic file operation questions

2005-02-02 Thread Marcel van den Dungen
alex wrote: Hi, I am a beginner with python and here is my first question: How can I read the contents of a file using a loop or something? I open the file with file=open(filename, 'r') and what to do then? Can I use something like for xxx in file: Thanks for help Alex take a look at this:

Re: returning True, False or None

2005-02-04 Thread Brian van den Broek
Alex Martelli said unto the world upon 2005-02-04 13:02: Steven Bethard <[EMAIL PROTECTED]> wrote: I have lists containing values that are all either True, False or None, e.g.: [True, None, None, False] [None, False, False, None ] [False, True, True, True ] etc. For a given l

Re: [noob] Error!

2005-02-04 Thread Brian van den Broek
administrata said unto the world upon 2005-02-04 17:59: I'm programming Car Salesman Program. It's been "3 days" learning python... But, i got problem Write a Car Salesman program where the user enters the base price of a car. The program should add on a bunch of extra fees such as tax, license, de

broke IDLE while defining a key-binding scheme

2005-02-04 Thread Brian van den Broek
Hi all, IDLE refuses to launch, and I believe it is because I attempted to define a custom key-binding that it doesn't like. I was recently defining a custom keybinding in IDLE 1.1 under Python 2.4 on WinMe. (I was using the simpler of the two binding definition interfaces.) When done, I hit th

Re: returning True, False or None

2005-02-04 Thread Brian van den Broek
Fahri Basegmez said unto the world upon 2005-02-04 23:14: "Mick Krippendorf" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Fahri Basegmez wrote: reduce(lambda x, y: x or y, lst) This doesn't solve the OPs problem since reduce(lambda x, y: x or y, [False, None]) returns None instead

Re: empty classes as c structs?

2005-02-05 Thread Brian van den Broek
Steven Bethard said unto the world upon 2005-02-05 14:05: Nick Coghlan wrote: Steven Bethard wrote: Yes -- help me rally behind my generic object PEP which proposes a Bunch type (probably to be renamed) for the Python standard lib. =) Did you see the suggestion of 'namespace' as a name? Yup, it'

Re: empty classes as c structs?

2005-02-05 Thread Brian van den Broek
Carlos Ribeiro said unto the world upon 2005-02-05 16:35: On Sat, 05 Feb 2005 15:59:00 -0500, Brian van den Broek <[EMAIL PROTECTED]> wrote: (I'm just a hobbyist, so if this suggestion clashes with some well established use of 'Bag' in CS terminology, well, never mind.) T

Re: Definitive documentation on newstyle classes? (WAS: Pickling and inheritance are making me hurt)

2005-02-05 Thread Brian van den Broek
Daniel Bickett said unto the world upon 2005-02-05 19:46: I was reading the "Pickling and inheritance are making me hurt" thread, and the latest suggestion (as of this posting) was to do with the __setstate__ and __getstate__ methods. They caught my attention because I hadn't encountered them befor

Re: A tool for Python - request for some advice

2005-06-21 Thread Brian van den Broek
TPJ said unto the world upon 21/06/2005 02:00: > First I have to admit that my English isn't good enough. I'm still > studying and sometimes I just can't express what I want to express. I've graded essays in Philosophy at my university that were written by native speakers of English yet were sub

Re: Create our own python source repository

2005-06-21 Thread Brian van den Broek
Michele Simionato said unto the world upon 21/06/2005 07:58: > qwwee: > >>for a certain argument I'd prefer an application fully >>explained (also if not covering all the features) to a more general >>tutorial with only brief and unrelated code snippets. >>Unfortunately, that's not the way things

Re: How does one write a function that increments a number?

2005-06-24 Thread Brian van den Broek
[EMAIL PROTECTED] said unto the world upon 25/06/2005 01:41: > Wait... so this means it is impossible to write a function that > increments an integer without turning the integer into a list? > Well, one of these options will probably suit: >>> def increment_counter(data): ... data += 1 ...

Re: Excellent Site for Developers

2005-06-25 Thread Brian van den Broek
Brian said unto the world upon 25/06/2005 10:50: > Do Re Mi chel La Si Do wrote: > >>rather... super troll > > > 100% Agreed. > > Can anyone say, "This looks like spam... Feels like spam... and is about > as useful here in the Python forums as spam -- therfore my conclusion is > that his

Re: [offtopic] Re: Set of Dictionary

2005-06-26 Thread Brian van den Broek
James Dennett said unto the world upon 26/06/2005 03:51: > Steven D'Aprano wrote: > > >>On Thu, 16 Jun 2005 21:21:50 +0300, Konstantin Veretennicov wrote: >> >> >> >>>On 6/16/05, Vibha Tripathi <[EMAIL PROTECTED]> wrote: >>> >>> I need sets as sets in mathematics: >>> >>>That's tough. First o

Re: Which kid's beginners programming - Python or Forth?

2005-06-27 Thread Brian van den Broek
BORT said unto the world upon 27/06/2005 23:16: > Please forgive me if this is TOO newbie-ish. > > I am toying with the idea of teaching my ten year old a little about > programming. I started my search with something like "best FREE > programming language for kids." After MUCH clicking and high

Re: How to compress a folder and all of its sub directories and files into a zip file?

2005-06-28 Thread Brian van den Broek
could ildg said unto the world upon 28/06/2005 03:29: > but the file is just stored, > and not compressed. > > On 6/28/05, could ildg <[EMAIL PROTECTED]> wrote: > >>Thank you, >>it works~~ >> >>On 6/29/05, Peter Szinek <[EMAIL PROTECTED]> wrote: >> >>>Hi, >>> >>>What about this: >>> >>>import os,

Re: How to compress a folder and all of its sub directories and filesinto a zip file?

2005-06-28 Thread Brian van den Broek
Fredrik Lundh said unto the world upon 28/06/2005 08:04: > Brian van den Broek wrote: > > >>So, it would appear that compression requires a 3rd party module, not >>included in Python (and not present on my Windows box). > > > where did you get your Windows Pytho

Re: Newbie: Explain My Problem

2005-06-29 Thread Brian van den Broek
[EMAIL PROTECTED] said unto the world upon 29/06/2005 03:11: > Code: > > #The Guess My Number Game > > import random > num = "" > guess = "" > counter = 7 > num = random.randrange(1, 100) > print "I'm thinking of a whole number from 1 to 100." > print "You have ", counter, " chances left to guess

Re: I have a question.

2005-06-30 Thread Brian van den Broek
Nathan Pinno said unto the world upon 30/06/2005 11:22: > > Hi all, > > Does Python have a random function? If so, can you show me an example > using it? > > Thanks, > Nathan Pinno > http://www.npinnowebsite.ca/ >>> import random >>> print "It took %s seconds to find the module name

Re: Programmers Contest: Fit pictures on a page

2005-07-01 Thread Brian van den Broek
Peter Hansen said unto the world upon 01/07/2005 11:47: > Dan Sommers wrote: > >>Peter Hansen <[EMAIL PROTECTED]> wrote: >> >>>This problem is well suited to the abilities of genetic algorithms, >>>and this would probably be an excellent way to learn more about them, >>>even if you don't get the b

Re: Programmers Contest: Fit pictures on a page

2005-07-01 Thread Brian van den Broek
Robert Kern said unto the world upon 01/07/2005 17:24: > Brian van den Broek wrote: > > >>Well, I found it ironic, but only when you add that the genetic >>algorithm approach came up in the context of a "best fit" problem. >>Survival of the fittest indeed

Re: Bad Math

2005-07-01 Thread Brian van den Broek
Patrick Rutkowski said unto the world upon 01/07/2005 23:56: > I started reading a python book today, one example was: > > 4 / (2.0 + 3) > > 0.8 > > My input/output was: > > 4 (2.0 + 3) > > 0.80004 > > Something smells fishy here... whats up? > > --python 2.4.1

Re: Another newbie question from Nathan.

2005-07-01 Thread Brian van den Broek
Nathan Pinno said unto the world upon 02/07/2005 02:25: > > Hi all. > > How do I make the computer generate 4 random numbers for the guess? I want > to know because I'm writing a computer program in Python like the game > MasterMind. > > Thanks. > > -- > Nathan Pinno > http://www.n

Re: Bad Math

2005-07-02 Thread Brian van den Broek
Patrick Rutkowski said unto the world upon 02/07/2005 09:25: > On 7/2/05, Brian van den Broek <[EMAIL PROTECTED]> wrote: > >>Patrick Rutkowski said unto the world upon 02/07/2005 00:12: >> >>>That's... annoying, to say the least. And my number 4/5 was a ra

precision problems in base conversion of rational numbers

2005-07-04 Thread Brian van den Broek
Hi all, I guess it is more of a maths question than a programming one, but it involves use of the decimal module, so here goes: As a self-directed learning exercise I've been working on a script to convert numbers to arbitrary bases. It aims to take any of whole numbers (python ints, longs, or

Re: precision problems in base conversion of rational numbers

2005-07-05 Thread Brian van den Broek
Terry Hancock said unto the world upon 05/07/2005 11:49: > On Monday 04 July 2005 06:11 am, Brian van den Broek wrote: > >>As a self-directed learning exercise I've been working on a script to >>convert numbers to arbitrary bases. It aims to take any of whole >>nu

Re: Do a "Python beginners e-mail list" exist?

2005-07-07 Thread Brian van den Broek
Alessandro Brollo said unto the world upon 07/07/2005 03:24: > Far from a professional programmer, I'm simply a > newbie Python user. Two basic questions: > > 1. I don't want to post banal questions about Python > to main Python list. Does a "banal Python questions > list" or a "Python beginners l

Re: An absolute Newbie question

2005-07-10 Thread Brian van den Broek
wpog said unto the world upon 10/07/2005 12:41: > Hello, > > I have a question about using "IDLE", and that is whenever I start write my > own program in the "Python Shell" it will automatically execute whatever > command I have written, for example: >>> print 'Hello World" > > So, how to I ge

Re: Replacing last comma in 'C1, C2, C3' with 'and' so that it reads 'C1, C2 and C3'

2005-07-12 Thread Brian van den Broek
Ric Da Force said unto the world upon 12/07/2005 02:43: > Hi, > > I have a string such as 'C1, C2, C3'. Without assuming that each bit of > text is of fixed size, what is the easiest way to change this list so that > it reads: > 'C1, C2 and C3' regardless of the length of the string. > > Rega

Re: 2.4 Recent File list not working

2005-07-13 Thread Brian van den Broek
Larry Bates said unto the world upon 13/07/2005 15:54: > I recently upgraded from 2.2 to 2.4 (ActiveState for Windows). > I was accustomed to having the most recent 10 files that I had > edited show up under File menu under Recent. After upgrading > these don't seem to be saved after exiting. I t

Re: problems with python 2.4 help

2005-07-15 Thread Brian van den Broek
[EMAIL PROTECTED] said unto the world upon 15/07/2005 14:50: > I've noticed that the listings in help don't take you to correct topic. > > anyone else have this problem? Is there a fix? > I'm not sure from your question what exact problem you are experiencing. Do you mean: IDLE 1.1.1 >>> hel

Re: interactive python session spool/save-log command?

2005-07-20 Thread Brian van den Broek
Robert Kern said unto the world upon 2005-07-20 21:15: > S. M. Tuttle wrote: > >>I'm going to be teaching an introductory course on Python >>in the Fall, so I am hurriedly trying to both learn >>Python and prepare the course during the next few weeks. >> >>I'm curious if there is a command that al

Re: Difference between " and '

2005-07-22 Thread Brian van den Broek
Andrew Dalke said unto the world upon 2005-07-22 13:30: > François Pinard wrote: > >>There is no strong reason to use one and avoid the other. Yet, while >>representing strings, Python itself has a _preference_ for single >>quotes. > > > I use "double quoted strings" in almost all cases becaus

Re: empty classes as c structs?

2005-02-07 Thread Brian van den Broek
Alex Martelli said unto the world upon 2005-02-06 18:06: Brian van den Broek <[EMAIL PROTECTED]> wrote: ... (I'm just a hobbyist, so if this suggestion clashes with some well established use of 'Bag' in CS terminology, well, never mind.) Yep: a Bag is a more common

RESOLVED broke IDLE while defining a key-binding scheme

2005-02-07 Thread Brian van den Broek
Brian van den Broek said unto the world upon 2005-02-04 22:21: Hi all, IDLE refuses to launch, and I believe it is because I attempted to define a custom key-binding that it doesn't like. shortcuts, etc.) by clicking on it. Nothing. Ran idle.py instead > . The DOS-console this b

Re: Unable to run IDLE Under Windows

2005-02-07 Thread Brian van den Broek
Peter Otten said unto the world upon 2005-02-07 09:14: Jonathan Polley wrote: I have one account on a WindowsXP machine that refuses to run IDLE (or any other python script that uses Tk). Other people can login to that PC and IDLE runs just fine, so it is not an installation issue. When the pers

Re: python code with indention

2005-02-07 Thread Brian van den Broek
Xah Lee said unto the world upon 2005-02-07 14:39: is it possible to write python code without any indentation? Xah [EMAIL PROTECTED] http://xahlee.org/PageTwo_dir/more.html print "It would seem it is indeed possible." print print "Note: although I know this, I don't consider myself an " print "

Re: variable declaration

2005-02-07 Thread Brian van den Broek
Steve Holden said unto the world upon 2005-02-07 17:51: Alexander Zatvornitskiy wrote: Привет Alex! 05 февраля 2005 в 17:00, Alex Martelli в своем письме к All писал: AM> to all intents and purposes working "as if" AM> it was a declaration. If I had to vote about the one worst formal AM> defec

Re: Learning Python - resources and ideas

2005-02-08 Thread Brian van den Broek
[EMAIL PROTECTED] (Cody Houston) said unto the world upon 2005-02-08 05:06: Hi. What is the best way to learn Python? None of the local schools near me teach any courses on the topic. Thanks. -- Cody Houston [EMAIL PROTECTED] Hi Cody, rec.photo.equipment.35mm? -- kind of an odd follow-up for a post

Re: variable declaration

2005-02-08 Thread Brian van den Broek
Brian van den Broek said unto the world upon 2005-02-07 20:36: Steve Holden said unto the world upon 2005-02-07 17:51: The reason global is a wart can clearly be seen in the following example: >>> x = 3 >>> def f(tf, v): ... if tf: ... global x ... x = v ... &g

Re: goto, cls, wait commands

2005-02-10 Thread Brian van den Broek
BOOGIEMAN said unto the world upon 2005-02-10 16:06: OK, thanks all Here's presentation of my advanced programming skills :) import os import time os.system("cls") number = 78 guess = 0 while guess != number: guess = input("Guess number: ") if

Re: Unit Testing in Python

2005-02-10 Thread Brian van den Broek
rhat said unto the world upon 2005-02-10 21:10: Hi Everyone, I've recently been reading some articles about unit-testing in Python [1] [2], but I am a bit confused: where do I go to get started with this? I tried googling for "unittest" but all I've found are some old links to projects that already

win32gui bug: where to report it?

2005-02-15 Thread George van den Driessche
It's taken me ages to find out why my window, built out of win32all, wasn't receiving any messages. Eventually I found the answer here: http://mail.python.org/pipermail/python-list/2001-October/069451.html The important point being: > IIRC you have to pass the return value of the RegisterClass()

Re: problem with tutor mailing

2005-02-16 Thread Brian van den Broek
administrata said unto the world upon 2005-02-16 16:11: i'm using tutor maling... i e-mail some questions to tutor and get answers. but, i frequently get mails which aren't related with my question. how should i stop it? You do know it's a mailing list that you've subscribed too, right? As in, peop

Re: duplicate docstrings

2005-02-19 Thread Brian van den Broek
Steven Bethard said unto the world upon 2005-02-18 13:58: I have two classes that implement the same interface, e.g. something like: class C(object): def foo(self): """Foo things""" ... def bar(self): """Bar things""" ... def baz(self): """Baz thi

Re: NOOB coding help....

2005-02-22 Thread Brian van den Broek
Igorati said unto the world upon 2005-02-22 03:51: #This program will ask for a user to imput numbers. The numbers will then be calculated #to find the statistical mean, mode, and median. Finallly the user will be asked #if he would like to print out the answers. numbers = [ ] print 'Enter numbers

Re: Selective HTML doc generation

2005-02-23 Thread Brian van den Broek
Graham said unto the world upon 2005-02-23 09:42: Hi. I'm looking for a documentation generation tool (such as pydoc, epydoc, happydoc, etc.) that will allow me to filter what it includes in it's output. I only want the reader to know about classes and methods in my package if if the classes have d

Re: Selective HTML doc generation

2005-02-24 Thread Brian van den Broek
Graham Ashton said unto the world upon 2005-02-24 04:54: Thanks Brian, much appreciated. Looks quite straightforward. Graham Hi Graham, glad it helped -- I think this marks the first time I've given a useful answer to a non-trivial question on comp.lang.python. :-) G: Hi. I'm looking for a docum

Re: Need help running external program

2005-02-27 Thread Brian van den Broek
Rigga said unto the world upon 2005-02-27 15:04: Tim Jarman wrote: No, the r was the point - it's there to tell Python not to do any escaping on the string. Try it again with the r and see what happens. Brilliant!!! that works a treat thankyou!!, where on earth did you find out about the 'r' any

Re: Trees

2005-02-27 Thread Brian van den Broek
Alex Le Dain said unto the world upon 2005-02-27 19:54: > Would this be for a GUI toolkit or maybe using a standard > class scheme? Sorry, yes I should have been more specific. I meant a non-GUI, standard class scheme. I want to use the scheme to hold a structure in memory and retrieve/add info

Re: Python 2.4 removes None data type?

2005-03-07 Thread Brian van den Broek
Steven Bethard said unto the world upon 2005-03-07 11:55: Warren Postma wrote: Michael Hoffman wrote: The fact that True and False are not constants? Yowza. a = True b = False False = a True = b if (1==2)==True: print "Doom" Why stop there when you can really cause some doom: py> import __bui

Re: using the set command

2005-03-11 Thread Brian van den Broek
Leeds, Mark said unto the world upon 2005-03-11 20:03: Do I have to import something In order to use the set command ? I am trying to use it but I keep getting an error. Mark The answer depends upon which version of Python you are using. That information, along with

Re: Tkinter WEIRDNESS or Python WEIRDNESS?

2005-03-11 Thread Brian van den Broek
steve said unto the world upon 2005-03-12 00:06: In a nutshell, my problem is that I am getting this runtime error, and I have no clue why. Please bear in mind its my first python program: "localvariable 'currentAbility' referenced before asignment" in this function which is a callback for a butto

Re: Tkinter WEIRDNESS or Python WEIRDNESS?

2005-03-12 Thread Brian van den Broek
steve said unto the world upon 2005-03-12 18:46: Brian van den Broek <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... steve said unto the world upon 2005-03-12 00:06: In a nutshell, my problem is that I am getting this runtime error, and I have no clue why. Please

Re: try / except not worknig correctly

2005-03-12 Thread Brian van den Broek
'@'.join([..join(['fred', 'dixon']), ..join(['gmail', 'com'])]) said unto the world upon 2005-03-12 19:20: the code below will not execute the except section when i enter a number. what am i missing ? # .while 1: . print 'Pump Protection ? ' . #line 133 .

  1   2   3   >