Re: FInd files with .so extension

2007-05-02 Thread pradeep nair
On May 3, 11:27 am, kaens <[EMAIL PROTECTED]> wrote: > do YOU mean hit "reply to all" not "reply?" > > On 5/3/07, kaens <[EMAIL PROTECTED]> wrote: > > > do you mean > > filelst.append(i)? > > > On 5/3/07, rishi pathak <[EMAIL PROTECTED]> wrote: > > > May be this would work > > > import os > > > g

Re: Python un-plugging the Interpreter

2007-05-02 Thread Hendrik van Rooyen
"Jorgen Grahn" <[EMAIL PROTECTED]> wrote: > On Wed, 25 Apr 2007 08:05:01 +0200, Hendrik van Rooyen <[EMAIL PROTECTED]> wrote: > > "Jorgen Grahn" <[EMAIL PROTECTED]> wrote: > ... > >> I doubt it. (But I admit that I am a bit negative towards thread > >> programming in general, and I have whined ab

Re: FInd files with .so extension

2007-05-02 Thread kaens
do YOU mean hit "reply to all" not "reply?" On 5/3/07, kaens <[EMAIL PROTECTED]> wrote: > do you mean > filelst.append(i)? > > On 5/3/07, rishi pathak <[EMAIL PROTECTED]> wrote: > > May be this would work > > import os > > grep="so" > > dir="." > > lst = os.listdir(dir) > > filelst=[] > > fo

Re: Firefighters at the site of WTC7 "Move away the building is going to blow up, get back the building is going to blow up."

2007-05-02 Thread Eric Gisse
On May 2, 10:14 pm, malibu <[EMAIL PROTECTED]> wrote: > On May 2, 9:46 pm, Eric Gisse <[EMAIL PROTECTED]> wrote: > > > On May 2, 7:10 pm, Midex <[EMAIL PROTECTED]> wrote: > > > [...] > > > I guess the explanation that people were looking at the building and > > watching its' structure deform is too

Re: Firefighters at the site of WTC7 "Move away the building is going to blow up, get back the building is going to blow up."

2007-05-02 Thread malibu
On May 2, 9:46 pm, Eric Gisse <[EMAIL PROTECTED]> wrote: > On May 2, 7:10 pm, Midex <[EMAIL PROTECTED]> wrote: > > [...] > > I guess the explanation that people were looking at the building and > watching its' structure deform is too rational. Also, that was a Larry Silverstein impostor who said t

Re: FInd files with .so extension

2007-05-02 Thread rishi pathak
May be this would work import os grep="so" dir="." lst = os.listdir(dir) filelst=[] for i in lst: if i.split(".")[len(i.split("."))-1] == grep: lst.append(i) print lst On 2 May 2007 21:58:41 -0700, pradeep nair <[EMAIL PROTECTED]> wrote: HI, How do i find files with .so ex

Re: Microsoft's Dynamic Languages Runtime (DLR)

2007-05-02 Thread Pascal Costanza
Fuzzyman wrote: > On May 2, 8:20 pm, Pascal Costanza <[EMAIL PROTECTED]> wrote: >> sturlamolden wrote: >>> On Monday Microsoft announced a new runtime for dynamic languages, >>> which they call "DLR". It sits on top of the conventional .NET runtime >>> (CLR) and provides services for dynamically t

Re: FInd files with .so extension

2007-05-02 Thread Steven D'Aprano
On Wed, 02 May 2007 21:58:41 -0700, pradeep nair wrote: > HI, > > > How do i find files with .so extension using python . import os help(os.listdir) help(os.walk) help(os.path.splitext) That should give you all the tools you need. -- Steven D'Aprano -- http://mail.python.org/mai

Re: How to check if a string is empty in python?

2007-05-02 Thread Steven D'Aprano
On Wed, 02 May 2007 21:59:56 -0700, Alex Martelli wrote: > Steven D'Aprano <[EMAIL PROTECTED]> wrote: > >> On Wed, 02 May 2007 21:19:54 -0400, Roy Smith wrote: >> >> > for c in s: >> >raise "it's not empty" >> >> String exceptions are depreciated and shouldn't be used. >> >> http://docs.py

Re: More urllib timeout issues.

2007-05-02 Thread John Nagle
Facundo Batista wrote: > Steve Holden wrote: > > >>1) There is work afoot to build timeout arguments into network libraries >>for 2.6, and I know Facundo Batista has been involved, you might want to >>Google or email Facundo about that. > > > Right now (in svn trunk) httplib, ftplib, telnetli

Re: Video: Professor of Physics Phd at Cal Tech says: 911 Inside Job

