Re: Freesoftware for auto/intelligent code completing in Python

2008-07-04 Thread Aspersieman
Jeroen Ruigrok van der Werven wrote: -On [20080630 23:51], Ali Servet Dönmez ([EMAIL PROTECTED]) wrote: This could be an extension, a plugin, an Emacs mode, a new editor or even a brand new huge all-fancy IDE, I don't care, but what am I missing here? Vim's omnicomplete (CTRL-X CTRL-O)

Re: Singleton implementation problems

2008-07-04 Thread Ben Finney
Peter Otten <[EMAIL PROTECTED]> writes: > The problem is the structure of your program. The myset module is > imported twice by Python, once as "myset" and once as "__main__". Yes, this is the problem. Each module imports the other. > Therefore you get two distinct MySet classes, and consequentl

Re: Parsing MIME-encoded data in an HTTP request

2008-07-04 Thread Ron Garret
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > On Jul 3, 3:59 pm, Ron Garret <[EMAIL PROTECTED]> wrote: > > I'm writing a little HTTP server and need to parse request content that > > is mime-encoded. All the MIME routines in the Python standard library > > seem to have been subsume

Re: problem parsing utf-8 encoded xml - minidom

2008-07-04 Thread ashmir . d
On Jul 4, 2:36 pm, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > The parser is failing on this line: > > > Heinrich Kèufner, Norbert Nedopil, Heinz Schèoch (Hrsg.). > mrcb245-c> > > If it is literally this line, it's no surprise: there must not be a line > break between the slash and the closing

Re: detection of unplugged cable

2008-07-04 Thread Oguz Yarimtepe
Ok here is the exact problem. I have both S-Video, HDMI and VGA out at my machine. I tried to clone the LCD display to HDMI out but it worked only when i disable the LCD and send the display to HDMI. So when the HDMI cable is unplugged i want to revert the process and enable the LCD. I need to det

better way to search the Python archive

2008-07-04 Thread Jeremy Link
Just an FYI out to folks that want a better way to search the Python archive. I've been using MarkMail (www.markmail.org ) to search the archives and it works MUCH better than the Google archive. It is a free hosting of all sorts of GNU/open source mailing lists (

Re: Singleton implementation problems

2008-07-04 Thread Matthew Fitzgibbons
Ben Finney wrote: Peter Otten <[EMAIL PROTECTED]> writes: The problem is the structure of your program. The myset module is imported twice by Python, once as "myset" and once as "__main__". Yes, this is the problem. Each module imports the other. Therefore you get two distinct MySet classes

compatible image type

