Re: Top 10 Caribbean island destinations

2007-10-11 Thread george . smith78
lol :) another one on baseball : 90% of the game is physical, the other half is mental. GS [EMAIL PROTECTED] On Oct 11, 7:32 pm, willshak <[EMAIL PROTECTED]> wrote: > on 10/11/2007 10:14 PM Audio expert said the following: > > > Now I know where NOT to go. > > TOO crowded for me. > > No one goes

Re: remove header line when reading/writing files

2007-10-11 Thread Marc 'BlackJack' Rintsch
On Thu, 11 Oct 2007 22:52:55 +, RyanL wrote: > I'm a newbie with a large number of data files in multiple > directories. I want to uncompress, read, and copy the contents of > each file into one master data file. The code below seems to be doing > this perfectly. The problem is each of the

Need suggestion on a GTalk Webservice

2007-10-11 Thread est
I am writing a GTalkBot which provides a webservice http://xxx.com/services/sendmessage.html If someone POST some text to http://xxx.com/services/sendmessage.html it will transfer the text to some friends on GTalk. I tried using django's __init__.py function to build this service but it seemed to

cxfreeze

2007-10-11 Thread luca72
Hello i use under linux cx-freeze My python program import a small module were i set the encoding to iso 8859-1. When i make the executable with cxfreeze and i run it i get this error: Traceback (most recent call last): File "/home/luca72/Desktop/Luca/python/cx_Freeze-3.0.3/initscripts/ Console.p

Re: matching a street address with regular expressions

2007-10-11 Thread Paul McGuire
On Oct 11, 11:50 pm, John Nagle <[EMAIL PROTECTED]> wrote: > > If anyone has a first-rate address parser in Python that will cover > most of the developed world, I'd like to talk to them. > > John Nagle > SiteTruth The pyparsing e

Re: the secret life of zombies

2007-10-11 Thread jsnx
Oh, by the way -- I apologize for the poor formatting of this post, I guess my linewrap setting is wrong for nntp. -- http://mail.python.org/mailman/listinfo/python-list

Re: Fwd: NUCULAR fielded text searchable indexing

2007-10-11 Thread Paul Rubin
[EMAIL PROTECTED] writes: > http://www.xfeedme.com/nucular/gut.py/go?FREETEXT=w > (w for "web") we get 6294 entries which takes about 500ms on > a cold index and about 150ms on a warm index. This is on a very > active shared hosting machine. That's reasonable speed, but is that just to do the set

pyserial doesn't recognize virtual serial port

2007-10-11 Thread naveen . sabapathy
Hi, I am trying to use virtual serial ports to develop/test my serial communication program. Running in to trouble... I am using com0com to create the virtual ports. The virtual ports seem to be working fine when I test it with Hyperterminal . I am using the example program that comes with py

Is this a bug of the lambda function

2007-10-11 Thread Zhu Wayne
Hi, I have a short code which gives me strange results, the code is as follows: f = [lambda x: None]*5 for j in range(0, 5): f[j] = lambda x: float(j)*x print "print f[k](1.)," for k in range(5): print f[k](1.), print "expect 0. 1. 2. 3. 4." print print "print f[j](1.)," for j in range(5

Re: [Tutor] matching a street address with regular expressions

2007-10-11 Thread John Nagle
Shawn Milochik wrote: > On 10/4/07, Ricardo Aráoz <[EMAIL PROTECTED]> wrote: >> Christopher Spears wrote: >>> One of the exercises in Core Python Programming is to >>> create a regular expression that will match a street >>> address. Here is one of my attempts. This is actually quite difficul

a good website for softwares,sports,movies and music ,sex etc.

2007-10-11 Thread panguohua
www.space666.com good -- http://mail.python.org/mailman/listinfo/python-list

Re: Diferent files: GUI (wxpython) Program

2007-10-11 Thread cmpython
On Oct 11, 7:47 pm, marc <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] escribió:> On Oct 11, 5:44 pm, marc <[EMAIL PROTECTED]> > wrote: > >> Hi why I can call an .py GUI (wxpython) from a program and control it? > >> I'm newbie in python. > > > Sorry, could you restate that? Explain again what

Re: CGI and external JavaScript nightmare

