Re: Binary search tree

2007-11-12 Thread Michel Albert
On Nov 9, 11:45 pm, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] a écrit : > > > Hi, > > > I have to get list of URLs one by one and to find the URLs that I have > > more than one time(can't be more than twice). > > > I thought to put them into binary search tree, this way the

Re: Binary search tree

2007-11-12 Thread Martin v. Löwis
> Now, I can see that this method has some superfluous data (the `1` > that is assigned to the dict). So I suppose this is less memory > efficient. But is this slower then? As both implementations use hashes > of the URL to access the data. Just asking out of curiosity ;) Performance-wise, there i

Re: python - an eggs...

2007-11-12 Thread thebjorn
On Nov 12, 1:12 am, "bruce" <[EMAIL PROTECTED]> wrote: > Hi Diez... > > I've never used setuptools, (it's not on the box) and i don't have > easy_install tools installed... In the link you were given there is a section titled "Installing setuptools". I'm reading it aloud for you now... -- bjorn

Re: email.get_filename() with newline

2007-11-12 Thread Gabriel Genellina
En Fri, 09 Nov 2007 10:46:15 -0300, Thomas Guettler <[EMAIL PROTECTED]> escribi�: > if I use part.get_filename() with the following email part: > > --_=_NextPart_001_01C81B11.52AB8006 > Content-Type: application/vnd.ms-excel; > > name="=?iso-8859-1?Q?30102007=28aktualisiert=29=5FK=FCn

Re: How to get a set of keys with largest values?

2007-11-12 Thread cokofreedom
On Nov 12, 10:07 am, Davy <[EMAIL PROTECTED]> wrote: > Hi all, > > I have a dictionary with n elements, and I want to get the m(m<=n) > keys with the largest values. > > For example, I have dic that includes n=4 elements, I want m=2 keys > have the largest values) > dic = {0:4,3:1,5:2,7:8} > So, th

Re: how to know if folder contents have changed

2007-11-12 Thread Jorge Godoy
[EMAIL PROTECTED] wrote: > can someone suggest a better way? i know it is a general programming > problem..but i wish to know if a python solution exists Use pyfam. I believe all docs are in fam but it integrates with that. -- http://mail.python.org/mailman/listinfo/python-list

comp.lang.python 2007

2007-11-12 Thread ashik
sdfg dsv vcjgsdgsy http://www.freewebs.com/thuiss/ http://indianfriendfinder.com/go/g906725-pmem -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get a set of keys with largest values?

2007-11-12 Thread Duncan Booth
Davy <[EMAIL PROTECTED]> wrote: > For example, I have dic that includes n=4 elements, I want m=2 keys > have the largest values) > dic = {0:4,3:1,5:2,7:8} > So, the the largest values are [8,4], so the keys are [7,0]. > > Is there any fast way to implement this algorithm? > Any suggestions are we

Re: Binary search tree

2007-11-12 Thread Scott SA
On 11/12/07, Michel Albert ([EMAIL PROTECTED]) wrote: >On Nov 9, 11:45 pm, Bruno Desthuilliers ><[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] a Ècrit : >> >> > Hi, >> >> > I have to get list of URLs one by one and to find the URLs that I have >> > more than one time(can't be more than twice). >>

Re: Using python as primary language

2007-11-12 Thread Martin Vilcans
On Nov 10, 2007 12:48 AM, Rhamphoryncus <[EMAIL PROTECTED]> wrote: > On Nov 9, 1:45 pm, "Terry Reedy" <[EMAIL PROTECTED]> wrote: > > 2. If micro-locked Python ran, say, half as fast, then you can have a lot > > of IPC (interprocess communition) overhead and still be faster with > > multiple process

Re: Python iPod challenge

2007-11-12 Thread Gabriel Genellina
En Sun, 11 Nov 2007 13:33:09 -0300, <[EMAIL PROTECTED]> escribi�: >it seems the problem you guys found appears... >when combining Windows OS and MSIE... >(apologies... m_._m ) Or any other OS+browser with javascript disabled. BTW, why do you require JS? Looks like it should be possib

How to get a set of keys with largest values?

2007-11-12 Thread Davy
Hi all, I have a dictionary with n elements, and I want to get the m(m<=n) keys with the largest values. For example, I have dic that includes n=4 elements, I want m=2 keys have the largest values) dic = {0:4,3:1,5:2,7:8} So, the the largest values are [8,4], so the keys are [7,0]. Is there any

PyServlet Error