2008-07-04 Thread gordon
hi in my application a file selection by user returns a pathname string like F:/images/png/my.png or F:/docs/text/somedoc.txt etc. I can get the extension using extn=string.split(os.path.basename(pathname),'.' )[1] then later on i want to create a Photoimage using ImageTk.PhotoImage(file=pat

Re: Freesoftware for auto/intelligent code completing in Python

2008-07-04 Thread Jeroen Ruigrok van der Werven
-On [20080704 09:00], Aspersieman ([EMAIL PROTECTED]) wrote: >Here's a tutorial on setting this up. >http://blog.sontek.net/2008/05/11/python-with-a-modular-ide-vim/ Thanks Nicol, there's some things there that can speed up my current setup as well. -- Jeroen Ruigro

Re: Singleton implementation problems

2008-07-04 Thread Peter Otten
Ben Finney wrote: > Peter Otten <[EMAIL PROTECTED]> writes: > >> The problem is the structure of your program. The myset module is >> imported twice by Python, once as "myset" and once as "__main__". > > Yes, this is the problem. Each module imports the other. > >> Therefore you get two distinc

Re: Singleton implementation problems

2008-07-04 Thread Terry Reedy
Ben Finney wrote: Peter Otten <[EMAIL PROTECTED]> writes: The problem is the structure of your program. The myset module is imported twice by Python, once as "myset" and once as "__main__". Yes, this is the problem. Each module imports the other. Therefore you get two distinct MySet class

Re: Recursive wildcard file search

2008-07-04 Thread Gerhard Häring
Robert Dailey wrote: Hi, Is there a way to perform a recursive file search using wildcards in python 3.0b1? [...] glob.glob() or glob.iglob(). -- Gerhard -- http://mail.python.org/mailman/listinfo/python-list

Re: running python from cmd.exe

2008-07-04 Thread Dominic Rice
Miki wrote: Hello, I can't seem to get python to run my scripts using the command: python .py If I type python the interpreter runs as I sorted out the Path property, I'm afraid I don't know much about this kind of thing as I'm a science student who needs some Python not a programmer! Can yo

Newbie, list has no attribute iteritems

2008-07-04 Thread rabad
Hi, I've created a custom filter based on HTMLParser, with the following source: class Filter(HTMLParser): def __init__(self, keyfile): HTMLParser.__init__(self) mykwfile = open(keyfile, 'r') self._keywords = [] for kw in mykwfile.read().split('\n'):

Re: running python from cmd.exe

2008-07-04 Thread Dominic Rice
Dominic Rice wrote: Miki wrote: Hello, I can't seem to get python to run my scripts using the command: python .py If I type python the interpreter runs as I sorted out the Path property, I'm afraid I don't know much about this kind of thing as I'm a science student who needs some Python not

Re: better way to search the Python archive

2008-07-04 Thread Tim Golden
Jeremy Link wrote: Just an FYI out to folks that want a better way to search the Python archive… I’ve been using MarkMail (www.markmail.org ) to search the archives and it works MUCH better than the Google archive. It is a free hosting of all sorts of GNU/open source

Re: compatible image type

2008-07-04 Thread Marc 'BlackJack' Rintsch
On Fri, 04 Jul 2008 01:15:30 -0700, gordon wrote: > then later on i want to create a Photoimage using > > ImageTk.PhotoImage(file=pathname) and display it on a canvas. > > the extn can be anything ..even zip or bat ,doc whatever depending on > user selection...I want to put someway to raise an

Re: Newbie, list has no attribute iteritems

2008-07-04 Thread Justin Ezequiel
def handle_starttag(self, tag, attrs): # <-- attrs here is a list if 'a' != tag: self.stack.append(self.__html_start_tag(tag, attrs))# <-- attrs here is still a list return attrs = dict(attrs)# <-- now attrs is a dictionary -- http://mail.python

Re: Newbie, list has no attribute iteritems

2008-07-04 Thread Bruno Desthuilliers
rabad a écrit : Hi, I've created a custom filter based on HTMLParser, with the following source: (snip) But when I use it, it gives me the following error message: ERROR Processor exception: AttributeError: 'list' object has no attribute 'iteritems' (snip) File "d:\esp\lib\python2.3\pr

Bug in re.findall?

2008-07-04 Thread Marcin Krol
Hello everyone, Is there a bug in re.findall in Python 2.4? See: subnetlist="192.168.100.0 , 192.168.101.0" ipre=re.compile("([0-9]{1,3}\.){3}[0-9]{1,3}") >>> ipre.findall(subnetlist) ['100.', '101.'] But: a=ipre.finditer(subnetlist) >>> a.next().group() '192.168.100.0' >>> a.next().group(

Naming conventions for regular variables

2008-07-04 Thread mk
http://www.python.org/dev/peps/pep-0008/ "Function Names Function names should be lowercase, with words separated by underscores as necessary to improve readability." However, this PEP does not recommend any particular style for naming regular (local) variables. Personally I like "m

Re: Bug in re.findall?

2008-07-04 Thread dwahli
On Jul 4, 12:33 pm, Marcin Krol <[EMAIL PROTECTED]> wrote: > Hello everyone, > > Is there a bug in re.findall in Python 2.4? See: > > subnetlist="192.168.100.0 , 192.168.101.0" > ipre=re.compile("([0-9]{1,3}\.){3}[0-9]{1,3}") > >  >>> ipre.findall(subnetlist) > > ['100.', '101.'] > > But: > > a=ipr

Re: Bug in re.findall?

2008-07-04 Thread Peter Otten
Marcin Krol wrote: > Hello everyone, > > Is there a bug in re.findall in Python 2.4? See: > > subnetlist="192.168.100.0 , 192.168.101.0" > ipre=re.compile("([0-9]{1,3}\.){3}[0-9]{1,3}") > > >>> ipre.findall(subnetlist) > > ['100.', '101.'] > > > But: > > a=ipre.finditer(subnetlist) > > >

re.search much slower then grep on some regular expressions

2008-07-04 Thread Henning_Thornblad
What can be the cause of the large difference between re.search and grep? This script takes about 5 min to run on my computer: #!/usr/bin/env python import re row="" for a in range(156000): row+="a" print re.search('[^ "=]*/',row) While doing a simple grep: grep '[^ "=]*/' input

Static Class Initialization Question.

2008-07-04 Thread Thomas Troeger
Hello, I have a class that looks like this: class A(object): def __init__(self, a=0, b=1): self.a, self.b=a, b def __str__(self): return "%s(%d,%d)" % (type(a).__name__, self.a, self.b) I want to have a list of such classes instantiated a

Re: Naming conventions for regular variables

2008-07-04 Thread Ben Finney
mk <[EMAIL PROTECTED]> writes: > http://www.python.org/dev/peps/pep-0008/ > > "Function Names > > Function names should be lowercase, with words separated by > underscores as necessary to improve readability." > > However, this PEP does not recommend any particular style for naming > regula

win32com.client (Howto edit Contacts in Outlook)

2008-07-04 Thread Bill Davy
I am trying to edit Contacts in Outlook. This is so I can transfer numbers from my address book which is an Excel spreadsheet to my mobile phone. I came across the following snippet of code which enabled me to the contacts at least list. I had to root around to discover CdoDefaultFolderContac

Re: Static Class Initialization Question.

2008-07-04 Thread Bruno Desthuilliers
Thomas Troeger a écrit : Hello, I have a class that looks like this: class A(object): def __init__(self, a=0, b=1): self.a, self.b=a, b def __str__(self): return "%s(%d,%d)" % (type(a).__name__, self.a, self.b) Given the output example you give, I assume there's

Re: imap4_SSL from behind a proxy server

2008-07-04 Thread Michael Ströder
Diez B. Roggisch wrote: Dave schrieb: I'm trying write some Python code to connect to Gmail from work, where I need to direct all non-HTTP traffic through a proxy server. AFAIK that's simply not possible. It's possible. Proxying that is not transparent is only (for practical matters, there

Re: Parsing MIME-encoded data in an HTTP request

2008-07-04 Thread Michael Ströder
Ron Garret wrote: I'm writing a little HTTP server and need to parse request content that is mime-encoded. All the MIME routines in the Python standard library seem to have been subsumed into the email package, which makes this operation a little awkward. How about using cgi.parse_multipart(

Re: re.search much slower then grep on some regular expressions

2008-07-04 Thread Bruno Desthuilliers
Henning_Thornblad a écrit : What can be the cause of the large difference between re.search and grep? This script takes about 5 min to run on my computer: #!/usr/bin/env python import re row="" for a in range(156000): row+="a" print re.search('[^ "=]*/',row) While doing a simple grep: gre

Re: re.search much slower then grep on some regular expressions

2008-07-04 Thread Bruno Desthuilliers
Bruno Desthuilliers a écrit : Henning_Thornblad a écrit : What can be the cause of the large difference between re.search and grep? This script takes about 5 min to run on my computer: #!/usr/bin/env python import re row="" for a in range(156000): row+="a" print re.search('[^ "=]*/',row)

Re: re.search much slower then grep on some regular expressions

2008-07-04 Thread Peter Otten
Henning_Thornblad wrote: > What can be the cause of the large difference between re.search and > grep? grep uses a smarter algorithm ;) > This script takes about 5 min to run on my computer: > #!/usr/bin/env python > import re > > row="" > for a in range(156000): > row+="a" > print re.sear

Re: Bug in re.findall?

2008-07-04 Thread Richie Hindle
Hi Marcin, > subnetlist="192.168.100.0 , 192.168.101.0" > ipre=re.compile("([0-9]{1,3}\.){3}[0-9]{1,3}") > > >>> ipre.findall(subnetlist) > ['100.', '101.'] Correct - it returns the most recently captured text for your sole group. > a=ipre.finditer(subnetlist) > >>> a.next().group() > '192.168.

Re: Static Class Initialization Question.

2008-07-04 Thread Thomas Troeger
Bruno Desthuilliers wrote: return "%s(%d,%d)" % (type(self).__name__, self.a, self.b) Er, yes exactly! I noticed it a few seconds after I had sent the message ;-( I want to have a list of such classes instantiated automatically on Of course I meant class instances ... sorry :) It'

origin of error message

2008-07-04 Thread gordon
hi i was trying to create an image using user selection of a file in tix fileselection box ..and i check for exception like below ... from string import split from os.path import basename ... #this is done inside __init__method self.imgsel=FileSelectBox(self.imgSelectFrame) ... def button1Click(

Re: Static Class Initialization Question.

2008-07-04 Thread Marc 'BlackJack' Rintsch
On Fri, 04 Jul 2008 14:59:05 +0200, Thomas Troeger wrote: > Bruno Desthuilliers wrote: >>> I want to have a list of such classes instantiated automatically on > > Of course I meant class instances ... sorry :) It's always good to have > an example to compensate for English errors *g*. Well, "c