2007-10-11 Thread Istvan Albert
On Oct 11, 2:23 am, IamIan <[EMAIL PROTECTED]> wrote: > > is a very lengthy garbled js file > athttp://pagead2.googlesyndication.com/pagead/show_ads.js > > The first piece of JavaScript works fine and the ads display > correctly, however the second file throws an "unterminated string > literal" js

Re: remove header line when reading/writing files

2007-10-11 Thread Scott David Daniels
[EMAIL PROTECTED] wrote: > ... > for zipfile in filelist: > zfiter = iter(gzip.Gzipfile(zipfile,'r')) > zfiter.next() # ignore header line > for i, line in enumerate(fziter): > outfile.write(line) Or even: writes = outfile.write for zipfile in filelist: zfiter = it

Re: Top 10 Caribbean island destinations

2007-10-11 Thread willshak
on 10/11/2007 10:14 PM Audio expert said the following: > Now I know where NOT to go. > TOO crowded for me. > No one goes there anymore. It's too crowded. Lawrence "Yogi" Berra > > <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >> See the most popular Caribbean island desti

Re: EasyMock for python ?

2007-10-11 Thread Ben Finney
BlueBird <[EMAIL PROTECTED]> writes: > Does anybody know where to find a library like EasyMock for python ? I've had good results with Ian Bicking's 'minimock.py' http://blog.ianbicking.org/minimock.html>. It uses the existing 'doctest' functionality for its output, and a minimock.Mock will mock

Re: howto add a sub-directory to the searchpath / namespace ?

2007-10-11 Thread Scott David Daniels
[david] wrote: > r" indicates a 'regular expression' string, normally > called a raw string. It means that \ characters are > treated using the regex syntax rather than the c syntax. This is an incredibly creative answer , if not fastidiously correct. Raw strings simply disable the special effect

Re: Top 10 Caribbean island destinations

2007-10-11 Thread Audio expert
Now I know where NOT to go. TOO crowded for me. <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > See the most popular Caribbean island destinations > > http://tropical-destinations.blogspot.com/ > -- http://mail.python.org/mailman/listinfo/python-list

Re: M2Crypto possible intermittent bug

2007-10-11 Thread John Nagle
John Nagle wrote: > Heikki Toivonen wrote: >> John Nagle wrote: >>> Still having trouble reproducing the problem. But somewhere, >>> something raised that bogus no-error exception three times. >>> Anything that returns "(0, 'Error')" as exception data is a bug. >> >> If you can, build python an

looking for ways to include python in pascal distro

2007-10-11 Thread [EMAIL PROTECTED]
I have found a couple of ways to include python in my pascal program http://arctrix.com/nas/python/standalone.html and an example I compiled from the embeded examples and I was wanting to know if there are more examples or comiled versions I can execute from my program... I am getting an error f

the secret life of zombies

2007-10-11 Thread jsnx
I'd like a program, call it 'pipe-fitter', that connects and interactive app to three named pipes. The program will filter out EOF from the input pipe, to keep the interactive program alive for multiple commands. When the interactive app dies, by receiving 'exit', say, then we are done with it -- p

the secret life of zombies

2007-10-11 Thread jsnx
I'd like a program, call it 'pipe-fitter', that connects and interactive app to three named pipes. The program will filter out EOF from the input pipe, to keep the interactive program alive for multiple commands. When the interactive app dies, by receiving 'exit', say, then we are done with it -- p

Re: Declarative properties

2007-10-11 Thread George Sakkis
On Oct 11, 7:04 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > You could take it even further by removing the need to repeat the > attribute's name twice. Currently this can done only through > metaclasses but in the future a class decorator would be even > better: Replying to myself here, but ac

Re: remove header line when reading/writing files

2007-10-11 Thread timaranz
On Oct 12, 12:23 pm, Tim Chase <[EMAIL PROTECTED]> wrote: > Forgot the enumerate call of all things > > > for zipfile in filelist: > >for i, line in enumerate(gzip.Gzipfile(zipfile,'r')): > >if i: outfile.write(line) > > Some days, I'm braindead. > > -tkc I would move the 'if' test

Re: decorating container types (Python 2.4)

