Re: Python, MS SQL, and batch inserts

2009-04-23 Thread Lawrence D'Oliveiro
In message , Dennis Lee Bieber wrote: > You don't mean to say you are creating full SQL insert statements > WITH THE DATA! Nothing wrong with that . -- http://mail.python.org/mailman/listinfo/python-list

Re: Python, MS SQL, and batch inserts

2009-04-23 Thread Lawrence D'Oliveiro
In message , Philip Semanchuk wrote: > Are you sure your logjam is in Python? Inserting 5500 rows can take a > few seconds if you're COMMITting after each INSERT. Wrap the whole > thing in an explicit transaction and see if that helps. Does MS-SQL have the equivalent of "insert delayed"

Re: [False,True] and [True,True] --> [True, True]?????

2009-04-23 Thread Lawrence D'Oliveiro
In message , Steven D'Aprano wrote: > On Thu, 23 Apr 2009 13:40:47 +1200, Lawrence D'Oliveiro wrote: > >> In message <25f4735b-52a2-4d53-9097- >> e623655ca...@k19g2000prh.googlegroups.com>, bdb112 wrote: >> >>> Is there any obvious reason why

Re: Python, MS SQL, and batch inserts

2009-04-23 Thread Lawrence D'Oliveiro
In message , Dennis Lee Bieber wrote: > On Thu, 23 Apr 2009 21:00:48 +1200, Lawrence D'Oliveiro > declaimed the following in > gmane.comp.python.general: >> >> Nothing wrong with that >> <http://codecodex.com/wiki/index.php?title=Useful_MySQL_Routines>

Re: mailbox.mbox.add() sets access time as well as modification time

2009-04-24 Thread Lawrence D'Oliveiro
In message , Grant Edwards wrote: > AFAIK, atime contains new mail for at least 20 years. Doesn't apply to maildir though, does it? Updating atime adds a lot of filesystem overhead; that's why the relatime option was invented . But better still is not to bothe

Re: if statement, with function inside it: if (t = Test()) == True:

2009-04-24 Thread Lawrence D'Oliveiro
In message , GC-Martijn wrote: > Nothing is wrong with it , but it cost more lines (= more scrolling) > When possible I want to keep my code small. Maybe you'd be better off with Perl than Python. -- http://mail.python.org/mailman/listinfo/python-list

Re: Finding partition containing a path?

2009-04-24 Thread Lawrence D'Oliveiro
In message , s...@pobox.com wrote: > Is there an easy way in Python to get the mount point in which a path > resides? (Unix only is fine.) See the os.statvfs call . -- http://mail.python.org/mailman/listinfo/python-list

Re: Lisp mentality vs. Python mentality

2009-04-24 Thread Lawrence D'Oliveiro
In message , Emmanuel Surleau wrote: > Ah well. I guess this explains Emacs. So how would you explain someone who uses Emacs to write Python code? Like me? -- http://mail.python.org/mailman/listinfo/python-list

Re: mailbox.mbox.add() sets access time as well as modification time

2009-04-25 Thread Lawrence D'Oliveiro
In message <49f33d8d$0$516$bed64...@news.gradwell.net>, tinn...@isbd.co.uk wrote: > mbox has several advantages over maildir (for me anyway):- > > It allows easy removal of empty mailboxes (in my case by the MUA) Really? I just created a "junk" mail folder via my IMAP server using Thunderb

Re: mailbox.mbox.add() sets access time as well as modification time

2009-04-25 Thread Lawrence D'Oliveiro
In message <_vqdnf6pny1gymzunz2dnuvz_qcdn...@posted.visi>, Grant Edwards wrote: > ... if one didn't care about backwards-compatiblity with old e-mail > apps, then one would use a less broken mailbox format like > maildir. It's only in the proprietary-software world that we need to worry about b

Re: Minimal binary diff & version control in Python?

2009-04-26 Thread Lawrence D'Oliveiro
In message , Kevin Ar18 wrote: > I was just wonder about creating something small to handle version control > on binary files -- maybe something in Python. :) Why not just use what's available? For example: . -- http://mail.python.org/mailman/listinf

Re: mod_python form upload: permission denied sometimes...

2009-04-26 Thread Lawrence D'Oliveiro
In message <0fc15bee-003a-45ca- b6b6-21ed0645b...@q2g2000vbr.googlegroups.com>, psaff...@googlemail.com wrote: > I have a mod_python application that takes a POST file upload from a > form. It works fine from my machine, other machines in my office and > my home machine. It does not work from my

Re: getting linux distro used...