Re: win32com.client (Howto edit Contacts in Outlook)

2008-07-04 Thread Tim Golden
Bill Davy wrote: I am trying to edit Contacts in Outlook. This is so I can transfer numbers from my address book which is an Excel spreadsheet to my mobile phone. I came across the following snippet of code --- hey! that looks familiar :) which enabled me to the contacts at least list. I

Re: compatible image type

2008-07-04 Thread Larry Bates
gordon wrote: hi in my application a file selection by user returns a pathname string like F:/images/png/my.png or F:/docs/text/somedoc.txt etc. I can get the extension using extn=string.split(os.path.basename(pathname),'.' )[1] then later on i want to create a Photoimage using ImageTk.Pho

Re: Recursive wildcard file search

2008-07-04 Thread Tim Golden
[sorry; this got stuck in my outbox] Robert Dailey wrote: Is there a way to perform a recursive file search using wildcards in python 3.0b1? For example, if I have: C:\foo\abc*xyz.* I want all files in C:\foo and all subfolders (recursively) of C:\foo that match the wildcard abc*xyz.* to be

Javascript - Python RSA encryption interoperability

2008-07-04 Thread Evren Esat Ozkan
Hello, I'm trying to encrypt a string with RSA. But it needs to be compitable with Dave's JavaScript RSA implementation*. I'm already read and tried lots of different things about RSA and RSA in Python. But could not produce the same result with the javascript library. My experiments could be see