2007-10-11 Thread timaranz
On Oct 12, 12:19 pm, James Stroud <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Hi, > > > I have a container class A and I want to add functionality to it by > > using a decorator class B, as follows: > > > class A(object): > > def __len__(self): > > return 5 > > > class B(o

Re: Advice on long running processes

2007-10-11 Thread commander_coder
Thank you to folks for the replies. Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: Diferent files: GUI (wxpython) Program

2007-10-11 Thread marc
[EMAIL PROTECTED] escribió: > On Oct 11, 5:44 pm, marc <[EMAIL PROTECTED]> wrote: >> Hi why I can call an .py GUI (wxpython) from a program and control it? >> I'm newbie in python. > > Sorry, could you restate that? Explain again what you want to do. > I would to call a python file that contains

Re: Diferent files: GUI (wxpython) Program

2007-10-11 Thread marc
[EMAIL PROTECTED] escribió: > On Oct 11, 5:44 pm, marc <[EMAIL PROTECTED]> wrote: >> Hi why I can call an .py GUI (wxpython) from a program and control it? >> I'm newbie in python. > > Sorry, could you restate that? Explain again what you want to do. > I would to call a python file that contain

Re: RMI with Pyro et al

2007-10-11 Thread Irmen de Jong
Diez B. Roggisch wrote: > Go install cygwin (but not it's included python-interpreter, or at least > make sure you have your python path properly under control) and then simply > start the script from the command-line. And hit C-c if you need it to stop, > and restart it. Only start it as service

Re: RMI with Pyro et al

2007-10-11 Thread Irmen de Jong
Sells, Fred wrote: > Diez B. Roggisch wrote > . Why do you want that (hot deploy) >> anyway? Does startuptime of a script really bother you? >> shouldn't take >> more than a few seconds. > > My primary need is development/debug. I'm a Pyro newbie and I add a > feature and then test. The only

Re: Diferent files: GUI (wxpython) Program

2007-10-11 Thread cmpython
On Oct 11, 5:44 pm, marc <[EMAIL PROTECTED]> wrote: > Hi why I can call an .py GUI (wxpython) from a program and control it? > I'm newbie in python. Sorry, could you restate that? Explain again what you want to do. -- http://mail.python.org/mailman/listinfo/python-list

Re: remove header line when reading/writing files

2007-10-11 Thread Tim Chase
Forgot the enumerate call of all things > for zipfile in filelist: > for i, line in enumerate(gzip.Gzipfile(zipfile,'r')): > if i: outfile.write(line) Some days, I'm braindead. -tkc -- http://mail.python.org/mailman/listinfo/python-list

Re: remove header line when reading/writing files

2007-10-11 Thread Tim Chase
> each file into one master data file. The code below seems to be doing > this perfectly. The problem is each of the data files has a header > row in the first line, which I do not want in the master file. How > can I skip that first line when writing to the master file? Any help > is much appr

Re: decorating container types (Python 2.4)

2007-10-11 Thread James Stroud
[EMAIL PROTECTED] wrote: > Hi, > > I have a container class A and I want to add functionality to it by > using a decorator class B, as follows: > > class A(object): > def __len__(self): > return 5 > > class B(object): > def __init__(self, a): > self._a = a > > def __

Re: Declarative properties

2007-10-11 Thread George Sakkis
On Oct 11, 7:48 am, Artur Siekielski <[EMAIL PROTECTED]> wrote: > I know about 'property' function in Python, but it's normal usage > isn't declarative, because I have to code imperatively getters and > setters: > > class Person(object): >def __init__(self, name): > self._name = name >

Re: decorating container types (Python 2.4)

2007-10-11 Thread James Stroud
[EMAIL PROTECTED] wrote: > Hi, > > I have a container class A and I want to add functionality to it by > using a decorator class B, as follows: > > class A(object): > def __len__(self): > return 5 > > class B(object): > def __init__(self, a): > self._a = a > > def __

Django Contractual Position

2007-10-11 Thread [EMAIL PROTECTED]
The Institute of Design of Chicago, IL is seeking an experienced Django developer to create an in-house contact and mailing web application. The application manages the contacts for the different conferences and events at the Institute of Design. The ideal candidate has experience with at least on

remove header line when reading/writing files

2007-10-11 Thread RyanL
I'm a newbie with a large number of data files in multiple directories. I want to uncompress, read, and copy the contents of each file into one master data file. The code below seems to be doing this perfectly. The problem is each of the data files has a header row in the first line, which I do

Re: storing meta data on dictionary keys

2007-10-11 Thread Andreas Kraemer
On Oct 11, 1:42 pm, Erik Jones <[EMAIL PROTECTED]> wrote: > On Oct 11, 2007, at 2:25 PM, Andreas Kraemer wrote: > > > On Oct 11, 10:17 am, Erik Jones <[EMAIL PROTECTED]> wrote: > > >> No, duck typing and inheritance are two different things. Duck > >> typing is when you implement the same operatio

Re: urllib.ProxyHandler HTTPS issues

2007-10-11 Thread Devraj
Thanks John. Will investigate sending the CONNECT command to handle proxies. Do you recommend doing this for HTTP proxies as well or should I just use the ProxyHandler for HTTP proxies? On Oct 12, 4:29 am, [EMAIL PROTECTED] (John J. Lee) wrote: > Devraj <[EMAIL PROTECTED]> writes: > > Hi everyon

external access to instances

2007-10-11 Thread Ladislav Andel
Hello, I have an application which is running in a loop(client/server app using twisted and reactor) and where are kept list of instances in memory. Each instance has it's own loop and it periodically sends requests to given network endpoints. I would like to use a tool(module) which accesses thi

Diferent files: GUI (wxpython) Program

2007-10-11 Thread marc
Hi why I can call an .py GUI (wxpython) from a program and control it? I'm newbie in python. -- http://mail.python.org/mailman/listinfo/python-list

decorating container types (Python 2.4)

2007-10-11 Thread timaranz
Hi, I have a container class A and I want to add functionality to it by using a decorator class B, as follows: class A(object): def __len__(self): return 5 class B(object): def __init__(self, a): self._a = a def __getattr__(self, attr): return getattr(self._a

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-10-11 Thread John W. Kennedy
[EMAIL PROTECTED] wrote: > Do not bluntly contradict me in public. You are in grave need of professional psychiatric help. Seek it now, if you do not wish your life to be ended three or four years down the line by a police sniper. -- John W. Kennedy Read the remains of Shakespeare's lost play,

Web Ontology Language (OWL) parsing

2007-10-11 Thread Sean Davis
I would like to parse some OWL files, but I haven't dealt with OWL in python or any other language for that matter. Some quick google searches do not turn up much in the way of possibilities for doing so in python. Any suggestions of available code or using existing libraries for doing so? Thank

Re: Library for crawling forums

2007-10-11 Thread Thomas Wittek
BlueCrux: > I'm trying to write a utility to crawl forums and strip posts to be > gone through offline. Just the content, I don't need to get who posted > or sigs or any identifying info. > > Can anyone suggest a library that is already geared toward this? Maybe a combination of mechanize [1] and

Top 10 Caribbean island destinations

2007-10-11 Thread arturklis4
See the most popular Caribbean island destinations http://tropical-destinations.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: problem with wxPanel derivation class

2007-10-11 Thread Chris Mellon
On 10/11/07, <"@bag.python.org <"none> wrote: > wxGlade created a simple Frame with a panel a sizer and 3 wxControls , > saticText, TextCtrl, and a Button. > > It seems as though the complaint is that a 'wxWindow *' is expected, > 'Panel' is received > However, Panel IS a wx.Panel derivative whi

Re: storing meta data on dictionary keys

2007-10-11 Thread Erik Jones
On Oct 11, 2007, at 2:25 PM, Andreas Kraemer wrote: > On Oct 11, 10:17 am, Erik Jones <[EMAIL PROTECTED]> wrote: > >> No, duck typing and inheritance are two different things. Duck >> typing is when you implement the same operations as another object or >> class, whereas with inheritance you get

Re: EasyMock for python ?

2007-10-11 Thread Goldfish
I had to get the hang of jMock-style testing through the usage of the pmock library. But it seems to work out pretty well. See some of my test cases at http://springpython.python-hosting.com/browser/trunk/src/springpython/test/databaseCoreTestCases.py. That should provide a hearty sample of uses

Re: problem with wxPanel derivation class

2007-10-11 Thread kyosohma
You've got calls for properties in other classes and you don't initialize the panel object. I edited the code somewhat so it'll at least run. I tried to comment where I changed things, but I may have missed a few minor points. See below: #The commented out code from MyFrame was moved to class

Re: Accessing Function Variables from Sub-functions

2007-10-11 Thread Terry Reedy
"Licheng Fang" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Sorry to dig up this old thread, but I would like to know what's the | rationale is. Why can't a nested function rebind a variable of an | outer function? Because it is debateble whether this is overall a good idea and

Re: determining fully qualified package & class name

2007-10-11 Thread Goldfish
import myPackage f = myPackage.foo() print f.__module__ + "." + f.__class__.__name__ That should do it! -- http://mail.python.org/mailman/listinfo/python-list

Re: Finding Peoples' Names in Files

2007-10-11 Thread Chris Mellon
On 10/11/07, brad <[EMAIL PROTECTED]> wrote: > Chris Mellon wrote: > > > In case you're doing this for PCI validation, be aware that just the > > CC number is considered sensitive and you'd get some false negatives > > if you filter on anything except that. > > > > Random strings that match CC chec

Re: multimethods decorator

2007-10-11 Thread Gerardo Herzig
Bruno Desthuilliers wrote: >[EMAIL PROTECTED] a écrit : > > >>>Gerardo Herzig a écrit : >>> >>> Hi all. Im reading the Gido's aproach using decorators at http://www.artima.com/weblogs/viewpost.jsp?thread=101605 It looks good to me, but the examples shows the functionality

Guitars Masters

2007-10-11 Thread arturklis2
Guitars reviews, lessons, pictures, and more!!! http://guitars-masters.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Finding Peoples' Names in Files

2007-10-11 Thread brad
Chris Mellon wrote: > In case you're doing this for PCI validation, be aware that just the > CC number is considered sensitive and you'd get some false negatives > if you filter on anything except that. > > Random strings that match CC checksums are really quite rare and false > positives from th

Re: Finding Peoples' Names in Files

2007-10-11 Thread Chris Mellon
On 10/11/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > On Oct 11, 12:49 pm, Matimus <[EMAIL PROTECTED]> wrote: > > On Oct 11, 9:11 am, brad <[EMAIL PROTECTED]> wrote: > > > > > > > > > [EMAIL PROTECTED] wrote: > > > > However...how can you know it is a name... > > > > > OK, I admitted in my fi

Re: Python SVN down?

2007-10-11 Thread Martin v. Löwis
> Are all the real ( ;-) ) developers using ssh+svn and not noticing > this? As Terry said, some noticed. But yes, many use svn+ssh, plus we live in different time zones, so we may be asleep when it breaks. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Library for crawling forums

2007-10-11 Thread James Matthews
Well i know some that do half the job urllib or urllib2 to download the page htmlparser or beautifulsoup For html parsing Enjoy On 10/11/07, BlueCrux <[EMAIL PROTECTED]> wrote: > > I'm trying to write a utility to crawl forums and strip posts to be > gone through offline. Just the content, I don

Re: storing meta data on dictionary keys

2007-10-11 Thread Andreas Kraemer
On Oct 11, 10:17 am, Erik Jones <[EMAIL PROTECTED]> wrote: > No, duck typing and inheritance are two different things. Duck > typing is when you implement the same operations as another object or > class, whereas with inheritance you get the same implementation as > that of the parent class. Exc

Re: Finding Peoples' Names in Files

2007-10-11 Thread John J. Lee
brad <[EMAIL PROTECTED]> writes: > Crazy question, but has anyone attempted this or seen Python code that > does? For example, if a text file contained 'Guido' and or 'Robert' > and or 'Susan', then we should return True, otherwise return False. A few ideas: 1. If you don't have a list of names,

Re: Python SVN down?

2007-10-11 Thread Terry Reedy
"Anthon" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] |I am trying to get at the python source code, but it seems | svn.python.org is down, at least on port 80 (http) and 3690 (svn). | This happened earlier this week and then it came back (at least | yesterday). | Are all the real

Library for crawling forums

2007-10-11 Thread BlueCrux
I'm trying to write a utility to crawl forums and strip posts to be gone through offline. Just the content, I don't need to get who posted or sigs or any identifying info. Can anyone suggest a library that is already geared toward this? -- http://mail.python.org/mailman/listinfo/python-list

Re: weakrefs and bound methods

2007-10-11 Thread Mathias Panzenboeck
Bruno Desthuilliers wrote: > Mathias Panzenboeck a écrit : > > About the lost weakref problem: in Python, methods are just tiny > wrappers around the object, class and function created at lookup time > (yes, on *each* lookup) (and WWAI, they are by the function object > itself, which implements th

Re: Declarative properties

2007-10-11 Thread Paul Hankin
On Oct 11, 7:42 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > Sorry I don't get it. If I want to customize the access to a "normal" > attribute I simply turn it into a property. I *think* I understand Artur's problem: he wants to be able to add (for example) clean-up and validation co

Re: problem with wxPanel derivation class

2007-10-11 Thread Larry Bates
none wrote: > wxGlade created a simple Frame with a panel a sizer and 3 wxControls , > saticText, TextCtrl, and a Button. > > The resulting code works fine. > > Now the problem. > I wish to make a separate class derrived from wxPanel that has the sized > and controls as above. It jusst won't wor

Re: "".join(string_generator()) fails to be magic

2007-10-11 Thread Dan Stromberg
On Thu, 11 Oct 2007 01:26:04 -0500, Matt Mackal wrote: > I have an application that occassionally is called upon to process > strings that are a substantial portion of the size of memory. For > various reasons, the resultant strings must fit completely in RAM. > Occassionally, I need to join some

Re: Declarative properties

2007-10-11 Thread Paul Hankin
On Oct 11, 12:48 pm, Artur Siekielski <[EMAIL PROTECTED]> wrote: > Hi. > > I would like to have declarative properties in Python, ie. something > like slots definitions in defclass in Common Lisp. It seems that even > Java will have it, using a library (https://bean-properties.dev.java.net/ > ). >

Re: CGI and external JavaScript nightmare

2007-10-11 Thread IamIan
bump -- http://mail.python.org/mailman/listinfo/python-list

Pyro: ActiveState (wind32) to Unix

2007-10-11 Thread Sells, Fred
I'm using ActiveState python on a windows box to talk to ACtive Directory. I'm running a Pyro Server on the same box. The client is Linux running std Python 2.4. It works just fine until the server codes calls some win32com.client api; then I get Traceback (most recent call last): File "

problem with wxPanel derivation class

2007-10-11 Thread none
wxGlade created a simple Frame with a panel a sizer and 3 wxControls , saticText, TextCtrl, and a Button. The resulting code works fine. Now the problem. I wish to make a separate class derrived from wxPanel that has the sized and controls as above. It jusst won't work #!/usr/bin/env python #

Re: Declarative properties

2007-10-11 Thread Marc 'BlackJack' Rintsch
On Thu, 11 Oct 2007 09:58:48 -0700, Dan Stromberg wrote: > On Thu, 11 Oct 2007 13:46:12 +, Marc 'BlackJack' Rintsch wrote: > >> On Thu, 11 Oct 2007 13:04:53 +, Artur Siekielski wrote: >> >>> 1. If I use instance field 'name' which is accessed directly by other >>> classes, >>> and later

Re: Is hostmonster any good for hosting python?

2007-10-11 Thread Tim Chase
> I should have mentioned, I am thinking about using a python framework, > either django, turbogears, or pylons. > > I think these frameworks require a newer version of python, maybe 2.4. I can't speak for the others, but I know Django can be deployed with 2.3+ (though they offer some nicities if

Re: determining fully qualified package & class name

2007-10-11 Thread Marc 'BlackJack' Rintsch
On Thu, 11 Oct 2007 11:18:33 -0700, patrimith wrote: > I am used to the following with Java: > > import some.package.MyClass; > name = MyClass.class.getName(); > > The value for name will be "some.package.MyClass". > > For Python, I find: > > from some.package.myclass import MyClass > name = M

Re: How do I make urllib2 preserve case in HTTP header names?

2007-10-11 Thread John J. Lee
[EMAIL PROTECTED] writes: > The HTTP specification, RFC 2616, states that field names in HTTP > headers are case insensitive. But I'm trying to use Python 2.5.1's > urllib2 to interact with a web service offered by Amazon.com, which > deviates from the HTTP spec in that it requires use of case-se

Re: urllib.ProxyHandler HTTPS issues

2007-10-11 Thread John J. Lee
Devraj <[EMAIL PROTECTED]> writes: > Hi everyone, > > I have been reading various documents/posts on the web about handling > proxy options in urllib2. Some of them suggest that urllib2 doesn't > handle HTTPS and others say it does. I have successfully written code > that relays HTTP connections v

Re: matching a street address with regular expressions

2007-10-11 Thread Tim Chase
> Don't forget to write test cases. If you have a series of addresses, > and confirm they are parsed correctly, you are in a good position to > refine the pattern. You will instantly know if a change in pattern has > broken another pattern. > > The reason I'm saying this, is because I think your p

wana watch latest hindi hot videos?

2007-10-11 Thread diprat7
wana watch latest hindi hot videos? than www.yedil.com is the site you are looking for have a nice time with www.yedil.com .Log on now -- http://mail.python.org/mailman/listinfo/python-list

determining fully qualified package & class name

2007-10-11 Thread patrimith
Hi List, I am used to the following with Java: import some.package.MyClass; name = MyClass.class.getName(); The value for name will be "some.package.MyClass". For Python, I find: from some.package.myclass import MyClass name = MyClass.__name__ The value for name will be "MyClass" Is there

Re: Is hostmonster any good for hosting python?

2007-10-11 Thread walterbyrd
I should have mentioned, I am thinking about using a python framework, either django, turbogears, or pylons. I think these frameworks require a newer version of python, maybe 2.4. Also, I think some of them require a newer version of Apache - 2.0 or better. I also think these python frameworks all

Re: Building Binary Packages

2007-10-11 Thread kyosohma
On Oct 10, 11:53 am, "Jim B. Wilson" <[EMAIL PROTECTED]> wrote: > On Wed, 10 Oct 2007 14:35:35 +, kyosohma wrote: > > I am trying to figure out how to build binaries for Python packages and > > I've done it with MinGW. > > Apparently, you still can:http://tinyurl.com/yb4bps I had an acquaintan

Re: Python process automatically restarting itself

2007-10-11 Thread Matimus
On Oct 11, 7:17 am, Adam Atlas <[EMAIL PROTECTED]> wrote: > What is the best way for a Python process (presumed to be a script run > by the interpreter binary, not embedded in some other program) to > restart itself? This is what I've been trying: > > import __main__ > > for path in sys.pat

Re: Declarative properties

2007-10-11 Thread Dan Stromberg
On Thu, 11 Oct 2007 13:46:12 +, Marc 'BlackJack' Rintsch wrote: > On Thu, 11 Oct 2007 13:04:53 +, Artur Siekielski wrote: > >> On Oct 11, 2:27 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: >>> But why? Default getters and setters are unnecessary and if you need >>> something ot

Re: "".join(string_generator()) fails to be magic

2007-10-11 Thread Carl Banks
On Oct 11, 2:26 am, Matt Mackal <[EMAIL PROTECTED]> wrote: > I have an application that occassionally is called upon to process > strings that are a substantial portion of the size of memory. For > various reasons, the resultant strings must fit completely in RAM. > Occassionally, I need to join so

Re: Parsing a commandline from within Python

2007-10-11 Thread Andreas Huesgen
>> Is there any buildin function which mimics the behavior of the >> standard commandline parser (generating a list of strings >> "foo bar" and "some text" from the commandline >> <"foo bar" "some text">)? > > Try the shlex module:: > > >>> import shlex > >>> shlex.split('"foo bar" "so

Re: Fwd: NUCULAR fielded text searchable indexing

2007-10-11 Thread aaron . watters
regarding http://nucular.sourceforge.net On Oct 11, 12:32 pm, Paul Rubin wrote: > > How many items did each query return? When I refer to large result > sets, I mean you often get queries that return 10k items or more (a > pretty small number: typing "python" into googl

Re: Finding Peoples' Names in Files

2007-10-11 Thread Matimus
On Oct 11, 10:02 am, [EMAIL PROTECTED] wrote: > On Oct 11, 12:49 pm, Matimus <[EMAIL PROTECTED]> wrote: > > > > > On Oct 11, 9:11 am, brad <[EMAIL PROTECTED]> wrote: > > > > [EMAIL PROTECTED] wrote: > > > > However...how can you know it is a name... > > > > OK, I admitted in my first post that it w

Re: Parsing a commandline from within Python

2007-10-11 Thread Steven Bethard
[EMAIL PROTECTED] wrote: > Is there any buildin function which mimics the behavior of the > standard commandline parser (generating a list of strings > "foo bar" and "some text" from the commandline > <"foo bar" "some text">)? Try the shlex module:: >>> import shlex >>> shlex.split('"fo

[Python-SWIG-C++] one question about wrapper interface files

2007-10-11 Thread [EMAIL PROTECTED]
Dear All, I am new to Python and SWIG, and I tried to search the SWIG mailinglist for my specific question, but I did not find it. And for a simple one c++ file, I can handle it successfully. Now I have a small project including several C files, file1.C file2.C file3.C file2.h file3.h , file1.C i

Re: storing meta data on dictionary keys

2007-10-11 Thread Erik Jones
On Oct 11, 2007, at 1:36 AM, Andreas Kraemer wrote: > On Oct 10, 9:00 pm, Erik Jones <[EMAIL PROTECTED]> wrote: >> If you're sure that 1. this use case won't grow and 2. that you'll >> only be the only person ever using code, then it's your choice of >> preference. Both of those points are equa

Re: Keeping track of subclasses and instances?

2007-10-11 Thread Bruno Desthuilliers
George Sakkis a écrit : (snip) > Anyway, here's something to get you > started; all a user has to do is derive (directly or indirectly) from > InstanceTracker and, if a class C defines __init__, > super(C,self).__init__() should be called explicitly: Actually, you don't even need that restriction

Re: Declarative properties

2007-10-11 Thread Bruno Desthuilliers
Artur Siekielski a écrit : > On Oct 11, 4:21 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: >> In practice, it turns out to be a lot less work to deal with that >> occasionally than to always deal with lugging around internal >> attributes and external properties when they're really not needed.

Re: Finding Peoples' Names in Files

2007-10-11 Thread byte8bits
On Oct 11, 12:49 pm, Matimus <[EMAIL PROTECTED]> wrote: > On Oct 11, 9:11 am, brad <[EMAIL PROTECTED]> wrote: > > > > > [EMAIL PROTECTED] wrote: > > > However...how can you know it is a name... > > > OK, I admitted in my first post that it was a crazy question, but if one > > could find an answer,

Re: Keeping track of subclasses and instances?

2007-10-11 Thread Erik Jones
On Oct 11, 2007, at 12:49 AM, Andreas Kraemer wrote: > On Oct 10, 6:19 pm, Karlo Lozovina <[EMAIL PROTECTED]> wrote: >> Larry Bates wrote: >>> I'm not completely sure I understand the question but here goes. >>> Instances of >>> classes are classes can be stored in lists or dictionaries. In >>

Parsing a commandline from within Python

2007-10-11 Thread andreas . huesgen
Hello, I am writing a commandline tool in Python which is often feed with lots of commandline arguments. In practice, the commandline already reached a critical length which is to long for Windows (some versions of Windows only support commandlines of up to 2047 characters). To work around this

Re: matching a street address with regular expressions

2007-10-11 Thread Max Erickson
Andy Cheesman <[EMAIL PROTECTED]> wrote: > Check out kodos http://kodos.sourceforge.net/ for an interactive > python regexp tester > > Andy > On systems with tkinter installed(So pretty much all Windows and lots and lots of Linux systems), the redemo.py script in the Tools/Scripts directory o

Re: Declarative properties

2007-10-11 Thread Bruno Desthuilliers
Artur Siekielski a écrit : > On Oct 11, 2:27 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: >> But why? Default getters and setters are unnecessary and if you need >> something other than the default you need to write it anyway more >> explicitly. > > I see some problems with your approa

Re: Finding Peoples' Names in Files

2007-10-11 Thread Dan Stromberg
On Thu, 11 Oct 2007 11:22:50 -0400, brad wrote: > Crazy question, but has anyone attempted this or seen Python code that > does? For example, if a text file contained 'Guido' and or 'Robert' and > or 'Susan', then we should return True, otherwise return False. It'll be hard to handle the Dweezi

Re: Declarative properties

2007-10-11 Thread Bruno Desthuilliers
Artur Siekielski a écrit : > Hi. > > I would like to have declarative properties in Python, ie. something > like slots definitions in defclass in Common Lisp. It seems that even > Java will have it, using a library ( https://bean-properties.dev.java.net/ > ). > > I know about 'property' function

  1   2   >