Re: passing tuple with pyqt4 signal/slot mechanism

2007-04-27 Thread Phil Thompson
On Friday 27 April 2007 1:20 am, Pradnyesh Sawant wrote: > > In the first version it didn't. In the second version it did. > > in my case, it didn't in the second version either??? > > > The version of PyQt? The version of SIP? The version of Qt? > > python2.4: 2.4.4~c1-0ubuntu1 > pyqt4:

video lectures on C, C++, Java, Python and other programming and Computer science.

2007-04-27 Thread AK444
Hi Friends, Check here http://freevideolectures.com/computerscience.html for video lectures on Programming languages like C, C++, Java, COBOL etc.., OS, Algorithms, Data Structures, RDBMS, Web designing, etc.. It also has amazing collection of video lectures and animations on all Engineer

Re: pyqt4 signal/slot using PyObject* and shortcut

2007-04-27 Thread Phil Thompson
On Friday 27 April 2007 7:05 am, Pradnyesh Sawant wrote: > On 4/27/07, Pradnyesh Sawant wrote: > > Hello, i have the following code: > > # > > import time > > import sys > > from PyQt4 import QtGui, QtCore > > > > class Counter(QtCore.

RE:: Re-ocurring Events

2007-04-27 Thread Robert Rawlins - Think Blue
Thank you guys for your suggestions. I've been having a look at that launchd stuff from apple but couldn’t really see how that applies to my requirements. I've been putting some serious thought into how this should work as its essentially the final part of the puzzle for my application, I'll have

Re: Feedback on Until recipe

2007-04-27 Thread Antoon Pardon
On 2007-04-26, MRAB <[EMAIL PROTECTED]> wrote: > At http://mail.python.org/pipermail/python-dev/2006-February/060718.html > Raymond Hettinger suggested removing the final colon after the 'while' > if there's no statement after it, which I agree with, although I would > prefer 'repeat' instead of '

Re: regex question

2007-04-27 Thread Josiah Carlson
proctor wrote: > i have a regex: rx_test = re.compile('/x([^x])*x/') You probably want... rx_test = re.compile('/x([^x]*)x/') - Josiah -- http://mail.python.org/mailman/listinfo/python-list

Re: regex question

2007-04-27 Thread Paul McGuire
On Apr 27, 1:33 am, proctor <[EMAIL PROTECTED]> wrote: > hello, > > i have a regex: rx_test = re.compile('/x([^x])*x/') > > which is part of this test program: > > > > import re > > rx_test = re.compile('/x([^x])*x/') > > s = '/xabcx/' > > if rx_test.findall(s): > print rx_tes

List objects are un-hashable

2007-04-27 Thread Andy
Hi, I'm trying to search and print any no# of Python keywords present in a text file (say - foo.txt), and getting the above error. Sad for not being able to decipher such a simple problem (I can come up with other ways - but want to fix this one FFS). Any help is appreciated. Thanks!! import keywo

RE: : Re-ocurring Events

2007-04-27 Thread Robert Rawlins - Think Blue
Just as another quick update, I've found this module for python that may be able to help me, its designed to spot date patterns for things like recurring events I guess, http://www.biostat.wisc.edu/~annis/creations/period.py.html Quite how I can integrate it into my project I'm not sure but if I

Re: List objects are un-hashable

2007-04-27 Thread Alexander Schmolck
Andy <[EMAIL PROTECTED]> writes: > Hi, I'm trying to search and print any no# of Python keywords present > in a text file (say - foo.txt), and getting the above error. Sad for > not being able to decipher such a simple problem (I can come up with Without looking at the docs, it seems save to assu

Re: List objects are un-hashable

2007-04-27 Thread Ant
> for line in inp: > lines +=1 > # a list of words > tempwords = line.split(None) > if keyword.iskeyword(tempwords): > print tempwords You are trying here to ask if a list of words (tempwords) is a keyword. The error is due to the implementation of the iskeyword function wh

Re: List objects are un-hashable

2007-04-27 Thread Andy
> What you want is something like: > > for line in inp: > lines +=1 > # a list of words > tempwords = line.split() > for k in tempwords: > if keyword.iskeyword(k): > print tempwords I think it should be: if keyword.iskeyword(k): print k

Re: List objects are un-hashable

2007-04-27 Thread Ant
> I think it should be: > > if keyword.iskeyword(k): > print k Whoops - yes of course! -- http://mail.python.org/mailman/listinfo/python-list

