Re: Don't you just love writing this sort of thing :)

2008-12-05 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Steven D'Aprano wrote: > ... stupid formatting ... withallthedifferenttermsruntogetherintoonelinesoyoudon'tknowwhereoneendsandtheotherbeginsifthat'showyouliketowritecodefinethat'snothowIliketodoit -- http://mail.python.org/mailman/listinfo/python-list

Re: Don't you just love writing this sort of thing :)

2008-12-05 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Steven D'Aprano wrote: > Since the context has been deleted, it's hard to tell whether the code as > written by Lawrence ... If you want to reply to my message, reply to my message, don't reply to my reply to someone else's reply to my message. -- http://mail.pytho

Re: Don't you just love writing this sort of thing :)

2008-12-05 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Duncan Booth wrote: > ... but the mess you posted is going to be virtually untestable ... The "mess" I posted did actually work as written. > ... whereas splitting it up into small testable functions will make it > much easier for you to actually get somewhere nea

Re: Don't you just love writing this sort of thing :)

2008-12-05 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Aaron Brady wrote: > On Dec 5, 4:32 am, Lawrence D'Oliveiro <[EMAIL PROTECTED] > central.gen.new_zealand> wrote: > >> The code people write is probably a direct reflection of their thinking >> processes: For example, slow, plod

Re: Don't you just love writing this sort of thing :)

2008-12-05 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Steven D'Aprano wrote: > On Fri, 05 Dec 2008 23:28:48 +1300, Lawrence D'Oliveiro wrote: > >> In message <[EMAIL PROTECTED]>, Steven D'Aprano >> wrote: >> >>> Since the context has been deleted, i

Re: Don't you just love writing this sort of thing :)

2008-12-05 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Steven D'Aprano wrote: > It would have been far more concise ... Gee, I thought people were complaining it was too cryptic, now it turns out they were actually complaining because it was too verbose. -- http://mail.python.org/mailman/listinfo/python-list

Re: Don't you just love writing this sort of thing :)

2008-12-05 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Istvan Albert wrote: > Originally, like many others here I said YIKES! but on a second read, > it is not that bad. It actually grows on you. > > After looking at it one more time I found it neat, very concise > without being unreadable. The key thing is, it's func

Re: Don't you just love writing this sort of thing :)

2008-12-06 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Rhodri James wrote: > Yes, it's very pretty, and you're terribly clever. In six months' time > when you come back to make some engineering change and have to sit down > and break it back down into those simple pieces to remind yourself what > it's doing, "pretty" a

Re: Don't you just love writing this sort of thing :)

2008-12-06 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Arnaud Delobelle wrote: > * you seem to disregard the fact that in 'programming language' there > is the word 'language'. A language is a way to _communicate_ > information, in the case of a programming language you communicate > it to the computer bu

Re: Don't you just love writing this sort of thing :)

2008-12-06 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Arnaud Delobelle wrote: > * you give the impression of being arrogant; Oddly enough, I wasn't the one who started by criticizing other people's code. I have no ego about my code; I gladly accept criticisms. But perhaps some other people are not so thick-skinned a

Re: Python is slow?

2008-10-05 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, José Matos wrote: > The gnuplot license is a free software according to FSF ... Not listed as one . -- http://mail.python.org/mailman/listinfo/python-list

Re: Python is slow?

2008-10-05 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Ben Finney wrote: > Note that I consider a work free even if it fails to grant “the right > to distribute misrepresentations of the author's words”, because that > act is an exercise of undue power over another person, and so falls > outside the limit imposed by the

Re: paramiko.SSHException : No existing session ???

2008-10-05 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, sa6113 wrote: > print "doing authentication" ... > > - > the result is : ... > donig authentication Interesting that these two don't match up. When you're supposed to copy and paste, you should copy and paste, not type it in. -- http://mail.python.

Re: Python 2.6, GUI not working on vista?

2008-10-06 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Thorsten Kampe wrote: > * Lawrence D'Oliveiro (Sun, 05 Oct 2008 22:13:46 +1300) > >> In message <[EMAIL PROTECTED]>, Michel Claveau - >> NoSpam SVP ; merci wrote: >> >> > Another way is to de-activate UAC. &