2007-11-12 Thread alwin
Hi I was trying to write a simple web application using Tomcat 6.0.14, Jython 2.2.1. My web.xml is as follows http://java.sun.com/dtd/web-app_2_3.dtd";> test PyServlet org.python.util.PyServlet 1 PyServlet *.py JythonServlet JythonServlet

Re: Extended date and time

2007-11-12 Thread Jeremy Sanders
John Machin wrote: > What does "dates in the past" mean?? Please be more specific about the > earliest date that you want to be able to handle. Python's datetime > starts at 0001-01-01. Somebody mentioned the time module, which is > implementation-dependent but typically starts at 1970-01-01 . >

Re: why ctypes+dll gives a strange result

2007-11-12 Thread Gabriel Genellina
En Sun, 11 Nov 2007 08:21:25 -0300, oyster <[EMAIL PROTECTED]> escribi�: > import ctypes > mydll=ctypes.windll.LoadLibrary("mydll.dll") > > _TwoTimes=getattr(mydll,'[EMAIL PROTECTED]') > _TwoTimes.argtypes=[ctypes.c_double] > def TwoTimes(i): > return _TwoTimes(i) > > in fact, twotimes f

Re: Using python as primary language

2007-11-12 Thread Hrvoje Niksic
"Martin Vilcans" <[EMAIL PROTECTED]> writes: > But if Python gets slow when you add fine-grained locks, then most > certainly it wouldn't get so slow if the locks were very fast, > right? Given the sheer number of increfs and decrefs happening, they should be impossibly fast (meaning: nonexistent

ODBC links?

2007-11-12 Thread Mr. Connolly
Lo' there. I'm a new user of Python, what I'm looking for is an easy way to create ODBC links to Access databases (obviously, Access isn't the best database out there I can use, but its easiest to just piece together for this quick project). What modules would I want to be looking for to create

RE: python - an eggs...

2007-11-12 Thread Diez B. Roggisch
bruce wrote: > Hi Diez... > > I've never used setuptools, (it's not on the box) and i don't have > easy_install tools installed... > > But in looking at your output, I have some questions... > -The 1st, I'm assuming that easy_install works with python2.4.3? > -The 2nd, In the output, is see the

Re: ODBC links?

2007-11-12 Thread Johannes Findeisen
On Mon, 2007-11-12 at 10:13 +, Mr. Connolly wrote: > Lo' there. I'm a new user of Python, what I'm looking for is an easy way to > create ODBC links to Access databases (obviously, Access isn't the best > database out there I can use, but its easiest to just piece together for > this quick p

Re: Populating a dictionary, fast

2007-11-12 Thread Hrvoje Niksic
Paul Rubin writes: > Michael Bacarella <[EMAIL PROTECTED]> writes: >> If only it were so easy. > > I think I know what's going on, the dictionary updates are sending the > GC into quadratic behavior. Try turning off the GC: > > import gc > gc.disable() This is

Re: Using python as primary language

2007-11-12 Thread Marc 'BlackJack' Rintsch
On Mon, 12 Nov 2007 10:28:02 +0100, Martin Vilcans wrote: > Actually, I would prefer to do parallell programming at a higher > level. If Python can't do efficient threading at low level (such as in > Java or C), then so be it. Perhaps multiple processes with message > passing is the way to go. It

Re: Extended date and time

2007-11-12 Thread John Machin
On Nov 12, 8:46 pm, Jeremy Sanders wrote: > John Machin wrote: > > What does "dates in the past" mean?? Please be more specific about the > > earliest date that you want to be able to handle. Python's datetime > > starts at 0001-01-01. Somebody mentioned the time module, which is > > implementatio

Re: PyQt with embedded python in Qt App

2007-11-12 Thread Bart.
Saturday 03 of November 2007 02:43:21 cgrebeld napisał(a): > http://python.pastebin.com/m18c67b3a Thank You, now I understand. Now how to extend this interpreter with Qt Application classes/objects to do some usefull things with this embeded interpreter ? Bart. -- http://mail.python.org/mailma

Only one week left for PyCon proposals!

2007-11-12 Thread David Goodger
There is only one week left for PyCon tutorial & scheduled talk proposals. If you've been thinking about making a proposal, now's the time! Tutorial details and instructions here: http://us.pycon.org/2008/tutorials/proposals/ Scheduled talk details and instructions here: http://us.pycon.org/2008

Re: Populating a dictionary, fast

2007-11-12 Thread Steven D'Aprano
On Sun, 11 Nov 2007 11:42:08 -0700, Arkanes wrote: > It takes about 20 seconds for me. It's possible it's related to int/long > unification - try using Python 2.5. If you can't switch to 2.5, try > using string keys instead of longs. I'm getting similar behaviour to the Original Poster, and I'm u