Re: List objects are un-hashable

2007-04-27 Thread Ganesan Rajagopal
> "Andy" == Andy <[EMAIL PROTECTED]> writes: > if keyword.iskeyword(tempwords): > print tempwords for word in tempwords: if keyword.iskeyword(word): print word Ganesan -- Ganesan Rajagopal -- http://mail.python.org/mailman/listinfo/python-list

Re: List objects are un-hashable

2007-04-27 Thread Michael Hoffman
Andy wrote: > Hi, I'm trying to search and print any no# of Python keywords present > in a text file (say - foo.txt), and getting the above error. Sad for > not being able to decipher such a simple problem (I can come up with > other ways - but want to fix this one FFS). It helps a lot of if you p

RE: Re-ocurring Events

2007-04-27 Thread Robert Rawlins - Think Blue
Thanks for getting back to me Laurent. I've now made some pretty tidy progress on this and -think- it's going to shape up nicely, I'm just working on converting my date strings from the XML into a date_struct and we should be good to go. I'll keep you all posted. Rob -Original Message-

Re: Tutorial creates confusion about slices

2007-04-27 Thread Antoon Pardon
On 2007-04-26, Steve Holden <[EMAIL PROTECTED]> wrote: > Antoon Pardon wrote: >> On 2007-04-25, Steve Holden <[EMAIL PROTECTED]> wrote: > [...] >>> Most people reading a tutorial are aware that they are being given the >>> knowledge they need to put the subject matter to immediate use, and th

Re: key detect

2007-04-27 Thread hlubenow
Alex Taslab wrote: > Hi everybody, does anyone know how to detect a key press from a > keyboard. Well I do know how to do that, but i need to detect just one > press and ignore the others. I mean, my program checks an input from the > outside (a sensor) and i emulate that signal as a keypress, but

Re: webbrowser.open works in IDLE and cmd shell but not from cygwin prompt

2007-04-27 Thread Michael Hoffman
Gregory Bloom wrote: > I'm running Python 2.5 under Windows. If I fire up IDLE and enter: > import webbrowser url = 'http://www.python.org' webbrowser.open_new(url) > > it works like a champ, opening the page in Firefox. Same thing goes > from a Windows cmd shell: it works as adv

How can I save command prompt screen

2007-04-27 Thread ozan SARI
Hi , I run a python acript with os.system('script.py') I want save command prompt screen in a text file (everything ) how can I do this? Thanks for your help Ozan -- http://mail.python.org/mailman/listinfo/python-list

what python technology for my app?

2007-04-27 Thread Chris
I have an database containing lots of numerical data. I want to write a browser based interface that will allow selection of various key parameters and yield tables, plots and/or printouts of the data according to the selections. Ultimately I want this to run on an intranet so that others can g

Re: My python annoyances so far

2007-04-27 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : (snip) > > Well, why do some things in the library have to be functions, and > other things have to be class methods? > Why aren't they all just either functions or class methods? like > perhaps ruby. > If I tell you that Python's functions are in fact static method

RE: Re-ocurring Events

2007-04-27 Thread Robert Rawlins - Think Blue
Ok, Almost done now, it seems to be working a real charm at the moment. I need a little help on performing a quick if statement against a date string. I have couple of date strings returned by s.attributes.getNamedItem("start").nodeValue s.attributes.getNamedItem("end").nodeValue and I need to d

Re: My python annoyances so far

2007-04-27 Thread Bruno Desthuilliers
Marc 'BlackJack' Rintsch a écrit : > In <[EMAIL PROTECTED]>, Steven Howe > wrote: > >> And before someone get's all technical, I know everything in Python is >> an 'object' even None, which implies class, or is it the other way around? > > Objects don't imply classes. There are object oriented

Re: *** Dr G Polya BRILLIANTLY analyses the Virgina Shooting Incident ***

2007-04-27 Thread Fred Bloggs
[EMAIL PROTECTED] wrote: > On Apr 24, 2:09 pm, Quadibloc <[EMAIL PROTECTED]> wrote: > >>The Real Andy wrote: >> >>>Makes me wonder about the credibility of any statement Dr Gideon Polya >>>makes. >> >>. >>I never thought that I would feel the urge to call someone an >>edelweiss-eating Tanzanian

Re: My python annoyances so far