Re: gif creator

2008-10-06 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > has anyone written a gif creator program purely in python that doesn't > require PIL or tons of other claptrap? It's so much easier to just go into Synaptic (or whatever your package manager is) and check a few boxes to install all the ne

Re: type-checking support in Python?

2008-10-06 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Gabriel Genellina wrote: > As an example, in the oil industry here in my country there is a mix of > measurement units in common usage. Depth is measured in meters, but pump > stroke in inches; loads in lbs but pressures in kg/cm². Isn't the right way to handle tha

Re: how to start thread by group?

2008-10-07 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Gabriel Genellina wrote: > Usually it's more efficient to create all the MAX_THREADS at once, and > continuously feed them with tasks to be done. Given that the bottleneck is most likely to be the internet connection, I'd say the "premature optimization is the root

Re: How do you get rid of useless warnings?

2008-10-07 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Martin Geisler wrote: > Take a look at the -W command line option to python. From the man page: > > -W argument > > The simplest form of argument is one of the following action > strings (or a unique abbreviation): ignore to ignore all warn-

Re: Reading from stdin

2008-10-07 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Luis Zarrabeitia wrote: > I have a problem with this piece of code: > > > import sys > for line in sys.stdin: > print "You said!", line > > > Namely, it seems that the stdin buffers the input, so there is no reply > until a huge amount of text has bi

Re: Python 2.6, GUI not working on vista?

2008-10-07 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Tim Roberts wrote: > Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote: > >>In message <[EMAIL PROTECTED]>, Thorsten Kampe >>wrote: >> >>> * Lawrence D'Oliveiro (Sun, 05 Oct 2008 22:13:46 +1300) >>>

Re: Python 2.6, GUI not working on vista?