2009-04-27 Thread Lawrence D'Oliveiro
In message , deostroll wrote: > I just found that you could use platform.system() to get the > underlying os used. But is there a way to get the distro used...? Mostly the differences will not be important. But if you want to know, I have been compiling a list of tests here

Re: Is there a maximum size to a Python program?

2009-04-27 Thread Lawrence D'Oliveiro
In message , Paul Hemans wrote: > One problem though that I didn't mention in my original > posting was that the replication may only require updating one or more > fields, that is a problem with a generating a single SQL statement to > cover all requests. That's not a big issue. Assume the field

Re: getting linux distro used...

2009-04-27 Thread Lawrence D'Oliveiro
In message , Sebastian Wiesner wrote: > > >> . > > At least the Gentoo-Test is not very reliable. It's a wiki. You know what to do. -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a maximum size to a Python program?

2009-04-27 Thread Lawrence D'Oliveiro
In message , Duncan Booth wrote: > Lawrence D'Oliveiro wrote: > >> In message , Paul Hemans wrote: >> >>> One problem though that I didn't mention in my original >>> posting was that the replication may only require updating one or >>> mo

Re: mailbox.mbox.add() sets access time as well as modification time

2009-04-27 Thread Lawrence D'Oliveiro
In message , Aahz wrote: > In article , > Lawrence D'Oliveiro wrote: >> >>It's only in the proprietary-software world that we need to worry about >>backward compatibility with old, obsolete software that the vendors >>cannot or will not fix. In the Free

Re: mailbox.mbox.add() sets access time as well as modification time

2009-04-27 Thread Lawrence D'Oliveiro
In message , Grant Edwards wrote: > On 2009-04-26, Lawrence D'Oliveiro > wrote: > >> In message <_vqdnf6pny1gymzunz2dnuvz_qcdn...@posted.visi>, Grant Edwards >> wrote: >> >>> ... if one didn't care about backwards-compatiblity with old e-mai

Re: Light (general) Inter-Process Mutex/Wait/Notify Synchronization?

2009-04-27 Thread Lawrence D'Oliveiro
In message , Gunter Henriksen wrote: > I would ideally like to have something which does > not need to make a system call in an uncontended > case for the mutex. In Linux you could use a futex. -- http://mail.python.org/mailman/listinfo/python-list

Re: mailbox.mbox.add() sets access time as well as modification time

2009-04-27 Thread Lawrence D'Oliveiro
In message , Steven D'Aprano wrote: > On Tue, 28 Apr 2009 11:19:51 +1200, Lawrence D'Oliveiro wrote: > >> Either there are enough people using it to care about it, in which case >> somebody in the community will fix it, it or there are not, in which >>

Re: Why bool( object )?

2009-04-28 Thread Lawrence D'Oliveiro
In message <54cb7f8a- fef4-4bf8-8054-16dc9b5c8...@d2g2000pra.googlegroups.com>, Aaron Brady wrote: > What is the rationale for considering all instances true of a user- > defined type? It's a stupid idea, and there seem to be instances of users tripping over it here in comp.lang.python every wee

Re: Connecting/talking to OpenOffice Base files

2009-04-28 Thread Lawrence D'Oliveiro
In message , norseman wrote: > # I know this prints ugly on paper. Blame it on children liking long > #words, presumably preferring increased typos too... Remember this was initially designed to be done with Java. Python was an afterthought, though it's interesting to see lots of examples

Re: suggestion on a complicated inter-process communication

2009-04-28 Thread Lawrence D'Oliveiro
In message <95ac6b26-46f2-4b28-b9a3-3aa02b754...@v1g2000prd.googlegroups.com>, Way wrote: > -> denotes create > > > MainProcess -> Process1 -> Process3 (from os.system) >| > -> Process2 (from os.system) -> Process4 (from os.system) > ->Process5 If MainP

Re: CSV performance

2009-04-28 Thread Lawrence D'Oliveiro
In message , Peter Otten wrote: > gc.disable() > # create many small objects that you want to keep > gc.enable() Every time I see something like this, I feel the urge to save the previous state and restore it afterwards: save_enabled = gc.isenabled() gc.disable() # create many small

Re: CSV performance

2009-04-29 Thread Lawrence D'Oliveiro
In message , Peter Otten wrote: > When I see the sequence > > save state > change state > do something > restore state > > I feel compelled to throw in a try ... finally Yeah, but I try to avoid using exceptions to that extent. :) -- http://mail.python.org/mailman/listinfo/python-list

Re: CSV performance

2009-04-29 Thread Lawrence D'Oliveiro
In message , Jorgen Grahn wrote: > I am asking because people who like databases tend to overestimate the > time it takes to parse text. And those of us who regularly load databases from text files, or unload them in the opposite direction, have a good idea of EXACTLY how long it takes to pars

