Re: sqlite version on windows

2010-03-26 Thread Lawrence D'Oliveiro
In message , Philip Semanchuk wrote: > On Mar 26, 2010, at 5:57 AM, Laszlo Nagy wrote: >> >> On my Linux system: Python version: 2.6.2 sqlite3.sqlite_version: >> 3.6.10 >> On my Windows system: Python version: 2.6.5 sqlite3.sqlite_version: >> 3.5.9 >> >> Why is that? > > The few Linux distros th

Re: GIF89A and PIL

2010-03-26 Thread Lawrence D'Oliveiro
In message <2010032618455468300-aptshan...@gmailinvalid>, Stephen Hansen wrote: > Is it possible to get PIL to save GIF's in GIF89A format, instead of > GIF87A? Why? What does GIF do for you that PNG doesn’t? -- http://mail.python.org/mailman/listinfo/python-list

Re: Encryption source code with md5

2010-03-28 Thread Lawrence D'Oliveiro
In message <91541c26-6f18-40c7- a0df-252a52bb7...@l25g2000yqd.googlegroups.com>, catalinf...@gmail.com wrote: > It is possible to encrypt with md5 python source code? Don’t use MD5. > What option do I have to protect my python source code? Copyright. -- http://mail.python.org/mailman/listinfo

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

2010-03-30 Thread Lawrence D'Oliveiro
In message <7316f3d2-bcc9-4a1a-8598- cdd5d41fd...@k17g2000yqb.googlegroups.com>, Joaquin Abian wrote: > (a==b) and 'YES' or 'NO' > > Yes, ugly Why would you say that’s ugly? By the way, you don’t need the parentheses. -- http://mail.python.org/mailman/listinfo/python-list

Re: "Usability, the Soul of Python"

2010-03-30 Thread Lawrence D'Oliveiro
In message <20100331003241.47fa9...@vulcan.local>, Robert Fendt wrote: > The braces are gone, and with them the holy wars. Let me start a new one. I would still put in some kind of explicit indicator of the end of the grouping construct: count = 99 while count > 0: print u'%d sl

Re: "Usability, the Soul of Python"

2010-03-30 Thread Lawrence D'Oliveiro
In message , Alf P. Steinbach wrote: > This is just unsubstantiated opinion, but worse, it makes a tacit > assumption that there is "best" way to do indentation. However, most > programmers fall into that trap, and I've done it myself. Having used so many different languages over the years, I ha

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

2010-04-03 Thread Lawrence D'Oliveiro
In message , Steve Holden wrote: > Lawrence D'Oliveiro wrote: > >> By the way, you don’t need the parentheses. > > But at the same time, if you don't *absolutely know* you don't need the > parentheses ... But you can “abolutely know”—it’s all spelled out her

Re: Encryption source code with md5

2010-04-03 Thread Lawrence D'Oliveiro
In message <4baf3ac4$0$22903$e4fe5...@news.xs4all.nl>, Irmen de Jong wrote: > On 28-3-2010 12:08, Lawrence D'Oliveiro wrote: > >> Don’t use MD5. > > Also, md5 is not an encryption algorithm at all, it is a secure hashing > function. You can use hash fu

Re: Getting Local MAC Address

2010-04-06 Thread Lawrence D'Oliveiro
In message , Booter wrote: > I am new to python ans was wondering if there was a way to get the mac > address from the local NIC? What if you have more than one? -- http://mail.python.org/mailman/listinfo/python-list

Re: Striving for PEP-8 compliance

2010-04-07 Thread Lawrence D'Oliveiro
In message , Tom Evans wrote: > I've written a bunch of internal libraries for my company, and they > all use two space indents, and I'd like to be more consistent and > conform to PEP-8 as much as I can. “A foolish consistency is the hobgoblin of little minds” — Ralph Waldo Emerson -- http

Re: Striving for PEP-8 compliance

2010-04-07 Thread Lawrence D'Oliveiro
In message , Gabriel Genellina wrote: > If you only reindent the code (without adding/removing lines) then you can > compare the compiled .pyc files (excluding the first 8 bytes that contain > a magic number and the source file timestamp). Remember that code objects > contain line number informat

Re: Striving for PEP-8 compliance

2010-04-09 Thread Lawrence D'Oliveiro
In message <4bbf6eb8$0$1670$742ec...@news.sonic.net>, John Nagle wrote: > Lawrence D'Oliveiro wrote: > >> In message , >> Gabriel Genellina wrote: >> >>> If you only reindent the code (without adding/removing lines) then you >>> can compare

Re: Striving for PEP-8 compliance