2007-04-27 Thread Bruno Desthuilliers
7stud a écrit : > [EMAIL PROTECTED] wrote: >> Annoyances: >> > > Every language has annoyances. Python is no exception. Sure. But we may disagree on what are actually Python's annoyances !-) > Post away. > Anyone that is offended can go drink a Guinness. > >> 1. Underscores! What's the deal

Re: How to find complementary colour for pixel

2007-04-27 Thread Laurent Pointal
Steven D'Aprano a écrit : > I shouldn't think so... I always forget if black is all ones or all > zeroes, so I checked here: http://www.pitt.edu/~nisg/cis/web/cgi/rgb.html For this I use the mnemotechnics idea of "chromatic coil" [*], when there are *all* colors turning it appear to be *white*. A

Re: How to find complementary colour for pixel

2007-04-27 Thread Steven D'Aprano
On Thu, 26 Apr 2007 21:17:42 -0700, James Stroud wrote: > Johny wrote: >> I use PIL to write some text to a picture.The text must be seen wery >> clearly. >> I write the text to different pictures but to the same position. As >> pictures maybe different, colour, in the position where I write t

Re: what python technology for my app?

2007-04-27 Thread Bruno Desthuilliers
Chris a écrit : > I have an database containing lots of numerical data. I want to write a > browser based interface that will allow selection of various key > parameters and yield tables, plots and/or printouts of the data > according to the selections. Ultimately I want this to run on an > int

RE: what python technology for my app?

2007-04-27 Thread Robert Rawlins - Think Blue
Just thought I'd make a little suggestion about this, I don’t know how strict you want to be with the web development side of things, but I'm a web developer by trade and have recently started using python for my non-web type applications. If you're looking for a web based server side solution, th

Re: My python annoyances so far

2007-04-27 Thread Bjoern Schliessmann
James Stroud wrote: > Here is something on which to meditate: classes become functions > when you get the quantum mechanics just so! s/become/can behave like/ :) Regards, Björn -- BOFH excuse #27: radiosity depletion -- http://mail.python.org/mailman/listinfo/python-list

Re: Re-ocurring Events

2007-04-27 Thread Jarek Zgoda
Robert Rawlins - Think Blue napisał(a): > and I need to do and conditional that ensures start is before today's > date/time and end is after today's date/time. > > The string looks like: '2007-01-01 00:00:00' > > Do I have to convert this to a proper time object to do the comparison? Or > can I

Re: My python annoyances so far

2007-04-27 Thread Bjoern Schliessmann
Steven D'Aprano wrote: > Perhaps you should read about the Kingdom of Nouns: > > execution-in-kingdom-of-nouns.html> Really cool. :) Thanks for sharing the link. Regards, Björn -- BOFH excuse #118: the router thinks its a printer. -- http://mai

RE: Re-ocurring Events

2007-04-27 Thread Robert Rawlins - Think Blue
Thanks for that tip Jarek, It worked a charm, I just created a format time string and used that in the compare against my XML and it work perfectly. Thank you, Rob -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jarek Zgoda Sent: 27 April 2007 13:01 To:

Multiple select in wx.GenericDirCrtl

2007-04-27 Thread Soren
Hi! Is it possible to do multiple file selections in a wx.GenericDirCtrl?? Thanks, Soren -- http://mail.python.org/mailman/listinfo/python-list

creating an object from base class

2007-04-27 Thread iogilvy
i wish to have some extended functionality added to sockets i can create my own socket class class mysocket(socket.socket): and all should be fine. Except, the sockets are created for me by the accept method, listening on port. So how can i take the standard socket created for me and create a '

Re: Generalized range

2007-04-27 Thread Beliavsky
On Apr 27, 1:32 am, [EMAIL PROTECTED] (Alex Martelli) wrote: > Michael Hoffman <[EMAIL PROTECTED]> wrote: > > [EMAIL PROTECTED] wrote: > > > Thanks - you have covered a fair bit of gorund here - I will modify > > > myRange taking your suggestions into account. The one suggestion that > > > I'm goin

Re: My python annoyances so far

2007-04-27 Thread flifus
On 26 Apr, 21:50, Bjoern Schliessmann wrote: > > like perhaps ruby. > > If I were rude, I would ask now why you don't use ruby. But I bet > ruby has some annoyances ready for you too. > > Regards, > > Björn > Well, I'd use ruby but python is everywhere, and ruby isn't. All the applications that i

Re: *** Dr G Polya BRILLIANTLY analyses the Virgina Shooting Incident ***

