Re: Python's doc problems: sort

2008-06-02 Thread Martin Marcher
nted to test some intercommunication, I faked most of the user agent strings but still was locked out by popular pages. I then figured it would be much better to fetch a useless page a couple of times. Sorry for the lognoise... /martin -- http://www.xing.com/profile/Martin_Marcher You are not

Re: Books for learning how to write "big" programs

2008-06-06 Thread Bob Martin
in 69148 20080605 140635 [EMAIL PROTECTED] wrote: >On May 22, 12:49=A0pm, "Kurt Smith" <[EMAIL PROTECTED]> wrote: >> On Thu, May 22, 2008 at 10:55 AM, duli <[EMAIL PROTECTED]> wrote: >> > Hi: >> > I would like recommendations forbooks(in any language, not >> > necessarily C++, C, python) which have

Re: os.startfile() on a mac

2008-06-14 Thread martin . laloux
search, search for example http://groups.google.be/group/comp.lang.python/browse_thread/thread/bddbb6861bf5b084/af7070e5b3971d53?hl=fr&lnk=gst&q=os.startfile+unix#af7070e5b3971d53 -- http://mail.python.org/mailman/listinfo/python-list

Re: Does '!=' equivelent to 'is not'

2008-06-17 Thread Derek Martin
. They are not the same, but they are similar. Saying a flat "no" alone, without qualifying your statement is generally interpreted as rude in English... It's kind of like how you talk to children when they're too young to understand the explanation. Yucky. -- Derek D. Martin

Re: Does '!=' equivelent to 'is not'

2008-06-18 Thread Derek Martin
onkers, I admit). I am somewhat incredulous that this required explanation... In the end what I thought would be a nice little, "hey, avoid this pot hole" kind of note seems to mostly have generated a lot of silly noise. I now retire from this discussion, and crawl back into my happy lurk-spot. :) Cheers -- Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0x81CFE75D pgpCV8qGT1EYK.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Wrap Numpy with Cython?

2008-06-24 Thread martin . nordstrom87
with Cython but I've failed. Does anyone have an example of how to do this? Thanks! Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Why is there no GUI-tools like this for Windows?

2008-07-14 Thread Martin Walsh
maestro wrote: > I can just do the layout with my mouse and then there is a program > that writes the code for me. > GUI-programming is hard for no reason. One good program then forever > easy... > > Is there not something like this for Python/Windows? Is the Linux one > only for ruby or for any l

Re: Using Python To Launch Python

2008-07-14 Thread Derek Martin
typing in bourne/bash shell, I guess... -- Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0x81CFE75D pgplmkg6rt2dJ.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Using Python To Launch Python

2008-07-14 Thread Derek Martin
On Mon, Jul 14, 2008 at 05:40:43PM -0400, Aquil H. Abdullah wrote: > You've hit the proverbial nail with the hammer. The problem is that my > application needs to run under both the Linux and Windows OSs, so while I > would love to use a nice sh, csh, or bash shell script. My hands are tied > beca

Using Tcl extensions with Python?

2008-07-17 Thread C Martin
How do you setup a Tcl extension to be accessible through Python? I understand that I'll have to use native Tcl calls to use it (tk.call() etc), but I can't figure out where to put the files or how to initialize them so I can call them. The package I would like to use is TkPNG: http://www.muonics

Re: Using Tcl extensions with Python?