2010-04-09 Thread Lawrence D'Oliveiro
In message , Grant Edwards wrote: > Anybody who invents another brace-delimited language should be beaten. > You always end up with a big problem trying to make sure the braces > are consistent with the program logic. Would you prefer “begin” and “end” word symbols, then? -- http://mail.python.o

Re: Striving for PEP-8 compliance

2010-04-10 Thread Lawrence D'Oliveiro
In message <18988a53-e88f-4abf- a83a-314b16653...@x12g2000yqx.googlegroups.com>, Patrick Maupin wrote: > I want nothing to do with any programmer who would mis-indent their > code. But what happens when you’re trying to reconcile two different indentation conventions? In Python, there can be pro

Re: Striving for PEP-8 compliance

2010-04-10 Thread Lawrence D'Oliveiro
In message , Grant Edwards wrote: > On 2010-04-10, Lawrence D'Oliveiro > wrote: > >> In message , Grant Edwards wrote: >> >>> Anybody who invents another brace-delimited language should be beaten. >>> You always end up with a big problem trying to make

Re: Striving for PEP-8 compliance

2010-04-11 Thread Lawrence D'Oliveiro
In message <87sk73jxl0@benfinney.id.au>, Ben Finney wrote: > What happens whe you're trying to reconcile two different > block-delimiter conventions? For example? -- http://mail.python.org/mailman/listinfo/python-list

Re: Striving for PEP-8 compliance

2010-04-11 Thread Lawrence D'Oliveiro
In message , Grant Edwards wrote: > On 2010-04-10, Lawrence D'Oliveiro > wrote: > >> In message , Grant Edwards wrote: >> >>> On 2010-04-10, Lawrence D'Oliveiro >>> wrote: >>> >>>> In message , Grant Edwards wrote: >>&g

Re: Creating a standalone application

2010-04-13 Thread Lawrence D'Oliveiro
In message , Luis Quesada wrote: > I am getting an "expected string without null bytes" error when using > cxfreeze for creating a standalone application (in Linux-Ubuntu). Why bother? Every decent Linux system will have Python available. Why not just distribute it as a script? -- http://mail.p

Re: Creating a standalone application

2010-04-17 Thread Lawrence D'Oliveiro
In message , Jonathan Hartley wrote: > On Apr 13, 10:42�pm, Lawrence D'Oliveiro > wrote: > >> In message , Luis Quesada wrote: >> >> > I am getting an "expected string without null bytes" error when using >> > cxfreeze for creating a stan

Re: Creating a standalone application

2010-04-17 Thread Lawrence D'Oliveiro
In message <4bc4ec17.3040...@4c.ucc.ie>, Luis Quesada wrote: > Lawrence D'Oliveiro wrote: > >> In message , Luis Quesada wrote: >> >>> I am getting an "expected string without null bytes" error when using >>> cxfreeze for creating a st

Re: when should I explicitly close a file?

2010-04-17 Thread Lawrence D'Oliveiro
In message , gelonida wrote: > I've been told, that following code snippet is not good. > > open("myfile","w").write(astring) ... I do that for reads, but never for writes. For writes, you want to give a chance for write errors to raise an exception and alert the user, instead of failing sil

Re: when should I explicitly close a file?

2010-04-21 Thread Lawrence D'Oliveiro
In message <4bc9aad...@dnews.tpgi.com.au>, Lie Ryan wrote: > Since in python nothing is guaranteed about implicit file close ... It is guaranteed that objects with a reference count of zero will be disposed. In my experiments, this happens immediately. -- http://mail.python.org/mailman/listinfo

Re: Download Proprietary Microsoft Products Now

2010-04-21 Thread Lawrence D'Oliveiro
In message , "Martin v. Löwis" wrote: > Brian Blais wrote: > >> On Apr 12, 2010, at 16:36 , Martin v. Loewis is wrote: >> >>> If you are planning to build Python extension modules in the next five >>> years, I recommend that you obtain a copy of VS Express >> >> Am I missing something here? I

Re: Download Proprietary Microsoft Products Now

2010-04-21 Thread Lawrence D'Oliveiro
In message <4bc8547...@dnews.tpgi.com.au>, Lie Ryan wrote: > ... so you should get the full installer if you want to insure yourself > from Microsoft pulling the plug out. I wonder how many Windows users will be able to figure that out... -- http://mail.python.org/mailman/listinfo/python-list

Re: when should I explicitly close a file?

2010-04-22 Thread Lawrence D'Oliveiro
In message , Chris Rebert wrote: > On Wed, Apr 21, 2010 at 5:53 PM, Lawrence D'Oliveiro wrote: > >> In message <4bc9aad...@dnews.tpgi.com.au>, Lie Ryan wrote: >> >>> Since in python nothing is guaranteed about implicit file close ... >> >> It is