Comp. Lang. python

2007-11-12 Thread sskumartry
To see more python computer language click here. http://www.geocities.com/bhauqz/ http://indianfriendfinder.com/go/g910673-pmem http://bigchurch.com/go/g910673-pmem http://www.bidvertiser.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Populating a dictionary, fast

2007-11-12 Thread Steven D'Aprano
On Sun, 11 Nov 2007 08:25:15 -0800, Michael Bacarella wrote: > Firstly, thank you for all of your help so far, I really appreciate it. > >> > So, you think the Python's dict implementation degrades towards > O(N) >> > performance when it's fed millions of 64-bit pseudo-random longs? >> >> No. >

Re: How to get a set of keys with largest values?

2007-11-12 Thread Jeff
Why are you doing that with key-value pairs? Why not with the array module or lists? -- http://mail.python.org/mailman/listinfo/python-list

PyGilState_Ensure interrupts python critical sections

2007-11-12 Thread billy . omahony
Hi, I have a native windows thread in a c python module which calls into python code and adds an item to a data structure (a home-grown circular buffer). At the same time my main python application is removing items from this data structure. Unlike native python containers adding and removing ite

Re: Coding Help

2007-11-12 Thread Billows
Maybe AutoFlowchart can help you! AutoFlowchart is a excellent source code flowcharting tool to generate flowchart from source code. Its flowchart can expand and shrink. and you can pre-define the the width , height,Horizontal spacing and vertical spacing. Move and zoom is also very easy. I

Re: How to get a set of keys with largest values?

2007-11-12 Thread Duncan Booth
Jeff <[EMAIL PROTECTED]> wrote: > Why are you doing that with key-value pairs? Why not with the array > module or lists? > The original poster asked about a problem with key-value pairs. I just answered his question. -- http://mail.python.org/mailman/listinfo/python-list

Re: Populating a dictionary, fast

2007-11-12 Thread Hrvoje Niksic
Michael Bacarella <[EMAIL PROTECTED]> writes: > $ uname -a > Linux xxx 2.6.9-22.ELsmp #1 SMP Sat Oct 8 21:32:36 BST 2005 x86_64 x86_64 > x86_64 GNU/Linux > > We've also tried it on this version (on a different machine): > > $ uname -a > Linux yyy 2.6.18-8.el5 #1 SMP Thu Mar 15 19:46:53 EDT 2007 x

Re: Some "pythonic" suggestions for Python

2007-11-12 Thread Loic Mahe
Chris M write : > Multi-return value lambda? Just so you know, there is no concept of > returning more than one value from a function. I wrote: > * multi return value lambda I meant: multiple return statement, not return multiple values pseudo code here: lambda x: if A return B, if C return D,

Re: which tool to use?

2007-11-12 Thread Yoram Hekma
On Sun, Nov 11, 2007 at 01:06:35PM -0500, Brian Blais wrote: > Hello, > > I'm looking for a system for managing submissions of proposals, with > multiple parts, and possible updating of those parts by the user (so it > needs some basic version control). There has to be some sort of > permission

Re: Some "pythonic" suggestions for Python

2007-11-12 Thread Hrvoje Niksic
Loic Mahe <[EMAIL PROTECTED]> writes: > Chris M write : >> Multi-return value lambda? Just so you know, there is no concept of >> returning more than one value from a function. > > I wrote: >> * multi return value lambda > > I meant: multiple return statement, not return multiple values > > pseudo

Moving from java to python.

2007-11-12 Thread [EMAIL PROTECTED]
Hi, I have recently been learning python, and coming from a java background there are many new ways of doing things that I am only just getting to grips with. I wondered if anyone could take a look at a few pieces of code I have written to see if there are any places where I am still using java-

Re: Moving from java to python.