2007-04-27 Thread bill . sloman
On Apr 27, 12:59 pm, Fred Bloggs <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > On Apr 24, 2:09 pm, Quadibloc <[EMAIL PROTECTED]> wrote: > > >>The Real Andy wrote: > > >>>Makes me wonder about the credibility of any statement Dr Gideon Polya > >>>makes. > > >>. > >>I never thought that I

getting rid of EOL character ?

2007-04-27 Thread stef
hello, In the previous language I used, when reading a line by readline, the EOL character was removed. Now I'm reading a text-file with CR+LF at the end of each line, Datafile = open(filename,'r') line = Datafile.readline() now this gives an extra empty line print line and what I

Re: Multiple select in wx.GenericDirCrtl

2007-04-27 Thread kyosohma
On Apr 27, 7:31 am, Soren <[EMAIL PROTECTED]> wrote: > Hi! > > Is it possible to do multiple file selections in a wx.GenericDirCtrl?? > > Thanks, > Soren I'm not finding anything. I do know you can select multiple files using the FileDialog. You should email the wxPython users group though. They m

Re: getting rid of EOL character ?

2007-04-27 Thread Michael Hoffman
stef wrote: > hello, > > In the previous language I used, > when reading a line by readline, the EOL character was removed. > > Now I'm reading a text-file with CR+LF at the end of each line, >Datafile = open(filename,'r')line = Datafile.readline() > > now this gives an extra empty line

Re: what python technology for my app?

2007-04-27 Thread Bruno Desthuilliers
Robert Rawlins - Think Blue a écrit : > Just thought I'd make a little suggestion about this, I don’t know how > strict you want to be with the web development side of things, but I'm a web > developer by trade and have recently started using python for my non-web > type applications. > > If you'r

Re: what python technology for my app?

2007-04-27 Thread Gerard Flanagan
On Apr 27, 12:18 pm, Chris <[EMAIL PROTECTED]> wrote: > I have an database containing lots of numerical data. I want to write a > browser based interface that will allow selection of various key > parameters and yield tables, plots and/or printouts of the data > according to the selections. Ultimat

visit http://www.real-article.com/spyware/index.php

2007-04-27 Thread hiruma222
The www.real-article.com website provides a ton of information about spyware. In addition, you will find extensive information on leading spyware to help you on your way to success. Please have a look at our spyware articles, products, resources, and additional information located throughout www.r

RE: what python technology for my app?

2007-04-27 Thread Robert Rawlins - Think Blue
Haha, no Troll, just a shameless plug for my life's one true love ;-) Rob -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bruno Desthuilliers Sent: 27 April 2007 14:35 To: python-list@python.org Subject: Re: what python technology for my app? Robert Rawl

Re: Generalized range

2007-04-27 Thread Alex Martelli
Beliavsky <[EMAIL PROTECTED]> wrote: ... > > I've taught "numerical computing" in university, and I would have had to > > fail anybody who'd misunderstood floating-point computations badly > > enough to try that "+=step" idea (including, sigh, the coders of several > > Fortran compilers who were

Re: conditional print statement ?

2007-04-27 Thread stef
> or (untested): > > if Print_Info: > def printOrNot(arg): > print arg > else: > def printOrNot(arg): > pass > > printOrNot(Datafile.readline()) > > thanks for the creative solution, and indeed it does work ;-) cheers, Stef Mientki -- http://mail.python.org/mailman/lis

Re: getting rid of EOL character ?

2007-04-27 Thread stef
> > line = line.rstrip("\r\n") should take care of it. If you leave out > the parameter, it will strip out all whitespace at the end of the > line, which is what I do in most cases. thanks for the solution Michael, cheers, Stef -- http://mail.python.org/mailman/listinfo/python-list

Re: getting rid of EOL character ?

2007-04-27 Thread Jim
If you have a recent Python, see the documentation for open on the library page for built-in functions. http://docs.python.org/lib/built-in-funcs.html Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: My python annoyances so far

2007-04-27 Thread Bjoern Schliessmann
[EMAIL PROTECTED] wrote: > Well, I'd use ruby but python is everywhere, and ruby isn't. All > the applications that interest me are scriptable in python, not > ruby. Pity that you don't comment core topics. Regards, Björn -- BOFH excuse #289: Interference between the keyboard and the chair.

Re: regex question