Completely Deleting A Directory

2010-04-26 Thread Lawrence D'Oliveiro
It doesn’t seem to mention in the documentation for os.walk that symlinks to directories are returned in the list of directories, not the list of files. This will lead to an error in the os.rmdir call in the example directory-deletion routine on that pag

Re: Download Proprietary Microsoft Products Now

2010-04-26 Thread Lawrence D'Oliveiro
Just been looking at this review of Visual Studio 2010 : ... the 2GB ISO was quicker to download than it was to install - not even counting the several reboots required. Since when do you need to REBOOT just to install a developm

Re: Completely Deleting A Directory

2010-04-26 Thread Lawrence D'Oliveiro
In message <86bb4820-ab5a-49cc-9e64-7f7e609e4...@y6g2000prk.googlegroups.com>, MrJean1 wrote: > 2) Function rmtree in the shutil module considers symlinks to a > directory an error > since Python > 2.6. I don’t think that applies to subd

Re: when should I explicitly close a file?

2010-04-27 Thread Lawrence D'Oliveiro
In message , Adam Tauno Williams wrote: > On Fri, 2010-04-23 at 16:29 +1200, Lawrence D'Oliveiro wrote: > >> Any implementation that doesn’t do reference-counting is brain-damaged. > > Why? Because a) it uses extra memory needlessly, and b) waiting until an object h

Adorable Pancreas

2010-04-30 Thread Lawrence D'Oliveiro
I want to use that as a code name for some software project. Perhaps for a release where a lot of work has gone on behind the scenes, not necessarily visible to the user. It’s from the Jean Kerr quote: “I’m tired of all this nonsense about beauty being skin deep. That’s deep enough. What do you

Re: Download Proprietary Microsoft Products Now

2010-04-30 Thread Lawrence D'Oliveiro
In message <530938a5-d865-4228-8d4a-402a39941...@k36g2000yqn.googlegroups.com>, Andrej Mitrovic wrote: > Sure beats having to recompile a kernel to support 3rd party audio > drivers. Which is a less fraught process than {B7C0D3A0-F949-44AD-ACE5-FB845B8C1EB7} ing Registry edits, don’t you thin? Y

[PATCH] add functional matrix-returning methods to Pycairo