2008-07-18 Thread C Martin
On Jul 17, 5:18 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: [snip] > And.. for tkpng specifically, you won't need tk.call to use it, you > just need to create your images using Tkinter.PhotoImage with a "png" > type. Thank you Guilherme, that's all great info. > Thomas Troeger <[EMAIL PROTECT

Re: Multiple variable control in for loops. Doable in Python?

2008-07-18 Thread Derek Martin
ty much guaranteed to provide a way to do what you're trying to do. You just need to stop thinking about your problem in terms of a particular syntactic element, and start thinking about it in more general terms of what you are actually trying to accomplish, and apply whatever sy

Re: Multiple variable control in for loops. Doable in Python?

2008-07-18 Thread Derek Martin
On Fri, Jul 18, 2008 at 05:28:32PM -0400, Derek Martin wrote: > def control(i, j): > print i,j > if not (i < 5 or j < 10): Rather, if not (i < 5 and j < 10): > return > else: > control(some_increment_function(i), other_incre

Re: Change PC to Win or Windows

2008-07-18 Thread Derek Martin
uot;bank" (and numerous others), the term "PC" has come to have several meanings, one of which is the above. You may not like it, but we're pretty much stuck with the term, so you may as well get used to it. -- Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0x81CFE75D

Re: Change PC to Win or Windows

2008-07-21 Thread Derek Martin
On Fri, Jul 18, 2008 at 10:34:41PM -0700, Dennis Lee Bieber wrote: > On Fri, 18 Jul 2008 19:14:43 -0400, Derek Martin <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > > On Fri, Jul 18, 2008 at 03:46:13PM -0700, Joel Teichroeb wrote: > > >

Re: Change PC to Win or Windows

2008-07-21 Thread Derek Martin
On Sat, Jul 19, 2008 at 02:56:07AM -0700, Lie wrote: > On Jul 19, 6:14 am, Derek Martin <[EMAIL PROTECTED]> wrote: > > On Fri, Jul 18, 2008 at 03:46:13PM -0700, Joel Teichroeb wrote: > > Much like the English word "bank" (and numerous others), the term "PC&qu

Re: Change PC to Win or Windows

2008-07-21 Thread Derek Martin
your whining and get used to the idea that THE REST OF THE WORLD uses PC to mean a Windows box. -- Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0x81CFE75D pgpWskQ7X4hnX.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Change PC to Win or Windows

2008-07-21 Thread Derek Martin
ign mentioning PCs is less than 10 years old (though I can't quickly find any references as to the date). The popularization of the term PC to refer to Intel-compatible machines running Microsoft OSes PREDATES APPLE'S AD CAMPAIGN BY OVER 10 YEARS. Therefore none of your points are val

Re: Change PC to Win or Windows

2008-07-22 Thread Derek Martin
t sell PCs. Apple's personal computer is NOT a PC, and never was, and never will be. It's an Apple. -- Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0x81CFE75D pgpM3T8xzDRmR.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: The Importance of Terminology's Quality

2008-07-22 Thread Martin Gregorie
not have a mechanism for declaring anonymous procedures. That, like the incorporation of machine code inserts, would have been a compiler-specific extension, so it is a terminological mistake to refer to it without specifying the implementing compiler. -- martin@ | Martin Gregorie gregorie. | org | Zappa fan & glider pilot -- http://mail.python.org/mailman/listinfo/python-list

Re: interpreter vs. compiled

2008-07-25 Thread Bob Martin
in 75186 20080725 050433 Tim Roberts <[EMAIL PROTECTED]> wrote: >castironpi <[EMAIL PROTECTED]> wrote: >> >>Compiling a program is different than running it. A JIT compiler is a >>kind of compiler and it makes a compilation step. I am saying that >>Python is not a compiler and in order to impleme

Re: Attack a sacred Python Cow

2008-07-27 Thread Derek Martin
aningful names, with fairly obvious and well-understood exceptions. -- Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0x81CFE75D pgpEV6qhBweow.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Attack a sacred Python Cow

2008-07-27 Thread Derek Martin
def __init__(): @.increment = 2 def bar(a) return a + @.increment I'm sure all the Pythonistas will hate this idea though... ;-) To be honest, it smacks a little of Perl's magic variables, which I actually hate with a passion. This is the only p

Re: Attack a sacred Python Cow

2008-07-27 Thread Derek Martin
o see what was used. It's bad programming, but the world is full of bad programmers, and we don't always have the choice not to use their code. Isn't one of Python's goals to minimize opportunities for bad programming? Providing a keyword equivalent to self and removing

Re: Attack a sacred Python Cow

2008-07-27 Thread Derek Martin
wo good reason to keep it the way it is, >which are simplicity (no special case) and consistency (no special >case). Clearly a lot of people find that it is less simple TO USE. The point of computers is to make hard things easier... if there is a task that is annoying, or tedious, o

Tkinter fullscreen with Mac OS X

2008-07-28 Thread C Martin
Is there a way to create a full screen app using Tkinter with Mac OS X?? On windows, this is relatively easy with overrideredirect(1). However, on the Mac, the top menu bar and dock are still displayed over the app. Is there a way to get rid of them? Thanks. -- http://mail.python.org/mailman/listi

Re: interpreter vs. compiled

2008-07-31 Thread Bob Martin
in 76135 20080731 090911 Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: >On Thu, 31 Jul 2008 06:17:59 GMT, Tim Roberts <[EMAIL PROTECTED]> declaimed >the following in comp.lang.python: > > >> And again, I never said that it did. CPython is an interpreter. the >> user's code is never translated into

Terminology (Re: Strong/weak typing)

2008-08-02 Thread Derek Martin
he philosophy behind its design. THIS DOES NOT RENDER WRONG OTHER TERMS OR USAGES. It merely augments the already rich natural language we have to describe what we do. -- Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0x81CFE75D pgpdANC3vBRJ5.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Change PC to Win or Windows

2008-08-02 Thread Derek Martin
Apple started using it that way. And it does not change the fact that you (and others like you) are being stubborn by refusing to accept that simple truth. If you're unable to see that by now, I don't imagine there's anything I can do to help you, so I give up trying to convince you. [...and there was much rejoicing.] -- Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0x81CFE75D pgpjvVEriGABi.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: pyspread 0.0.8

2008-08-03 Thread Martin Manns
I tried). (Hint: pyspread does *not* protect your system in any special way. So if you write a system command to delete all files and have sufficient rights to do this, the files will be deleted.) Please let me know, which OS you are using (Unix/Linux, MacOS, Windows or something else). Best Regards Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter fullscreen with Mac OS X

2008-08-06 Thread C Martin
On Jul 28, 6:43 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: > > You could try this, supposing tl is a toplevel: > > tl.tk.call("::tk::unsupported::MacWindowStyle", "style", tl._w, "plain", > "none") > I tried this (although, my tl is actually a tk instance): self.tk.call("::tk::unsupported::

Howto: single line webserver

2008-08-07 Thread Martin Bless
what I could do with CGIHTTPServer.py until I recently found out. If you're interested you can find a little howto here: http://mbless.blogspot.com/2008/08/one-line-webserver.html Enjoy! Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: sending to an xterm

2008-08-08 Thread Derek Martin
e. Instead of just running xterm, you can run "xterm -e 'cmd foo bar'" where cmd is the program to run and foo and bar are its arguments. The problem is that as soon as the program exits, xterm will exit also. -- Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0x81CFE75

Re: Why prefer != over <> for Python 3.0?

2008-04-02 Thread Bob Martin
in 340625 20080402 094139 "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote: >John J. Lee wrote: > >>How did programmers manage back then in 32k? > >Some of the answers, in no particular sequence, are: > >Tight, small operating systems that did the minimum. Apart from the GUI stuff, mainframe operati

plpythonu+postgrs anybody using it?

2008-04-02 Thread Martin Marcher
Hello, I just started on working with a postgres project, the DB looks really bad and isn't normalized in any way... 4k Text messages representing a whole protocol which need to be transformed. Somehow it just doesn't seem right to put this stuff directly in the database and creating a bunch of st

Re: Manipulate Large Binary Files

2008-04-02 Thread Derek Martin
should at least illustrate the idea): # read a meg at a time buffsize = 1048576 while true: buff = INPUT.read(buffsize) OUTPUT.write(buff) if len(buff) != buffsize: break -- Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0x81CFE75D pgp80hee5vxgO.pgp

Re: Manipulate Large Binary Files

2008-04-02 Thread Derek Martin
read/write buff increase speed? No... -- Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0x81CFE75D pgpbuOCRibbkY.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Manipulate Large Binary Files

2008-04-03 Thread Derek Martin
have to read the data before you can write it... -- Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0x81CFE75D pgpGZVie2qSt5.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Best way to check if string is an integer?

2008-04-08 Thread Martin Marcher
w int() would understand that and wanted to show that case as ease of use, I was wrong, so how do you actually cast this type of input to an integer? thanks martin -- http://tumblr.marcher.name https://twitter.com/MartinMarcher http://www.xing.com/profile/Martin_Marcher http://www.linkedin.com

Re: Best way to check if string is an integer?

2008-04-08 Thread Martin Marcher
arg, as posted earlier: int("10.0") fails, it will of course work with float("1E+1") sorry for the noise... On Tue, Apr 8, 2008 at 10:32 PM, Martin Marcher <[EMAIL PROTECTED]> wrote: > hmmm > > int() does miss some stuff: > > >>> 1E+1 > 1

Re: Java or C++?

2008-04-14 Thread Bob Martin
in 342367 20080414 074410 [EMAIL PROTECTED] wrote: >Hello, I was hoping to get some opinions on a subject. I've been >programming Python for almost two years now. Recently I learned Perl, >but frankly I'm not very comfortable with it. Now I want to move on >two either Java or C++, but I'm not sure

Re: How to get the version of a file

2008-04-14 Thread martin . laloux
you need appscript "that allows you to control scriptable Mac OS X applications from Python" http://pypi.python.org/pypi/appscript/0.18.1 -- http://mail.python.org/mailman/listinfo/python-list

Re: Java or C++?

2008-04-15 Thread Bob Martin
in 342436 20080414 160208 =?UTF-8?B?R3J6ZWdvcnogU8WCb2Rrb3dpY3o=?= <[EMAIL PROTECTED]> wrote: >> Hello, I was hoping to get some opinions on a subject. I've been >> programming Python for almost two years now. Recently I learned Perl, >> but frankly I'm not very comfortable with it. Now I want to

Re: Python crashes consistently

2008-04-16 Thread martin . laloux
which python ? from macports or macpython ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python crashes consistently

2008-04-16 Thread martin . laloux
I agree, use the official python http://www.python.org/ftp/python/2.5.2/python-2.5.2-macosx.dmg I'm also using OS X 10.4.11 and I have no problem for installing numpy http://www.scipy.org/Installing_SciPy/Mac_OS_X or you can download Pre-built binaries from http://pythonmac.org/packages/py25-fat/

codec for html/xml entities!?

2008-04-18 Thread Martin Bless
= 1 totalProblems += cntProblems of.close() print print "Summary:" print " Infile : %s" % (infile,) print " Outfile: %s" % (outfile,) print ' %8d %s %s' % (totalLines, ['lines','line'][totalLines==1], 'written.') print ' %8d %s %s' % (totalProblems, ['entities','entity'][totalProblems==1], 'left unconverted.') print '%s' % ('Done.',) Have a nice day and ru, Martin (read you, ;-) -- http://mail.python.org/mailman/listinfo/python-list

ANN: pyspread 0.0.1

2008-04-18 Thread Martin Manns
into grid cell + Numpy object array for representation of eval function array + Cell access via slicing of numpy function array + X, Y, and Z yield current cell location for relative reference Requires: Python 2.5, Numpy 1.0.4, and wxPython 2.8.7.1. License: GPL Best Regards Martin Manns -- mmanns

Re: ANN: pyspread 0.0.1

2008-04-19 Thread Martin Manns
On Fri, 18 Apr 2008 04:46:38 +0200 Martin Manns <[EMAIL PROTECTED]> wrote: > pyspread 0.0.1 is now available at: > http://pyspread.sourceforge.net Hi, I updated to version 0.0.2 that fixes the tarballs and zip files. Any information about the package working on different

Re: installing MySQLdb module

2008-04-20 Thread martin . laloux
search, search, search http://groups.google.be/group/comp.lang.python/browse_thread/thread/d75a491b8dbc3880/7d4f8eea29e23992?hl=fr&lnk=gst&q=MySQLdb+mac#7d4f8eea29e23992 -- http://mail.python.org/mailman/listinfo/python-list

Re: codec for html/xml entities!?

2008-04-20 Thread Martin Bless
[Stefan Behnel] wrote & schrieb: >Martin Bless wrote: >> What's a good way to encode and decode those entities like € or >> € ? > >Hmm, since you provide code, I'm not quite sure what your actual question is. - What's a GOOD way? - Am I reinventing the whe

Re: Unix Device File Emulation

2008-04-23 Thread Martin Blume
ny ideas? This is OS X 10.4 > while 1: r = self.fifodev.readline() if r: print r According to my docs, readline() returns an empty string at the end of the file. Also, you might want to sleep() between reads a little bit. IMHO. HTH. Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Unix Device File Emulation

2008-04-23 Thread Martin Blume
gt; little bit. > > > > Oh ok, that makes sense. Hmm. So do I not want to use > readline()? Or is there a way to do something like > 'block until the file is not empty'? > No, while 1: r = self.fifodev.readline() if r: print r else: time.sl

Re: RE: Lucky gay sucking cock while butt fucked deep

2008-04-24 Thread Bob Martin
in 344018 20080422 231351 "Blubaugh, David A." <[EMAIL PROTECTED]> wrote: >Is there a way to block these messages. I do not want to be caught >with filth such as this material. I could lose my job with Belcan with >evil messages such as these messages. =20 So don't repeat them! -- http://mail

ANN: pyspread 0.0.4

2008-04-27 Thread Martin Manns
Hi, The newest version pyspread 0.0.4 now runs on + GTK + Windows + Mac (not tested myself but got positive reports) New features in 0.0.4: + Column, line and table insertion and deletion + Themeable toolbar Feedback is very welcome! Best Regards Martin -- http://mail.python.org/mailman

Re: ANN: pyspread 0.0.4

2008-04-28 Thread Martin Manns
On Sun, 27 Apr 2008 05:21:56 +0200 Martin Manns <[EMAIL PROTECTED]> wrote: > The newest version pyspread 0.0.4 now runs on > + GTK > + Windows > + Mac (not tested myself but got positive reports) > > New features in 0.0.4: > + Column, line and table insertion and del

Re: RegEx for matching brackets

2008-05-02 Thread Derek Martin
s a test } missing close } BAD: -> FAILED Testing { a test ] this { a test } is a test } missing close [ BAD: -> FAILED Testing a test } { this { a test } is a test } BAD: -> FAILED Testing { a test } this { a test } is a test } BAD: -> FAILED In all cases, this code correctly identifies when the brackets are out of order, or unbalanced. -- Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0x81CFE75D pgp2N52u418cU.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: The Importance of Terminology's Quality