2007-05-02 Thread Major Quaternion Dirt Quantum
can you puhlease reply to my questions? nothing is ever 100%, if only because of Heisenberg -- that dirty little physicist! > I suppose you never seen this footage of WTC7 before have you? Its > 100% evidence that WTC7 was controlled > demolition:http://www.youtube.com/watch?v=YNN6apj5B2U- thus

Re: Video: Professor of Physics, Phd at Cal Tech says: 911 Inside Job

2007-05-02 Thread lemnitzer
On Apr 26, 3:08 am, James Stroud <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Video: Professor of Physics, Phd at Cal Tech says: 911 Inside Job > > > Cal Tech is the ELITE of ELITE in physics. > > > If Feynman were alive, he would point his finger straight at the 911 > > criminal opera

Re: how update a qListView in backgroud

2007-05-02 Thread Tina I
Reinaldo Carvalho wrote: > Hi, > > I programming with qt module and i have a qWidgetTab with a qListView > inside, and i need update the qListView every 5 seconds, how do this > on transparent mode to user. I do a function to update, but i dont > know call then. > > I will start this update when

Re: BUSTED!!! 100% VIDEO EVIDENCE that WTC7 was controlled demolition!! NEW FOOTAGE!!! Ask yourself WHY havn't I seen this footage before?

2007-05-02 Thread Major Quaternion Dirt Quantum
maybe, "pulled" is just a firefighteresque synonym for gravity doing its thing -- still not subsumed in the Standard Model of physicists, so, There. y'know, sort of like, how it is, pilots refer to going "out" and "in," instead of up & down. Zogby clientlist, VERY cool; what great organizations I

Re: [ANN] Update to Python Quick Reference Card (for Python 2.4) (v0.67)

2007-05-02 Thread Alex Martelli
Laurent Pointal <[EMAIL PROTECTED]> wrote: > Casey Hawthorne wrote: > > > PC-cillin flagged this as a dangerous web site. > > Maybe PC-cillin tag as dangerous all sites about Python, the famous snake. > > > PS. And why does it tag my laboratory work page as dangerous ? It's pure > HTML, I work

Re: __dict__s and types and maybe metaclasses...

