Re: Getting "TypeError:list indices must be integers"

2006-06-13 Thread John Machin
On 13/06/2006 4:11 PM, Girish Sahani wrote: [snip] >instance = ti2(k) >tiNew = ti1.append(instance) ti2 is quacking "function" but ti1 is quacking "list". Possibilities: (1) You meant to type ti2[k] ... and this section of code has not yet been executed, and would have featured a

Getting "TypeError:list indices must be integers": apology

2006-06-13 Thread Girish Sahani
Hi ppl, I'm really sorry for the previous post. I write mails very quickly and end up making errors in it. This time i ended up giving a code portion from an old copy of my program. Here's the code portion that is giving a TypeError:list indices must be integers for index1 in indexList1: for ind

Re: Xah Lee network abuse

2006-06-13 Thread Surendra Singhi
Its not Xah Lee, who abuses the system. But people like "Erik Max Francis" and "Philippa Cowderoy" who carry on nonsense discussions across mailing lists. -- Surendra Singhi http://ssinghi.kreeti.com , | WHY SHOULD WE SAVE TIGER? | Ans: Saving the tiger means saving mankind.. | |

Re: Getting "TypeError:list indices must be integers"

2006-06-13 Thread Girish Sahani
> On 13/06/2006 4:11 PM, Girish Sahani wrote: > [snip] >>instance = ti2(k) >>tiNew = ti1.append(instance) > > ti2 is quacking "function" but ti1 is quacking "list". > > Possibilities: > (1) You meant to type ti2[k] ... and this section of code has not yet > been executed, and would

Re: "groupby" is brilliant!

2006-06-13 Thread vpr
Hi Frank This is one of the reasons why I love Python, you can write readable code. I strive to write clean code but I find that exception handling code e.g. try: makes my code ugly and significantly harder to read. Does anyone have any good pointers for a former C++ / Perl coder. /vpr Frank Mi

Re: Getting "TypeError:list indices must be integers"

2006-06-13 Thread John Machin
On 13/06/2006 5:08 PM, John Machin wrote: > On 13/06/2006 4:11 PM, Girish Sahani wrote: > [snip] >>instance = ti2(k) >>tiNew = ti1.append(instance) > > ti2 is quacking "function" but ti1 is quacking "list". > > Possibilities: > (1) You meant to type ti2[k] ... and this section of

Re: urllib behaves strangely