Re: running python from cmd.exe

2008-07-04 Thread Chris Hulan
On Jul 4, 5:38 am, Dominic Rice <[EMAIL PROTECTED]> wrote: > Dominic Rice wrote: > > Miki wrote: > >> Hello, > > >>> I can't seem to get python to run my scripts using the command: python > >>> .py > > >>> If I type python the interpreter runs as I sorted out the Path property, > > >>> I'm afraid I

Re: win32com.client (Howto edit Contacts in Outlook)

2008-07-04 Thread Bill Davy
"Tim Golden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Bill Davy wrote: >> I am trying to edit Contacts in Outlook. This is so I can transfer >> numbers from my address book which is an Excel spreadsheet to my mobile >> phone. I came across the following snippet of code > >

Re: Generating list of possible configurations

2008-07-04 Thread [EMAIL PROTECTED]
Wow, I didn't have time to look back on this thread for a while, surprised of the activity. Anyhow, thanks for the answers, and thanks for pointing out that the itertools-variants are not available in 2.5. Cheers! //emil -- http://mail.python.org/mailman/listinfo/python-list

Can't get Python for Windows to run

2008-07-04 Thread Tim Rowe
I have Python 2.5 working just fine on my system. I've tried downloading and installing the MS Windows Python extensions, but can't get pythonw.exe (that's the windows executable, right?) to do anything. I double-click it, nothing happens. I run it from a command prompt, it just returns me to the

Re: Javascript - Python RSA encryption interoperability

2008-07-04 Thread marek . rocki
Evren Esat Ozkan napisał(a): > Hello, > > I'm trying to encrypt a string with RSA. But it needs to be compitable > with Dave's JavaScript RSA implementation*. I'm already read and tried > lots of different things about RSA and RSA in Python. But could not > produce the same result with the javascri

Re: Can't get Python for Windows to run

2008-07-04 Thread Tim Golden
Tim Rowe wrote: I have Python 2.5 working just fine on my system. I've tried downloading and installing the MS Windows Python extensions, but can't get pythonw.exe (that's the windows executable, right?) to do anything. I double-click it, nothing happens. I run it from a command prompt, it just

Re: A fix for OverflowError in 64bits platforms

2008-07-04 Thread Manuel Vazquez Acosta
Terry Reedy wrote: > Manuel Vazquez Acosta wrote: >> Hi all, >> >> I'm debugging a Plone site in an AMD64 laptop. When I first tried to run >> Zope, I got this exception: > > In general, versions numbers for both Python and the app are helpful. > Python 2.4.5, Plone 2.5.5, Zope 2.9.8final >> Ov

Re: win32com.client (Howto edit Contacts in Outlook)

2008-07-04 Thread Bill Davy
"Bill Davy" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Tim Golden" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> Bill Davy wrote: >>> I am trying to edit Contacts in Outlook. This is so I can transfer >>> numbers from my address book which is an Excel spre

Boost Python - C++ class' private static data blown away before accessing in Python?

2008-07-04 Thread Stodge
I've exposed a C++ class to Python using Boost Python. The class, let's say it's called Entity, contains private static data, which is an array of strings. Though I think it implements it using MFC's CPtrArray. I've also exposed a public function from Entity - let's say it's called foo. This funct

Re: re.search much slower then grep on some regular expressions

2008-07-04 Thread Paddy
On Jul 4, 1:36 pm, Peter Otten <[EMAIL PROTECTED]> wrote: > Henning_Thornblad wrote: > > What can be the cause of the large difference between re.search and > > grep? > > grep uses a smarter algorithm ;) > > > > > This script takes about 5 min to run on my computer: > > #!/usr/bin/env python > > im

Re: Can't get Python for Windows to run

2008-07-04 Thread Tim Rowe
2008/7/4 Tim Golden <[EMAIL PROTECTED]>: > Ummm. That's the Python interpreter but without a window so > (unhelpfully, from your point of view) it's doing exactly the > right thing. > > I assume you were trying to run the PythonWin Python > interpreter and dev env? On my system, that's: > > C:\Pyt

Getting a path from a file object

2008-07-04 Thread Andrew Fong
Newbie question: Let's say I open a new file for writing in a certain path. How do I get that path back? Example: >>> f = open('/some/path/file.ext') >>> some_function(f) '/some/path/file.ext' Does some_function(f) already exist? And if not, how would I define it? -- Andrew -- http://mail.pyth

Re: Getting a path from a file object

2008-07-04 Thread Michael Mabin
f.name will return the path. But if you want to guarantee getting the absolute pathname use os.path.abspath >>> import os >>> os.path.abspath(f.name) '/some/path/file.ext' On Fri, Jul 4, 2008 at 1:37 PM, Andrew Fong <[EMAIL PROTECTED]> wrote: > Newbie question: > > Let's say I open a new file

pydev and psycopg2 - weird behaviour

2008-07-04 Thread RossGK
I've been using pydev for a short while successfully, and Django with postgresql as well. psycopg2 is part of that behind the scenes I would imagine, to make django work. Now I'm trying to use psycopg2 in a non-Django program, I'm seeing some weird behaviour My "import psycopg2" is tagged

Re: Getting a path from a file object

2008-07-04 Thread [EMAIL PROTECTED]
On 4 juil, 20:37, Andrew Fong <[EMAIL PROTECTED]> wrote: > Newbie question: > > Let's say I open a new file for writing in a certain path. How do I > get that path back? > > Example: > > >>> f = open('/some/path/file.ext') > >>> some_function(f) > > '/some/path/file.ext' > > Does some_function(f) a

Re: re.search much slower then grep on some regular expressions

2008-07-04 Thread Filipe Fernandes
On Fri, Jul 4, 2008 at 8:36 AM, Peter Otten <[EMAIL PROTECTED]> wrote: > Henning_Thornblad wrote: > >> What can be the cause of the large difference between re.search and >> grep? > > grep uses a smarter algorithm ;) > >> This script takes about 5 min to run on my computer: >> #!/usr/bin/env python