2007-05-02 Thread Alex Martelli
Adam Atlas <[EMAIL PROTECTED]> wrote: > On May 2, 5:24 pm, Larry Bates <[EMAIL PROTECTED]> wrote: > > I think that most people accomplish this by: > > > > class blah: > > __initial_values={'a': 123, 'b': 456} > > > > def __init__(self): > > self.__dict__.update(self.__initialvalues

Re: Microsoft's Dynamic Languages Runtime (DLR)

2007-05-02 Thread Alex Martelli
Kevin Haynes <[EMAIL PROTECTED]> wrote: > Isn't python cross platform? Sure -- why is that relevant? Alex -- http://mail.python.org/mailman/listinfo/python-list

Re: [python-advocacy] Need Help in Preparing for Study of Python by Forrester Research

2007-05-02 Thread Tennessee Leeuwenburg
I've read through the document. It seems basically okay, although highly web-oriented. There are still *some* desktop developers left in the world! I was a little disappointed not to see more on the community -- e.g. engagement of the community, activity in support fora, availability of books and

Re: How to check if a string is empty in python?

2007-05-02 Thread Alex Martelli
Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Wed, 02 May 2007 21:19:54 -0400, Roy Smith wrote: > > > for c in s: > >raise "it's not empty" > > String exceptions are depreciated and shouldn't be used. > > http://docs.python.org/api/node16.html They're actually deprecated, not depreciated

Re: How to check if a string is empty in python?

2007-05-02 Thread Alex Martelli
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: ... > >>> import gmpy > >>> gmpy.mpz(11) > mpz(11) > >>> gmpy.mpz('11',10) > mpz(11) > >>> gmpy.mpz(11,10) > > Traceback (most recent call last): > File "", line 1, in > gmpy.mpz(11,10) > TypeError: gmpy.mpz() with numeric argument needs exact

FInd files with .so extension

2007-05-02 Thread pradeep nair
HI, How do i find files with .so extension using python . -- http://mail.python.org/mailman/listinfo/python-list

Re: sqlite for mac?

2007-05-02 Thread 7stud
> Did you install Xcode on your Mac? Yes, Xcode 2.4. -- http://mail.python.org/mailman/listinfo/python-list

Re: Lazy evaluation: overloading the assignment operator?

2007-05-02 Thread Charles Sanders
Diez B. Roggisch wrote: > I fail to see where laziness has anything to do with this. > In C++, this problem can be remedied with the so called > temporary base class idiom. I have seen this referred to as lazy evaluation in C++, so I suspect that Diez and Sturia are using "Lazy evaluatio

Re: sqlite for mac?

2007-05-02 Thread 7stud
On May 1, 6:09 am, Ben Secrest <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 2007-05-01, Daniel Nogradi <[EMAIL PROTECTED]> wrote: > > >> Does sqlite come in a mac version? > > > The interface (pysqlite) is part of the python 2.5 standard library > > but you ne

Re: BUSTED!!! 100% VIDEO EVIDENCE that WTC7 was controlled demolition!! NEW FOOTAGE!!! Ask yourself WHY havn't I seen this footage before?

2007-05-02 Thread coyote
Midex wrote: > On 3 maio, 00:20, Don Stockbauer <[EMAIL PROTECTED]> wrote: >> Ask yourself WHY havn't I seen this footage before? >> >> >> >> "Don, why havent you seen this footage before?" he asked himself, self- >> referentially in the best tradition of Douglas R. Hof

Re: Firefighters at the site of WTC7 "Move away the building is going to blow up, get back the building is going to blow up."

2007-05-02 Thread Eric Gisse
On May 2, 7:10 pm, Midex <[EMAIL PROTECTED]> wrote: [...] I guess the explanation that people were looking at the building and watching its' structure deform is too rational. -- http://mail.python.org/mailman/listinfo/python-list

Re: BUSTED!!! 100% VIDEO EVIDENCE that WTC7 was controlled demolition!! NEW FOOTAGE!!! Ask yourself WHY havn't I seen this footage before?

2007-05-02 Thread Midex
On 3 maio, 00:20, Don Stockbauer <[EMAIL PROTECTED]> wrote: > Ask yourself WHY havn't I seen this footage before? > > > > "Don, why havent you seen this footage before?" he asked himself, self- > referentially in the best tradition of Douglas R. Hofstadter. > > 'Er, bec

Re: SEO - Search Engine Optimization - Seo Consulting

2007-05-02 Thread Steven D'Aprano
On Wed, 02 May 2007 19:47:28 -0700, Huck Phin wrote: > I understand how top posting is annoying, and when you check any > usenet group message, everyone seems to just jump at the chance to > yell at someone for doing it. What I do not understand is how > everyone is attacking the top poster, and

Re: BUSTED!!! 100% VIDEO EVIDENCE that WTC7 was controlled demolition!! NEW FOOTAGE!!! Ask yourself WHY havn't I seen this footage before?

2007-05-02 Thread Midex
On 3 maio, 00:20, [EMAIL PROTECTED] wrote: > On 2 May 2007 20:05:23 -0700, Midex <[EMAIL PROTECTED]> Gave us: > > >100% EVIDENCE > > You AND Rosie are fucking retarded! Sure, you have firefighters and all the first responders telling you LIVE in the video that the building is going to be pulled

Re: BUSTED!!! 100% VIDEO EVIDENCE that WTC7 was controlled demolition!! NEW FOOTAGE!!! Ask yourself WHY havn't I seen this footage before?

2007-05-02 Thread Homer J Simpson
"Midex" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > In order to appreciate just what Truthers are talking about when they > cry Treason over WTC7, you would want to see this History Channel > documentary on what they claim happened to WTC7: > http://www.youtube.com/watch?v=TVSx

Re: BUSTED!!! 100% VIDEO EVIDENCE that WTC7 was controlled demolition!! NEW FOOTAGE!!! Ask yourself WHY havn't I seen this footage before?

2007-05-02 Thread Don Stockbauer
Ask yourself WHY havn't I seen this footage before? "Don, why havent you seen this footage before?" he asked himself, self- referentially in the best tradition of Douglas R. Hofstadter. 'Er, because I haven't seen it before?" Don responded in a tautological fashion.

Firefighters at the site of WTC7 "Move away the building is going to blow up, get back the building is going to blow up."

2007-05-02 Thread Midex
100% EVIDENCE - SEE THE TRUTH FINALLY - ON THE GROUND VIDEO WITNESSES http://www.youtube.com/watch?v=YNN6apj5B2U In order to appreciate just what Truthers are talking about when they cry Treason over WTC7, you would want to see this History Channel documentary on what they claim happened to WT

Re: Video: Professor of Physics Phd at Cal Tech says: 911 Inside Job

2007-05-02 Thread Midex
On 28 abr, 17:50, Major Quaternion Dirt Quantum <[EMAIL PROTECTED]> wrote: > here's a question that came-up recently, > in battling with the controlled-demo advocates > at teh Promenade: > > how is it that the metal was still molten, > after weeks? > > it seems taht an additional hypothesis is requ

BUSTED!!! 100% VIDEO EVIDENCE that WTC7 was controlled demolition!! NEW FOOTAGE!!! Ask yourself WHY havn't I seen this footage before?

2007-05-02 Thread Midex
100% EVIDENCE - SEE THE TRUTH FINALLY - ON THE GROUND VIDEO WITNESSES http://www.youtube.com/watch?v=YNN6apj5B2U In order to appreciate just what Truthers are talking about when they cry Treason over WTC7, you would want to see this History Channel documentary on what they claim happened to WT

Re: ignorance and intolerance in computing communties

2007-05-02 Thread Pillsy
On May 2, 11:33 am, Xah Lee <[EMAIL PROTECTED]> wrote: [...] > In a person's computing career, concrete and specialized questions > like these abound, and the answers or knowledge about them are scarce. > Due to the general ignorance of technical knowledge, and the power- > struggling nature of mal

Re: SEO - Search Engine Optimization - Seo Consulting

2007-05-02 Thread Huck Phin
I understand how top posting is annoying, and when you check any usenet group message, everyone seems to just jump at the chance to yell at someone for doing it. What I do not understand is how everyone is attacking the top poster, and not the spammer. It seems that the real issue of this post is

Re: curses mystical error output

2007-05-02 Thread Skip Montanaro
> Maybe the Solaris 10 curses stuff is toast? Maybe. the curses and curses_panel modules were linked against crufty stuff in /usr/lib. I've asked our admins to install ncurses. Hopefully that's the cure. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: How to check if a string is empty in python?

2007-05-02 Thread Steven D'Aprano
On Wed, 02 May 2007 21:19:54 -0400, Roy Smith wrote: > for c in s: >raise "it's not empty" String exceptions are depreciated and shouldn't be used. http://docs.python.org/api/node16.html -- Steven D'Aprano -- http://mail.python.org/mailman/listinfo/python-list

Re: curses mystical error output

2007-05-02 Thread Skip Montanaro
> I have a fairly simple curses app which is giving me this error: > > addstr() returned ERR I tried something else. Using both python 2.4 and SVN head (aka 2.6a0 sort of) I tried the curses regression test. Both versions crashed, though with somewhat different errors. Maybe the Solaris 10

how update a qListView in backgroud

2007-05-02 Thread Reinaldo Carvalho
Hi, I programming with qt module and i have a qWidgetTab with a qListView inside, and i need update the qListView every 5 seconds, how do this on transparent mode to user. I do a function to update, but i dont know call then. I will start this update when user select this tab, and stop whe user l

Re: python,win32com,scipy and vb 6 : no module named scipy

2007-05-02 Thread Terry Reedy
scipy is a 3rd party package which I believe you get from the same place, more or less, as numpy. -- http://mail.python.org/mailman/listinfo/python-list

Re: Slicing Arrays in this way

2007-05-02 Thread Steven D'Aprano
On Wed, 02 May 2007 16:01:05 -0700, John Machin wrote: > The OP has already confessed. Don't rub it in. Sorry, I sent my comment before I received his confession. -- Steven D'Aprano -- http://mail.python.org/mailman/listinfo/python-list

Re: Slicing Arrays in this way

2007-05-02 Thread James Stroud
Tobiah wrote: > > >>> elegant_solution([1,2,3,4,5,6,7,8,9,10]) > [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]] > > Here's one I use: def elegant_solution(alist): i = iter(alist) return [[j, i.next()] for j in i] py> elegant_solution(range(14)) [[0, 1], [2, 3], [4, 5], [6, 7], [8, 9], [10,