2006-06-13 Thread Duncan Booth
John J. Lee wrote: >> It looks like wikipedia checks the User-Agent header and refuses to >> send pages to browsers it doesn't like. Try: > [...] > > If wikipedia is trying to discourage this kind of scraping, it's > probably not polite to do it. (I don't know what wikipedia's policies > are, th

Re: Getting "TypeError:list indices must be integers"

2006-06-13 Thread John Machin
On 13/06/2006 5:33 PM, Girish Sahani wrote: > Python prints 'c','c' when i print repr(index1),repr(index2).This means > they are characters right?? > But i have defined indexList as follows (and also tested the output, both > are outputted as lists of numbers): > > for char in list1: > i = subst

Pygame.draw challenge

2006-06-13 Thread richard
THE CHALLENGE: Create a game in 64kbytes of source code using only pygame. No additional libraries, no external files (even ones loaded from a network). That means no PyOpenGL, no PNGs, no OGGs. THE DEADLINE: Start as soon as you read th

Re: "groupby" is brilliant!

2006-06-13 Thread Paul McGuire
> > reader = csv.reader(open('trans.csv', 'rb')) > rows = [] > for row in reader: > rows.append(row) > This is untested, but you might think about converting your explicit "for... append" loop into either a list comp, rows = [row for row in reader] or just a plain list constructor:

Re: Intermittent Failure on Serial Port (Other thread code)

2006-06-13 Thread H J van Rooyen
I would like to publicly thank Serge Orloff for the effort he has put in so far and his patience... He is a Scholar and a Gentleman. Serge Orloff wrote: | H J van Rooyen wrote: | | > Note that the point of failure is not the same place in the python file, but it | > is according to the traceback,

Re: Python 411.

2006-06-13 Thread Mike T
What exactly is 411 in this context? A reference to higher education perhaps? Or perhaps part of the American constitution? What exactly? Also for that matter what is 101? Cheers, Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: numeric/numpy/numarray

2006-06-13 Thread Simon Percivall
Bryan wrote: > hi, > > what is the difference among numeric, numpy and numarray? i'm going to start > using matplotlib soon and i'm not sure which one i should use. > > > this page says, "Numarray is a re-implementation of an older Python array > module > called Numeric" > http://www.stsci.edu/r

Decimals

2006-06-13 Thread Tgone
Hello, I have a price column in a MySQL table: price decimal(5,2) When I access them in Python with SQLObject, prices display as 15.0 instead of 15.00. Why is this happening? I can't figure out why Python is trimming off the hundredth place. I'm not doing any formatting... Thanks, Tony -- http

Re: [newbie]apache authentication questions

2006-06-13 Thread Michael Ströder
Steve Holden wrote: > [EMAIL PROTECTED] wrote: > >> It is not impossible though and in cases where you don't have a choice >> but to use a HTTP authentication scheme, use of AJAX may be the >> answer to still allowing use of a form based login scheme. See: >> >> http://www.peej.co.uk/articles/ht

Re: urllib behaves strangely

2006-06-13 Thread Gabriel Zachmann
> On the other hand something which is simply retrieving one or two fixed > pages doesn't fit that definition of a bot so is probably alright. They i think so, too. even provide a link to some frameworks for writing bots e.g. > > http://sourceforge.net/projects/pywikipediabot/ ah, that looks

Re: "parent" in a class __init__ def?

2006-06-13 Thread bruno at modulix
[EMAIL PROTECTED] wrote: > bruno at modulix wrote: > >>[EMAIL PROTECTED] wrote: >> >>> Intuitively, the name lookup on >>>self.parent.foo would be faster than if you passed in the object in >>>question >> >> >>Each dot means doing a lookup in a namespace. The more dots, the more >>lookups. And loo

Re: urllib behaves strangely

2006-06-13 Thread Gabriel Zachmann
> headers = {} > headers['User-Agent'] = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; > rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4' > > request = urllib2.Request(url, headers) > file = urllib2.urlopen(request) ah, thanks a lot, that works ! Best regards, Gabriel. -- /

Re: Decimals

2006-06-13 Thread Laszlo Nagy
Tgone írta: > Hello, > > I have a price column in a MySQL table: price decimal(5,2) > > When I access them in Python with SQLObject, prices display as 15.0 > instead of 15.00. Why is this happening? I can't figure out why Python > is trimming off the hundredth place. I'm not doing any formatting...

Re: "groupby" is brilliant!

2006-06-13 Thread Frank Millman
Paul McGuire wrote: > > > > reader = csv.reader(open('trans.csv', 'rb')) > > rows = [] > > for row in reader: > > rows.append(row) > > > > This is untested, but you might think about converting your explicit "for... > append" loop into either a list comp, > > rows = [row for row in reader]

Re: numeric/numpy/numarray

2006-06-13 Thread Ben Sizer
Simon Percivall wrote: > Bryan wrote: > > hi, > > > > what is the difference among numeric, numpy and numarray? i'm going to > > start > > using matplotlib soon and i'm not sure which one i should use. > > Look again at numeric.scipy.org, and this time: read the whole page, > especially the secti

Re: Decimals

2006-06-13 Thread Tgone
Laszlo Nagy wrote: > Tgone írta: > > Hello, > > > > I have a price column in a MySQL table: price decimal(5,2) > > > > When I access them in Python with SQLObject, prices display as 15.0 > > instead of 15.00. Why is this happening? I can't figure out why Python > > is trimming off the hundredth pla

Re: [*SPAM*] Python open proxy honeypot

2006-06-13 Thread Tim Williams
On 13/06/06, Alex Reinhart <[EMAIL PROTECTED]> wrote: > > Is running Python's built-in smtpd, pretending to accept and forward all > messages, enough to get me noticed by a spammer, or do I have to do > something else to "advertise" my script as an open proxy? This will get you noticed by crawlers

Re: Decimals

2006-06-13 Thread Tgone
Sybren Stuvel wrote: > Tgone enlightened us with: > > Sorry, when I print out the variable it displays as '15.0'. The > > price is '15.00' in the database though. > > That's the same thing, isn't it? 15.0 == 15.0 Yes, they're both mathematically the same. I never said they weren't... > >

Screen capturing on Windows

2006-06-13 Thread Rune Strand
Is it possible by use of pyWin32 or ctypes to make a screen capture of an inactive, or a hidden window if the hwnd/WindowName/ClassName is known? I've seen dedicated screen capture software do this. While PIL.ImageGrab.grab() is excellent, it will only capture the foreground of the desktop. I've t

Re: Decimals

2006-06-13 Thread Laszlo Nagy
>> Try string formatting: >> >> print '%.2f' % product.price >> > > That works. I expected Python to display the data exactly as it is in > the database, like most languages. It depends on what you get back from MySQLdb. Try this: import decimal d = decimal.Decimal("3.") print d Now tr

Re: Python 411.

2006-06-13 Thread Roel Schroeven
Mike T schreef: > What exactly is 411 in this context? A reference to higher education > perhaps? Or perhaps part of the American constitution? What exactly? > Also for that matter what is 101? I don't know about 411, but 101 refers to basic or entry-level courses at universities in the United

Re: Python 411.

2006-06-13 Thread Brian van den Broek
Mike T said unto the world upon 13/06/06 10:46 AM: > What exactly is 411 in this context? A reference to higher education > perhaps? Or perhaps part of the American constitution? What exactly? > Also for that matter what is 101? > > Cheers, > Mike > Hi Mike, 411 is the number one dials in Nor

Re: Python 411.

2006-06-13 Thread Ganesan Rajagopal
> Mike T <[EMAIL PROTECTED]> writes: > What exactly is 411 in this context? A reference to higher education > perhaps? Or perhaps part of the American constitution? What exactly? > Also for that matter what is 101? It's a directory assistance number in the US. The site is a directory of URL

What's wrong in this HTML Source file of a Bank

2006-06-13 Thread Thaqalainnaqvi
Several times I logged-in successfully but after log-in I can't use features/services which were shown prior to my login. Can anyone exoert from this forum check , is it technical fault of Bank Web Site or this problem pertaining to the user(me). hPLUS Login https://rs6.habibbank.ae/stylesh

Re: What's wrong in this HTML Source file of a Bank

2006-06-13 Thread bruno at modulix
[EMAIL PROTECTED] wrote: > Several times I logged-in successfully but after log-in I can't use > features/services which were shown prior to my login. Can anyone exoert > > from this forum check , is it technical fault of Bank Web Site or this > problem pertaining to the user(me). It's definitiv

Earthquake and Tornado Forecasting Programs June 13, 2006

2006-06-13 Thread edgrsprj
"edgrsprj" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > PROPOSED EARTHQUAKE FORECASTING > COMPUTER PROGRAM DEVELOPMENT EFFORT > > Posted July 11, 2005 > My main earthquake forecasting Web page is: > http://www.freewebz.com/eq-forecasting/Data.html > EARTHQUAKE AND TORNADO FORECAST

Unimporting modules, memory leak?

2006-06-13 Thread Antonio Arauzo Azofra
Hello everybody, Probably, this is being too demanding for Python, but it may be useful to unimport modules to work with dynamic code (though not the best, one example is [2]). In fact, it is supposed to be possible[1], but I have detected it usually leaks memory. When unimported in Linux, the s

Python Video processing.

2006-06-13 Thread Ant
Hi all, I have a specific task I want to automate - rotating a video file through 90 degrees. I've used the PIL library quite a bit to perform batch processing on images, and would like to do similar on video. Can anyone see a problem with the following: 1) Use pymedia to convert the video into

Re: Python Video processing.

2006-06-13 Thread Fredrik Lundh
"Ant" <[EMAIL PROTECTED]> wrote: > In particular, does anyone know whether the data obtained from decoding > the video frame as in the following snippet from > http://pymedia.org/tut/src/dump_video.py.html: > > dd= d.convert( fmt ) > img= pygame.image.fromstring( dd.data, dd.size

Re: PIL problem after installation

2006-06-13 Thread Lad
Fredrik Lundh wrote: > Lad wrote: > > > I downloaded jpeg (from ftp://ftp.uu.net/graphics/jpeg/ ) source > > libraries( file jpegsrc.v6b.tar.gz) and installed them. Now in > > /usr/local/lib I have the following files: cjpeg > > ,djpeg,jpegtran,rdjpgcom and wrjpgcom > > cjpeg, djpeg etc are execu

"Adding" dictionnaries

2006-06-13 Thread Salvatore
Hello, Does anybody had the problem of adding the content of two dictionnaries. ? Regards -- http://mail.python.org/mailman/listinfo/python-list

Re: Very nice python IDE (windows only)

2006-06-13 Thread Jan Bijsterbosch
Hello Luis, "Luis M. González" <[EMAIL PROTECTED]> schreef in bericht news:[EMAIL PROTECTED] > > [EMAIL PROTECTED] wrote: >> I happen to have delphi, so if someone wants me to make small changes, >> just let me know, I'll try to help > > Hmm... now that you offer, would it be possible to have

Re: "Adding" dictionnaries

2006-06-13 Thread Salvatore
While reading the doc i've found 'update' :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Video processing.

2006-06-13 Thread Ant
> im = Image.fromstring("RGB", dd.size, dd.data) > > instead of doing that pygame.image call (not that the argument order is > different). > > for details, see the pygame tostring/fromstring docs, and the corresponding > PIL > methods: That's starting to look promising, yes - thanks! I'll gi

Making a Label that looks the same as a button.

2006-06-13 Thread Dustan
I have a Button object that gets replaced by a Label when clicked. Button(buttonsframe,text=' ',command=c,font=buttonsFont) Note that the text is a single space. buttonsFont uses 'Courier New' as a family. When clicked, the Button is destroyed and replaced with a Label object: Label(buttonsframe,

Re: Very nice python IDE (windows only)

2006-06-13 Thread Jan Bijsterbosch
Hello Jonathan, "Jonathan Ellis" <[EMAIL PROTECTED]> schreef in bericht news:[EMAIL PROTECTED] > ago wrote: >> I have just discovered Python Scripter by Kiriakos Vlahos and it was a >> pleasant surprise. I thought that it deserved to be signalled. It is >> slim and fairly fast, with embedded grap

Re: What's wrong in this HTML Source file of a Bank

2006-06-13 Thread Jerry
This really isn't the place to ask what is wrong with code that isn't Python, especially of someone else's website. There is absolutely no way for us to tell what is happening on the server side. You should contact the maintainer of the site and let them know you are having problems. -- Jerry -

pylab doesn't find numpy on Windows

2006-06-13 Thread timw.google
Hi all. I installed matplotlib 0.87.3 under Python 2.4 on both Linux (FC3) and Windows XP Pro. On the linux install, I can import pylab, but when I try to do the same thing on the Windows installation, I get >>> from pylab import * Traceback (most recent call last): File "", line 1, in -toplev

.py and running in Windows:

2006-06-13 Thread Michael Yanowitz
Hello: Presently in my Windows 2000 system, when I double-click on a .py file (open it) it automatically runs it in Python. I would like to change that behavour. That is fine for .pyc file, but for .py files, I would either like to have it run in Python but return to the Python shell prompt when

Re: pylab doesn't find numpy on Windows

2006-06-13 Thread Alexandre Fayolle
Le 13-06-2006, timw.google <[EMAIL PROTECTED]> nous disait: > Hi all. > > I installed matplotlib 0.87.3 under Python 2.4 on both Linux (FC3) and > Windows XP Pro. On the linux install, I can import pylab, but when I > try to do the same thing on the Windows installation, I get > from pylab imp

What's wrong in this HTML Source file of a Bank

2006-06-13 Thread Thaqalainnaqvi
They don't know whats happeing despite sending them several e-mails. -- http://mail.python.org/mailman/listinfo/python-list

Re: What's wrong in this HTML Source file of a Bank

2006-06-13 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > > They don't know whats happeing despite sending them several e-mails. So what? How are _we_ supposed to know? Even if somebody here found a bug in their java script (this is a Python NG, btw...) - now _how_ exactly are you planning to update their website with that in

Re: .py and running in Windows:

2006-06-13 Thread Andrew Gwozdziewycz
You'll have better results posting this to it's own thread. On Jun 13, 2006, at 9:29 AM, Michael Yanowitz wrote: > Hello: > > Presently in my Windows 2000 system, when I double-click on a > .py file (open it) it automatically runs it in Python. I would > like to change that behavour. That is fi

Re: Making a Label that looks the same as a button.

2006-06-13 Thread Eric Brunel
On 13 Jun 2006 06:14:03 -0700, Dustan <[EMAIL PROTECTED]> wrote: > I have a Button object that gets replaced by a Label when clicked. > > Button(buttonsframe,text=' ',command=c,font=buttonsFont) > Note that the text is a single space. buttonsFont uses 'Courier New' as > a family. > > When clicked,

Re: "Adding" dictionnaries

2006-06-13 Thread Paul McGuire
"Salvatore" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > While reading the doc i've found 'update' :-) > Bless you, Salvatore!! Too often we hear about the "gross deficiencies" of the Python documentation. I'd venture to say that documentation is mostly perceived as the last r

Re: Making a Label that looks the same as a button.

2006-06-13 Thread Andrew Gwozdziewycz
It's imperative that you explain which toolkit you are using since they all have differences. On Jun 13, 2006, at 9:14 AM, Dustan wrote: > I have a Button object that gets replaced by a Label when clicked. > > Button(buttonsframe,text=' ',command=c,font=buttonsFont) > Note that the text is a si

a string problem

2006-06-13 Thread micklee74
hi if i have a some lines like this a ) "here is first string" b ) "here is string2" c ) "here is string3" When i specify i only want to print the lines that contains "string" ie the first line and not the others. If i use re module, how to compile the expression to do this? I tried the re modul