2008-08-17 Thread Martin Gregorie
at >> that time -- but for general programming it was sheer horror. > > But the easiest machine language /ever/. What? Even easier than ICL 1900 PLAN or MC68000 assembler? That would be difficult to achieve. -- martin@ | Martin Gregorie gregorie. | Essex, UK org | -- http://mail.python.org/mailman/listinfo/python-list

Re: The Importance of Terminology's Quality

2008-08-18 Thread Martin Gregorie
the assembler > again. (SPS, the non-macro basic assembler, ran at about 70 lines a > minute, tops.) > Even a steam powered 1901 (3.6 uS for a half-word add IIRC) running a tape based assembler was faster than that. It could just about keep up with a 300 cpm card reader. -- martin@ | M

Re: python custom command interpreter?

2008-08-20 Thread Derek Martin
, parse them to make sure the syntax is right, and then execute the equivalent code in Python. -- Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0x81CFE75D pgpZSb18bJrz2.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Negative integers

2008-08-20 Thread Derek Martin
a == 0 or b == 0: return True return (abs(a) == a) == (abs(b) == b) The first version *almost* works for the duplicitous zero: >>> sign(-0, 1) True >>> sign(0, 1) True >>> sign(0, -1) False Close, but no cigar. -- Derek D. Martin http://www.pizzashack.org/