Re: Lazy evaluation: overloading the assignment operator?

2007-05-02 Thread Terry Reedy
"sturlamolden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | | Python allows the binding behaviour to be defined for descriptors, | using the __set__ and __get__ methods. I think it would be a major | advantage if this could be generalized to any object, by allowing the | assignme

Re: How to check if a string is empty in python?

2007-05-02 Thread Roy Smith
In article <[EMAIL PROTECTED]>, Dustan <[EMAIL PROTECTED]> wrote: > On May 2, 5:50 pm, Steven D'Aprano > <[EMAIL PROTECTED]> wrote: > > On Wed, 02 May 2007 13:35:47 -0700, noagbodjivictor wrote: > > > How to check if a string is empty in python? > > > if(s == "") ?? > > > > In no particular order

Re: Handling Infinite Loops on Server Applications

2007-05-02 Thread MRAB
On May 3, 1:38 am, "Paul Kozik" <[EMAIL PROTECTED]> wrote: > I'm working with a small server program I'm writing for a small video > game. The main class constructor starts a thread that handles socket > connections, which itself starts new threads for each user connection. > > The actual server pr

Re: How to check if a string is empty in python?

2007-05-02 Thread Dustan
On May 2, 5:50 pm, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Wed, 02 May 2007 13:35:47 -0700, noagbodjivictor wrote: > > How to check if a string is empty in python? > > if(s == "") ?? > > In no particular order, all of these methods will work: > > # test s is equal to another empty string >

Re: python,win32com,scipy and vb 6 : no module named scipy