Re: Combining The Best Of Python, Ruby, & Java??????

2006-06-13 Thread Diez B. Roggisch
> But semantically it is a proper functional language. The features may > not attract Python users who might prefer Boo/Jython/IronPython. But it > does offer something to disillusioned Groovy users. Are they disillusioned? Just wondering. Diez -- http://mail.python.org/mailman/listinfo/python-l

Re: "Adding" dictionnaries

2006-06-13 Thread Salvatore
Paul McGuire a écrit : > Also, you will find a wealth of help by using (from the interactive Python > prompt) "help(dict)" or "help(str)" or "import unfamiliarModule; > help(unfamiliarModule)". > Thanks Paul -- http://mail.python.org/mailman/listinfo/python-list

What's wrong in this HTML Source file of a Bank

2006-06-13 Thread Thaqalainnaqvi
I have posted the same question in alt.html but no one yet replied. -- http://mail.python.org/mailman/listinfo/python-list

Re: .py and running in Windows:

2006-06-13 Thread Iain King
Andrew Gwozdziewycz wrote: > You'll have better results posting this to it's own thread. > He certainly should have, but since I've read it here anyway: > On Jun 13, 2006, at 9:29 AM, Michael Yanowitz wrote: > > > Hello: > > > > Presently in my Windows 2000 system, when I double-click on a >