Re: Can't get Python for Windows to run

2008-07-04 Thread Martin v. Löwis
> Is it worth flagging as an issue somewhere the fact that the pywin > installer assumes a particular structure for the start menu No. This is the first time in several years that this was reported, and chances that this gets fixed in the upcoming years are very low, unless a patch gets contribute

Re: SQLite and Python 2.4

2008-07-04 Thread Steffen Mutter
Hi Joe! Am Tue, 01 Jul 2008 17:51:35 -0700 schrieb Joe Goldthwaite: > I'm confused. (Not a new experience). Everyone looking for help in the usenet asking for help is sharing your disease. > I've got a web application > running under Zope. I use the Wing IDE for testing and debugging. Okay

Re: Iphone Going 3G!

2008-07-04 Thread Aloysius Hibblenire-Ozzleridge
On Thu, 3 Jul 2008 11:19:39 -0700 relic [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED] > fizzi wrote: >> For the Iphone lovers out there, > > Wrong group. No weirdos here. The dumb cunt is posting old news too. -- http://mail.python.org/mailman/listinfo/python-list

Re: running python from cmd.exe

2008-07-04 Thread Dominic Rice
Chris Hulan wrote: On Jul 4, 5:38 am, Dominic Rice <[EMAIL PROTECTED]> wrote: Dominic Rice wrote: Miki wrote: Hello, I can't seem to get python to run my scripts using the command: python .py If I type python the interpreter runs as I sorted out the Path property, I'm afraid I don't know much