Re: ctypes

2009-04-29 Thread Lawrence D'Oliveiro
In message , Gabriel Genellina wrote: > c_float_p = ctypes.POINTER(ctypes.c_float) > c_short_p = ctypes.POINTER(ctypes.c_short) I like to do import ctypes as ct to shorten the references: c_float_p = ct.POINTER(ct.c_float) c_short_p = ct.POINTER(ct.c_short) -- Lawrence "Death To

Re: Why bool( object )?

2009-04-30 Thread Lawrence D'Oliveiro
In message , Steven D'Aprano wrote: > The reason why Lawrence's insistence is so badly wrong becomes more > apparent if you look at what you can do with boolean contexts other than > simple `if` tests. Compare: > > > for x in a or b or c: > do_something_with(x) > > > versus: > > > if le

Re: Light (general) Inter-Process Mutex/Wait/Notify Synchronization?

2009-05-01 Thread Lawrence D'Oliveiro
In message <49f729f5$0$1645$742ec...@news.sonic.net>, John Nagle wrote: > Linux doesn't do interprocess communication very well. > ... and shared memory (unsafe). What about with a futex? -- http://mail.python.org/mailman/listinfo/python-list

Re: Question about the wording in the python documents.

2009-05-02 Thread Lawrence D'Oliveiro
In message , grocery_stocker wrote: > req is clearly an instance of urllib2.Request and not a Request object. "Object" is a term commonly used to mean "instance of a class". In Python, classes are also objects, but if classes were meant rather than instances, I imagine it would say so. -- http

Re: python docs for beginner programmer?

2009-05-03 Thread Lawrence D'Oliveiro
In message , Deep_Feelings wrote: > Do you think python online docs are good starting point for me? Why not try them and see? -- http://mail.python.org/mailman/listinfo/python-list

Re: Any idea to emulate tail -f

2009-05-05 Thread Lawrence D'Oliveiro
In message , Joel Juvenal Rivera Rivera wrote: > I want to make something very similar to the command tail -f (follow a > file) ... -- http://mail.python.org/mailman/listinfo/python-list

Re: exit a program gracefully