Re: wxpython: how do i write this without the id parameter?

2006-06-13 Thread John Salerno
Scott David Daniels wrote: > class InputForm(wx.Frame): > def __init__(self, parent=None, id=-1, title=__file__): > # or, if you prefer: ..., id=wx.ID_ANY, ... > wx.Frame.__init__(self, parent=parent, id=id, > title='%s v%s' % (title, __version_

Re: What's wrong in this HTML Source file of a Bank

2006-06-13 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > > I have posted the same question in alt.html but no one yet replied. No wonder. -- http://mail.python.org/mailman/listinfo/python-list

RE: Making a Label that looks the same as a button.

2006-06-13 Thread Grayson, John
Buttons can look like labels without the need to create another object - just remove the Command binding, set state to DISABLED and disabledforeground='same color as NORMAL'... This demonstrates how to play with button styles: import Tkinter as tk class GUI: def __init__(self): s

Re: numeric/numpy/numarray

2006-06-13 Thread Bryan
Simon Percivall wrote: > Bryan wrote: >> hi, >> >> what is the difference among numeric, numpy and numarray? i'm going to start >> using matplotlib soon and i'm not sure which one i should use. >> >> >> this page says, "Numarray is a re-implementation of an older Python array >> module >> called

Re: a string problem

2006-06-13 Thread John Salerno
[EMAIL PROTECTED] wrote: > hi > > if i have a some lines like this > a ) "here is first string" > b ) "here is string2" > c ) "here is string3" > > When i specify i only want to print the lines that contains "string" ie > the first line and not the others. If i use re module, how to compile > th