2007-04-27 Thread proctor
On Apr 27, 1:33 am, Paul McGuire <[EMAIL PROTECTED]> wrote: > On Apr 27, 1:33 am, proctor <[EMAIL PROTECTED]> wrote: > > > > > hello, > > > i have a regex: rx_test = re.compile('/x([^x])*x/') > > > which is part of this test program: > > > > > > import re > > > rx_test = re.compile('/

Re: conditional print statement ?

2007-04-27 Thread Paul McGuire
On Apr 26, 7:31 am, Dustan <[EMAIL PROTECTED]> wrote: > On Apr 26, 1:58 am, Antoon Pardon <[EMAIL PROTECTED]> wrote: > > > > > > > On 2007-04-25, Stef Mientki <[EMAIL PROTECTED]> wrote: > > > > hello, > > > > As part of a procedure I've a number sequences like this: > > > > > > > if Print_Info

Re: regex question

2007-04-27 Thread Michael Hoffman
proctor wrote: > On Apr 27, 1:33 am, Paul McGuire <[EMAIL PROTECTED]> wrote: >> On Apr 27, 1:33 am, proctor <[EMAIL PROTECTED]> wrote: >>> rx_test = re.compile('/x([^x])*x/') >>> s = '/xabcx/' >>> if rx_test.findall(s): >>> print rx_test.findall(s) >>> >>> i expect the output

Re: regex question

2007-04-27 Thread Duncan Booth
proctor <[EMAIL PROTECTED]> wrote: > so my question remains, why doesn't the star quantifier seem to grab > all the data. isn't findall() intended to return all matches? i > would expect either 'abc' or 'a', 'b', 'c' or at least just > 'a' (because that would be the first match). why does it gi

Re: Command-line option equiv of PYTHONPATH

2007-04-27 Thread Antoon Pardon
On 2007-04-27, James Stroud <[EMAIL PROTECTED]> wrote: > Rajesh wrote: >> Hi, >> >> The '-I' option adds the path to the list of directories that >> contains modules that can be included in a script. I can use it as "#!/ >> usr/bin/perl -I" thereby not asking the user of >> the script to set the

Re: conditional print statement ?

2007-04-27 Thread Duncan Booth
Paul McGuire <[EMAIL PROTECTED]> wrote: > The Enable/Disable decorators on the Python wiki (http:// > wiki.python.org/moin/PythonDecoratorLibrary?highlight=%28decorator > %29#head-8298dbf9ac7325d9ef15e7130e676378bbbda572) help you do > something very similar, without having to replicate the functi

Re: regex question

2007-04-27 Thread Paul McGuire
On Apr 27, 9:10 am, proctor <[EMAIL PROTECTED]> wrote: > On Apr 27, 1:33 am, Paul McGuire <[EMAIL PROTECTED]> wrote: > > > > > > > On Apr 27, 1:33 am, proctor <[EMAIL PROTECTED]> wrote: > > > > hello, > > > > i have a regex: rx_test = re.compile('/x([^x])*x/') > > > > which is part of this test pr

Re: regex question

2007-04-27 Thread proctor
On Apr 27, 8:26 am, Michael Hoffman <[EMAIL PROTECTED]> wrote: > proctor wrote: > > On Apr 27, 1:33 am, Paul McGuire <[EMAIL PROTECTED]> wrote: > >> On Apr 27, 1:33 am, proctor <[EMAIL PROTECTED]> wrote: > >>> rx_test = re.compile('/x([^x])*x/') > >>> s = '/xabcx/' > >>> if rx_test.findall(s): > >>

Re: getting rid of EOL character ?

2007-04-27 Thread Steven Howe
stef wrote: hello, In the previous language I used, when reading a line by readline, the EOL character was removed. Now I'm reading a text-file with CR+LF at the end of each line, Datafile = open(filename,'r') line = Datafile.readline() now this gives an extra empty line print li

Re: regex question

2007-04-27 Thread proctor
On Apr 27, 8:37 am, Duncan Booth <[EMAIL PROTECTED]> wrote: > proctor <[EMAIL PROTECTED]> wrote: > > so my question remains, why doesn't the star quantifier seem to grab > > all the data. isn't findall() intended to return all matches? i > > would expect either 'abc' or 'a', 'b', 'c' or at least

Re: My python annoyances so far

2007-04-27 Thread Antoon Pardon
On 2007-04-27, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > 7stud a écrit : >> [EMAIL PROTECTED] wrote: >>> Annoyances: >>> >> >> Every language has annoyances. Python is no exception. > > Sure. But we may disagree on what are actually Python's annoyances !-) That is probably why the subje

Re: How can I save command prompt screen

2007-04-27 Thread Steven Howe
ozan SARI wrote: Hi , I run a python acript with os.system('script.py') I want save command prompt screen in a text file (everything ) how can I do this? Thanks for your help Ozan check out using the subprocess module http://docs.python.org/lib/node529.html It s

Accessing SQL View with Python

2007-04-27 Thread kyosohma
Hi All, I need to access a Microsoft SQL database View. Is there a way to do this with Python? I have done a fair share of "googling" and found nothing on accessing Views, just executing SQL, which I already know how to do. I am running Windows XP, Python 2.4. Thanks a lot! Mike -- http://mai

Re: Accessing SQL View with Python

2007-04-27 Thread Tim Golden
[EMAIL PROTECTED] wrote: > Hi All, > > I need to access a Microsoft SQL database View. Is there a way to do > this with Python? I have done a fair share of "googling" and found > nothing on accessing Views, just executing SQL, which I already know > how to do. > > I am running Windows XP, Python

building _tkinter module with .NET 2005?

2007-04-27 Thread joshusdog
I have the Python 2.5.1 source and I'm trying to build the debug version of the _tkinter module. I've got .NET 2005 (Visual Studio 8) but the instructions in the pcbuild\readme.txt file only contain instructions for using .NET 2003 (Visual Studio 7.1). There's another readme.txt file under the pcbu

Re: Access to raw command line?

2007-04-27 Thread Pieter Edelman
Yes, but I want to make it less difficult for my end users, not more difficult. I think the best is to require an extra switch for the photo files, as some of the people here suggested. On Apr 26, 6:27 pm, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2007-04-26, Pieter Edelman <[EMAIL PROTECTED]>

Re: conditional print statement ?

2007-04-27 Thread Paul McGuire
On Apr 27, 9:45 am, Duncan Booth <[EMAIL PROTECTED]> wrote: > Paul McGuire <[EMAIL PROTECTED]> wrote: > > The Enable/Disable decorators on the Python wiki (http:// > > wiki.python.org/moin/PythonDecoratorLibrary?highlight=%28decorator > > %29#head-8298dbf9ac7325d9ef15e7130e676378bbbda572) help you

My newbie annoyances so far

2007-04-27 Thread Paul McGuire
Python is not VB and Python is not Java and Python is not Ruby and Python is not any other language that is not Python. 1. Functions cannot be called without the parens (like in VB) 2. Python uses some naming conventions as programmer cues, such as leading and trailing double-underscores to indic

Re: regex question

2007-04-27 Thread Duncan Booth
proctor <[EMAIL PROTECTED]> wrote: >> >>> re.findall('(.)*', 'abc') >> ['c', ''] > thank you this is interesting. in the second example, where does the > 'nothingness' match, at the end? why does the regex 'run again' when > it has already matched everything? and if it reports an empty match >

Re: Access to raw command line?

2007-04-27 Thread Pieter Edelman
Of course you're right about that. I think an optional GUI or wizard- like interface (in this particular case) would be best, but I was looking for an easy fix :) Thanks for the suggestion though. On Apr 26, 5:25 pm, Michele Simionato <[EMAIL PROTECTED]> wrote: > On Apr 26, 9:04 am, Pieter Edelman

use urllib library to have an upload status bar

2007-04-27 Thread shirish
Hi all, Before I start, please know that I'm no developer, just a user. This is also a cross-post as I have tried to post the same at python- bugs mailing list, just don't know if it gets in or not. We have a bug-reporting system in ubuntu called apport. Apparently apport uses a python libra

Re: regex question

2007-04-27 Thread proctor
On Apr 27, 8:50 am, Paul McGuire <[EMAIL PROTECTED]> wrote: > On Apr 27, 9:10 am, proctor <[EMAIL PROTECTED]> wrote: > > > > > On Apr 27, 1:33 am, Paul McGuire <[EMAIL PROTECTED]> wrote: > > > > On Apr 27, 1:33 am, proctor <[EMAIL PROTECTED]> wrote: > > > > > hello, > > > > > i have a regex: rx_te

editing scripts on a mac

2007-04-27 Thread Steve Holden
I am teaching someone Python by email, and part of our conversation recently ran as follows: him> How do I save a script and run it? me > Do you have a text editor? If so, edit the script in that, then save it me > in your home directory (the place you can see when you open the terminal him>

Re: My newbie annoyances so far

2007-04-27 Thread John Nagle
Paul McGuire wrote: > Python is not VB and Python is not Java and Python is not Ruby and > Python is not any other language that is not Python. As someone who's written in too many programming languages over a long career, I'm quite pleased with Python as a programming language. It's straigh

Learning to use wxPython

2007-04-27 Thread KDawg44
Hi, I downloaded the wxPython demo and did an emerge wxpython (gentoo) to install. When I run the demo, I am getting this error: # python demo.py Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/wx-2.6-gtk2-ansi/wx/ _misc.py", line 1286, in Notify self.notify()

Re: Accessing SQL View with Python

2007-04-27 Thread kyosohma
On Apr 27, 10:29 am, Tim Golden <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Hi All, > > > I need to access a Microsoft SQL database View. Is there a way to do > > this with Python? I have done a fair share of "googling" and found > > nothing on accessing Views, just executing SQL, whi

Re: Learning to use wxPython

2007-04-27 Thread Michele Petrazzo
KDawg44 wrote: > Hi, > Hi, > I downloaded the wxPython demo and did an emerge wxpython (gentoo) to > install. When I run the demo, I am getting this error: > > > # python demo.py Traceback (most recent call last): File > "/usr/lib/python2.4/site-packages/wx-2.6-gtk2-ansi/wx/ _misc.py", > line

Re: editing scripts on a mac

2007-04-27 Thread Tommy Grav
> him> I do not have a text editor, but here are the answers to > him> questions 1-5. > > Now, frankly, I don't think this answer is correct, since I know OS > X is > a UNIX derivative, but I am loathe to involve a programming noob > with vi > or something similar. So I wondered if one of the c

Re: My newbie annoyances so far

2007-04-27 Thread Michael Hoffman
John Nagle wrote: > (P.S. PEP 3117 is a joke, right?) Note date of creation. -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: editing scripts on a mac

2007-04-27 Thread Thomas Nelson
On Apr 27, 11:37 am, Tommy Grav <[EMAIL PROTECTED]> wrote: > > him> I do not have a text editor, but here are the answers to > > him> questions 1-5. > > > Now, frankly, I don't think this answer is correct, since I know OS > > X is > > a UNIX derivative, but I am loathe to involve a programming n

Re: editing scripts on a mac

2007-04-27 Thread Tommy Nordgren
On 27 apr 2007, at 18.08, Steve Holden wrote: > I am teaching someone Python by email, and part of our conversation > recently ran as follows: > > him> How do I save a script and run it? > > me > Do you have a text editor? If so, edit the script in that, then > save it > me > in your home directo

Re: use urllib library to have an upload status bar

2007-04-27 Thread Larry Bates
shirish wrote: > Hi all, > Before I start, please know that I'm no developer, just a user. > This is also a cross-post as I have tried to post the same at python- > bugs mailing list, just don't know if it gets in or not. > > We have a bug-reporting system in ubuntu called apport. Apparently

Re: Correct behavior?

2007-04-27 Thread Mitja Trampus
[EMAIL PROTECTED] wrote: > On Apr 26, 8:34 pm, asker <[EMAIL PROTECTED]> wrote: >> But:>>> print "%15.2f" % a+b >> >> Traceback (most recent call last): >> File "", line 1, in >> TypeError: cannot concatenate 'str' and 'float' objects >> >> Is this correct for Python to issue this error? > > Th

Re: Rational numbers

2007-04-27 Thread M.-A. Lemburg
On 2007-02-23 16:35, Martin Manns wrote: > Hi, > > I am starting to use rationals and since I found no batteries included, > I tried out the mxNumber package. > > However, I get strange warnings on comparison operations > (which however seem to yield correct results): > > --- > $ python > Python

Re: My newbie annoyances so far

2007-04-27 Thread John Nagle
Dennis Lee Bieber wrote: > On 27 Apr 2007 08:34:42 -0700, Paul McGuire <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > >>deficient - ternary expressions are now part of the language after >>years of refugees from C and C++ asking how to write "a = b ? c : d", >>and now they

Re: http pipelining

2007-04-27 Thread Steve Holden
[EMAIL PROTECTED] wrote: > Which python module is capable of pipelining http requests? > > (I know httplib can send mulitple requests per tcp connection, but in > a strictly serial way. ) > Oops, sorry, you meant sending requests in parallel, right? You'll need to use either urllib or urllib2 f

Re: http pipelining

2007-04-27 Thread Steve Holden
[EMAIL PROTECTED] wrote: > Which python module is capable of pipelining http requests? > > (I know httplib can send mulitple requests per tcp connection, but in > a strictly serial way. ) > > There's nothing in the standard library, I believe, that includes both client and server functionality

Re: Learning to use wxPython

2007-04-27 Thread KDawg44
On Apr 27, 11:25 am, Michele Petrazzo <[EMAIL PROTECTED]> wrote: > KDawg44 wrote: > > Hi, > > Hi, > > > I downloaded the wxPython demo and did an emerge wxpython (gentoo) to > > install. When I run the demo, I am getting this error: > > > # python demo.py Traceback (most recent call last): File >

Re: http pipelining

2007-04-27 Thread swq22
On Fri, 27 Apr 2007 13:50:21 -0400, Steve Holden <[EMAIL PROTECTED]> wrote: >[EMAIL PROTECTED] wrote: >> Which python module is capable of pipelining http requests? >> >> (I know httplib can send mulitple requests per tcp connection, but in >> a strictly serial way. ) >> >> >There's nothing in

wxPython (Flex)GridSizer Failing

2007-04-27 Thread [EMAIL PROTECTED]
Python v2.5 wxPython v2.8.3.0 I've got an app that has a wx.Panel managed by a FlexGridSizer. There are 5 columns and 6 rows, all with StaticText widgets and all of similar size. Everything works fine until I Clear and re-fill the sizer a few times, then it puts all of the text in the upper-left

Re: Access to raw command line?

2007-04-27 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2007-04-26, Donn Cave <[EMAIL PROTECTED]> wrote: > > >> One possible way to work around this is to get the raw command line > >> and do the shell expansions ourselves from within Python. Ignoring the > >> question of w

More urllib timeout issues.

2007-04-27 Thread John Nagle
I thought I had all the timeout problems with urllib worked around, but no. socket.setdefaulttimeout is useful, but not always effective. I'm setting that to 15 seconds. If the host end won't open the connection within 15 seconds, urllib times out. But if the host end opens the connection,

Re: : Re-ocurring Events

2007-04-27 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Robert Rawlins - Think Blue <[EMAIL PROTECTED]> wrote: . . . >I've been thinking about the possibility of using a combination of xpath to >search the XML with some loops which change the date. As

Re: Dedicated CPU core for Python?

2007-04-27 Thread Joshua J. Kugler
On Thursday 26 April 2007 14:07, Gabriel Genellina wrote: > En Thu, 26 Apr 2007 15:54:38 -0300, Joshua J. Kugler > <[EMAIL PROTECTED]> escribió: > >> Are you talking about CPU affinity >> (http://en.wikipedia.org/wiki/Processor_affinity) or an actual CPU that >> can directory execute Python byte

Re: editing scripts on a mac

2007-04-27 Thread Michael Bentley
On Apr 27, 2007, at 11:08 AM, Steve Holden wrote: > I am teaching someone Python by email, and part of our conversation > recently ran as follows: > > him> How do I save a script and run it? > > me > Do you have a text editor? If so, edit the script in that, then > save it > me > in your home dir

Re: Dedicated CPU core for Python?

2007-04-27 Thread John Nagle
Joshua J. Kugler wrote: > On Thursday 26 April 2007 14:07, Gabriel Genellina wrote: > > >>En Thu, 26 Apr 2007 15:54:38 -0300, Joshua J. Kugler >><[EMAIL PROTECTED]> escribió: >> >> >>>Are you talking about CPU affinity >>>(http://en.wikipedia.org/wiki/Processor_affinity) or an actual CPU that >>>

Returned mail: see transcript for details

2007-04-27 Thread Mail Administrator
*** ** Attachment file.scr was filtered. ***-- http://mail.python.org/mailman/listinfo/python-list

Memory addressing

2007-04-27 Thread Simon Berube
Hi, I have a rather simple question for which I couldn't find an answer. I noticed how a significant number of objects in Python return a __repr__() string along the lines of : < Object at 0xXX> I find this notation quite convenient to avoid out of control strings when using large arra

Re: My newbie annoyances so far

2007-04-27 Thread Paul McGuire
On Apr 27, 12:42 pm, John Nagle <[EMAIL PROTECTED]> wrote: > Dennis Lee Bieber wrote: > > On 27 Apr 2007 08:34:42 -0700, Paul McGuire <[EMAIL PROTECTED]> > > declaimed the following in comp.lang.python: > > >>deficient - ternary expressions are now part of the language after > >>years of refugees f

  1   2   >