Re: Another newbie question

2005-12-10 Thread Mike Meyer
Steven D'Aprano <[EMAIL PROTECTED]> writes: >> In particular, >> you can get most of your meaningless methods out of a properly >> designed Coordinate API. For example, add/sub_x/y_ord can all be >> handled with move(delta_x = 0, delta_y = 0). > > Here is my example again: > > [quote] > Then, somew

Re: Another newbie question

2005-12-10 Thread Mike Meyer
[EMAIL PROTECTED] (Alex Martelli) writes: > Mike Meyer <[EMAIL PROTECTED]> wrote: >... >> >> it. Nothing you do with zim.foo or zim.foo.bar can change the state of >> >> zim. The only invariants you need to check are bar's, which you do at >> >

Re: The Industry choice

2004-12-31 Thread Mike Meyer
[EMAIL PROTECTED] (Cameron Laird) writes: > For a not-too-different variety of safety, I like Eiffel. Again, > Eiffel compilers are available nearly, but not entirely, everywhere. Eiffel compilers tend to generate C code, and hence work on anything with a C compiler. The question then becomes ho

Re: Python equivalent of script(1)

2005-01-01 Thread Mike Meyer
[EMAIL PROTECTED] writes: > In my case I wouldn't like to use it as a proof of anything, but I want > to get a script accessing a library system in my school -- it means > many attempts to play with urllib. I would prefer to do it in an > interactive session, but then I would love to have a record

Re: Looping using iterators with fractional values

2005-01-01 Thread Mike Meyer
"drife" <[EMAIL PROTECTED]> writes: > Hello, > > Making the transition from Perl to Python, and have a > question about constructing a loop that uses an iterator > of type float. How does one do this in Python? > > In Perl this construct quite easy: > > for (my $i=0.25; $i<=2.25; $i+=0.25) { > pri

Continuations Based Web Framework - Seaside.

2005-01-02 Thread Mike Thompson
earlier, partially failed attempt to do what Seaside now seems to be delivering. Anyway, I guess all I'm doing is drawing this to the community's attention. Sophisticated web applications seems to be one of Python's key domains and this looks a significant new development in the area

Re: The Industry choice

2005-01-02 Thread Mike Meyer
Bulba! <[EMAIL PROTECTED]> writes: > This "free software" (not so much OSS) notion "but you can > hire programmers to fix it" doesn't really happen in practice, > at least not frequently: because this company/guy remains > ALONE with this technology, the costs are unacceptable. Yes, but fixing p

Re: Developing Commercial Applications in Python

2005-01-03 Thread Mike Meyer
"It's me" <[EMAIL PROTECTED]> writes: > Well, now that they are API based, they can easily add any script language > they so wish through SWIG (www.swig.org). > > Maybe not LISP. SNOBOL would be the right thing to do. (*NOT*) SWIG generates wrappers for GUILE, which is Scheme, which looks enou

Re: Continuations Based Web Framework - Seaside.

2005-01-03 Thread Mike Meyer
Steve Holden <[EMAIL PROTECTED]> writes: > It's the *ideas* that are important, though, rather than the > implementation, and my initial hope was to publicise the weakness of > statelessness on the web as applications become more complex. This needed publicity? Isn't it obvious to anyone who has

Re: input record sepArator (equivalent of "$|" of perl)

2005-01-03 Thread Mike Meyer
Christos "TZOTZIOY" Georgiou <[EMAIL PROTECTED]> writes: > [1] through the French "mètre" of course; great job, those > revolutionaries did with the metric system. As Asimov put it, "how many > inches to the mile?" Trivia question: Name the second most powerfull country on earth not using the me

Re: lies about OOP

2005-01-04 Thread Mike Brenner
oupling, increase cohesion of the software, and do tricks with lambda", Python-D will say: "simplify, reduce coupling, and increase cohesion of the data, and do tricks with metadata." Mike Brenner -- http://mail.python.org/mailman/listinfo/python-list

Re: Restore a unified diff

2005-01-05 Thread Mike Meyer
Tim Peters <[EMAIL PROTECTED]> writes: > [Nick Allen] >> Unfortunately, restore does not do the same for unified_diff. I do >> not see any similar function that is intended for unified_diff. Does >> anyone know how to "restore" from a unified diff generated delta? > > That's in general impossibl

Re: is python more popular than coldfusion?

2005-01-05 Thread Mike Meyer
[EMAIL PROTECTED] writes: >>is python more popular than coldfusion? > For your specific purpose of learning a language to get a job, I > suggest visiting the site http://mshiltonj.com/sm/categories/languages/ > , where it appears that Python is mentioned about as often as Fortran > or Ada in job l

Re: smtp question

2005-01-05 Thread Mike Meyer
"Philippe C. Martin" <[EMAIL PROTECTED]> writes: > Hi, > > I am testing the smtp module and have the following question: > > in the code below (taken from net sample) prior to adding the "Subject:" > field, the email client found the "From" and the "To". Without the > "Subject:" field on I get thi

Re: Python evolution: Unease

2005-01-05 Thread Mike Thompson
ght WWW sites and I can't find much on "Envisage". At SciPy.org there is one set of powerpoint slides on it but nothing more. Is it available for download somewhere? -- Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Another PythonWin Excel question

2005-01-06 Thread Mike Thompson
eet I was at. How can I get it to add *after*? Thanks, -- Me Does this help? http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_wrcore/html/wrtskhowtomoveworksheetswithinworkbooks.asp -- Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Another PythonWin Excel question

2005-01-06 Thread Mike Thompson
It's me wrote: Yes, Mike, Others pointed that out as well. For good reason. The difficulty is that they are all in VBAs. Most of them can be translated to Python fairly easily, and some I can get from looking at the recorded macro - but some requires quite a bit of head scratching. For ins

import problems *newbie*

2005-01-13 Thread mike kreiner
menu, I'm able to locate my module, PolyDraw.py. The problem goes away if I open PolyDraw.py from PythonWin, which I'm assuming is because opening the module makes my_scripts the current working directory. This is just a quick workaround, but I'd like to know how to fi

Re: import problems *newbie*

2005-01-16 Thread mike kreiner
first open source contribution!). Thanks. ~mike -- http://mail.python.org/mailman/listinfo/python-list