RE: .py and running in Windows:

2006-06-13 Thread Michael Yanowitz
Thanks. XP looks to be the same as 2000. Works as expected now. Thank You. Not sure what this 'thread' issue is. I never specified a thread. I think perhaps though because I did open another message in this mailing list (to get the correct email address to send to), but I deleted all its conte

Re: a string problem

2006-06-13 Thread micklee74
John Salerno wrote: > [EMAIL PROTECTED] wrote: > > hi > > > > if i have a some lines like this > > a ) "here is first string" > > b ) "here is string2" > > c ) "here is string3" > > > > When i specify i only want to print the lines that contains "string" ie > > the first line and not the others.

Re: a string problem

2006-06-13 Thread MTD
> When i specify i only want to print the lines that contains "string" ie > the first line and not the others. If i use re module, how to compile > the expression to do this? I tried the re module and using simple > search() and everytime it gives me all the 3 lines that have "string" > in it, wher

Re: a string problem

2006-06-13 Thread micklee74
John Salerno wrote: > [EMAIL PROTECTED] wrote: > > hi > > > > if i have a some lines like this > > a ) "here is first string" > > b ) "here is string2" > > c ) "here is string3" > > > > When i specify i only want to print the lines that contains "string" ie > > the first line and not the others.

Re: a string problem