2008-10-07 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Thorsten Kampe wrote: > * Lawrence D'Oliveiro (Mon, 06 Oct 2008 23:18:10 +1300) > >> In message <[EMAIL PROTECTED]>, Thorsten Kampe >> wrote: >>> >>> * Lawrence D'Oliveiro (Sun, 05 Oct 2008 22:13:46 +130

Re: time

2008-10-07 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Gabriel Rossetti wrote: > If I look at my clock, it's 16:59 (4:59pm), if I type "date" in a > terminal, it says the same thing. Try this: date gives local time, while TZ=UTC date gives UTC time. > I'm wanting to write a simple NTP-type server/client (i

Re: distributing apps without the Python source?

2008-10-08 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Joe Strout wrote: > We have a client who's paranoid about distributing the Python source > to his commercial app. "Commercial" is not synonymous with "closed source". If he wanted to keep the source closed, Python was a poor choice. You could redo it in C or C++, a

Re: re : do something in time interval

2008-10-08 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Hendrik van Rooyen wrote: > import time > while True: > end_time = time.time() + 5 > while time.time() < end_time: > do_the_in_between_stuff() > do_the_every_five_second_stuff() Maybe I'm dense, but ... where do you stop

Re: How to do regular BASH work in Python?

2008-10-11 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Michael Torrie wrote: > But unfortunately Python is definitely not a shell-scripting language > and some things that are easy in bash are really, really hard in python ... Why not combine the two . -- h

Re: type-checking support in Python?

2008-10-12 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Steven D'Aprano wrote: > ... just for the record "dimensions" are not "units". Yeah, OK. "unit" = "dimensions" x "multiplier". Where "multiplier" can be arbitarily set to 1 for SI units. -- http://mail.python.org/mailman/listinfo/python-list

Re: type-checking support in Python?

2008-10-12 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Bas wrote: > What they taught me as a physics undergrad is to always convert random > units given as input to SI units as soon as possible, do all your > calculations internally in SI units and (only if really needed) > convert back to arbitrary units on output. If

Re: how to start thread by group?

2008-10-13 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Gabriel Genellina wrote: > En Tue, 07 Oct 2008 13:25:01 -0300, Terry Reedy <[EMAIL PROTECTED]> > escribió: > >> Lawrence D'Oliveiro wrote: >> >>> In message <[EMAIL PROTECTED]>, >>> Gabriel Genellina

Re: PIL on windows XP x64 (64-bit)?

2008-10-13 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Berco Beute wrote: > Has anybody here got PIL (the Image lib) working on Windows XP x64 (64- > bit)? There is no version available for that platform from > pythonware.com. Shouldn't your distro maintainers have it in their repositories? -- http://mail.python.org/ma

Re: documentation: what is "::="?

2008-10-14 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Peter Otten wrote: > ... you have probably executed > > from locale import * > > This has imported the locale.str() function that now shadows the builtin > str(). One of many reasons not to use wildcard imports. :) -- http://mail.python.org/mailman/listinfo/pytho

Re: type-checking support in Python?

2008-10-14 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Kay Schluehr wrote: > ... and I'm sad noticing that it is apparently abandonware. In Open Source, nothing is ever truly abandonware unless nobody cares about it any more. :) -- http://mail.python.org/mailman/listinfo/python-list

Re: documentation: what is "::="?

2008-10-14 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Anita Kean wrote: > I'm still curious about why isn't ["::="] documented ... It is . -- http://mail.python.org/mailman/listinfo/python-list

Re: Emacs users: feedback on diffs between python-mode.el and python.el?

2008-10-14 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > If you're an Emacs user who has used both python-mode.el (the python mode > code distributed with Python and XEmacs) and python.el (the python mode > code distributed with GNU Emacs), I'd like to get your impressions on how > they compare

Re: Question

2008-10-14 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Aditi Meher wrote: > How to write code to store data into buffer using python? Write following code: buffer = data -- http://mail.python.org/mailman/listinfo/python-list

Re: Can Python fix vcard files?

2008-10-14 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Paul Boddie wrote: > The vCard specification (RFC 2426 [1]) refers to RFC 2425 [2], which > says this in section 5.8.1: > > A logical line MAY be continued on the next physical line anywhere > between two characters by inserting a CRLF immediately followed by a

Re: problem using ctypes with MMX intrinsics

2008-10-14 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, dcharno wrote: > I can load the library and access functions inside it, but > I getting a seg fault when I hit one of the intrinsics. I assume that SIGSEGV indicates some (mis)alignment issue. If the instructions were not valid, you'd get SIGILL instead. -- http://

Re: Sending multi-part MIME package via HTTP-POST

2008-10-14 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > ... but I'm getting a very vague server error message ... Which is? -- http://mail.python.org/mailman/listinfo/python-list

Ooo 3.0 Python user macros

2008-10-15 Thread Lawrence D'Oliveiro
Has anyone been able to run user-defined Python macros in OpenOffice.org 3.0? I had one in ~/.ooo-2.0/user/Scripts/python/try.py which did work under Ooo2.x. So I put the same thing in ~/.ooo3/user/Scripts/python/, but it will not show up in any macro dialog in Ooo 3.0. The provided example macros

Re: Can Python fix vcard files?

2008-10-15 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Dotan Cohen wrote: > 2008/10/15 Lawrence D'Oliveiro <[EMAIL PROTECTED]>: >> >> What adds to the confusion is that quoted-printable has its own >> convention for soft-wrapping long lines, using an equals sign followed by >&g

Re: Python equivalent to SharePoint?

2008-10-15 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Paul Boddie wrote: > ... any absence of steep licensing costs isn't necessarily > an advantage in the consulting business since such stuff usually gets > passed onto the brand-obsessed customer. Sounds like you're talking about customers being bigger businesses, ra

Re: problem using ctypes with MMX intrinsics

2008-10-15 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Robert Kern wrote: > Try to check the addresses of the ctypes values you are passing in. I'm > not entirely sure how to do that, though. Cast the address to an integer and print it out? I think the data needs to be 16-byte-aligned, so in hex, the units digit of the

Re: default value in __init__

2008-10-15 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Steven D'Aprano wrote: > On Thu, 09 Oct 2008 01:39:30 -0700, kenneth (a.k.a. Paolo) wrote: > >> On Oct 9, 10:14 am, Christian Heimes <[EMAIL PROTECTED]> wrote: >> >>> No, it always contains the default argument because default values are >>> created just ONE TIME <

Re: Emacs users: feedback on diffs between python-mode.el and python.el?

2008-10-16 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, rustom wrote: > Reminds me of a funny story about one of our university profs. > At a time when we used DOS and unix (on terminals) he got a very high > end SGI workstation. > And promptly shouted at the sysads because he could not see his > C:> > prompt. The joke

Re: baffling memory usage

2008-10-17 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Tim Redfern wrote: > My python code runs nicely when launched manually from a login shell, ps > shows its using 11MB or so of memory. > > However, when I try to launch the same code from a startup script, it > uses over 22MB and the system grinds to a halt. Specifi

Re: Sending multi-part MIME package via HTTP-POST

2008-10-17 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > On Oct 15, 2:42 am, Lawrence D'Oliveiro <[EMAIL PROTECTED] > central.gen.new_zealand> wrote: > >> In message >> <[EMAIL PROTECTED]>, >> >> [EMAIL PROTECTED] wrote: >> > ...

Re: xor: how come so slow?

2008-10-17 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Michele wrote: > class Encoder(object): > def create_random_block(self, data, seed, blocksize): > number_of_blocks = int(len(data)/blocksize) > random.seed(seed) > random_block = ['0'] * blocksize > for index in range(number_of_bl

Re: docpicture

2008-10-17 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Pete Forman wrote: > Maybe someone would like to play with the data URL scheme (RFC 2397) > to meet the OP's desire to embed the image. AFAIK a downside is that > MS are only starting to support that in IE8. Firefox, Konqueror and Safari already support it. So it'

Re: Python equivalent to SharePoint?

2008-10-17 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Paul Boddie wrote: > On 15 Okt, 22:50, Lawrence D'Oliveiro <[EMAIL PROTECTED] > central.gen.new_zealand> wrote: > >> In message >> <[EMAIL PROTECTED]>, Paul >> Boddie wrote: >> >> > ... any absence of

Re: urllib accept-language doesn't have any effect

2008-10-17 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Martin Bachwerk wrote: > It does indeed give me a swedish version.. of www.google.de :) That's the > beauty about Google that they have all languages for all domains > available. > > However if I try it with www.gizmodo.com (a tech blog in several > languages) I s

Re: default value in __init__

2008-10-17 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Duncan Booth wrote: > We already get people asking why code like this doesn't return 3: > fns = [ lambda: x for x in range(10) ] fns[3]() > 9 > > ... making this change to default arguments would mean the > solution usually proposed to the function scopi

Re: xor: how come so slow?

2008-10-17 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Steven D'Aprano wrote: > On Fri, 17 Oct 2008 20:51:37 +1300, Lawrence D'Oliveiro wrote: > >> ... why do you say that xoring random data with other random data > produces less randomness than you started with? blocksize <= nu

Re: Ooo 3.0 Python user macros

2008-10-17 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Lawrence D'Oliveiro wrote: > The provided example macros seem to work: under the "Tools -> Macros -> > Organize Macros -> Python..." menu, there is an entry named > "OpenOffice.org Macros", and I can run the macros

Re: xor: how come so slow?

2008-10-17 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Sion Arrowsmith wrote: > Maybe it should be "fewer random data". Except these days we tend to think of "data" being, say, more like "flour" than "bees", so it's "less data", like "less flour", rather than like "fewer bees". :) > After all, each byte in the block i

Re: default value in __init__

2008-10-17 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Aaron "Castironpi" Brady wrote: > The purpose of a parameter is something that the caller can supply, but > doesn't have to. It is not for internal-use-only items. Exactly! -- http://mail.python.org/mailman/listinfo/python-list

Re: default value in __init__

2008-10-17 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Steven D'Aprano wrote: > On Fri, 17 Oct 2008 23:04:52 +1300, Lawrence D'Oliveiro wrote: > >> The right solution, of course, is >> >> fns = [(lambda x : lambda : x)(x) for x in range(10)] > > Only if by

Re: 'Hidden Features of Python'

2008-10-17 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Kurt Smith wrote: > For more fun with the Zen, see this thread: > > http://mail.python.org/pipermail/python-bugs-list/2008-July/055857.html For someone complaining about improperly-spaced punctuation, they can't spell "orthographical". :) -- Lawrence "Skitt's La

Re: Interface to Matlab

2008-10-17 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Daniel wrote: > Have you looked at > http://www.scipy.org/ > and http://matplotlib.sourceforge.net/ > > They do an awful lot of what matlab does. This one I think rolls them all up into a package that does even more. > Also, I think tha

Re: Python certification

2008-10-17 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Ben Finney wrote: > srinivasan srinivas <[EMAIL PROTECTED]> writes: > >> I m planning to do certification in Python?? > > Why the question marks? Are you asking us whether this is true? Perhaps he's one of those people who end sentences with a rising inflection?

Re: Convertimg a Sequence of Images to an AVI File

2008-10-17 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, W. eWatson wrote: > I'd like to simply take the large images out of the file and make an avi > file from them. What in Python will help me do that? Probably easier to just use FFmpeg from the command line. -- http://mail.python.org/mailman/listinfo/python-list

Re: Linux.com: Python 3 makes a big break

2008-10-18 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Aahz wrote: > (There's a significant amount of JavaScript, much of which is generated by > Python code.) Been there, done that. Triple backslashes, anybody? :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Linux.com: Python 3 makes a big break

2008-10-18 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Terry Reedy wrote: > "For instance, the print statement got turned into a print function ... " Except I never use print in scripts. -- http://mail.python.org/mailman/listinfo/python-list

Re: windows / unix path

2008-10-18 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Marcin201 wrote: > os.path.join('Pictures', '01.jpg') returns 'Pictures\\01..jpg' on > Win. When I read files created on Win under Unix this is a problem, > python cannot open 'Pictures\\01.jpg' But it can on Windows, right? os.path contains functions specific to

Re: IO error

2008-10-18 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Rajan Arora wrote: > I am trying to get the data out of an instrument through its GPIB port... > > When i try read() command it gives me an IO timeout error. What's the device name, device driver module name, do you have any sample or diagnostic code you can run t

Re: Linux.com: Python 3 makes a big break

2008-10-18 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Aahz wrote: > In article <[EMAIL PROTECTED]>, > Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote: > >>In message <[EMAIL PROTECTED]>, Terry >>Reedy wrote: >>> >>> "For instance, the print sta

Re: Porting VB apps to Python for Window / Linux use

2008-10-18 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Dotan Cohen wrote: > I often see mention of SMBs that either want to upgrade their Windows > installations, or move to Linux, but cannot because of inhouse VB > apps. Probably best to leave those legacy VB apps alone and develop new replacements in a more open, cro

Re: IO error

2008-10-18 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Rajan Arora wrote: > On Oct 18, 5:52 pm, Lawrence D'Oliveiro <[EMAIL PROTECTED] > central.gen.new_zealand> wrote: >> In message >> <[EMAIL PROTECTED]>, >> Rajan >> >> Arora wrote: >> > I am tr

Re: memory use with regard to large pickle files

2008-10-18 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Catherine Moroney wrote: > I'm writing a python program that reads in a very large > "pickled" file (consisting of one large dictionary and one > small one), and parses the results out to several binary and hdf > files. Job for a database? -- http://mail.python.org

Re: Kicking off a python script using Windows Scheduled Task

2008-10-18 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, korean_dave wrote: > Does anyone know how to properly kick off a script using Windows > Scheduled Task? The script calls other python modules within itself. > HERE'S THE CATCH: > I am used to running the script directly from the command window and > the print() is v

Re: xor: how come so slow?

2008-10-18 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Steven D'Aprano wrote: > On Sat, 18 Oct 2008 09:16:11 +1300, Lawrence D'Oliveiro wrote: > >> Data can come in fractional bits. That's how compression works. > > If you don't believe me, try compressing a single bit

Re: Linux.com: Python 3 makes a big break

2008-10-19 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Kay Schluehr wrote: > If someone had solved the hard problem of finding a less > cumbersome way of writing sys.stdout.write(...) ... I don't see what the big deal is. I regularly write things like sys.stdout.write \ ( "" "%(title)s

Re: Linux.com: Python 3 makes a big break

2008-10-19 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Dennis Lee Bieber wrote: > There is also the matter that the original material is using " on > each line to delimit the string, and then \" within the line to escape > the desired output "s, rather than either using ' for the string and > bare " for the output chara

Re: Linux.com: Python 3 makes a big break

2008-10-19 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Aahz wrote: > I'm strongly opposed to backslashes because they break when you get > whitespace after them. 1) I've never had that problem. 2) Even if I did, it would report a syntax error, it's not going to fail silently and introduce any run-time bugs, is it? -- h

Re: keyword in package name.

2008-10-19 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Abhishek Mishra wrote: > I have the habit of using domain names (of either the application or > company) in reverse in package names. > > for e.g. com.spam.app1 > > I've recently started a project for an indian domain (tld = .in), > which leads to a package name l

Re: keyword in package name.

2008-10-19 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Steve Holden wrote: > Though I do think it's an inappropriate choice for Python. I'd characterize it as a Javaism. It exemplifies the difference between the corporate, management-driven Java development model, versus the more freewheeling, informal Python one. Like

Re: xor: how come so slow?

2008-10-19 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Steven D'Aprano > wrote: > >> On Sat, 18 Oct 2008 09:16:11 +1300, Lawrence D'Oliveiro wrote: >> >>> Data can come in fractional bits. That

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-20 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Stef Mientki wrote: > I (again) wonder what's the perfect way to store, OS-independent, > filepaths ? URLs beginning file://. -- http://mail.python.org/mailman/listinfo/python-list

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-20 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Ross Ridge wrote: > However, the normal place to store settings on Windows is in the registry. Which becomes a single point of failure for the whole system. -- http://mail.python.org/mailman/listinfo/python-list

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-20 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Steven D'Aprano wrote: > Do you really think there are Linux or Mac systems with a C: drive? And what about files on Dimdows systems kept on a drive other than C? > This whole question is based on the ludicrous assumption that general > file system paths can be pl

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-20 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Steven D'Aprano wrote: > And 75% [1] of average Windows users will either delete the file, move it > to a more convenient[2] location, or edit the file name to remove the dot. Doesn't seem very likely to me. Experienced Dimdows users would well know that stuffing a

Re: Porting VB apps to Python for Window / Linux use

2008-10-20 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > Still has some things that I would dearly love in python... like "skinned" > gui applications. That's a function of the GUI toolkit, not of the language. Python doesn't make you use any GUI toolkit, nor does it prevent you from using any

Re: indentation

2008-10-20 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Gandalf wrote: > every time I switch editor all the script indentation get mixed up ... Mixed up in what way? Are you configuring your editors to do automatic space/tab conversion in inconsistent ways? -- http://mail.python.org/mailman/listinfo/python-list

Re: indentation

2008-10-20 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Steven D'Aprano wrote: > Here's Jamie Zawinski: > http://www.jwz.org/doc/tabs-vs-spaces.html > > "On defaultly-configured Unix systems, and on ancient dumb terminals and > teletypes, the tradition has been for the TAB character to mean ``move to > the right until t

Re: What was that, what was it?

2008-10-20 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Aaron Brady wrote: > If Python was a car, I think it would be a hybrid... I hope not. They're only good in the city, a waste of time once you get over 50 km/h. > Plus there's nothing about sarcasm in the Zen. That's why it's the Zen. :) -- http://mail.python.org