2009-05-05 Thread Lawrence D'Oliveiro
In message , Gabriel Genellina wrote: > I prefer to put the code inside a function, and just `return` earlier. It would be nice if Python offered a straightforward equivalent to ... initialization goes here ... do /*once*/ { ... do stuff ... if (check1_failed)

Re: Logging exceptions to a file

2009-05-06 Thread Lawrence D'Oliveiro
In message <597627b8- d30b-4b74-9202-9cd46fb1d...@s28g2000vbp.googlegroups.com>, Pierre GM wrote: > ... I'd like to record (possibly unhandled) exceptions in the logfile. python myscript.py 2>error.log -- http://mail.python.org/mailman/listinfo/python-list

Re: IIR filter conversion routines for Python?

2009-05-08 Thread Lawrence D'Oliveiro
In message , wzab wrote: > I'm looking for procedures converting the IIR filters into cascade and/ > or parallel forms. Tried a DSP textbook? -- http://mail.python.org/mailman/listinfo/python-list

Re: SQL and CSV

2009-05-08 Thread Lawrence D'Oliveiro
In message , Peter Otten wrote: > While it may not matter here using placeholders instead of manually > escaping user-provided values is a good habit to get into. Until you hit things it can't deal with. -- http://mail.python.org/mailman/listinfo/python-list

Re: I'm intrigued that Python has some functional constructions in the language.

2009-05-08 Thread Lawrence D'Oliveiro
In message , namekuseijin wrote: > Carl Banks escreveu: > >> 2. However, functional programming is cryptic at some level no matter >> how nice you make the syntax. > > When your program is nothing but function definition and function > application, syntax is meaningless. On the contrary, syntax

Re: I'm intrigued that Python has some functional constructions in the language.

2009-05-08 Thread Lawrence D'Oliveiro
In message <692b7ae8-0c5b-498a- a012-51bda980f...@s28g2000vbp.googlegroups.com>, namekuseijin wrote: > On May 8, 6:48 pm, Lawrence D'Oliveiro central.gen.new_zealand> wrote: >> In message , namekuseijin wrote: >> >> > Carl Banks escreveu: >> >> &

Re: SQL and CSV

2009-05-08 Thread Lawrence D'Oliveiro
In message , andrew cooke wrote: > Lawrence D'Oliveiro wrote: >> In message , Peter Otten wrote: >> >>> While it may not matter here using placeholders instead of manually >>> escaping user-provided values is a good habit to get into. >> >> Unt

bulk_copy

2009-05-08 Thread Lawrence D'Oliveiro
Every now and then I've had the need to copy a bunch of records in a MySQL table--perhaps take a copy of some production data into a test database to track down a bug, that kind of thing. So I wrote a utility to do it. -- http://mail.python.org/mail

Re: Wrapping comments

2009-05-09 Thread Lawrence D'Oliveiro
In message , Tobias Weber wrote: > the guideline (PEP 8) is hard wrap to 7x characters. Nowadays I set my maximum line lengths, and the widths of my terminal windows to 100 characters. And I'm wondering whether or not to go wider still. After all, the screens can take it. -- http://mail.pytho

Re: Wrapping comments

2009-05-09 Thread Lawrence D'Oliveiro
In message , Scott David Daniels wrote: > Lawrence D'Oliveiro wrote: > >> In message , Tobias Weber >> wrote: >> >>> the guideline (PEP 8) is hard wrap to 7x characters. >> >> Nowadays I set my maximum line lengths, and the widths of my termin

Re: Wrapping comments

2009-05-09 Thread Lawrence D'Oliveiro
In message , Lawrence D'Oliveiro wrote: > In message , Scott David Daniels > wrote: > >> Lawrence D'Oliveiro wrote: >> >>> In message , Tobias Weber >>> wrote: >>> >>>> the guideline (PEP 8) is hard wrap to 7x characters.

Re: SQL and CSV

2009-05-09 Thread Lawrence D'Oliveiro
In message , andrew cooke wrote: > even if you're not open to injection attacks, you're still less likely to > get escaping correct than a puprose written, widely used library. Escaping isn't really that hard to do. For example, the rules for MySQL literals are clearly spelled out here

Re: OT (humor): 'import antigravity' in action!

2009-05-11 Thread Lawrence D'Oliveiro
In message , Shawn Milochik wrote: > I know you've probably all seen this 50 times, but just in case: > http://xkcd.com/353/ Ironically, that's no longer valid in Python 3.0. -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I test the integrity of a Python installation in Debian and Ubuntu

2009-05-11 Thread Lawrence D'Oliveiro
In message , Geoff Gardiner wrote: > How do I assure myself of the integrity of a Python installation > acquired using apt-get install on Debian and Ubuntu? apt-get install debsums man debsums -- http://mail.python.org/mailman/listinfo/python-list

Re: Nimrod programming language

2009-05-11 Thread Lawrence D'Oliveiro
In message <57f4c81a-3537-49fa-a5f6- a0cc0d43d...@o14g2000vbo.googlegroups.com>, rump...@web.de wrote: > I am dissatisfied with Python's (or Java's) Unicode handling: > 1) IO overhead to convert UTF-8 (defacto standard on UNIX) into > UTF-16. Are you sure they're using UTF-16? I would use UCS-2 o

Re: How do I test the integrity of a Python installation in Debian and Ubuntu

2009-05-11 Thread Lawrence D'Oliveiro
In message , Geoff Gardiner wrote: > @Lawrence D'Oliveiro: > ... I see that you published my unobfuscated e-mail address on USENET for all to see. I obfuscated it for a reason, to keep the spammers away. I'm assuming this was a momentary lapse of judgement, for which I e

Re: What's the use of the else in try/except/else?

2009-05-12 Thread Lawrence D'Oliveiro
In message , kj wrote: > I know about the construct: > > try: > # do something > except ...: > # handle exception > else: > # do something else > > ...but I can't come with an example in which the same couldn't be > accomplished with [no else] I'd agree. If you have to resort to a "

Re: How do I test the integrity of a Python installation in Debian and Ubuntu

2009-05-12 Thread Lawrence D'Oliveiro
In message , Geoff Gardiner wrote: > Lawrence D'Oliveiro wrote: > >> .. I expect an apology. >> Otherwise, it becomes grounds for an abuse complaint to your ISP. >> > Yes, I do apologize profusely and publicly ... Thank you. -- http://mail.python.org/mailman/listinfo/python-list

Re: Wrapping comments

2009-05-12 Thread Lawrence D'Oliveiro
In message , Tobias Weber wrote: > In article <02159679$0$20647$c3e8...@news.astraweb.com>, > Steven D'Aprano wrote: > >> Maybe in another 20 years, nobody will care about low-level details like >> the characters used to write code. Only the tokens really matter. > > You could have that ten y

Re: Wrapping comments