2006-06-13 Thread micklee74
John Salerno wrote: > [EMAIL PROTECTED] wrote: > > hi > > > > if i have a some lines like this > > a ) "here is first string" > > b ) "here is string2" > > c ) "here is string3" > > > > When i specify i only want to print the lines that contains "string" ie > > the first line and not the others.

Re: .py and running in Windows:

2006-06-13 Thread tactics40
The only problem I know of for changing PY files to open up in an editor is that it could screw up Python as a CGI with Apache under Windows. To change file associations, right click and go to "Open With." Choose your text editor and click "always open with this problem" at the bottom. And easy wa

Linux info

2006-06-13 Thread TheSaint
Hello there, I still learning, but I couldn't find anything which tells me where a symlink is pointing to. A part of os.system('ls -l ' + path) and cutting down to the need, I haven't got any specialized function. F -- http://mail.python.org/mailman/listinfo/python-list

Re: pylab doesn't find numpy on Windows

2006-06-13 Thread timw.google
Thanks. That did it. Alexandre Fayolle wrote: > Le 13-06-2006, timw.google <[EMAIL PROTECTED]> nous disait: > > Hi all. > > > > I installed matplotlib 0.87.3 under Python 2.4 on both Linux (FC3) and > > Windows XP Pro. On the linux install, I can import pylab, but when I > > try to do the same thi

Re: a string problem

2006-06-13 Thread John Salerno
[EMAIL PROTECTED] wrote: > just curious , if RE has the \b and it works, can we look into the > source of re and see how its done for \b ? I had a look in the sre module (which re seems to import), but I couldn't find much. I'm not the best at analyzing source code, though. :) What is it you wa

Re: What's wrong in this HTML Source file of a Bank

2006-06-13 Thread bruno at modulix
[EMAIL PROTECTED] wrote: > I have posted the same question in alt.html but no one yet replied. You should ask your butcher. Now please stop posting off-topic. -- bruno desthuilliers python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for p in '[EMAIL PROTECTED]'.split('@')])"

Re: Linux info

2006-06-13 Thread faulkner
os.path.realpath TheSaint wrote: > Hello there, > > I still learning, but I couldn't find anything which tells me where a > symlink is pointing to. > A part of os.system('ls -l ' + path) and cutting down to the need, I haven't > got any specialized function. > > F -- http://mail.python.org/mail

Customized Boot Manager in Python

2006-06-13 Thread diffuser78
I have to create a small visual interface program called as Boot Manager which is customized accoring to the needs. I have around 8 pc's and 2 linux boxes. One Linux box is always on and all other are closed in sleep state. I have to perform the following things: 1. Boot up all of them. I used W

Re: numeric/numpy/numarray

2006-06-13 Thread Ben Sizer
Bryan wrote: > at the end of that page, it says: > > "Numarray is another implementation of an arrayobject for Python written after > Numeric and before NumPy. Sponsors of numarray have indicated they will be > moving to NumPy as soon as is feasible for them so that eventually numarray > will >

Re: "groupby" is brilliant!

2006-06-13 Thread geskerrett
Frank; I would just like to thank-you for this timely post. I am working on a reporting project that needed "groupby" functionality and I was going to sit down this morning to rework some "very ugly code" into some "not quite so ugly code". Your post got me pointed to in the "right" direction and

Re: a string problem