Triple-quoted strings hath not the Python-nature

2008-10-21 Thread Lawrence D'Oliveiro
If triple-quoted strings had the Python-nature, then they would take indentation into account. Thus: """this is a multi-line string.""" would be equivalent to "this\n is a\n multi-line\nstring." and not "this\n is a\n multi-line\nstring." The rule would b

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-21 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Ross Ridge wrote: > Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote: > >> Ross Ridge wrote: > >>> However, the normal place to store settings on Windows is in the >>> registry. > >> Which becomes a single po

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-22 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Ross Ridge wrote: > Ross Ridge wrote: > >> As opposed to the file system being the single point failure? > > Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote: >>The file system is involved regardless. But leaving out an a

Re: OS 10.5 build 64 bits

2008-10-23 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Robin Becker wrote: > Is there some magic I can try to make the OS 10.5 build as 64 bits? Bear in mind OS X isn't really 64-bit, it's still only a 32-bit kernel. -- http://mail.python.org/mailman/listinfo/python-list

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-24 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Steven D'Aprano wrote: > Putting preferences files in the user's top level directory is horribly > inconvenient for the user. There is a way around this: redefine the HOME environment variable to be the directory where you want the dotfiles to end up. -- http://mai

Re: from package import * without overwriting similarly named functions?