2009-05-12 Thread Lawrence D'Oliveiro
In message , Tobias Weber wrote: > (still not gonna use software that doesn't let me type # because it's > alt+3 on a UK layout; having to re-learn or configure that is just sick) Tried typing compose-plus-plus? -- http://mail.python.org/mailman/listinfo/python-list

Re: Wrapping comments

2009-05-12 Thread Lawrence D'Oliveiro
In message , Nick Craig- Wood wrote: > Rhodri James wrote: > >> Emacs is my editor of choice ... > > You probably haven't used MAC OS X then! I tried using Emacs via SSH from a Mac once. Made me run screaming for the nearest Windows box

Re: What's the use of the else in try/except/else?

2009-05-13 Thread Lawrence D'Oliveiro
In message , Steven D'Aprano wrote: > On Tue, 12 May 2009 09:20:36 +, Steven D'Aprano wrote: > >> It seems pretty straightforward to me. > > Except of course such a pattern won't work ... I rest my case. -- http://mail.python.org/mailman/listinfo/python-list

Re: (Windows) Finding out which process has locked a file.

2009-05-14 Thread Lawrence D'Oliveiro
In message <787d6072-3381-40bd- af20-8e1a40405...@h23g2000vbc.googlegroups.com>, CinnamonDonkey wrote: > I have a script running which occa[s]ionally fails because it is trying > to delete a file in use by another process. When this happens I want > it to log which process has the lock. Maybe the

Re: KeyboardInterrupt catch does not shut down the socketserver

2009-05-15 Thread Lawrence D'Oliveiro
In message , Igor Katson wrote: > I have problems in getting a SocketServer to shutdown. Do you want to do a shutdown or a close? -- http://mail.python.org/mailman/listinfo/python-list

Re: KeyboardInterrupt catch does not shut down the socketserver

2009-05-15 Thread Lawrence D'Oliveiro
In message , Igor Katson wrote: > Lawrence D'Oliveiro wrote: > >> In message , Igor >> Katson wrote: >> >>> I have problems in getting a SocketServer to shutdown. >> >> Do you want to do a shutdown or a close? >> > I want the serv

Re: Subversion commit from Python?

2009-05-18 Thread Lawrence D'Oliveiro
In message <2904e7de-0a8d-4697-9c44- c83bb5319...@s31g2000vbp.googlegroups.com>, Jack Trades wrote: > Originally I had the 'data' directory in the same directory as the cgi > scripts and was using os.system("svn commit"), however I kept running > into weird bugs with this method. What bugs? --

Re: Seeking old post on developers who like IDEs vs developers who like simple languages

2009-05-18 Thread Lawrence D'Oliveiro
In message , Ulrich Eckhardt wrote: > If you took a look at Java, you > would notice that the core language syntax is much simpler than Python's. I don't think it is. Look at things like "private" versus "protected" versus "public" with or without "static" and "final", "class" versus "interface"

Re: Seeking old post on developers who like IDEs vs developers who like simple languages

2009-05-18 Thread Lawrence D'Oliveiro
In message <07e5af6c-d41d-4a4a-8e2e- f27bc92c9...@f16g2000vbf.googlegroups.com>, Steve Ferg wrote: > On the one hand, there are developers who love big IDEs with lots of > features (code generation, error checking, etc.), and rely on them to > provide the high level of support needed to be reasona

Re: Subversion commit from Python?

2009-05-19 Thread Lawrence D'Oliveiro
In message , Jack Trades wrote: > On May 19, 12:26 am, Lawrence D'Oliveiro central.gen.new_zealand> wrote: > >> In message <2904e7de-0a8d-4697-9c44- >> >> c83bb5319...@s31g2000vbp.googlegroups.com>, Jack Trades wrote: >> > Originally I had the &#

Re: Subversion commit from Python?

2009-05-19 Thread Lawrence D'Oliveiro
In message <5f7f9840-0e17-48fb-acf9-04186fb1b...@r3g2000vbp.googlegroups.com>, Jack Trades wrote: > On May 19, 3:53 am, Lawrence D'Oliveiro > wrote: > >> Possibly your CGI scripts are running as some user like "nobody", which >> doesn't have the

Re: Subversion commit from Python?

2009-05-19 Thread Lawrence D'Oliveiro
In message <77fv7jf1h44c...@mid.uni-berlin.de>, Diez B. Roggisch wrote: > I have had many troubles with SVN + permissions. I create a custom captive user to own write access to the repository, with access only to keys belonging to authorized users via svn+ssh. Problem solved. -- http://mail.p

Re: How to build Python 2.6.2 on HP-UX Itanium with thread support?