Re: python custom command interpreter?

2008-08-21 Thread Derek Martin
On Thu, Aug 21, 2008 at 05:17:41AM +, Marc 'BlackJack' Rintsch wrote: > On Wed, 20 Aug 2008 18:46:42 -0400, Derek Martin wrote: > > > How so? What could be easier than "rm -rf directory"? > > C:\>rm -rf directory Yeah, except the application spe

Re: The Importance of Terminology's Quality

2008-08-21 Thread Martin Gregorie
t a boot ROM became > available for the PDP-11 (as an expensive option!) -and only much later > still for the PDP-8 series (e.g., the MI8E for the PDP-8/E). > > - > Rob Warnock <[EMAIL PROTECTED]> > 627 26th Avenue http://rpw3.org/> S

Re: Having trouble with tail -f standard input

2008-08-21 Thread Derek Martin
l to see how it does what it does. But, if I were you, I'd just download something like swatch, and be done with it. :) -- Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0x81CFE75D pgpgsg6JnEM88.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: programming toolbox

2008-08-22 Thread Derek Martin
you are... If you only want to learn to program to solve your own problems, then it doesn't really matter. The only reason to learn additional languages is if you find a case where what you've learned doesn't solve your problem, or the solution is a lot harder than it should be.

Re: The Importance of Terminology's Quality