2010-05-04 Thread Lawrence D'Oliveiro
I find the matrix methods in Pycairo to be an annoying hodge-podge of ones that overwrite the Matrix object in-place (init_rotate, invert) versus ones that concatenate additional transformations (rotate, scale, translate) versus ones that return new matrices without modifying the originals (multipl

Re: condition and True or False

2010-05-06 Thread Lawrence D'Oliveiro
In message <685761fe-b052-4d89-92d3-17d1f2a39...@p2g2000yqh.googlegroups.com>, Paul McGuire wrote: > While sifting through some code looking for old "x and y or z" code > that might better be coded using "y if x else z", I came across this > puzzler: > > x = and True or False I suspect the

Re: Windows - select.select, timeout and KeyboardInterrupt

2010-05-08 Thread Lawrence D'Oliveiro
In message , exar...@twistedmatrix.com wrote: > This is a good example of why it's a bad idea to use select on Windows. > Instead, use WaitForMultipleObjects. How are you supposed to write portable code, then? -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows - select.select, timeout and KeyboardInterrupt

2010-05-09 Thread Lawrence D'Oliveiro
In message , exar...@twistedmatrix.com wrote: > On 07:48 am, l...@geek-central.gen.new_zealand wrote: > >>In message , >>exar...@twistedmatrix.com wrote: >> >>>This is a good example of why it's a bad idea to use select on >>>Windows. >>>Instead, use WaitForMultipleObjects. >> >>How are you suppo

Re: virtualenvwrapper for Windows (Powershell)

2010-05-10 Thread Lawrence D'Oliveiro
In message <22cf35af-44d1-43fe-8b90-07f2c6545...@i10g2000yqh.googlegroups.com>, Guillermo wrote: > If you've ever missed it on Windows and you can use Powershell ... I thought the whole point of Windows was to get away from this command-line stuff. Not such a good idea after all? -- http://ma

Re: shortcut for large amount of global var declarations?

2010-05-10 Thread Lawrence D'Oliveiro
In message , Alex Hall wrote: > ... I have about fifteen vars in a function which have to be > global. Why not make them class variables, e.g. class my_namespace : var1 = ... var2 = ... #end my_namespace def my_function(...) : ... can directly read/assign my

Re: fast regex

2010-05-10 Thread Lawrence D'Oliveiro
In message , james_027 wrote: > I was working with regex on a very large text, really large but I have > time constrained. “Fast regex” is a contradiction in terms. You use regexes when you want ease of definition and application, not speed. For speed, consider hand-coding your own state machi

Re: Is Python a functional programming language?

2010-05-11 Thread Lawrence D'Oliveiro
In message <7xvdavd4bq@ruckus.brouhaha.com>, Paul Rubin wrote: > Python is a pragmatic language from an imperative tradition ... I thought the opposite of “functional” was “procedural”, not “imperative”. The opposite to the latter is “declarative”. But (nearly) all procedural languages also

Re: Is Python a functional programming language?

2010-05-11 Thread Lawrence D'Oliveiro
In message , Stefan Behnel wrote: > But the beauty is that Python is multi-paradigm ... The trouble with “multi-paradigm” is that it offends the zealots on all sides. It’s like saying that, to effect a compromise among multiple conflicting monotheistic religions, we should create a polytheisti

Re: virtualenvwrapper for Windows (Powershell)

2010-05-11 Thread Lawrence D'Oliveiro
In message <973ca0fa-4a2f-4e3b-91b9-e38917885...@d27g2000yqc.googlegroups.com>, Guillermo wrote: > On May 11, 7:43 am, Lawrence D'Oliveiro > wrote: > >> In message >> <22cf35af-44d1-43fe-8b90-07f2c6545...@i10g2000yqh.googlegroups.com>, >> >> G

Re: virtualenvwrapper for Windows (Powershell)

2010-05-12 Thread Lawrence D'Oliveiro
In message , Guillermo wrote: > On May 12, 4:31 am, Lawrence D'Oliveiro > wrote: > >> In message >> <973ca0fa-4a2f-4e3b-91b9-e38917885...@d27g2000yqc.googlegroups.com>, >> >> Guillermo wrote: >> > On May 11, 7:43 am, Lawrence D'Oliveiro

Re: Is Python a functional programming language?

2010-05-12 Thread Lawrence D'Oliveiro
In message , Nobody wrote: > On Tue, 11 May 2010 23:13:10 +1200, Lawrence D'Oliveiro wrote: > >>> But the beauty is that Python is multi-paradigm ... >> >> The trouble with “multi-paradigm” is that it offends the zealots on >> all sides. > > Is th

Re: Picking a license

2010-05-12 Thread Lawrence D'Oliveiro
In message , Ed Keith wrote: > ... but to claim that putting more restrictions on someone give them more > freedom is pure Orwellian double speak. What about the freedom to take away other people’s freedom? What tuple of speak would that be? -- http://mail.python.org/mailman/listinfo/python-li

Re: Picking a license

2010-05-13 Thread Lawrence D'Oliveiro
In message <155f1683-9bfd-4a83-b63f-7fb0fc2f5...@g21g2000yqk.googlegroups.com>, Patrick Maupin wrote: > On May 12, 10:48 pm, Lawrence D'Oliveiro > wrote: > >> In message , Ed >> Keith wrote: >> >> > ... but to claim that putting more restrictions

Re: PEP 3119 ABC - And how I learned to love the Abstract Bomb

2010-05-13 Thread Lawrence D'Oliveiro
In message , Hatem Nassrat wrote: > 1. To create a YajlContentHandler class that forces all sub-classers > to implement a certain set of methods. (Great, thats what ABC is for) > > 2. Conditional Abstractness! if certain methods are not implemented > then be able to require some method to be imp

Re: Django as exemplary design

2010-05-13 Thread Lawrence D'Oliveiro
In message , MRAB wrote: > Albert Hopkins wrote: > >> On Thu, 2010-05-06 at 16:38 -0700, Patrick Maupin wrote: >> >>> I don't know how this applies to reading other peoples' code, but >>> recent research shows we learn more from success than failure >> >> That's good to learn, because for years

Re: Django as exemplary design

2010-05-13 Thread Lawrence D'Oliveiro
In message , Aahz wrote: > My suspicion is that very very few medium/large systems are truly > "well-designed". Conway’s law applies: the product of any human endeavour reflects the organizational structure that produced it. If the individuals/groups writing the different parts of the software

Re: Picking a license

2010-05-13 Thread Lawrence D'Oliveiro
In message , Ed Keith wrote: > If, on the other hand you are releasing a library, to be incorporated into > other products, If you release it under the GPL I will not take the time > to learn it. I do not want to have to think about what took I can legally > use for what job. Libraries with permi

Re: Broken pipe

2010-05-13 Thread Lawrence D'Oliveiro
In message , Chris Rebert wrote: > Also, please don't use semicolons in your code. It's bad style. Wonder why they’re allowed, then. -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a better way to set a system clock in Python (on a Linux system)

2010-05-13 Thread Lawrence D'Oliveiro
In message , J wrote: > Like I said, it works well, I just wonder if there is a cleaner way of > setting the local clock to a different time in python without having > to do all this. How about one line in Bash: date -s $(date --rfc-3339=date -d "+1 hour") -- http://mail.python.org/mailman

Re: Picking a license

2010-05-13 Thread Lawrence D'Oliveiro
In message <72888d2c-4b1a-4b08-a3aa- f4021d2ed...@e2g2000yqn.googlegroups.com>, Patrick Maupin wrote: > If I download an Ubuntu ISO, burn it and give it away (let's say I give > away 100 copies, just to remove the fair use defense), then I have > violated the GPL. I provided chapter and verse on

Re: Picking a license

2010-05-13 Thread Lawrence D'Oliveiro
In message , Ed Keith wrote: > The claim is being made that [the GPL] restricts freedom. What about the “freedom” to restrict other people’s freedom? Should that be restricted or not? -- http://mail.python.org/mailman/listinfo/python-list

Re: Picking a license

2010-05-13 Thread Lawrence D'Oliveiro
In message , Ed Keith wrote: > Assertion I: >If person A is free to do more than person B, then person A has >more freedom then person B. > > Assertion II: >If person A is free do perform an action person B is not free to >perform then person A is free to do more than person B. >

Re: Picking a license

2010-05-13 Thread Lawrence D'Oliveiro
In message , Ed Keith wrote: > On Thu, 5/13/10, Lawrence D'Oliveiro > wrote: > >> In message , >> Ed Keith wrote: >> >>> So if you want me to even consider using your library >>> do not use GPL, or LGPL. >> >> What have you got ag

Re: Picking a license

2010-05-14 Thread Lawrence D'Oliveiro
In message <2ff3643b-6ef1-4471-8438- dcba0dc93...@a21g2000yqn.googlegroups.com>, Patrick Maupin wrote: > On May 13, 10:04 pm, Lawrence D'Oliveiro > wrote: > >> In message , Ed >> Keith wrote: >> >>> The claim is being made that [the GPL] restr

Re: Picking a license

2010-05-14 Thread Lawrence D'Oliveiro
In message <2b17ee77-0e49-4a97-994c-7582f86c0...@r34g2000yqj.googlegroups.com>, Patrick Maupin wrote: > On May 13, 10:06 pm, Lawrence D'Oliveiro > wrote: > >> Under the GPL, everybody has exactly the same freedoms. > > That's absolutely not true. For

Re: parsing XML

2010-05-14 Thread Lawrence D'Oliveiro
In message , Stefan Behnel wrote: > Here's an overly complicated solution, but I thought that an object > oriented design would help here. How many times are you going to write the “"name", "age", "height"” sequence? The next assignment question I would ask is: how easy would it be to add a fo

Re: Broken pipe

2010-05-14 Thread Lawrence D'Oliveiro
In message <4bec2a9...@dnews.tpgi.com.au>, Lie Ryan wrote: > On 05/13/10 22:41, Lawrence D'Oliveiro wrote: >> In message , Chris >> Rebert wrote: >> >>> Also, please don't use semicolons in your code. It's bad style. >> >>

Re: Picking a license

2010-05-14 Thread Lawrence D'Oliveiro
In message <84a26d03-03b3-47d9- a1f9-107470b87...@k2g2000yqe.googlegroups.com>, Patrick Maupin wrote: > I also firmly believe, as I have stated before, that the GPL is a much > more commercial license. If you want to make money off something, > then, no doubt, GPL keeps your competitors from bein

Re: Picking a license

2010-05-14 Thread Lawrence D'Oliveiro
In message , Ed Keith wrote: > Yes, under the GPL every one has one set of freedoms, under the MIT or > Boost license every one has more freedoms. Under other licenses they have > fewer freedoms. But what about the “freedom” to take away other people’s freedom? Is that really “freedom”? -- htt

Re: Picking a license

2010-05-14 Thread Lawrence D'Oliveiro
In message , Patrick Maupin wrote: > On May 14, 6:12 am, Lawrence D'Oliveiro > wrote: > >> In message >> <2ff3643b-6ef1-4471-8438-dcba0dc93...@a21g2000yqn.googlegroups.com>, >> Patrick Maupin wrote: > >>> On May 13, 10:04 pm, Lawrence D'Ol

Re: Picking a license

2010-05-14 Thread Lawrence D'Oliveiro
In message <548024fc- dd56-48b9-907d-3aa6a722b...@l31g2000yqm.googlegroups.com>, Patrick Maupin wrote: > The confusion that some are showing in this thread about whether source > must be distributed certainly helps to show that as well. What “confusion”? The GPL requires that source must always

Re: Picking a license

2010-05-14 Thread Lawrence D'Oliveiro
In message <5e719bcd-5405-4c34-870b-13e64ef1f...@k29g2000yqh.googlegroups.com>, Patrick Maupin wrote: > On May 14, 6:13 am, Lawrence D'Oliveiro central.gen.new_zealand> wrote: > >> In message >> <2b17ee77-0e49-4a97-994c-7582f86c0...@r34g2000yqj.googleg

Re: Picking a license

2010-05-14 Thread Lawrence D'Oliveiro
In message , Ed Keith wrote: > That is one good reason for choosing to use the GPL, instead of a less > restrictive license. You can license it, for a fee, to someone who wants > to use it in some way that is not allowed under the GPL. Replace “GPL” with “” and your statement is no less (or more

Re: Picking a license

2010-05-14 Thread Lawrence D'Oliveiro
In message , Patrick Maupin wrote: > After all, lots of software ideas proved their worth in proprietary > systems, and then were later cloned by FOSS developers. And vice versa. Everybody, whether working in closed or open environments, builds on the work of everybody else. Rsync pioneered the

Re: Picking a license

2010-05-14 Thread Lawrence D'Oliveiro
In message , Paul Boddie wrote: > Although people can argue that usage of the GPL prevents people from > potentially contributing because they would not be able to sell > proprietary versions of the software ... It doesn’t prevent them from selling proprietary versions of their own contribution

Re: Picking a license

2010-05-14 Thread Lawrence D'Oliveiro
In message , Ed Keith wrote: > I just refuse to use [the GPL] in any code for a client, because I > do not want to require someone who does not know source code from Morse > code code to figure out what they need to do to avoid violating the > license. Why don’t you just put the source code on t

Re: Picking a license

2010-05-14 Thread Lawrence D'Oliveiro
In message , Paul Boddie wrote: > If you think the mobile telephony vendors are a bunch of fluffy bunny > rabbits playing with each other in sugary meadows of niceness, I don't > want to be present when someone directly and finally disabuses you of > this belief. The rise to popularity of Free So

Re: Do any debuggers support "edit and continue?"

2010-05-15 Thread Lawrence D'Oliveiro
In message , Joel Koltner wrote: > Just curious... in Microsoft's Visual Studio (and I would presume some > other tools), for many languages (both interpreted and compiled!) there's > an "edit and conitnue" option that, when you hit a breakpoint, allows you > to modify a line of code before it's

Re: Picking a license

2010-05-15 Thread Lawrence D'Oliveiro
In message , Patrick Maupin wrote: > On May 14, 9:21 pm, Lawrence D'Oliveiro central.gen.new_zealand> wrote: > >> In message , Ed >> Keith wrote: >> >>> I just refuse to use [the GPL] in any code for a client, because I >>> do not want to requir

Re: Picking a license

2010-05-15 Thread Lawrence D'Oliveiro
In message , Ed Keith wrote: > On Fri, 5/14/10, Lawrence D'Oliveiro > wrote: > >> In message , >> Ed Keith wrote: >> >>> Yes, under the GPL every one has one set of freedoms, >>> under the MIT or Boost license every one has more freedoms.

Re: Picking a license

2010-05-15 Thread Lawrence D'Oliveiro
In message <93d67bd9-6721-4759-a3de-412b95b29...@c11g2000vbe.googlegroups.com>, Paul Boddie wrote: > Although Bill Gates once apparently claimed that no-one needs the > source code for their word processor or office suite ... Thereby committing the sealed-bonnet fallacy. -- http://mail.python.o

Re: Picking a license

2010-05-15 Thread Lawrence D'Oliveiro
In message , Ed Keith wrote: > But if my client give someone else a copy of the binary I gave them, they > are now in violation. Why would they be in violation? It seems to me a violation would only occur if someone asked them for the source, and they refused. -- http://mail.python.org/mailman

ODFPY

2010-06-06 Thread Lawrence D'Oliveiro
Very handy library for creating and manipulating ODF documents without any dependency on OpenOffice.org . I’ve been looking at using it for automating the generation of the invoices I send out at the end of each month. So far, it’s been a lot easier than trying to figu

Why Is Escaping Data Considered So Magical?

2010-06-24 Thread Lawrence D'Oliveiro
Just been reading this article which says that a lot of security holes are arising these days because everybody is concentrating on unit testing of their own particular components, with less attention being devoted

Re: Why Is Escaping Data Considered So Magical?

2010-06-24 Thread Lawrence D'Oliveiro
In message , Roy Smith wrote: > 1) Somebody is running your application (or the database server) with > the locale set to something unexpected. Locales are under program control, so that won’t happen. This is why I use UTF-8 encoding for everything. -- http://mail.python.org/mailman/listinfo/py

Re: Why Is Escaping Data Considered So Magical?

2010-06-24 Thread Lawrence D'Oliveiro
In message <2010062422432660794-angrybald...@gmailcom>, Owen Jacobson wrote: > Why would I write this when SQLAlchemy, even without using its ORM > features, can do it for me? SQLAlchemy doesn’t seem very flexible. Looking at the code examples , they

Re: Why Is Escaping Data Considered So Magical?

2010-06-25 Thread Lawrence D'Oliveiro
In message , Nobody wrote: > On Fri, 25 Jun 2010 12:25:56 +1200, Lawrence D'Oliveiro wrote: > >> I construct ad-hoc queries all the time. It really isn’t that hard to >> do safely. > > Wrong. > > Even if you get the quoting absolutely correct (which is a ver

Re: Why Is Escaping Data Considered So Magical?

2010-06-25 Thread Lawrence D'Oliveiro
In message , Cameron Simpson wrote: > On 25Jun2010 15:38, Lawrence D'Oliveiro > wrote: > > | In message <2010062422432660794-angrybald...@gmailcom>, Owen Jacobson > | wrote: > > | > Why would I write this when SQLAlchemy, even without using its O

Re: Why Is Escaping Data Considered So Magical?

2010-06-25 Thread Lawrence D'Oliveiro
In message , Jorgen Grahn wrote: > I thought it was well-known that the solution is *not* to try to > sanitize the input -- it's to switch to an interface which doesn't > involve generating an intermediate executable. In the Python example, > that would be something like os.popen2(['zcat', '-f',

Re: Why Is Escaping Data Considered So Magical?

2010-06-26 Thread Lawrence D'Oliveiro
In message , Tim Chase wrote: > On 06/25/2010 07:49 PM, Lawrence D'Oliveiro wrote: > ... 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 judgem

Re: Why Is Escaping Data Considered So Magical?

2010-06-26 Thread Lawrence D'Oliveiro
In message , Ian Kelly wrote: > Your example from the first post of the thread rewritten using sqlalchemy: > > conn.execute( > items.update() > .where(items.c.inventory_nr == modify_id) > .values( > dict( > (field[0], Params.getvalue("%s[%s]"

Re: Why Is Escaping Data Considered So Magical?

2010-06-26 Thread Lawrence D'Oliveiro
In message <2010062522560231540-angrybald...@gmailcom>, Owen Jacobson wrote: > It's not hard. It's just begging for a visit from the fuckup fairy. That’s the same fallacious argument I pointed out earlier. -- http://mail.python.org/mailman/listinfo/python-list

Re: Why Is Escaping Data Considered So Magical?

2010-06-26 Thread Lawrence D'Oliveiro
In message , Nobody wrote: > On Sat, 26 Jun 2010 12:40:41 +1200, Lawrence D'Oliveiro wrote: > >>>> I construct ad-hoc queries all the time. It really isn’t that hard to >>>> do safely. >>> >>> Wrong. >>> >>> Even if you

Re: Why Is Escaping Data Considered So Magical?

2010-06-26 Thread Lawrence D'Oliveiro
In message , Nobody wrote: > Ask anyone with a surname like O'Neil, O'Connor, O'Leary, etc; they've > probably broken a lot of web apps *without even trying*. Last I checked, I couldn’t post comments on freedom-to-tinker.com. -- http://mail.python.org/mailman/listinfo/python-list

Re: Why Is Escaping Data Considered So Magical?

2010-06-26 Thread Lawrence D'Oliveiro
In message , Roy Smith wrote: > I recently fixed a bug in some production code. The programmer was > careful to use snprintf() to avoid buffer overflows. The only problem > is, he wrote something along the lines of: > > snprintf(buf, strlen(foo), foo); A long while ago I came up with this macr

Re: Continuously running scripts question

2010-06-26 Thread Lawrence D'Oliveiro
In message , Ian Kelly wrote: > I use cron. > > Con: Most cron implementations have a maximum frequency of once per > minute. Another con is: what happens if a run takes longer than the invocation frequency? -- http://mail.python.org/mailman/listinfo/python-list

Re: I strongly dislike Python 3

2010-06-27 Thread Lawrence D'Oliveiro
In message , Stefan Reich wrote: > My complaint is about changing the syntax of "print". I never use print, so I don’t appreciate the problem. It seems to be useful only for noddy I/O. -- http://mail.python.org/mailman/listinfo/python-list

Re: value of: None is None is None

2010-06-27 Thread Lawrence D'Oliveiro
In message , Alan G Isaac wrote: > Surprising for a moment, if you don't > immediatelyrecognize it as a chained comparison. Bugger. So much for a Python version of this , then ... -- http://mail.python.org/mailman/listinfo/pyth

Re: Why Is Escaping Data Considered So Magical?

2010-06-27 Thread Lawrence D'Oliveiro
In message , Kushal Kumaran wrote: > On Sun, Jun 27, 2010 at 9:47 AM, Lawrence D'Oliveiro > wrote: > >> In message , Roy Smith wrote: >> >>> I recently fixed a bug in some production code. The programmer was >>> careful to use snprintf() to avoid bu

Re: Why Is Escaping Data Considered So Magical?

2010-06-27 Thread Lawrence D'Oliveiro
In message , Ian Kelly wrote: > On Sat, Jun 26, 2010 at 8:31 PM, Lawrence D'Oliveiro > wrote: > >> Except I only needed two calls to SQLString, while you need two dozen >> instances of that repetitive items.c boilerplate. >> >> As a human, being rep

Re: python source code -> win/dos executable (on linux)

2010-06-27 Thread Lawrence D'Oliveiro
In message <4c24c152$0$31381$4fafb...@reader1.news.tin.it>, superpollo wrote: > suppose i work in a linux environment, but i would like to ship a > win/dos executable file from time to time, just for test purposes (my > "testers" are windows users and don't want to go through the hassle of > inst

Re: [OT] Re: Why Is Escaping Data Considered So Magical?

2010-06-28 Thread Lawrence D'Oliveiro
In message , Kushal Kumaran wrote: > On Sun, Jun 27, 2010 at 5:16 PM, Lawrence D'Oliveiro > wrote: > >>In message , Kushal >> Kumaran wrote: >> >>> On Sun, Jun 27, 2010 at 9:47 AM, Lawrence D'Oliveiro >>> wrote: >>> >>>&g

Re: Why are String Formatted Queries Considered So Magical?

2010-06-28 Thread Lawrence D'Oliveiro
In message <14e44c9c-04d9-452d-b544-498adfaf7...@d8g2000yqf.googlegroups.com>, Carl Banks wrote: > Seriously, almost every other kind of library uses a binary API. What > makes databases so special that they need a string-command based API? HTML is also effectively a string-based API. And what a

Re: Why Is Escaping Data Considered So Magical?

2010-06-28 Thread Lawrence D'Oliveiro
In message , Nobody wrote: > On Sun, 27 Jun 2010 14:36:10 +1200, Lawrence D'Oliveiro wrote: > >> Except nobody has yet shown an alternative which is easier to get right. > > For SQL, use stored procedures or prepared statements. So feel free to rewrite my example using e

Re: python source code -> win/dos executable (on linux)

2010-06-29 Thread Lawrence D'Oliveiro
In message <4c286d71$0$18654$4fafb...@reader3.news.tin.it>, superpollo wrote: > Lawrence D'Oliveiro ha scritto: >> >> Is it really such a hassle to install things on Windows? > > no, but it *IS* to explain it to dumb users... :-( Can’t you create an installati

Re: os.system: string encoding

2010-06-29 Thread Lawrence D'Oliveiro
In message , Peter Kleiweg wrote: > How do I set the string encoding for os.system to anything other then > UTF-8? Works for me (on Debian Unstable): l...@theon:~> echo $LC_ALL en_NZ.utf8 l...@theon:~> python3.1 Python 3.1.2 (r312:79147, May 8 2010, 13:27:06) [GCC 4.4.4] o

Re: [OT] Re: Why Is Escaping Data Considered So Magical?

2010-06-29 Thread Lawrence D'Oliveiro
In message , Kushal Kumaran wrote: > On Tue, Jun 29, 2010 at 5:56 AM, Lawrence D'Oliveiro > wrote: > >> Why does this work, then: >> >> l...@theon:hack> cat test.c >> #include >> >> int main(int argc, char ** argv) >> { >>

Re: Why Is Escaping Data Considered So Magical?

2010-06-29 Thread Lawrence D'Oliveiro
In message , Jorgen Grahn wrote: > On Sat, 2010-06-26, Lawrence D'Oliveiro wrote: > >> In message , Jorgen Grahn >> wrote: >> >>> I thought it was well-known that the solution is *not* to try to >>> sanitize the input -- it's to switch to

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