2009-05-21 Thread Lawrence D'Oliveiro
In message , henning.vonbar...@arcor.de wrote: > I'm used to "configure; make; make install", which usually works well on > other platforms... It's often worthwhile to try ./configure --help and see if any of the options might be relevant. -- http://mail.python.org/mailman/listinfo/python

Re: Cursor movement question

2009-05-22 Thread Lawrence D'Oliveiro
In message , Jive Dadson wrote: > Gosh, you guys are slow. :-) I figured it out. We were just waiting to see how long it would take you. -- http://mail.python.org/mailman/listinfo/python-list

Re: sqlite3, qmarks, and NULL values

2009-05-22 Thread Lawrence D'Oliveiro
In message , Mitchell L Model wrote: > However, COL2 might be NULL. I can't figure out a value for y that would > retrieve rows for which COL2 is NULL. It seems to me that I have to > perform an awkward test to determine whether to execute a query with one > question mark or two. In SQL, NULL is

Re: What's the use of the else in try/except/else?

2009-05-22 Thread Lawrence D'Oliveiro
In message <8dc983db-b8c4-4897- a58b-969ca5f8e...@g20g2000vba.googlegroups.com>, Beni Cherniavsky wrote: > And yes, it's icky - not because of the ``else`` but because > aquisition-release done correctly is always an icky pattern. Only in the presence of exceptions. -- http://mail.python.org/ma

Re: UDP reading on multiple sockets

2009-05-22 Thread Lawrence D'Oliveiro
In message <27bd949f-80b5-44c9-8e3b- c12b49c7e...@r34g2000vbi.googlegroups.com>, thomas.vo...@likeabird.de wrote: > The only honest answer would be that I'm totaly unfamiliar with select > and also the documentation I found wasn't able to clear the picture. > So are there examples of using select

Re: 4 hundred quadrillonth?

2009-05-24 Thread Lawrence D'Oliveiro
In message , Christian Heimes wrote: > Welcome to IEEE 754 floating point land! :) It used to be worse in the days before IEEE 754 became widespread. Anybody remember a certain Prof William Kahan from Berkeley, and the foreword he wrote to the Apple Numerics Manual, 2nd Edition, published in 1

Re: 4 hundred quadrillonth?

2009-05-24 Thread Lawrence D'Oliveiro
In message <7b986ef0-d118-4e0c- afef-3c6385a4c...@b7g2000pre.googlegroups.com>, rustom wrote: > For a mathematician there are no inexact numbers; for a physicist no > exact ones. On the contrary, mathematics have worked out a precise theory of inexactness. As for exactitude in physics, Gregory

About Standard Numerics (was Re: 4 hundred quadrillonth?)

2009-05-24 Thread Lawrence D'Oliveiro
In message <9mwdntfmpprjqotxnz2dnuvz_vadn...@giganews.com>, Erik Max Francis wrote: > Lawrence D'Oliveiro wrote: > >> In message , >> Christian Heimes wrote: >> >>> Welcome to IEEE 754 floating point land! :) >> >> It used to be worse i

Re: How to reuse TCP listening socket immediately after it was connected at least once?

2009-05-24 Thread Lawrence D'Oliveiro
In message , Roy Smith wrote: > In article , > Lawrence D'Oliveiro wrote: > >> The right thing to do is try to ensure that all your connections are >> properly closed at shutdown. That may not be enough (if your server >> crashes due to bugs), so the other t

Re: 4 hundred quadrillonth?

2009-05-24 Thread Lawrence D'Oliveiro
In message , Dennis Lee Bieber wrote: > On Sun, 24 May 2009 22:47:51 +1200, Lawrence D'Oliveiro > declaimed the following in > gmane.comp.python.general: > >> As for exactitude in physics, Gregory Chaitin among others has been >> trying to rework physics to get r

Re: Optimizing math functions

2009-05-25 Thread Lawrence D'Oliveiro
In message <0033dace$0$9725$c3e8...@news.astraweb.com>, Steven D'Aprano wrote: > Minimizing functions of two variables is difficult, as a general rule. > Nevertheless, there are tools for doing so. Check out SciPy. The name "Marquadt-Levenberg" comes to mind. As I recall, it involved finding ze

Re: How to reuse TCP listening socket immediately after it was connected at least once?

2009-05-25 Thread Lawrence D'Oliveiro
In message , Igor Katson wrote: > I have written a socket server and some arbitrary clients. When I > shutdown the server, and do socket.close(), I cannot immediately start > it again cause it has some open sockets in TIME_WAIT state. It throws > address already in use exception at me. There's a

Ted Dziuba