2008-08-22 Thread Martin Gregorie
3 clock cycles per instruction. Motorola 6800 and 6809 (no microcode or pipelines either, 1 byte fetch) average 4 - 5 cycles/instruction. -- martin@ | Martin Gregorie gregorie. | Essex, UK org | -- http://mail.python.org/mailman/listinfo/python-list

Re: The Importance of Terminology's Quality

2008-08-23 Thread Martin Gregorie
On Sat, 23 Aug 2008 00:06:28 -0400, John W Kennedy wrote: > Martin Gregorie wrote: >> Not necessarily. An awful lot of CPU cycles were used before microcode >> was introduced. Mainframes and minis designed before about 1970 didn't >> use or need it > > No, most

Re: The Importance of Terminology's Quality

2008-08-24 Thread Martin Gregorie
On Sat, 23 Aug 2008 21:22:05 -0400, John W Kennedy wrote: > Martin Gregorie wrote: >> On Sat, 23 Aug 2008 00:06:28 -0400, John W Kennedy wrote: >> >>> Martin Gregorie wrote: >>>> Not necessarily. An awful lot of CPU cycles were used before >>>>

ANN: pyspread 0.0.9

2008-08-25 Thread Martin Manns
thon >=2.8.7.1. License: GPL Project page: http://pyspread.sourceforge.net Enjoy Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Are dictionaries the same as hashtables?