2006-06-13 Thread micklee74
John Salerno wrote: > [EMAIL PROTECTED] wrote: > > > just curious , if RE has the \b and it works, can we look into the > > source of re and see how its done for \b ? > > I had a look in the sre module (which re seems to import), but I > couldn't find much. I'm not the best at analyzing source cod

Re: numeric/numpy/numarray

2006-06-13 Thread Bryan
Ben Sizer wrote: > Bryan wrote: > >> at the end of that page, it says: >> >> "Numarray is another implementation of an arrayobject for Python written >> after >> Numeric and before NumPy. Sponsors of numarray have indicated they will be >> moving to NumPy as soon as is feasible for them so that e

Re: Linux info

2006-06-13 Thread vasudevram
os.system('ls -lL ' + path) should also work. But check, I may be wrong about the L option, and am not near a Linux system right now. That's "lL" - a small letter l (ell) followed by a capital letter L in the ls options above. This way may be slower than os.path.realpath if that is implemented as

Re: numeric/numpy/numarray

2006-06-13 Thread John Hunter
> "Bryan" == Bryan <[EMAIL PROTECTED]> writes: Bryan> hi, what is the difference among numeric, numpy and Bryan> numarray? i'm going to start using matplotlib soon and i'm Bryan> not sure which one i should use. numpy is the successor to numarray and Numeric. All three do basic

Re: Python 411.

2006-06-13 Thread Ron Stephens
Steve, thanks for the note. The name Python411 comes from me copying my good friend Rob Walch, who named his podcast Podcast411, which is a popular show on which he interviews other podcasters like Adam Curry etc. He also has a book just published about podcasting. Ron Stephens -- http://mail.py

Re: a string problem

2006-06-13 Thread Rune Strand
[EMAIL PROTECTED] wrote: > hi > > if i have a some lines like this > a ) "here is first string" > b ) "here is string2" > c ) "here is string3" > > When i specify i only want to print the lines that contains "string" ie > the first line and not the others. If i use re module, how to compile > the

Re: "groupby" is brilliant!

2006-06-13 Thread Benji York
Frank Millman wrote: > reader = csv.reader(open('trans.csv', 'rb')) > rows = [] > for row in reader: > rows.append(row) Why do you create a list of rows instead of just iterating over the reader directly? -- Benji York -- http://mail.python.org/mailman/listinfo/python-list

Vancouver Python Workshop - Talk submission reminder

2006-06-13 Thread Brian Quinlan
What's New? === The deadline for submitting a talk or tutorial for the Vancouver Python Workshop is fast approaching. Talks will be accepted until Friday June 16th. To submit a talk, see: http://www.vanpyz.org/conference/talksubmission.html About the Vancouver Python Workshop ===

Re: Making a Label that looks the same as a button.

2006-06-13 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Grayson, John <[EMAIL PROTECTED]> wrote: > > > >Buttons can look like labels without the need to create another object - >just remove the >Command binding, set state to DISABLED and disabledforeground='same >color as NORMAL'... > >This demonstrates how to play with

Re: a string problem

2006-06-13 Thread Maric Michaud
Le Mardi 13 Juin 2006 15:59, John Salerno a écrit : > And I'm actually ashamed to admit that I know the RE way, but not the > regular string manipulation way, if there is one! eheh, In [39]: import string In [40]: sub, s1, s2 = 'string', 're string2, ,string1', 're string2, ,string' In [41]: su

Re: a string problem

2006-06-13 Thread Mitja Trampus
John Salerno wrote: > [EMAIL PROTECTED] wrote: >> hi >> >> if i have a some lines like this >> a ) "here is first string" >> b ) "here is string2" >> c ) "here is string3" >> >> When i specify i only want to print the lines that contains "string" ie > ... > And I'm actually ashamed to admit that I

Re: .py and running in Windows:

2006-06-13 Thread imcs ee
i modify "C:\Python\python.exe" -i "%1" %* to cmd /k;"C:\Python\python.exe" -i "%1" %* or cmd /k;"C:\Python\python.exe" "%1" %*   just a little trick.  On 13 Jun 2006 06:48:23 -0700, Iain King <[EMAIL PROTECTED]> wrote: Andrew Gwozdziewycz wrote:> You'll have better results posting this to it'

Re: Python 411.