Problem parsing namespaces with xml.dom.minidom

2005-01-17 Thread Mike McGavin
it. I'd really just like to be able to parse an XML document into a DOM, and then be able to pull out elements relative to their namespaces. Can anyone see what I'm doing wrong? Thanks. Mike. -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem parsing namespaces with xml.dom.minidom

2005-01-18 Thread Mike McGavin
#x27;t seem to be working properly for me when namespaces are involved. Thanks. Mike. -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem parsing namespaces with xml.dom.minidom

2005-01-18 Thread Mike McGavin
27;ll take a look at this, too. Much appreciated. Mike. -- http://mail.python.org/mailman/listinfo/python-list

scipy.signal.convolve2d() clips off part of my image

2005-01-24 Thread mike kreiner
is (384, 512), even though windows and my image editor say the image is 512 by 384. Could this have something to do with the reason convolve2d() only works right on the left-most 388 by 388 pixels? Thanks for any help. -Mike Kreiner -- http://mail.python.org/mailman/listinfo/python-list

string.atoi and string.atol broken?

2005-01-25 Thread Mike Moum
vel- s.atoi('8',4) File "/usr/lib/python2.3/string.py", line 220, in atoi return _int(s, base) ValueError: invalid literal for int(): 8 s.atoi('4',3) should result in 11 s.atoi('13',4) should result in 31 s.atoi('12',4) should result in 30 s.atoi('8',4) is legitimate, but it generates an error. Is this a bug, or am I missing something obvious? TIA, Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: string.atoi and string.atol broken?

2005-01-25 Thread Mike Moum
d convert it to the correct representation in the base of the second argument. In other words, atoi('4',3) should take 4 in base 10 and convert it to base 3, resulting in 11. Exactly backwords, as atoi('11',3) = 4, that is, 11 base 3 = 4 base 10. Thanks to all fo

Re: What is different with Python ?

2005-06-20 Thread Mike Meyer
Andrea Griffini <[EMAIL PROTECTED]> writes: > On Tue, 14 Jun 2005 16:40:42 -0500, Mike Meyer <[EMAIL PROTECTED]> wrote: > > >Um, you didn't do the translation right. > > Whoops. > > So you know assembler, no other possibility as it's such > a c

Re: What is different with Python ?