2009-05-25 Thread Lawrence D'Oliveiro
: If you've ever had to build C extensions to Python on Windows, you can join me in a feeling of satisfaction that someone at Microsoft is going to have to figure this out. Let's call it retribution for Internet

Re: Re: 4 hundred quadrillonth?

2009-05-25 Thread Lawrence D'Oliveiro
In message , Dave Angel wrote: > Lawrence D'Oliveiro wrote: > >> Anybody remember a certain Prof William Kahan from Berkeley ... >> > I remember the professor. He was responsible for large parts of the > Intel 8087 specification, which later got mostly codifi

Re: What text editor is everyone using for Python

2009-05-25 Thread Lawrence D'Oliveiro
In message , LittleGrasshopper wrote: > ... I am looking for suitable syntax files for [editor of choice] ... I don't understand why people need "syntax files" to use a text editor. -- http://mail.python.org/mailman/listinfo/python-list

Re: What text editor is everyone using for Python

2009-05-26 Thread Lawrence D'Oliveiro
In message , Steven D'Aprano wrote: > On Tue, 26 May 2009 18:31:56 +1200, Lawrence D'Oliveiro wrote: > >> In message > b201-4b2445732...@v35g2000pro.googlegroups.com>, LittleGrasshopper >> wrote: >> >>> ... I am looking for suitable synta

Re: What text editor is everyone using for Python

2009-05-26 Thread Lawrence D'Oliveiro
In message , Hendrik van Rooyen wrote: > "Lawrence D'Oliveiro" wrote: >> >> Why [do you want syntax highlighting]? > > It makes your screen look more busy as you type - for instance, if you > type a " or a ' then it treats the rest of the f

Re: 4 hundred quadrillonth?

2009-05-26 Thread Lawrence D'Oliveiro
In message , Steven D'Aprano wrote: > On Sun, 24 May 2009 22:47:51 +1200, Lawrence D'Oliveiro > declaimed the following in > gmane.comp.python.general: > >> .. Gregory Chaitin among others has been trying to rework physics to get >> rid of real numbers altoget

Re: What text editor is everyone using for Python

2009-05-26 Thread Lawrence D'Oliveiro
In message , Arnaud Delobelle wrote: > That's why I use ed. After 20 years of suffering with vi, I finally decided to switch to Emacs. Yes, it has lots of fancy features and "modes" and things, but it wasn't hard to figure out how to turn the intrusive stuff off, and still leave a very powerfu

Re: What text editor is everyone using for Python

2009-05-26 Thread Lawrence D'Oliveiro
In message , Jean-Michel Pichavant wrote: > Why buy an IDE when you just need a text editor ? Because all the cool kids have one. If you want to be different and individual like them, you have to have what they have. -- http://mail.python.org/mailman/listinfo/python-list

Re: What text editor is everyone using for Python

2009-05-26 Thread Lawrence D'Oliveiro
In message , Roy Smith wrote: > The real problem is when you get dumped into some editor other than you > one you expected and don't realize it for a while. It's really amazing > how much damage you can do to a file by typing (for example) emacs > commands at vi. Doesn't work the other way round

Re: What text editor is everyone using for Python

2009-05-26 Thread Lawrence D'Oliveiro
In message , Teguh Iskanto wrote: > Have you tried vim ? it has got tons of tons of features ... So has everything else these days. > for example: you're working in the office and connected to your remote > CVS server ... Wouldn't it be easier to use a distributed VCS? -- http://mail.python.

Re: How to reuse TCP listening socket immediately after it was connected at least once?

2009-05-26 Thread Lawrence D'Oliveiro
In message , Roy Smith wrote: > In article , > Lawrence D'Oliveiro wrote: > >> In message , Roy Smith wrote: >> >> > In article , >> > Lawrence D'Oliveiro wrote: >> > >> >> The right thing to do is try to ensure that al

Re: DB-API execute params, am I missing something?

2009-05-27 Thread Lawrence D'Oliveiro
In message , Dennis Lee Bieber wrote: > Notice that db.literal() call? That's part of the mechanism used to > escape and quote parameters -- it only returns strings that are safe for > insertion into the SQL statement. Does it deal with "like"-wildcards? -- http://mail.python.org/mailman/listi

Re: DB-API execute params, am I missing something?

2009-05-27 Thread Lawrence D'Oliveiro
In message <784h2cf1kem0...@mid.uni-berlin.de>, Diez B. Roggisch wrote: > Lawrence D'Oliveiro wrote: > >> In message , Dennis >> Lee Bieber wrote: >> >>> Notice that db.literal() call? That's part of the mechanism used to >>> escape and

Re: What text editor is everyone using for Python