2007-05-02 Thread vml
On 2 mai, 23:37, vml <[EMAIL PROTECTED]> wrote: > Hello, > > I am really new in python scipy win32com and scipy I tried to setup a > COM server to interact with vb 6 the pythom COM server is : > > from win32com.server import exception, register > import pythoncom, win32pdhutil, winerror > import ma

Re: gpp (conditional compilation)

2007-05-02 Thread Gabriel Genellina
En Wed, 02 May 2007 14:37:40 -0300, [EMAIL PROTECTED] <[EMAIL PROTECTED]> escribió: > I'm trying to use the gpp utility (Gnu points to > http://en.nothingisreal.com/wiki/GPP) > to do conditional compilation in Python, and I'm running into a > problem: the same '#' character introduces Python c

Re: Microsoft's Dynamic Languages Runtime (DLR)

2007-05-02 Thread Ken Tilton
sturlamolden wrote: > On May 3, 2:15 am, Kaz Kylheku <[EMAIL PROTECTED]> wrote: > > >>Kindly refrain from creating any more off-topic, cross-posted threads. >>Thanks. > > > The only off-topic posting in this thread is your own (and now this > one). > Begone. FWIW, I took Kaz's remark to be m

Re: Slicing Arrays in this way

2007-05-02 Thread John Machin
On May 3, 10:21 am, Michael Hoffman <[EMAIL PROTECTED]> wrote: > Tobiah wrote: > > > >>> elegant_solution([1,2,3,4,5,6,7,8,9,10]) > > [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]] > > That's not an array, it's a list. See the array module for arrays > (fixed-length, unlike variable-length lists). You

Re: Microsoft's Dynamic Languages Runtime (DLR)

2007-05-02 Thread Kevin Haynes
Isn't python cross platform? On Thursday 3 May 2007, Kaz Kylheku wrote: > On May 2, 11:22 am, sturlamolden <[EMAIL PROTECTED]> wrote: > > On Monday Microsoft announced a new runtime for dynamic languages, > > Kindly refrain from creating any more off-topic, cross-posted threads. > Thanks. -- htt

Re: curses mystical error output

2007-05-02 Thread skip
>> screen.addstr(row, 39, "|") >> >> where row is 3. Ian> You might be trying to write to a section that is currently off Ian> screen. Seems to me when I was doing some curses stuff that when I Ian> tried to write to one more row than could be fit onto my terminal Ia

Handling Infinite Loops on Server Applications

2007-05-02 Thread Paul Kozik
I'm working with a small server program I'm writing for a small video game. The main class constructor starts a thread that handles socket connections, which itself starts new threads for each user connection. The actual server program itself however needs to wait in the background, but continue l

Re: Slicing Arrays in this way

2007-05-02 Thread Michael Hoffman
Tobiah wrote: > > >>> elegant_solution([1,2,3,4,5,6,7,8,9,10]) > [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]] That's not an array, it's a list. See the array module for arrays (fixed-length, unlike variable-length lists). -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: Microsoft's Dynamic Languages Runtime (DLR)

2007-05-02 Thread sturlamolden
On May 3, 2:15 am, Kaz Kylheku <[EMAIL PROTECTED]> wrote: > Kindly refrain from creating any more off-topic, cross-posted threads. > Thanks. The only off-topic posting in this thread is your own (and now this one). Begone. S.M. -- http://mail.python.org/mailman/listinfo/python-list

Re: Microsoft's Dynamic Languages Runtime (DLR)

2007-05-02 Thread Kaz Kylheku
On May 2, 11:22 am, sturlamolden <[EMAIL PROTECTED]> wrote: > On Monday Microsoft announced a new runtime for dynamic languages, Kindly refrain from creating any more off-topic, cross-posted threads. Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: __dict__s and types and maybe metaclasses...

2007-05-02 Thread Steven Bethard
Adam Atlas wrote: > Suppose I want to create a type (i.e. a new-style class via the usual > `class blah(...)` mechanism) but, during the process of creating the > type, I want to replace its __dict__ If I understand you right, what you want is something like:: class MyDict(object):

Re: How to check if a string is empty in python?

2007-05-02 Thread [EMAIL PROTECTED]
On May 2, 6:41 pm, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] a écrit : > > > On May 2, 3:49 pm, Basilisk96 <[EMAIL PROTECTED]> wrote: > > >>A simple > > >>if s: > >>print "not empty" > >>else: > >>print "empty" > > >>will do. > > > How do you know that s is a string

Re: win32com.client Excel Color Porblem

2007-05-02 Thread ici
On May 3, 1:37 am, Ray <[EMAIL PROTECTED]> wrote: > Hi, > > I need to use cell's background color. > > when I record a macro from excel, it shows: > > Rows("7:7").Select > With Selection.Interior > .ColorIndex = 8 > .Pattern = xlSolid > > how do I run it from python win32com

Re: __dict__s and types and maybe metaclasses...