2005-06-20 Thread Mike Meyer
Andrew Dalke <[EMAIL PROTECTED]> writes: > Andrea Griffini wrote: > > Wow... I always get surprises from physics. For example I > > thought that no one could drop confutability requirement > > for a theory in an experimental science... > > Some physicists (often mathematical physicists) propose >

Re: What is different with Python ?

2005-06-20 Thread Mike Meyer
"Claudio Grondi" <[EMAIL PROTECTED]> writes: > > What has it all to do with Python? To be not fully off-topic, I > suggest here, that it is much easier to discuss programming > related matters (especially in case of Python :-) or mathematics > than any other subjects related to nature, because pr

Re: UML to Python/Java code generation

2005-06-21 Thread Mike P.
e (REI) is very well documented. One could potentially write Python scripts coupled with some Python introspection/reflection code to automatically generate and reverse engineer (and document) Python <-> UML. It was always something I wanted to do but never got around to it. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: extreme newbie

2005-06-21 Thread Mike Meyer
Grant Edwards <[EMAIL PROTECTED]> writes: > Under Unix it's not all that hard to accidentally create files > like that. Sometimes you have to resort to blasting them away > by i-node number, or by moving the files you want to keep and > then nuking the directory. A standard practice on our early U

Re: extreme newbie

2005-06-21 Thread Mike Meyer
Steven D'Aprano <[EMAIL PROTECTED]> writes: > On Sat, 18 Jun 2005 15:00:02 +0200, Renato Ramonda wrote: > Hiding the source code does not make software more secure. Any bugs and > security holes will be there whether the software is distributed in source > code, object code, or something in betwee

Re: A tool for Python - request for some advice

2005-06-22 Thread Mike Meyer
"TPJ" <[EMAIL PROTECTED]> writes: > I've written this script in bash, because I thought it would be better > to have a script which would run in environment without Python (it all > was about installing Python anyway!). I used bash, dialog, wget... And > now someone suggested, that I shuld use Pyt

Re: Getting/Saving email attachments w/ poplib and email modules

2005-06-22 Thread Mike Meyer
[EMAIL PROTECTED] writes: > Hello All, > > Here's what I'm trying to do: > > I need to connect to a pop3 server, download all messages, and copy all > of the attachments into a specific directory. The actual email message > is unimportant. Now, I've found plenty of examples that strip the > at

Looking for a web-based messaging system

2005-06-22 Thread Mike Meyer
One of my clients has a need for a web-based messaging system. Something python-based is preferred, as that's where our expertise is, but web frameworks built in Python are perfectly acceptable. If you know of something really good that isn't in Python, I wouldn't mind hearing about it - but I do h

Re: import search path

2005-06-22 Thread Mike Meyer
"SHELTRAW, DANIEL" <[EMAIL PROTECTED]> writes: > Hello Python list > > If a Python program has an import statement like: > > import FFT > > how do I determine the path to the imported file? guru% python Python 2.4.1 (#2, Apr 25 2005, 21:42:44) [GCC 3.4.2 [FreeBSD] 20040728] on freebsd5 Type "hel

Re: Loop until condition is true

2005-06-23 Thread Mike Meyer
Stelios Xanthakis <[EMAIL PROTECTED]> writes: > Michael Hoffman wrote: >> Stelios Xanthakis wrote: >> >>> Magnus Lycka wrote: >> > >> Right. Silly me. Maybe in some future Python version, True and False will be constants, like None is since Python 2.4. >>> >>> >>> Actually, there is sup

Re: Loop until condition is true

2005-06-23 Thread Mike Meyer
Michael Hoffman <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: > >> Making None a constant broke existing code (and I just saw old code >> that assigned to None). Are True and False that much more common as >> variable names than None? > > Yes. In fact, I c

Re: suggestions invited

2005-06-23 Thread Mike Meyer
gry@ll.mit.edu writes: > Aditi wrote: >> hi all...i m a software engg. student completed my 2nd yr...i have been >> asked to make a project during these summer vacations...and hereby i >> would like to invite some ideas bout the design and implementation of >> an APPLICATION MONITORING SYSTEMi

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-28 Thread Mike Holmans
hick accents just sound comical. The problem which a lot of fairly-midstream American accent users face is that it's the same sort of thing which Brits try and imitate when they want to suggest a snake-oil salesman. At bottom, an American accent doesn't mark someone out to a Brit as du

Re: Favorite non-python language trick?

2005-06-28 Thread Mike Meyer
Tom Anderson <[EMAIL PROTECTED]> writes: > On Fri, 24 Jun 2005, Roy Smith wrote: >> Tom Anderson <[EMAIL PROTECTED]> wrote: >>> The one thing i really do miss is method overloading by parameter >>> type. I used this all the time in java >> You do things like that in type-bondage languages > I love

Re: Is there something similar to ?: operator (C/C++) in Python?

2005-06-28 Thread Mike Meyer
Riccardo Galli <[EMAIL PROTECTED]> writes: > On Fri, 24 Jun 2005 09:00:04 -0500, D H wrote: > >>> Bo Peng wrote: >>> I need to pass a bunch of parameters conditionally. In C/C++, I can do func(cond1?a:b,cond2?c:d,.) Is there an easier way to do this in Python? >>> >>> >> Th

Re: Excellent Site for Developers

2005-06-28 Thread Mike Meyer
message to a >> mailing list or Usenet newsgroup (or other discussion forum, I suppose) >> they are often trying to get someone else to "take their bait". >> >> See also: http://www.answers.com/troll >> >> Skip > -- Mike Meyer <[EMAIL PROTECTE

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

2005-06-28 Thread Mike Meyer
Ivan Van Laningham <[EMAIL PROTECTED]> writes: > In which case, you should start with PostScript;-) I learned it by > plugging a glass tty into the serial port on one of the very first > AppleWriters and typing away. None of this fancy-shmancy '>>>' > business;-) But what a great reward, having