2008-08-26 Thread Martin Marcher
On 2008-08-26 00:32:20, cnb wrote: > Are dictionaries the same as hashtables? Yes, but there is nothing in there that does sane collision handling like making a list instead of simply overwriting. PS: your sig was *a bit* longer than you question. please don't do that... signature.asc Descripti

Re: [ctypes-users] ctypes - loading 'librsvg-2-2.dll'

2008-08-26 Thread Martin (gzlist)
Doing this worked for me: C:\>set PATH=C:\Program Files\Common Files\GTK\2.0\bin C:\>"C:\Python24\python.exe" -c "import ctypes; print ctypes.CDLL('librsvg-2-2')" Change the paths to your equivalents and try it, see if you have the same or a similar dependency problem. Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Setting my Locale

2008-08-27 Thread Derek Martin
ocale -a -- Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0x81CFE75D pgpWZRSPsSXRy.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: How to delete a last character from a string

2008-08-29 Thread Derek Martin
On Fri, Aug 29, 2008 at 07:28:40PM +0100, [EMAIL PROTECTED] wrote: > dirListFinal = [] > for item in dirList: >print item >if item.endswith('\\') == True: if item[-1] == '\\': -- Derek D. Martin http://www.pizzas

Re: How to delete a last character from a string

2008-08-29 Thread Derek Martin
On Fri, Aug 29, 2008 at 07:37:50PM +, Steven D'Aprano wrote: > On Fri, 29 Aug 2008 14:46:53 -0400, Derek Martin wrote: > > > On Fri, Aug 29, 2008 at 07:28:40PM +0100, [EMAIL PROTECTED] wrote: > >> dirListFinal = [] > >> for item in dirList: > >&

python extension dynamic linking

2008-09-01 Thread Martin Landa
y pointers... Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: The Importance of Terminology's Quality

2008-09-01 Thread Martin Gregorie
witch.html What you're talking is a flat handle on a SPST or DPST toggle switch. It is often called a paddle switch and mounted with the flats on the handle horizontal. Like this, but often with a longer handle: http://www.pixmania.co.uk/uk/uk/1382717/art/radioshack/spdt-panel-mount- pa