2007-11-12 Thread Jarek Zgoda
[EMAIL PROTECTED] napisał(a): > def getConnected(self): > return self._connected No need to use accessors. Just plain attribute lookup is sufficient. -- Jarek Zgoda Skype: jzgoda | GTalk: [EMAIL PROTECTED] | voice: +48228430101 "We read Knuth so you don't have to." (Tim Pet

regex that is equivalent to perl's syntax

2007-11-12 Thread Lee Sander
hi, does python's re library have a similar capability of the perls regular expression to search for pattern that appears a variable number of times within the lower and upper bounds given? For example, what is the python's equivalent to the following perl's search string? m/^\S{1,8}\.\S{0,3}/ whic

Re: Populating a dictionary, fast

2007-11-12 Thread Jeffrey Froman
Hrvoje Niksic wrote: > Note that both machines are x86_64.  Please try your test on a 32-bit > machine and report the results.  I suspect performance won't degrade > there. This theory seems to be supported by my findings. Running the test on a 32-bit machine took 45 seconds, while the same test

Re: Moving from java to python.

2007-11-12 Thread Paul Hankin
On Nov 12, 3:25 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi, > > I have recently been learning python, and coming from a java > background there are many new ways of doing things that I am only just > getting to grips with. > > I wondered if anyone could take a look at a few pieces of c

Re: regex that is equivalent to perl's syntax

2007-11-12 Thread Marc 'BlackJack' Rintsch
On Mon, 12 Nov 2007 07:38:57 -0800, Lee Sander wrote: > does python's re library have a similar capability of the perls > regular expression to > search for pattern that appears a variable number of times within the > lower and upper bounds given? For example, what is the python's > equivalent to

Re: regex that is equivalent to perl's syntax

2007-11-12 Thread Tim Chase
> does python's re library have a similar capability of the perls > regular expression to > search for pattern that appears a variable number of times within the > lower and upper bounds given? For example, what is the python's > equivalent to the following perl's search string? > m/^\S{1,8}\.\S{0,

Re: Moving from java to python.

2007-11-12 Thread Hrvoje Niksic
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > def __init__(self, connections = None, uid = None): You can use connections=(), so you don't need the "if" below. In fact, you can further write: for node, weight in connections: self._connected.append(node) self._weigh

Re: Moving from java to python.

2007-11-12 Thread Tim Chase
> def __init__(self, connections = None, uid = None): > """ > Args: > [connections - a list of (connected node, weight) tuples. ] > [uid - an identifier for comparisons.] > """ > self._connected = [] > self._weights = [] > > if connections: >

reading file objects in chunks

2007-11-12 Thread Martin Marcher
Hi, I'm looking for something that will give me an iterator to a file-(like)-object. I have large files with only a single line in it that have fixed length fields like, record length is 26bytes, dataA is 10 bytes, dataB is 16 bytes. Now when I made my parsing stuff but can't find anything that w

Re: Looking for a good Python environment

2007-11-12 Thread VSmirk
On Nov 11, 4:39 pm, Paul Rubin wrote: > Russell Warren <[EMAIL PROTECTED]> writes: > > Wing now has multi-threaded debugging. > > Cool, is it windows-only? I'm using Linux. > > > A quick look at the current state of SPE shows that it now has multi- > > threaded debugging

Re: PyGilState_Ensure interrupts python critical sections

2007-11-12 Thread Chris Mellon
On Nov 12, 2007 6:56 AM, <[EMAIL PROTECTED]> wrote: > Hi, > > I have a native windows thread in a c python module which calls into > python code and adds an item to a data structure (a home-grown > circular buffer). At the same time my main python application is > removing items from this data str

Re: Moving from java to python.

2007-11-12 Thread Larry Bates
Paul Hankin wrote: > On Nov 12, 3:25 pm, "[EMAIL PROTECTED]" > <[EMAIL PROTECTED]> wrote: >> Hi, >> >> I have recently been learning python, and coming from a java >> background there are many new ways of doing things that I am only just >> getting to grips with. >> >> I wondered if anyone could ta

RE: python - an eggs...

2007-11-12 Thread bruce
diez... i was being polite in thanking you for your input/thoughts... i actually had read what you'd posted, as i stated. in act, i did manage to get things working, thanks to you. but your comment about "ignoring pointers" indicates that you are a jerk, so... i now find your emails/tone offensi

Re: reading file objects in chunks

2007-11-12 Thread Marc 'BlackJack' Rintsch
On Mon, 12 Nov 2007 17:47:29 +0100, Martin Marcher wrote: > I'd really like something nicer than > > chunksize = 26 > f = file("datafile.dat", buffering=chunksize) > > chunk = f.read(chunksize) > while len(chunk) == chunksize: > compute_data(chunk) > f.read(chunksize) > > I just don't feel

Re: how to know if folder contents have changed

2007-11-12 Thread [EMAIL PROTECTED]
On Nov 11, 11:03 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > hi > i am trying to create a cache of digitized values of around 100 > image files in a folder..In my program i would like to know from time > to time if a new image has been added or removed from the folder.. > Why not use th

Re: how to know if folder contents have changed

2007-11-12 Thread Martin Marcher
2007/11/12, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > Why not use the file creation/modification timestamps? because you'd have to a) create a thread that pulls all the time for changes or b) test everytime for changes fam informs in a notification like way. Personally I'd create a "hidden" cach

RE: Populating a dictionary, fast [SOLVED]

2007-11-12 Thread Michael Bacarella
> id2name[key >> 40][key & 0x100] = name Oops, typo. It's actually: Id2name[key >> 40][key & 0xff] = name -- http://mail.python.org/mailman/listinfo/python-list

RE: Populating a dictionary, fast

2007-11-12 Thread Michael Bacarella
> > and see it take about 45 minutes with this: > > > > $ cat cache-keys.py > > #!/usr/bin/python > > v = {} > > for line in open('keys.txt'): > > v[long(line.strip())] = True > > On my system (windows vista) your code (using your data) runs in: > > 36 seconds with python 2.4 > 25 seconds

Re: Using python as primary language

2007-11-12 Thread Rhamphoryncus
On Nov 12, 2:28 am, "Martin Vilcans" <[EMAIL PROTECTED]> wrote: > On Nov 10, 2007 12:48 AM, Rhamphoryncus <[EMAIL PROTECTED]> wrote: > > > On Nov 9, 1:45 pm, "Terry Reedy" <[EMAIL PROTECTED]> wrote: > > > 2. If micro-locked Python ran, say, half as fast, then you can have a lot > > > of IPC (interp

RE: Populating a dictionary, fast [SOLVED SOLVED]

2007-11-12 Thread Michael Bacarella
> > You can download the list of keys from here, it's 43M gzipped: > > http://www.sendspace.com/file/9530i7 > > > > and see it take about 45 minutes with this: > > > > $ cat cache-keys.py > > #!/usr/bin/python > > v = {} > > for line in open('keys.txt'): > > v[long(line.strip())] = True

Rothschilds own half the worlds wealth directly and indirectly thru zionist proxies Re: Bill Gates was never the Richest man on earth

2007-11-12 Thread zionist . news
On Nov 11, 5:48 am, "GOH, Kheng-Swee" <[EMAIL PROTECTED]> wrote: > On Tue, 06 Nov 2007 17:53:01 -, [EMAIL PROTECTED] wrote: > > ... > > >Using an innovative system of pigeons > >for communication and encoded letters, ... > > I didn't believe you until I read that part. It all makes sense now!

Re: A JEW hacker in California admits distributing malware that let him steal usernames and passwords for Paypal accounts.

2007-11-12 Thread zionist . news
On Nov 10, 3:02 pm, ChairmanOfTheBored <[EMAIL PROTECTED]> wrote: > On Sat, 10 Nov 2007 22:10:15 -, [EMAIL PROTECTED] wrote: > >The mapping of Muslim communities > > You're a goddamned retard. A Jew hacker in California admits distributing malware that let him steal usernames and passwords f

why there is no pythonscript insine web browsers?

2007-11-12 Thread Timuçin Kızılay
I'm an old programmer coming from a cobol background and started to learn python. I'm using javasript for web based applications but after I started to learn python, the javascript language started to seem ugly to me. Now I'm wondering why there is java support on web browsers but no python sup

Re: Rothschilds own half the worlds wealth directly and indirectly thru zionist proxies Re: Bill Gates was never the Richest man on earth

2007-11-12 Thread Simon Spiegel
On 2007-11-12 18:57:07 +0100, [EMAIL PROTECTED] said: > On Nov 11, 5:48 am, "GOH, Kheng-Swee" <[EMAIL PROTECTED]> > wrote: >> On Tue, 06 Nov 2007 17:53:01 -, [EMAIL PROTECTED] wrote: >> >> ... >> >>> Using an innovative system of pigeons >>> for communication and encoded letters, ... >> >>

RE: python - an eggs...

2007-11-12 Thread Diez B. Roggisch
bruce wrote: > diez... > > i was being polite in thanking you for your input/thoughts... i actually > had read what you'd posted, as i stated. Really? Did you? Here your third question: -3rd question.. in searching the 'net, it appears that i have to download setuptools in order to get easy_ins

Re: why there is no pythonscript insine web browsers?

2007-11-12 Thread Diez B. Roggisch
Timuçin Kızılay wrote: > I'm an old programmer coming from a cobol background and started to > learn python. I'm using javasript for web based applications but after I > started to learn python, the javascript language started to seem ugly to > me. Now I'm wondering why there is java support on we

crawler in python and mysql

2007-11-12 Thread Fabian López
Hi, I would like to write a code that needs to crawl an url and take all the HTML code. I have noticed that there are different opensource webcrawlers, but they are very extensive for what I need. I only need to crawl an url, and don't know if it is so easy as using an html parser. Is it? Which lib

Re: Rothschilds own half the worlds wealth directly and indirectly thru zionist proxies Re: Bill Gates was never the Richest man on earth

2007-11-12 Thread Robert J. Kolker
[EMAIL PROTECTED] wrote: > > You would learn a lot MORE if you listened to the videos whose links > are provided. > Please share these links anonymously with your friends, neighbors or > anyone whose email you know. > > Spread quality knowledge. That means the Goyim own the other half. So what

RE: python - an eggs...

2007-11-12 Thread bruce
hey dietz... if you give me your email i'll correspond with you directly.. but yeah, you are a jerk. in that you make assumptions that may/may not be correct, but you appear to have a holier than thou mentality... i did download the setuptools tar file i read through the txt files that came w

Python-URL! - weekly Python news and links (Nov 12)

2007-11-12 Thread Gabriel Genellina
QOTW: "AOP is a programming paradigm in the same way indie is a genre of film." - Carl Banks http://groups.google.com/group/comp.lang.python/msg/224e922a3e1a8638 "I really like Python's notion of having just one data type: the duck." - itsme http://groups.google.com/group/comp.lang.perl.m

Re: OT: concatenating targets for python with (eg.) Gnu make

2007-11-12 Thread Carl Banks
On Nov 12, 1:22 pm, Jon Nicoll <[EMAIL PROTECTED]> wrote: > My question is, how can I specify a makefile rule so that *all* of the > changed .A files are invoked on the AtoB command line - ie if 1.A, 2.A > and 3.A are newer than 1.B, 2.B, 3.B, I want make to invoke > > AtoB.py 1.A 2.A 3.A 4.A > > r

webbrowser.open still gives problem with file://

2007-11-12 Thread krishnakant Mane
hello, some days bac I posted a problem about webbrowser.open() not opening the file on the local machine. I get a few responses and I tryed working it out. I also refered to the cookbook example posted on that thread. I still can't figure out why webbrowser.open("file:///home/krishna/documents/tut

Re: Binary search tree

2007-11-12 Thread Scott SA
On 11/12/07, Scott SA ([EMAIL PROTECTED]) wrote: Uhm sorry, there is a slightly cleaner way of running the second option I presented (sorry for the second post). >If you would find an index and count useful, you could do something like this: > >for idx in range(len(urls)): >uniqu

Re: Information manager/organizer with tags question.

2007-11-12 Thread Aaron Watters
On Nov 11, 5:44 pm, [EMAIL PROTECTED] wrote: > Hello, > > I would like to write an information manager/organizer type of app but > first I'd like to ask if there is something like that already... Your outline sounds like a killer app, and I don't know of anything like it (especially for free). Ho

Re: Populating a dictionary, fast [SOLVED]

2007-11-12 Thread Paul Rubin
"Michael Bacarella" <[EMAIL PROTECTED]> writes: > > id2name[key >> 40][key & 0x100] = name > Oops, typo. It's actually: > Id2name[key >> 40][key & 0xff] = name Are you saying this is a patch that appeared after python 2.3? Somehow I don't think it's come up in this threa

RE: crawler in python and mysql

2007-11-12 Thread Adam Pletcher
In the standard Python install (Windows 2.5, at least), there's there's a couple example scripts you might find useful: \Tools\webchecker\webchecker.py Crawls specified URL, checking for broken links. \Tools\webchecker\websucker.py Variant on the above that archives the specified site lo

Re: Python iPod challenge

2007-11-12 Thread jose Barcelona
Gabriel, Now it works fine with FIREFOX , SAFARI and MSIE. (MSIE didnt like the the way prototype.js deals with CR LF) > BTW, why do you require JS? The python interpreter comunicates back and forth via a widget just like gmail XD. Sorry for that. Anyway we stil need volunteers... ht

Override method name and original method access

2007-11-12 Thread Donn Ingle
In an unusual twist of code I have a subclass which overrides a method but it also needs to call the original method: class One: def add (self, stuff): self.stuff.append(stuff) class Two(One): def __init__(self, otherstuff): (otherstuff) #otherstuff must go into list within the parent. #Th

Transfer socket connection between programs

2007-11-12 Thread JamesHoward
Does anyone know any method to have one program, acting as a server transfer a socket connection to another program? I looked into transferring the connection via xml rpc to no avail. It seems to be a problem of getting access to a programs private memory space and giving another program access t

Re: python - an eggs...

2007-11-12 Thread Diez B. Roggisch
bruce schrieb: > hey dietz... > > if you give me your email i'll correspond with you directly.. > but yeah, you are a jerk. in that you make assumptions that may/may not be > correct, but you appear to have a holier than thou mentality... > > i did download the setuptools tar file i read thro

Re: Python-URL! - weekly Python news and links (Nov 12)

2007-11-12 Thread Laszlo Nagy
Gabriel Genellina wrote: > QOTW: "AOP is a programming paradigm in the same way indie is a genre of > film." - Carl Banks > http://groups.google.com/group/comp.lang.python/msg/224e922a3e1a8638 > I was following links and hit PEP 246 here: http://www.python.org/dev/peps/pep-0246/ On that

Re: why there is no pythonscript insine web browsers?

2007-11-12 Thread Daniel Fetchinson
> I'm an old programmer coming from a cobol background and started to > learn python. I'm using javasript for web based applications but after I > started to learn python, the javascript language started to seem ugly to > me. Now I'm wondering why there is java support on web browsers but no > pyth

Re: optional arguments with compact reporting in optparse

2007-11-12 Thread braver
Steve -- thanks for your pointer to argparse, awesome progress -- optional arguments. However, I still wonder how I do reporting. The idea is that there should be a list with tuples of the form: (short, long, value, help) -- for all options, regardless of whether they were specified on the comm

Re: Transfer socket connection between programs

2007-11-12 Thread Grant Edwards
On 2007-11-12, JamesHoward <[EMAIL PROTECTED]> wrote: > Does anyone know any method to have one program, acting as a > server transfer a socket connection to another program? The only way I know of is to use fork. When you fork a process, all open file-descriptors (including network connections)

Re: Python-URL! - weekly Python news and links (Nov 12)

2007-11-12 Thread Carl Banks
On Nov 12, 2:46 pm, Laszlo Nagy <[EMAIL PROTECTED]> wrote: > Gabriel Genellina wrote: > > QOTW: "AOP is a programming paradigm in the same way indie is a genre of > > film." - Carl Banks > >http://groups.google.com/group/comp.lang.python/msg/224e922a3e1a8638 > > I was following links and hit P

Re: Override method name and original method access

2007-11-12 Thread Chris Mellon
On Nov 12, 2007 1:41 PM, Donn Ingle <[EMAIL PROTECTED]> wrote: > In an unusual twist of code I have a subclass which overrides a method but > it also needs to call the original method: > > class One: > def add (self, stuff): > self.stuff.append(stuff) > > class Two(One): > def __init__(self, ot

Re: Override method name and original method access

2007-11-12 Thread Laszlo Nagy
Donn Ingle wrote: > In an unusual twist of code I have a subclass which overrides a method but > it also needs to call the original method: > > class One: > def add (self, stuff): > self.stuff.append(stuff) > > class Two(One): > def __init__(self, otherstuff): > (otherstuff) #otherstuff must

Re: Transfer socket connection between programs

2007-11-12 Thread Paul Rubin
JamesHoward <[EMAIL PROTECTED]> writes: > Does anyone know any method to have one program, acting as a server > transfer a socket connection to another program? I looked into > transferring the connection via xml rpc to no avail. You have to use an out of band communication mechanism. On Linux

Re: Transfer socket connection between programs

2007-11-12 Thread JamesHoward
On Nov 12, 12:50 pm, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2007-11-12, JamesHoward <[EMAIL PROTECTED]> wrote: > > > Does anyone know any method to have one program, acting as a > > server transfer a socket connection to another program? > > The only way I know of is to use fork. When you f

Re: Transfer socket connection between programs

2007-11-12 Thread Grant Edwards
On 2007-11-12, JamesHoward <[EMAIL PROTECTED]> wrote: >> Private memory has nothing to do with it. The connection is a >> data structure that lives in kernel space, not in user space. >> Even if you could grant another process access to your "private >> memory space", it wouldn't help you "transf

Re: Python-URL! - weekly Python news and links (Nov 12)

2007-11-12 Thread Aurélien Campéas
Laszlo Nagy a écrit : > Gabriel Genellina wrote: >> QOTW: "AOP is a programming paradigm in the same way indie is a genre of >> film." - Carl Banks >> http://groups.google.com/group/comp.lang.python/msg/224e922a3e1a8638 >> > I was following links and hit PEP 246 here: > > http://www.python

Re: Information manager/organizer with tags question.

2007-11-12 Thread andrei . avk
On Nov 12, 2:24 pm, Aaron Watters <[EMAIL PROTECTED]> wrote: > On Nov 11, 5:44 pm, [EMAIL PROTECTED] wrote: > > > Hello, > > > I would like to write an information manager/organizer type of app but > > first I'd like to ask if there is something like that already... > > Your outline sounds like a k

Re: Transfer socket connection between programs

2007-11-12 Thread Laszlo Nagy
JamesHoward wrote: > Does anyone know any method to have one program, acting as a server > transfer a socket connection to another program? I looked into > transferring the connection via xml rpc to no avail. It seems to be a > problem of getting access to a programs private memory space and > gi

Re: Questions about remembering and caching function arguments

2007-11-12 Thread Aurélien Campéas
thebjorn a écrit : > On Nov 12, 1:05 am, "Anand Patil" <[EMAIL PROTECTED]> > wrote: >> Hi all, >> >> I have two questions about a class, which we'll call MyWrapperClass, >> in a package to which I'm contributing. >> >> 1) MyWrapperClass wraps functions. Each instance has an attribute >> called 'val

imaplib unexpected error

2007-11-12 Thread KeefTM
Hello, I am getting an odd error when trying to establish an IMAP connection: File "/Library/Frameworks/Python.framework/Versions/2.4//lib/python2.4/ imaplib.py", line 904, in _get_response raise self.abort("unexpected response: '%s'" % resp) imaplib.abort: unexpected response: '220 libertydis

Re: Transfer socket connection between programs

2007-11-12 Thread marek . rocki
JamesHoward napisa (a): > Does anyone know any method to have one program, acting as a server > transfer a socket connection to another program? I looked into > transferring the connection via xml rpc to no avail. It seems to be a > problem of getting access to a programs private memory space and >

Re: Transfer socket connection between programs

2007-11-12 Thread [EMAIL PROTECTED]
On Nov 12, 1:41 pm, JamesHoward <[EMAIL PROTECTED]> wrote: > Does anyone know any method to have one program, acting as a server > transfer a socket connection to another program? I looked into > transferring the connection via xml rpc to no avail. It seems to be a > problem of getting access to

Re: imaplib unexpected error

2007-11-12 Thread KeefTM
Nevermind. It always seems I figure out what I did wrong right after I post. Turns out I was using the wrong port. On Nov 12, 12:51 pm, KeefTM <[EMAIL PROTECTED]> wrote: > Hello, I am getting an odd error when trying to establish an IMAP > connection: > > File "/Library/Frameworks/Python.framewo

Re: Populating a dictionary, fast

2007-11-12 Thread Istvan Albert
On Nov 12, 12:39 pm, "Michael Bacarella" <[EMAIL PROTECTED]> wrote: > The win32 Python or the cygwin Python? > > What CPU architecture? it is the win32 version, a dual core laptop with T5220 Core 2 -- http://mail.python.org/mailman/listinfo/python-list

Re: imaplib unexpected error

2007-11-12 Thread Laszlo Nagy
KeefTM wrote: > Hello, I am getting an odd error when trying to establish an IMAP > connection: > > File "/Library/Frameworks/Python.framework/Versions/2.4//lib/python2.4/ > imaplib.py", line 904, in _get_response > raise self.abort("unexpected response: '%s'" % resp) > imaplib.abort: unexpecte

Re: imaplib unexpected error

2007-11-12 Thread KeefTM
On Nov 12, 1:46 pm, Laszlo Nagy <[EMAIL PROTECTED]> wrote: > KeefTM wrote: > > Hello, I am getting an odd error when trying to establish an IMAP > > connection: > > > File "/Library/Frameworks/Python.framework/Versions/2.4//lib/python2.4/ > > imaplib.py", line 904, in _get_response > > raise se

preparing data for visualization

2007-11-12 Thread Bryan . Fodness
I would like to have my data in a format so that I can create a contour plot. My data is in a file with a format, where there may be multiple fields field = 1 1a 0 2a 0 3a 5 4a 5 5a 5 6a 5 7a 5 8a 5 9a 0 10a 0 1b 0 2b 0 3b 5 4b

Re: A JEW hacker in California admits distributing malware that let him steal usernames and passwords for Paypal accounts.

2007-11-12 Thread thermate
On Nov 12, 11:29 am, "radiosrfun" <[EMAIL PROTECTED]> wrote: > It was MUSLIMS who killed close to 3000 people of all races/religions. Where is your proof ? Where is the Anthrax Mailer ?? His proof that the moslems did not do it is painted all over the internet in

Re: optional arguments with compact reporting in optparse

2007-11-12 Thread Steven Bethard
braver wrote: > Steve -- thanks for your pointer to argparse, awesome progress -- > optional arguments. > > However, I still wonder how I do reporting. The idea is that there > should be a list with tuples of the form: > > (short, long, value, help) > > -- for all options, regardless of whether

  1   2   >