2007-05-02 Thread Adam Atlas
On May 2, 5:24 pm, Larry Bates <[EMAIL PROTECTED]> wrote: > I think that most people accomplish this by: > > class blah: > __initial_values={'a': 123, 'b': 456} > > def __init__(self): > self.__dict__.update(self.__initialvalues) That's not really what I'm talking about... I'm talk

Re: Cannot execute Windows commands via Python in 64-bit

2007-05-02 Thread minitotoro
On May 2, 3:46 pm, Larry Bates <[EMAIL PROTECTED]> wrote: > minitotoro wrote: > > On May 2, 3:07 pm, Larry Bates <[EMAIL PROTECTED]> wrote: > >> [EMAIL PROTECTED] wrote: > >>> I have a script that runs fine in Windows 2003 (32-bit). It basically > >>> calls the Windows defrag command. When I try th

Re: Slicing Arrays in this way

2007-05-02 Thread Ian Clark
Yeah, having an elegant_solution() function would solve soo many of my problems. ;) Ian -- http://mail.python.org/mailman/listinfo/python-list

Re: gpp (conditional compilation)

2007-05-02 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Duncan Booth <[EMAIL PROTECTED]> wrote: >"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > >> I'm trying to use the gpp utility (Gnu points to >> http://en.nothingisreal.com/wiki/GPP) to do conditional compilation in >> Python, and I'm running into a problem: the sam

Re: Slicing Arrays in this way

2007-05-02 Thread John Machin
On May 3, 8:55 am, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Wed, 02 May 2007 15:03:24 -0700, Tobiah wrote: > > > >>> elegant_solution([1,2,3,4,5,6,7,8,9,10]) > > [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]] > > Wow! That's impressive. What version of Python are you using? When I try > it, I ge

Re: How to check if a string is empty in python?

2007-05-02 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > On May 2, 3:49 pm, Basilisk96 <[EMAIL PROTECTED]> wrote: > >>A simple >> >>if s: >>print "not empty" >>else: >>print "empty" >> >>will do. > > > How do you know that s is a string? Why do you want to know if it's a string ? -- http://mail.python.org/mailm

Re: How to check if a string is empty in python?

2007-05-02 Thread John Machin
On May 3, 8:50 am, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Wed, 02 May 2007 13:35:47 -0700, noagbodjivictor wrote: > > How to check if a string is empty in python? > > if(s == "") ?? > > In no particular order, all of these methods will work: > [snip] > > # test that s has none of any chara

Re: Can I use Python instead of Joomla?

2007-05-02 Thread Bruno Desthuilliers
walterbyrd a écrit : > If I wanted to build a website with forums, news feeds, galleries, > event calander, document managment, etc. I do so in Joomla easily. > > But, I would perfer to use django/python, if that would be at all > practical. > > I suppose I could put python scripts into django, i

Re: How to check if a string is empty in python?

2007-05-02 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > How to check if a string is empty in python? > if(s == "") ?? > if not s: print "s is empty" -- http://mail.python.org/mailman/listinfo/python-list

Re: curses mystical error output

2007-05-02 Thread Ian Clark
On 5/2/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I have a fairly simple curses app which is giving me this error: > > addstr() returned ERR > > I'm trapping it and continuing. I can see that *some* of my addstring calls > succeed. This one happens to be > > screen.addstr(row, 39,

Re: Slicing Arrays in this way

2007-05-02 Thread Steven D'Aprano
On Wed, 02 May 2007 15:03:24 -0700, Tobiah wrote: > > >>> elegant_solution([1,2,3,4,5,6,7,8,9,10]) > [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]] Wow! That's impressive. What version of Python are you using? When I try it, I get this: >>> elegant_solution([1,2,3,4,5,6,7,8,9,10]) Traceback (most r

Re: Slicing Arrays in this way

2007-05-02 Thread Tobiah
I'm a retard. Disregard. -- Posted via a free Usenet account from http://www.teranews.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Cannot execute Windows commands via Python in 64-bit

2007-05-02 Thread Larry Bates
minitotoro wrote: > On May 2, 3:07 pm, Larry Bates <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] wrote: >>> I have a script that runs fine in Windows 2003 (32-bit). It basically >>> calls the Windows defrag command. When I try the exact same code on >>> Windows 2003 (64-bit) I get the following m

Re: Microsoft's Dynamic Languages Runtime (DLR)

2007-05-02 Thread Fuzzyman
On May 2, 8:20 pm, Pascal Costanza <[EMAIL PROTECTED]> wrote: > sturlamolden wrote: > > On Monday Microsoft announced a new runtime for dynamic languages, > > which they call "DLR". It sits on top of the conventional .NET runtime > > (CLR) and provides services for dynamically typed languages like

Re: How to check if a string is empty in python?