Re: Processes in Linux from Python

2008-09-01 Thread Derek Martin
think you miss a > > grep -v grep Indeed not. The brackets around the 'h' (which make it a character class, or range if you prefer) prevent the regex from matching itself. -- Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0x81CFE75D pgpsslNfAlrcv.pgp Descriptio

Re: The Importance of Terminology's Quality

2008-09-02 Thread Martin Gregorie
t; flipping them they would feel like they were cutting into your fingers. > That sounds like a sub-minature SPDT toggle switch with a normal handle. Cheap as chips, which is probably why they were used on that front panel. Like this by any chance? http://www.maplin.co.uk/images/300/

Re: Inquiry regarding the name of subprocess.Popen class

2008-09-02 Thread Derek Martin
s/provides. As such, "Popen" is a better name to describe this object than "subprocess" would be. -- Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0x81CFE75D pgpR91MGDIrTx.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Inquiry regarding the name of subprocess.Popen class

2008-09-02 Thread Derek Martin
p.com/en/B9106-90010/popen.3S.html http://www.faqs.org/docs/artu/ch07s02.html The Linux man page unfortunately copies (verbatim) the FreeBSD man page, which gets it wrong. You can not open a process, but you can definitely open a pipe. -- Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0x81CFE75D pgpmN360qDTwf.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Inquiry regarding the name of subprocess.Popen class

2008-09-02 Thread Derek Martin
folks felt the need to quote "open", indicating that clearly they knew that no process is being "opened" by the function call. You start processes, you don't open them. This should have been a clue to the BSD manual page writer that they had the sense wrong; it's ver

Re: Inquiry regarding the name of subprocess.Popen class

2008-09-02 Thread Derek Martin
on, but it is only that: an opinion. Yet some of you state your case as if it is incontrovertable fact. I've given a good case as to why it IS a good name (one which I genuinely support), and disagree as you may, none of the points any of you have made invalidate or even wea

Re: Inquiry regarding the name of subprocess.Popen class

2008-09-02 Thread Derek Martin
On Tue, Sep 02, 2008 at 10:55:54PM +, Marc 'BlackJack' Rintsch wrote: > On Tue, 02 Sep 2008 18:15:07 -0400, Derek Martin wrote: > > >> Classes represent "things", and class names should be nouns. > > > > Is that a law? > > It's a com

Re: Inquiry regarding the name of subprocess.Popen class

2008-09-02 Thread Derek Martin
On Wed, Sep 03, 2008 at 12:20:18AM -0400, Miles wrote: > Derek Martin wrote: > > On Tue, Sep 02, 2008 at 10:55:54PM +, Marc 'BlackJack' Rintsch wrote: > >> but the instances of `Popen` are no actions. There's no way to > >> "execute" a `Pop

Re: Inquiry regarding the name of subprocess.Popen class

2008-09-02 Thread Derek Martin
On Wed, Sep 03, 2008 at 12:20:18AM -0400, Miles wrote: > Derek Martin wrote: > > On Tue, Sep 02, 2008 at 10:55:54PM +, Marc 'BlackJack' Rintsch wrote: > >> but the instances of `Popen` are no actions. There's no way to > >> "execute" a `Pop

Re: Inquiry regarding the name of subprocess.Popen class

2008-09-03 Thread Derek Martin
On Wed, Sep 03, 2008 at 06:40:10AM +, Marc 'BlackJack' Rintsch wrote: > On Tue, 02 Sep 2008 19:54:12 -0400, Derek Martin wrote: > > >> And if they model an action there must be some way to activate the > >> action > > > > That's a reasonab

Re: Inquiry regarding the name of subprocess.Popen class