2008-10-24 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Reckoner wrote: > I have multiple packages that have many of the same function names. Is > it possible to do > > from package1 import * > from package2 import * > > without overwriting similarly named objects from package1 with > material in package2? Avoid wildc

Re: Question about scope

2008-10-24 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Steven D'Aprano wrote: > Why is it a class attribute instead of an instance attribute? Singleton class. -- http://mail.python.org/mailman/listinfo/python-list

Re: portable python

2008-10-24 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, asit wrote: > from socket import * I think I'd make it a policy not to help with any scripts that contain wildcard imports. > status={0:"open",10049:"address not available",10061:"closed", > 10060:"timeout",10056:"already connected",10035:"filtered",11001:"IP > no

Re: Triple-quoted strings hath not the Python-nature

2008-10-26 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Steven D'Aprano wrote: > I disagree. Triple-quoted strings are exactly the same as other strings: > they capture *exactly* what you put in them ... But that conflicts with the use of whitespace for indentation rules. Other languages are freeform, and have strings t

Re: Triple-quoted strings hath not the Python-nature

2008-10-26 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Robert Lehmann wrote: > I would feel greatly offended if I had to indent all *raw* data. You mean raw strings? -- http://mail.python.org/mailman/listinfo/python-list

Re: Interface to Matlab