2007-05-02 Thread Steven D'Aprano
On Wed, 02 May 2007 13:35:47 -0700, noagbodjivictor wrote: > How to check if a string is empty in python? > if(s == "") ?? In no particular order, all of these methods will work: # test s is equal to another empty string if s == "": # assuming s is a string, test that it is empty if not s: #

Python COM and Delphi callback

2007-05-02 Thread Larry Bates
I have a Python COM object working. I want to pass to it a Delphi callback function (showing progress) that I can call periodically. I've Googled until I'm cross-eyed and I'm getting nowhere. Anybody out there that could give me a push in the right direction. I tried passing pointer to my callb

Re: Cannot execute Windows commands via Python in 64-bit

2007-05-02 Thread minitotoro
On May 2, 3:07 pm, Larry Bates <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > I have a script that runs fine in Windows 2003 (32-bit). It basically > > calls the Windows defrag command. When I try the exact same code on > > Windows 2003 (64-bit) I get the following message: > > > C:\Scr

Re: My Python annoyances

2007-05-02 Thread Bruno Desthuilliers
James Stroud a écrit : (snip) > > I want to complain about the fact that I wrote 200 lines the other day > and it worked first time. Problem was, I spent 20 minutes before I > realized that the lack of errors was a result of the lack of bugs. +1 QOTW -- http://mail.python.org/mailman/listinfo/

win32com.client Excel Color Porblem

2007-05-02 Thread Ray
Hi, I need to use cell's background color. when I record a macro from excel, it shows: Rows("7:7").Select With Selection.Interior .ColorIndex = 8 .Pattern = xlSolid how do I run it from python win32com ? xlApp.ActiveSheet.Rows("7:7").ColorIndex won't work. Thanks for an

Re: Microsoft's Dynamic Languages Runtime (DLR)

2007-05-02 Thread Ken Tilton
[EMAIL PROTECTED] wrote: > On May 2, 1:22 pm, sturlamolden <[EMAIL PROTECTED]> wrote: > >>On Monday Microsoft announced a new runtime for dynamic languages, >>which they call "DLR". It sits on top of the conventional .NET runtime >>(CLR) and provides services for dynamically typed languages lik

Basic question about sockets and security

2007-05-02 Thread Dave Dean
Hi all, I'm just starting out in sockets/network programming, and I have a very basic question...what are the 'security' implications of opening up a socket? For example, suppose I've written a simple chat server and chat client. The server opens a socket, listens on a port, and accepts inco

Re: Slicing Arrays in this way

2007-05-02 Thread Tobiah
John Machin wrote: > On May 3, 8:03 am, Tobiah <[EMAIL PROTECTED]> wrote: >> >>> elegant_solution([1,2,3,4,5,6,7,8,9,10]) >> [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]] >> > > What is your definition of "elegant"? What about other dimensions of > code quality like "robust" and "fast"? > > What hav

Re: Slicing Arrays in this way

2007-05-02 Thread Tobiah
Matimus wrote: > On May 2, 3:03 pm, Tobiah <[EMAIL PROTECTED]> wrote: >> >>> elegant_solution([1,2,3,4,5,6,7,8,9,10]) >> [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]] >> >> -- >> Posted via a free Usenet account fromhttp://www.teranews.com > seq = range(1,11) seq > [1, 2, 3, 4, 5, 6, 7, 8,

Re: Slicing Arrays in this way

2007-05-02 Thread John Machin
On May 3, 8:03 am, Tobiah <[EMAIL PROTECTED]> wrote: > >>> elegant_solution([1,2,3,4,5,6,7,8,9,10]) > [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]] > What is your definition of "elegant"? What about other dimensions of code quality like "robust" and "fast"? What have you tried? Here's one possibili

Re: Slicing Arrays in this way

2007-05-02 Thread Matimus
On May 2, 3:03 pm, Tobiah <[EMAIL PROTECTED]> wrote: > >>> elegant_solution([1,2,3,4,5,6,7,8,9,10]) > [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]] > > -- > Posted via a free Usenet account fromhttp://www.teranews.com >>> seq = range(1,11) >>> seq [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] >>> zip( seq[0::2],se

Re: Cannot execute Windows commands via Python in 64-bit

2007-05-02 Thread Larry Bates
[EMAIL PROTECTED] wrote: > I have a script that runs fine in Windows 2003 (32-bit). It basically > calls the Windows defrag command. When I try the exact same code on > Windows 2003 (64-bit) I get the following message: > > C:\Scripts>autodefrag.py > Starting defragment: defrag -v C: >>c:/Script

curses mystical error output

2007-05-02 Thread skip
I have a fairly simple curses app which is giving me this error: addstr() returned ERR I'm trapping it and continuing. I can see that *some* of my addstring calls succeed. This one happens to be screen.addstr(row, 39, "|") where row is 3. After the screen was cleared two other calls