Re: Parsing MIME-encoded data in an HTTP request

2008-07-04 Thread Ron Garret
In article <[EMAIL PROTECTED]>, Michael Ströder <[EMAIL PROTECTED]> wrote: > Ron Garret wrote: > > I'm writing a little HTTP server and need to parse request content that > > is mime-encoded. All the MIME routines in the Python standard library > > seem to have been subsumed into the email pac

Re: Parsing MIME-encoded data in an HTTP request

2008-07-04 Thread Ron Garret
In article <[EMAIL PROTECTED]>, Ron Garret <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > Michael Ströder <[EMAIL PROTECTED]> wrote: > > > Ron Garret wrote: > > > I'm writing a little HTTP server and need to parse request content that > > > is mime-encoded. All the MIME routin

Re: running python from cmd.exe

2008-07-04 Thread John Machin
On Jul 5, 7:38 am, Dominic Rice <[EMAIL PROTECTED]> wrote: > Chris Hulan wrote: > > On Jul 4, 5:38 am, Dominic Rice <[EMAIL PROTECTED]> wrote: > >> Dominic Rice wrote: > >>> Miki wrote: > Hello, > > I can't seem to get python to run my scripts using the command: python > > .py > >

Re: running python from cmd.exe

2008-07-04 Thread Dominic Rice
John Machin wrote: On Jul 5, 7:38 am, Dominic Rice <[EMAIL PROTECTED]> wrote: Chris Hulan wrote: On Jul 4, 5:38 am, Dominic Rice <[EMAIL PROTECTED]> wrote: Dominic Rice wrote: Miki wrote: Hello, I can't seem to get python to run my scripts using the command: python .py If I type python the

http://vivalacuba.blogspot.com/

2008-07-04 Thread thisisspam0
http://vivalacuba.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: site-packages, unzipepd there but import fails

2008-07-04 Thread satoru
why don't you just download & excute the windown installer binary? On Jul 4, 2:47 am, defn noob <[EMAIL PROTECTED]> wrote: > On Jul 3, 8:06 pm, "[EMAIL PROTECTED]" > > <[EMAIL PROTECTED]> wrote: > > On 3 juil, 18:51, defn noob <[EMAIL PROTECTED]> wrote: > > > > well the reason i unzipped and place

caseless dict - questions

2008-07-04 Thread Phoe6
I have a requirement for using caseless dict. I searched the web for many different implementations and found one snippet which was implemented in minimal and useful way. # import UserDict class CaseInsensitiveDict(dict, UserDict.DictMixin): def __init__(self, *args, **kwargs):

Re: Copyright issues for an application developed using django, python and mySQL