2008-09-03 Thread Derek Martin
On Wed, Sep 03, 2008 at 03:16:00PM -0700, Dennis Lee Bieber wrote: > On Wed, 3 Sep 2008 03:09:18 -0400, Derek Martin <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > > > > struct run { > > int speed; > > direction_type di

Not fully understanding the role of Queue.task_done()

2008-09-04 Thread Martin DeMello
? The python docs for the Queue module were a bit light. martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Not fully understanding the role of Queue.task_done()

2008-09-04 Thread Martin DeMello
a list? Or do I just call get() repeatedly and catch the exception when it's done? martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Not fully understanding the role of Queue.task_done()

2008-09-04 Thread Martin DeMello
.get_all() was. Your code should work nicely for that. martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Not fully understanding the role of Queue.task_done()

2008-09-04 Thread Martin DeMello
On Sep 4, 1:51 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Martin DeMello wrote: > > I'm writing a cluster monitor, that collects information from a set of > > machines and logs it to a database > > > In the interests of not hammering the db unnecessarily

Re: Python Linear Programming on Ubuntu

2008-09-17 Thread Martin Manns
On Tue, 16 Sep 2008 19:25:58 -0700 (PDT) Fett <[EMAIL PROTECTED]> wrote: > # SciPy -- http://www.scipy.org - supposedly has this, but as I said, > I can't find any mention of it anywhere but on the site you linked. I found OpenOpt on the site: http://scipy.org/scipy/scikits/wiki/MILP I downloade

Re: Milenko Kindl rtegdgd

2008-09-21 Thread Martin Griffith
e like Snobol or RPG/2 It's better to say "that's not C, is it" I don't know why, but that's the way it works. martin -- http://mail.python.org/mailman/listinfo/python-list

test list post

2008-09-26 Thread Derek Martin
Sorry for the noise, my recent posts seem to have been eaten by the list management software, as far as I can tell. Just testing if that's still the case. -- Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0x81CFE75D pgp611hi0GmSx.pgp Description: PGP signature --

Re: Test if list contains another list

2008-09-26 Thread Derek Martin
[0] >>> find_needle_in_haystack([1,2,3], ["a","b",1,2,3,"9"]) >>> [2] >>> find_needle_in_haystack([1,2,3], ["a","b",1,2,3,"9","q",1,2,3]) >>> [2, 7] -- Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0x81CFE75D pgpNKYFN6mu45.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Test if list contains another list

2008-09-28 Thread Derek Martin
ou optimized, I think you're better off leaving the optimizations out, for the sake of code clarity. At the very least, if you're going to write complicated optimizations, you ought to have explained what you were doing in comments... :) -- Derek D. Martin http://www.pizzashack.org/ GPG

Re: Test if list contains another list

2008-09-29 Thread Derek Martin
On Mon, Sep 29, 2008 at 04:12:13AM -0700, [EMAIL PROTECTED] wrote: > Derek Martin: > >Unless you're doing lots and lots of these in your application,< > > I don't agree. That's library code, so it has to be efficient and > flexible, because it's designed

Re: OS.SYSTEM ERROR !!!

2008-09-30 Thread Martin Walsh
Blubaugh, David A. wrote: > To All, > > I have been attempting to execute the following program within the > Python environment: > > However, when I would try to execute the following lines of source code > within a python script file: > > import os > > os.system(r"C:\myprogramfolder\run\Mypr

Tuple parameter unpacking in 3.x

2008-10-02 Thread Martin Geisler
bove, and for me this language feature is a big plus since it makes the code more readable. -- Martin Geisler VIFF (Virtual Ideal Functionality Framework) brings easy and efficient SMPC (Secure Multi-Party Computation) to Python. See: http://viff.dk/. pgp2apNYlyOtF.pgp Description: PGP signa

Re: Tuple parameter unpacking in 3.x

2008-10-04 Thread Martin Geisler
I realize that defining bar as an inner function has the advantage of being able to see variables in the namespace of foo. -- Martin Geisler VIFF (Virtual Ideal Functionality Framework) brings easy and efficient SMPC (Secure Multi-Party Computation) to Python. See: http://viff.dk/. pgp8h0HQCkWkD.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Tuple parameter unpacking in 3.x

2008-10-04 Thread Martin Geisler
g the PEP-3113 I got the impression that the author thought that this feature was unused and didn't matter. With this I wish to say that it matters to me. -- Martin Geisler VIFF (Virtual Ideal Functionality Framework) brings easy and efficient SMPC (Secure Multi-Party Computation) to Pytho

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