Slicing Arrays in this way

2007-05-02 Thread Tobiah
>>> elegant_solution([1,2,3,4,5,6,7,8,9,10]) [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]] -- Posted via a free Usenet account from http://www.teranews.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Lazy evaluation: overloading the assignment operator?

2007-05-02 Thread sturlamolden
On May 2, 11:08 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > And AFAIK the general overhead of laziness versus eager evaluation does > not pay off - haskell is a tad slower than e.g. an ML dialect AFAIK. In the numerical Python community there is already a prototype compiler called 'numexp

Cannot execute Windows commands via Python in 64-bit

2007-05-02 Thread nsjmetzger
I have a script that runs fine in Windows 2003 (32-bit). It basically calls the Windows defrag command. When I try the exact same code on Windows 2003 (64-bit) I get the following message: C:\Scripts>autodefrag.py Starting defragment: defrag -v C: >>c:/Scripts/DEFRAG20070502.log 'defrag' is not

Re: I wish that [].append(x) returned [x]

2007-05-02 Thread Joshua J. Kugler
On Wednesday 02 May 2007 12:05, Tobiah wrote: > >> In addition to the above good advice, in case you are submitting a query >> to a DB-API compliant SQL database, you should use query parameters >> instead of building the query with string substitution. > > I tried that a long time ago, but I gu

Re: Lazy evaluation: overloading the assignment operator?

2007-05-02 Thread sturlamolden
On May 2, 9:46 pm, Stargaming <[EMAIL PROTECTED]> wrote: > > del tmp2 > > y = tmp3 # tmp3 gets evaluated as assignment is overloaded > > To allow lazy evaluation, you need overloading of the assignment > operator? No I don't. I could for example delay evaluation until some data from y is request

python,win32com,scipy and vb 6 : no module named scipy

2007-05-02 Thread vml
Hello, I am really new in python scipy win32com and scipy I tried to setup a COM server to interact with vb 6 the pythom COM server is : from win32com.server import exception, register import pythoncom, win32pdhutil, winerror import math import numpy import sys sys.path.append('D:\\soft\python2

Re: Can I use Python instead of Joomla?

2007-05-02 Thread Alan Franzoni
Il 2 May 2007 13:48:45 -0700, walterbyrd ha scritto: > If I wanted to build a website with forums, news feeds, galleries, > event calander, document managment, etc. I do so in Joomla easily. You're using Joomla, which is a CMS written in PHP. Python is a language, you should ask 'can I use Pytho

Re: Lazy evaluation: overloading the assignment operator?

2007-05-02 Thread Diez B. Roggisch
sturlamolden schrieb: > Python allows the binding behaviour to be defined for descriptors, > using the __set__ and __get__ methods. I think it would be a major > advantage if this could be generalized to any object, by allowing the > assignment operator (=) to be overloaded. > > One particular use

Re: How to check if a string is empty in python?

2007-05-02 Thread [EMAIL PROTECTED]
On May 2, 3:49 pm, Basilisk96 <[EMAIL PROTECTED]> wrote: > A simple > > if s: > print "not empty" > else: > print "empty" > > will do. How do you know that s is a string? > > -Basilisk96 -- http://mail.python.org/mailman/listinfo/python-list

Re: How to check if a string is empty in python?

2007-05-02 Thread John Machin
On May 3, 6:35 am, [EMAIL PROTECTED] wrote: > How to check if a string is empty in python? > if(s == "") ?? Please lose the parentheses. if s == "": will work. So will if not s: Have you worked through the tutorial yet? -- http://mail.python.org/mailman/listinfo/python-list

Re: __dict__s and types and maybe metaclasses...

2007-05-02 Thread Larry Bates
Adam Atlas wrote: > Suppose I want to create a type (i.e. a new-style class via the usual > `class blah(...)` mechanism) but, during the process of creating the > type, I want to replace its __dict__ so I can override some behaviors > during the initial assignment of its members. That is, I have `c

Re: Can I use Python instead of Joomla?

2007-05-02 Thread Adam Atlas
On May 2, 4:48 pm, walterbyrd <[EMAIL PROTECTED]> wrote: > If I wanted to build a website with forums, news feeds, galleries, > event calander, document managment, etc. I do so in Joomla easily. > > But, I would perfer to use django/python, if that would be at all > practical. > > I suppose I could

Re: pack/unpack zero terminated string

2007-05-02 Thread John Machin
On May 3, 12:01 am, Laurent Pointal <[EMAIL PROTECTED]> wrote: > tmp123 a écrit : > > > Hello, > > > Thanks for your time. > > > After review the "struct" documentation, it seems there are no option > > to pack/unpack zero terminated strings. > > > By example, if the packed data contains: byte + ze

  1   2   3   >