Re: Boss wants me to program

2005-06-29 Thread Mike Meyer
"Adriaan Renting" <[EMAIL PROTECTED]> writes: > I realy prefer a WYSIWYG UI design tool > to having to code BUTTON(120, 123, 123, 335, -1, NULL, doButton, "Push", > "push this button") With a modern GUI library, it's more like: buttonBox.addWidget(Button("&New", my, "new")) and your button

Re: Modules for inclusion in standard library?

2005-06-29 Thread Mike Meyer
Rocco Moretti <[EMAIL PROTECTED]> writes: > Except that (please correct me if I'm wrong) there is somewhat of a > policy for not including interface code for third party programs which > are not part of the operating system. (I.e. the modules in the > standard libary should all be usable for anyon

Re: map vs. list-comprehension

2005-06-30 Thread Mike P.
tly with a module which had a serious bug with the Python 2.3 version, but worked with the Python 2.4 version - I had to upgrade every single third party module I was using - I was lucky the ones I was using had 2.4 versions, but there are still a lot of modules out there that don't). Sorry for the OT long rant. Mike -- http://mail.python.org/mailman/listinfo/python-list

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

2005-06-30 Thread Mike Meyer
[EMAIL PROTECTED] (Roy Smith) writes: > There's a reprint this morning on slashdot of a 1984 review Byte did > on the brand-new Macintosh (executive summary: cool machine, needs > more memory). The first four software packages available for the new > machine? > > MacWrite/MacPaint (they seem to c

Re: Modules for inclusion in standard library?

2005-06-30 Thread Mike Meyer
Harry George <[EMAIL PROTECTED]> writes: > b) Installing distutils-aware python packages is trivial. I'd rather > the energy which might go into a bigger std library go instead into > helping projects which don't have distutils-style builds. How about integrating distutils and PyPI, so that dist

Re: script fichiers binaires lecture écriture

2005-06-30 Thread Mike Meyer
bruno modulix <[EMAIL PROTECTED]> writes: >> Be aware that I'm >> using pyhton 1.5, > Err... latest is 2.4.1, and the language has really, really changed. You > should consider upgrading... > >> unfortunately... > > BTW, in 1.5.x, you can use the String module instead of string class > methods:

Re: Python for everything?