2008-07-04 Thread Nagu
Thank you for your explanations. On Jul 3, 6:27 pm, Ben Finney <[EMAIL PROTECTED]> wrote: > Nagu <[EMAIL PROTECTED]> writes: > > I made a small recommendation engine for our company using python, > > django, and mySQL. My supervisor and the senior management are > > worried about the copyright and

Re: Can't get Python for Windows to run

2008-07-04 Thread William McBrine
On Fri, 04 Jul 2008 16:19:34 +0100, Tim Rowe wrote: > pythonw.exe (that's the windows executable, right?) python.exe and pythonw.exe are both Windows executables. There are no non- Windows executables in a Python for Windows package. python.exe is used for console apps or interactive sessions.

Re: re.search much slower then grep on some regular expressions

2008-07-04 Thread Carl Banks
On Jul 4, 4:43 pm, "Filipe Fernandes" <[EMAIL PROTECTED]> wrote: > On Fri, Jul 4, 2008 at 8:36 AM, Peter Otten <[EMAIL PROTECTED]> wrote: > > Henning_Thornblad wrote: > > >> What can be the cause of the large difference between re.search and > >> grep? > > > grep uses a smarter algorithm ;) > > >>

Re: re.search much slower then grep on some regular expressions

2008-07-04 Thread John Nagle
Henning_Thornblad wrote: What can be the cause of the large difference between re.search and grep? This script takes about 5 min to run on my computer: #!/usr/bin/env python import re row="" for a in range(156000): row+="a" print re.search('[^ "=]*/',row) While doing a simple grep: grep '

Re: re.search much slower then grep on some regular expressions

2008-07-04 Thread Peter Pearson
On Fri, 4 Jul 2008 20:34:03 -0700 (PDT), Carl Banks wrote: > On Jul 4, 4:43 pm, "Filipe Fernandes" <[EMAIL PROTECTED]> wrote: >> On Fri, Jul 4, 2008 at 8:36 AM, Peter Otten <[EMAIL PROTECTED]> wrote: >> > Henning_Thornblad wrote: >> >> >> This script takes about 5 min to run on my computer: >> >> #

Python XML-RPC Server with clientside Javascript

2008-07-04 Thread akineko
Hello everyone, I have used Python SimpleXMLRPCServer to expose several methods to be used. My Python script creates a free-standing server and not a CGI script. I have tested its exposed methods using the following Python script: import xmlrpclib s = xmlrpclib.ServerProxy('http://localhost:8765'

Re: re.search much slower then grep on some regular expressions

2008-07-04 Thread Peter Otten
John Nagle wrote: > Henning_Thornblad wrote: >> What can be the cause of the large difference between re.search and >> grep? >> >> This script takes about 5 min to run on my computer: >> #!/usr/bin/env python >> import re >> >> row="" >> for a in range(156000): >> row+="a" >> print re.search

Re: re.search much slower then grep on some regular expressions

2008-07-04 Thread Peter Otten
Paddy wrote: > It is not a smarter algorithm that is used in grep. Python RE's have > more capabilities than grep RE's which need a slower, more complex > algorithm. So you're saying the Python algo is alternatively gifted... Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: re.search much slower then grep on some regular expressions

2008-07-04 Thread Peter Otten
Filipe Fernandes wrote: > but why would you say this particular > regex isn't common enough in real code? As Carl says, it's not just the regex, it's the the combination with a long line that exposes the re library's weakness. Peter -- http://mail.python.org/mailman/listinfo/python-list

how to get selected filename in FileSelectBox

2008-07-04 Thread wilson
hi i am using tix FileSelectBox in my application .I want to get the selected filename as a string i do this as follows fselectbox=FileSelectBox(someframe) fselectbox.__setitem__("dir",join(fselectbox.cget("dir"),"..")) fselectbox.pack(side=LEFT) ... selectedfile=fselectbox.selection.cget("value"

Re: install py2exe in vista

2008-07-04 Thread maphew
SOLVED: right-click on the install program and "Run as administrator" solution courtesy of http://support.esri.com/index.cfm?fa=knowledgebase.techarticles.articleShow&d=34538 On Jun 22, 11:34 am, jim-on-linux <[EMAIL PROTECTED]> wrote: > On Saturday 21 June 2008 13:28, Herman wrote: > > >  I wan