2009-05-28 Thread Lawrence D'Oliveiro
In message <0039e83c$0$9673$c3e8...@news.astraweb.com>, Steven D'Aprano wrote: > A good UI standard should mean that: > > * all functionality should be discoverable without reading the manual; Which means no scripting languages are allowed? -- http://mail.python.org/mailman/listinfo/python-li

Re: DB-API execute params, am I missing something?

2009-05-28 Thread Lawrence D'Oliveiro
In message , Dennis Lee Bieber wrote: > On Thu, 28 May 2009 13:12:57 +1200, Lawrence D'Oliveiro > declaimed the following in > gmane.comp.python.general: > >> >> What if the string you're searching for includes a "%" or "_&q

Re: What text editor is everyone using for Python

2009-05-28 Thread Lawrence D'Oliveiro
In message <003a5518$0$9673$c3e8...@news.astraweb.com>, Steven D'Aprano wrote: > On Thu, 28 May 2009 20:58:07 +1200, Lawrence D'Oliveiro wrote: > >> In message <0039e83c$0$9673$c3e8...@news.astraweb.com>, Steven D'Aprano >> wrote: >> >

Re: How to reuse TCP listening socket immediately after it was connected at least once?

2009-05-28 Thread Lawrence D'Oliveiro
In message , Thomas Bellman wrote: > Speaking as a sysadmin, running applications for production, > programs not using SO_REUSEADDR should be taken out and shot. > Not using SO_REUSEADDR means forcing a service interruption of > half an hour (IIRC) if for some reason the service must be > restart

Re: What text editor is everyone using for Python

2009-05-28 Thread Lawrence D'Oliveiro
In message <003af57e$0$9673$c3e8...@news.astraweb.com>, Steven D'Aprano wrote: > On Fri, 29 May 2009 09:04:39 +1200, Lawrence D'Oliveiro wrote: > >> In message <003a5518$0$9673$c3e8...@news.astraweb.com>, Steven D'Aprano >> wrote: >> >>

Re: What text editor is everyone using for Python

2009-05-29 Thread Lawrence D'Oliveiro
In message <003b3d8c$0$9673$c3e8...@news.astraweb.com>, Steven D'Aprano wrote: > On Fri, 29 May 2009 14:00:19 +1200, Lawrence D'Oliveiro wrote: > >> In message <003af57e$0$9673$c3e8...@news.astraweb.com>, Steven D'Aprano >> wrote: >> >>

Re: DB-API execute params, am I missing something?

2009-05-29 Thread Lawrence D'Oliveiro
In message , Dennis Lee Bieber wrote: > On Thu, 28 May 2009 20:57:13 +1200, Lawrence D'Oliveiro > declaimed the following in > gmane.comp.python.general: > >>> >>>>>> db.literal((... "%wildcard%" ...)) >>>(... "&#x

Re: DB-API execute params, am I missing something?

2009-05-29 Thread Lawrence D'Oliveiro
In message <0dcfcb4a-8844-420b-b2e2- c8e684197...@p6g2000pre.googlegroups.com>, John Machin wrote: > If you need to escape % or _ in a LIKE argument, do whatever the host > convention is. > E.g. you are searching for text that contains literally "5% discount", > with SQLite you could do: > [avoidi

Re: What text editor is everyone using for Python

2009-05-30 Thread Lawrence D'Oliveiro
In message , Lie Ryan wrote: > norseman wrote: > >> Suggestion: >> Take a look at the top two most used OS you use and learn the default >> (most often available) text editors that come with them. > > Which means Notepad on Windows? Or you could take a Linux preinstallation on a Live CD/DVD or U

Re: DB-API execute params, am I missing something?

2009-05-30 Thread Lawrence D'Oliveiro
In message <55520c08-5b02-4231- b0f3-74eadecd6...@g1g2000yqh.googlegroups.com>, John Machin wrote: > ... suggest a better way. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to reuse TCP listening socket immediately after it was connected at least once?

2009-05-31 Thread Lawrence D'Oliveiro
In message , Thomas Bellman wrote: > We weren't exactly keen on rebooting the machine, but it was the > fastest way of getting out of that situation that we could figure > out. How *should* we have dealt with it in your opinion? Remember, the timed_wait timeout is there for a reason, and trying

Re: which database is suitable for small applications

2009-05-31 Thread Lawrence D'Oliveiro
In message <52801358-c037-458d-8857- a78c2d881...@z16g2000prd.googlegroups.com>, Ankit wrote: > If your application does not require you to add very heavy data then > you can also use flat files to do your stuff. > Its always a better to use Databases ... It's not always better to use databases.

<    2   3   4   5   6   7   8   9   10   11   >