2006-06-13 Thread Terry Reedy
"Brian van den Broek" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > meaning something like information. Introductory university course in > a field are often numbered 101 (i.e. Computer Science 101). So, that > number has acquired a slang meaning of basic and introductory > infor

Re: Writing PNG with pure Python

2006-06-13 Thread Johann C. Rocholl
How about this here construct? #!/usr/bin/env python # png.py - PNG encoder in pure Python # Copyright (C) 2006 Johann C. Rocholl <[EMAIL PROTECTED]> # # This file is licensed alternatively under one of the following: # 1. GNU Lesser General Public License (LGPL), Version 2.1 or newer # 2. GNU Gen

Re: [newbie]apache authentication questions

2006-06-13 Thread Steve Holden
Michael Ströder wrote: > Steve Holden wrote: > >>[EMAIL PROTECTED] wrote: >> >> >>>It is not impossible though and in cases where you don't have a choice >>>but to use a HTTP authentication scheme, use of AJAX may be the >>>answer to still allowing use of a form based login scheme. See: >>> >>> h

TONIGHT! Lisp group beerfest in NYC, PyCells to be discussed

2006-06-13 Thread Ken Tilton
The royal We has just learned that His Kennyness will be honoring the boozehounds of LispNYC with His Presence tonight (deets below). He will come bearing Celtk and news of PyCells, though the top billing tonight goes to SoC student Extraordinaire Samantha Kleinberg. kenzo > Please join us for

Re: Making a Label that looks the same as a button.

2006-06-13 Thread Fredrik Lundh
Andrew Gwozdziewycz wrote: > It's imperative that you explain which toolkit you are using since > they all have differences. however, if you knew the answer, you would have recognized what toolkit he was using. -- http://mail.python.org/mailman/listinfo/python-list

Re: Decimals

2006-06-13 Thread Steve Holden
Tgone wrote: > Sybren Stuvel wrote: > >>Tgone enlightened us with: >> >>>Sorry, when I print out the variable it displays as '15.0'. The >>>price is '15.00' in the database though. >> >>That's the same thing, isn't it? 15.0 == 15.0 > > > Yes, they're both mathematically the same. I never

Re: Decimals

2006-06-13 Thread Diez B. Roggisch
Tgone wrote: > Sybren Stuvel wrote: >> Tgone enlightened us with: >> > Sorry, when I print out the variable it displays as '15.0'. The >> > price is '15.00' in the database though. >> >> That's the same thing, isn't it? 15.0 == 15.0 > > Yes, they're both mathematically the same. I never s

Re: [*SPAM*] Python open proxy honeypot

2006-06-13 Thread Alex Reinhart
Tim Williams wrote: > On 13/06/06, Alex Reinhart <[EMAIL PROTECTED]> wrote: >> >> Is running Python's built-in smtpd, pretending to accept and forward all >> messages, enough to get me noticed by a spammer, or do I have to do >> something else to "advertise" my script as an open proxy? > > This wi

Re: ANN: Dao 1.0.0-alpha is released

2006-06-13 Thread Ilias Lazaridis
[EMAIL PROTECTED] wrote: > Hello, > > It is a pleasure to announce in this mailing list the newly released > Dao. This is the first release after the Dao interpreter being ... > Two modules are also released along with the virtual machine: DaoMySQL > and DaoPyhon. DaoPython is particularly intere

Re: Python 411.

2006-06-13 Thread Steve Holden
Brian van den Broek wrote: > Mike T said unto the world upon 13/06/06 10:46 AM: > >>What exactly is 411 in this context? A reference to higher education >>perhaps? Or perhaps part of the American constitution? What exactly? >>Also for that matter what is 101? >> >>Cheers, >>Mike >> > > > Hi Mi

Re: Earthquake and Tornado Forecasting Programs June 13, 2006

2006-06-13 Thread Frank Silvermann
[snip] I look forward to a day when meteorology has more to do with precise models than models, although I'm all for Russian-style delivery of such data. I forecast that a lot of people will be surprised by the weather today, as they are categorical idiots, as is the OP. frank -- http://mail.

Is there a better way of accessing functions in a module?

2006-06-13 Thread Ant
I have the following code which works fine for running some tests defined within a module: def a_test(): print "Test A" def b_test(): print "Test B" if __name__ == "__main__": tests = ["%s()" % x for x in dir() if x.endswith("test")] for test in tests: eval(test) But th

  1   2   >