2005-06-30 Thread Mike Meyer
[EMAIL PROTECTED] writes: > I posted a article earlier pertaining programming for my boss. Now I am > gonna ask a question about programming for myself. I just finished my > first C++ Class. Next semester is a class on encryption(and it's > probably gonna be a math class too). And finally back in

Re: Python for everything?

2005-06-30 Thread Mike Meyer
Ivan Van Laningham <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: >> [EMAIL PROTECTED] writes: >> As other have noted, C was never really used for everything. Unix >> tools were designed to connect together from the very beginning, which >> is what makes shell scr

Re: How to run commands in command line from a script

2005-07-01 Thread Mike Meyer
Peter Hansen <[EMAIL PROTECTED]> writes: > Ivan Shevanski wrote: >> Alright well I'm quite a noob and when I run a simple command to >> change the current directory, nothing happens. I made a little test >> script to show it: >> import os >> cwd = os.getcwd() >> print cwd >> os.system('cd = C:\Pr

Re: LOC in Python and C++ in large projects

2005-07-01 Thread Mike Meyer
"Adriaan Renting" <[EMAIL PROTECTED]> writes: > I think the choice of a programming language is not very important in > determining the overal succes of a project. C++ and Python are however > my two favorite languages. Well, getting done on time is a crucial part of success, and it takes less tim

Re: Question about Python

2005-07-01 Thread Mike Meyer
Jan Danielsson <[EMAIL PROTECTED]> writes: > Hello all, > I'd like to ask seasoned Python developers: > - Are you comfortable in upgrading to the latest version of Python, or > are you worried about what you have to fix in your existing programs? No, I'm not worried. The Python developers worry a

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-01 Thread Mike Meyer
"iK" <[EMAIL PROTECTED]> writes: > Seems like he wants python programmers to solve their problems all in the > same way. While that is great for corporate slaves it is terrible for the > creative programmer. No, he wants Python to be Pythonic. TMTOWTDI is not Pythonic. > Python is quickly beco

Re: Assigning to None

2005-07-01 Thread Mike Meyer
Peter Hansen <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: >> Yes. I once grabbed an old program that did assignments to None. But >> that's always been a bad idea. > What was the use case!? Unpacking a tuple. Something like this: (foo, bar, None) = gen_

Re:

2005-07-01 Thread Mike Meyer
Harry George <[EMAIL PROTECTED]> writes: >> > - more available libraries and more advanced developement tools. > If the library is in C, C++, or FORTRAN, Python can use it. Worst > case you have to write your own bindings. Are there really that many more libraries for C++? I'm not talking about d

Re: Favorite non-python language trick?

2005-07-01 Thread Mike Meyer
"Shai" <[EMAIL PROTECTED]> writes: > Joseph Garvin wrote: >> >> I'm curious -- what is everyone's favorite trick from a non-python >> language? And -- why isn't it in Python? > > 1. Lisp's "dynamically scoped" variables (Perl has them, and calls them > "local", but as far as I've seen their use th

Re: Favorite non-python language trick?

2005-07-01 Thread Mike Meyer
[Lots of quoted text left in...] I started thinking about this, and realized that there was a way to do what you wanted, with no execution time overhead, and without providing ways to radically change the program behavior behind the scenes. Mike Meyer <[EMAIL PROTECTED]> writes: > "

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-01 Thread Mike Meyer
"Sean McIlroy" <[EMAIL PROTECTED]> writes: > Peter Hansen wrote: > >> Sean, what gave you the impression this would change? > if that's the case then list comprehensions and/or "first class > functions" are likely to be the next target. The existence of list comprehensions are the reason that th

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-02 Thread Mike Meyer
Jamey Cribbs <[EMAIL PROTECTED]> writes: > Code blocks allow you to wrap up any Ruby code and pass it to a method > and have it executed within that method. It is more powerful than > lambda, because you can have multiple statements in the code block and > you can do assignment within the code blo

Re: Python for everything?

2005-07-02 Thread Mike Meyer
Christos "TZOTZIOY" Georgiou <[EMAIL PROTECTED]> writes: > On Thu, 30 Jun 2005 20:55:20 -0400, rumours say that Mike Meyer > <[EMAIL PROTECTED]> might have written: > >>Actually, I was thinking of pre-K&R Unix compilers. > > There must be something I

Re: What are the other options against Zope?

2005-07-02 Thread Mike Meyer
Terry Hancock <[EMAIL PROTECTED]> writes: > This is true in the same sense that Python is unnecessary > because all programs can be written in assembler. Or machine > code for that matter. Entered by flipping switches, even -- throw > away that keyboard. > > I have actually seen this done, BTW.

Using regular expressions in internet searches

2005-07-03 Thread mike . ceravolo
time-efficient?) Is there already a search engine that can do this? (2) How can I search multiple web pages within a single location or path? TIA, Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: What are the other options against Zope?

2005-07-03 Thread Mike Meyer
Christopher Subich <[EMAIL PROTECTED]> writes: > That, and the file format definitely isn't robust to bit-rot that > happened too often on FAT16/32 filesystems. >From where I sit, the critical difference between the registry and a set of .ini files (or Unix rc files) is that the registry requires

Re: website catcher

2005-07-03 Thread Mike Meyer
"jwaixs" <[EMAIL PROTECTED]> writes: > If I should put the parsedwebsites in, for example, a tablehash it will > be at least 5 times faster than just putting it in a file that needs to > be stored on a slow harddrive. Memory is a lot faster than harddisk > space. And if there would be a lot of peo

Re: How do you program in Python?

2005-07-03 Thread Mike Meyer
anthonyberet <[EMAIL PROTECTED]> writes: > My question isn't as all-encompassing as the subject would suggest... > > I am almost a Python newbie, but I have discovered that I don't get > along with IDLE, as i can't work out how to run and rerun a routine > without undue messing about. > > What I w

Re: Python for everything?

2005-07-03 Thread Mike Meyer
Joseph Garvin <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: > >>You wind up >>having to invoke the function through your data object, and then pass >>the data object in - sort of as an explicit "self". >> > Yeah, and us pythonists hate expl

Re: looping over a big file

2005-07-03 Thread Mike Meyer
Roy Smith <[EMAIL PROTECTED]> writes: > The "right" way to do this is: > > for line in file ("filename"): >whatever > > The file object returned by file() acts as an iterator. Each time through > the loop, another line is read and returned (I'm sure there is some > block-level buffering goin

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-03 Thread Mike Meyer
Steven D'Aprano <[EMAIL PROTECTED]> writes: > I don't object to adding sum and product to the language. I don't object > to adding zip. I don't object to list comps. Functional, er, functions > are a good thing. We should have more of them, not less. Yes, but where should they go? Adding functions

Re: math.nroot

2005-07-04 Thread Mike Meyer
"George Sakkis" <[EMAIL PROTECTED]> writes: > "Steven D'Aprano" <[EMAIL PROTECTED]> wrote: > >> But it doesn't make sense to say that two flags are equal: >> >> keep_processing = True >> more_reading_needed = True >> while more_reading_needed and keep_processing: >> get_more_records() >>

Re: threads and sleep?

2005-07-05 Thread Mike Meyer
Jeffrey Maitland <[EMAIL PROTECTED]> writes: > What I would like to do is have say 1 thread use as much of a given > CPU as possible and if a new thread is started (added) that if a CPU > is available use it instead of using the same cpu. That way it should > speed the application up. The standalo

Re: Folding in vim

2005-07-05 Thread Mike Meyer
Sybren Stuvel <[EMAIL PROTECTED]> writes: > Andrea Griffini enlightened us with: >> - never ever use tabs > > I always use one tab for indents, and set my editor to display it as > four spaces. I like being able to unindent a line by deleting a single > character. I don't see a reason why _not_ to

Re: How do you program in Python?

2005-07-05 Thread Mike Meyer
Peter Hansen <[EMAIL PROTECTED]> writes: > Tom Anderson wrote: >> +1 insight of the century. This is the heart of the unix way - lots >> of simple little programs that do exactly one thing well, and can be >> composed through simple, clean interfaces. For actually getting >> things done, a toolkit

Re: Lisp development with macros faster than Python development?..

2005-07-05 Thread Mike Meyer
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: >> Well, his Viaweb company was founded in about '95, right? So he probably just >> used Lisp because Python wasn't as well known yet. ;-) > > David > > That is what I thought too. It makes sense but I wasn't sure. Still > ain't. > The problem is t

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-06 Thread Mike Meyer
Ron Adam <[EMAIL PROTECTED]> writes: > So doing this would give an error for functions that require an argument. > > def foo(x): > return x > > a = None > b = foo(a)# error because a dissapears before foo gets it. So how do I pass None to a function? > >>TypeErro

Re: Favorite non-python language trick?

2005-07-06 Thread Mike Meyer
"Shai" <[EMAIL PROTECTED]> writes: > They're called "Special vars", and you need to define them (unlike > local LISP variables, which behave essentially like Python vars), but > then you use them just like other vars (that is, you usually bind them > with LET). This is the first I hear about them

Re: f*cking re module

2005-07-07 Thread Mike Meyer
Steven D'Aprano <[EMAIL PROTECTED]> writes: > On Thu, 07 Jul 2005 06:47:54 -0400, Chris Smith wrote: >> Oh, come on: what's a Perliodic Table of Operators, between friends? >> http://www.ozonehouse.com/mark/blog/code/PeriodicTable.html > That, and the discussion on operators by Larry Wall, are two

Re: question about introspection using inspect module

2005-07-07 Thread Mike Meyer
Benjamin Rutt <[EMAIL PROTECTED]> writes: > what I am actually trying to do is to build a database of Python > modules. so then later, I can write a tool in my favorite editor > (Emacs) to invoke some forms of completion against this database > (e.g. os.remov or socket. to see a list of all socket

Re: How do you program in Python?

2005-07-07 Thread Mike Meyer
Jorgen Grahn <[EMAIL PROTECTED]> writes: > Hey, it's not fair to make fun of emacs now that I've mentioned vim > favourably so many times ;-) > > Seriously, nothing about emacs seems big or slow today. It has been > outbloated by pretty much everything else. Who could have imagined /that/ > ten yea

Re: Lisp development with macros faster than Python development?..

2005-07-07 Thread Mike Meyer
"Antoon Pardon" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'll clarify. A lot of the time I hear arguments against > features that boils down to. It seems that you've lost some of the intent during the boiling. > 1) I don't need it. Is that what you get out of the oft-used "