2008-10-26 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Daniel wrote: > On Oct 17, 2:26 pm, Lawrence D'Oliveiro <[EMAIL PROTECTED] > central.gen.new_zealand> wrote: >> >> In message >> <[EMAIL PROTECTED]>, >> Daniel wrote: >> >>> Also, I think tha

Re: Porting VB apps to Python for Window / Linux use

2008-10-26 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Stef Mientki wrote: > ... although I realize closed source is not completely possibly in Python, > but that's no problem if the program is large/complex enough compared to > it's market value ;-) Software has no market value. Business models that try to assign it o

Re: mySQL problems

2008-10-31 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Alfons Nonell-Canals wrote: > _mysql_exceptions.OperationalError: (2003, "Can't connect to MySQL > server on 'HOST' (110)") Error 110 is ETIMEDOUT (Connection timed out). -- http://mail.python.org/mailman/listinfo/python-list

Re: Restricted Execution of untrusted code

2008-10-31 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Emanuele D'Arrigo wrote: > I noticed that this issue has been discussed in this newsgroup > periodically over the years and I seem to understand that - > comprehensive- safe/restricted execution of untrusted code in python I think the most reliable solution is to t

Re: open a shell prompt froma python program

2008-10-31 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, gaurav kashyap wrote: > konsole: cannot connect to X server Could be it's not being passed the right DISPLAY setting. Is this under the same username, so it's automatically using the right xauth settings? -- http://mail.python.org/mailman/listinfo/python-list

Re: v4l module

2008-10-31 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Carl K wrote: > I tried to use ctypes with ghostscript and failed. What is the connection with Ghostscript? > I have a feeling trying to use it with kernel modules would be even > harder ... You don't talk to kernel modules--that's the kernel's job. Surely you'd

Re: Exact match with regular expression

2008-10-31 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Rob Williscroft wrote: > Read (and bookmark) this: > > http://www.python.org/doc/2.5.2/lib/re-syntax.html Funny how you never get a thank-you when you tell people to RTFM. -- http://mail.python.org/mailman/listinfo/python-list

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