Re: f*cking re module

2005-07-08 Thread Mike Meyer
Rocco Moretti <[EMAIL PROTECTED]> writes: > François Pinard wrote: > If your program had only minor errors, there was likely a good chance > that the compiler might guess correctly, and your program would > compile to what you wanted in the first place. If not, by continuing > on, the compiler can

Re: __autoinit__

2005-07-11 Thread Mike Meyer
"Ralf W. Grosse-Kunstleve" <[EMAIL PROTECTED]> writes: > --- Bengt Richter <[EMAIL PROTECTED]> wrote: >> No, that limitation wouldn't exist, so you wouldn't have to explain it ;-) >> I.e., the above would act like >> >> class Foo: >> x = Bar() >> def method_1(self, _anonymous_arg_1): >

Re: Fwd: Should I use "if" or "try" (as a matter of speed)?

2005-07-12 Thread Mike Meyer
Dark Cowherd <[EMAIL PROTECTED]> writes: > But one advise that he gives which I think is of great value and is > good practice is > "Always catch any possible exception that might be thrown by a library > I'm using on the same line as it is thrown and deal with it > immediately." Yuch. That sort

Re: new division in Pythonwin

2005-07-12 Thread Mike Meyer
"Jive Dadson" <[EMAIL PROTECTED]> writes: > I like to use Pythonwin as my desktop calculator. It's bothersome > to have to type in "from __future__ import division" into the > interactive window every time I open it. I've tried various ways to > attempt to get it to import new division at startu

Re: threads and sleep?

2005-07-13 Thread Mike Meyer
Andreas Kostyrka <[EMAIL PROTECTED]> writes: > That doesn't change the contrary facts: > > -) the general threading programming model is very hard to get right. > It's basically at the moment where we were with memory management at C > level. Painful, and errorprone. Nothing to be happy about. I'd

Re: Native ODBC access for python on linux?

2005-07-14 Thread Mike Meyer
"Thomas Bartkus" <[EMAIL PROTECTED]> writes: > Although I hear rumors about ODBC drivers on Linux, I confess I don't > understand the need. Certainly you can use Python with the MySQLdb module > from any Linux machine and query away at the server. As long as the MySQL > server accepts your IP/usr/

Re: goto

2005-07-18 Thread Mike Meyer
rbt <[EMAIL PROTECTED]> writes: > Many of the world's most profitable software companies (MS for example) > have thousands of goto statements in their code... oh the horror of it > all. Why aren't these enlightened-by-the-gods know-it-alls as profitable > as these obviously ignorant companies? Bec

Re: Opinions on KYLIX 3 (Delphi 4 Linux)

2005-07-18 Thread Mike Meyer
"Thomas Bartkus" <[EMAIL PROTECTED]> writes: >> > Re-train on a new platform, >> > and re-write from scratch? > > What do you do when an open source project you were using gets abandoned? cvs import -m "sources for orphaned project" > Hard to see much difference here. Doing support for objec

Re: Opinions on KYLIX 3 (Delphi 4 Linux)

2005-07-19 Thread Mike Meyer
Thomas Bartkus <[EMAIL PROTECTED]> writes: > On Mon, 18 Jul 2005 19:56:24 -0400, Mike Meyer wrote: > >> "Thomas Bartkus" <[EMAIL PROTECTED]> writes: >>>> > Re-train on a new platform, >>>> > and re-write from scratch? >&g

Re: goto

2005-07-19 Thread Mike Meyer
Rocco Moretti <[EMAIL PROTECTED]> writes: > Leif K-Brooks wrote: >> rbt wrote: >> >>>IMO, most of the people who deride goto do so because they heard or read >>> where someone else did. >> 1 GOTO 17 >> 2 mean,GOTO 5 >> 3 couldGOTO 6 >> 4 with GOTO 7 >> 5 what G

Re: retrieving https pages

2005-07-19 Thread Mike Meyer
Eric <[EMAIL PROTECTED]> writes: > I'm using Linux - Manriva LE2005, python 2.3 (or i can also use python 2.4 > on my other system just as well). > Anyways... > I want to get a web page containing my stock grants. > The initial page is an https and there is a form on it to > fill in your username

Re: How to send a query to the browser from time to time?

2005-07-19 Thread Mike Meyer
"Simon Dahlbacka" <[EMAIL PROTECTED]> writes: > Short answer: Not using HTTP. > > However, you can use something like AJAX to just load new data from > time to time and not the entire page. AJAX is overkill for this. If you just want to automatically refresh the page automatically, you can use a

Re: email format in python

2005-07-19 Thread Mike Meyer
Jorgen Grahn <[EMAIL PROTECTED]> writes: > Agree. In the case of user input validation, it might be ok to politely > inform the user that the address looks a bit funny, but refusing to work > with it will anger a user sooner or later. Yup. I use cryptographically signed addresses as one-time addre

Re: Read only files

2005-07-19 Thread Mike Meyer
Pranav Bagora <[EMAIL PROTECTED]> writes: > Hello, > > I am getting a permission Denied error when i am > trying to make changes in some read only files in a > directory. How do we check and change the read only > attributes of files in python. You want the os.stat and os.chmod functions.

wxPython && wxGlade

2005-07-20 Thread Mike L.G.
span to the 2nd column. I've been able to span rows and columns using wxGridBagSizer, but wxGlade does not seem to offer this type of sizer. Is this layout visibly possible using wxGlade? Thank you for your time. -- Mike L.G. http://www.mahalosoft.com -- http://mail.python.org/mailma

Re: goto

2005-07-20 Thread Mike Meyer
Peter Hansen <[EMAIL PROTECTED]> writes: > Sybren Stuvel wrote: >> Mike Meyer enlightened us with: >> >>>>I dislike gotos because it is too easy to inadvertently create >>>>infinite loops. <10 WINK; 20 GOTO 10> >>> >>>And it

Re: Web-Forms

2005-07-21 Thread Mike Meyer
Mathias Waack <[EMAIL PROTECTED]> writes: > Hi, > > I need to access some information from a web site which are only accessible > through a form. Thus for each bucket of data you have to fill out the form, > submit it and wait for an answer. Very easy - if you don't have to check > some hundred t

Re: goto

2005-07-22 Thread Mike Meyer
Rocco Moretti <[EMAIL PROTECTED]> writes: >> My "favorite" infinte loop with while is: >>i = 0 >>while i < 20: >> do_process(i) >> Note the prominent *lack* of any change to i here? >> Oh, for: >> from i = 0 >> invariant 0 <= i <= 20 >> variant 21 - i >> until i >

Re: Generating images with text in them

2005-07-22 Thread Mike Meyer
[EMAIL PROTECTED] (phil hunt) writes: > On Thu, 21 Jul 2005 02:44:03 -0500, Terry Hancock <[EMAIL PROTECTED]> wrote: >>While bitmap font files are not copyrightable, there are license issues >>with most of the "nicer" fonts you are probably talking about. > > Oh? I can understand them being copyrig

<    4   5   6   7   8   9   10   11   12   13   >