How to get a unique id for bound methods?

2005-08-19 Thread Russell E. Owen
I have several situations in my code where I want a unique identifier for a method of some object (I think this is called a bound method). I want this id to be both unique to that method and also stable (so I can regenerate it later if necessary). I thought the id function was the obvious choic

Re: Confused newbie needs help with "__init__() takes exactly 11 arguments (1 given)"

2005-08-19 Thread [EMAIL PROTECTED]
d'oh I'm an idiot... you are making a 'list' object. -- http://mail.python.org/mailman/listinfo/python-list

Re: while c = f.read(1)

2005-08-19 Thread Grant Edwards
On 2005-08-19, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Alright, everyone seems to have gone off on a tangent here, so I'll try > to stick to your code... > """ > This is what I would ideally like: > > > f = open("blah.txt", "r") > while c = f.read(1): > # ... work on c > > > But I

wanna stop by my homemade glory hole?

2005-08-19 Thread Lacy
my husband is installing an extra bathroom poolside. there is a perfect size hole (unless you have a huge cock) to stick your dick through into the adjoing room. come around the side of my house(perfect if you look like a repair man) enter into the unfisnished bathroom and I'll service you fro

Re: How to get a unique id for bound methods?

2005-08-19 Thread Benji York
Russell E. Owen wrote: > The id of two different methods of the same object seems to be the > same, and it may not be stable either. Two facts you're (apparently) unaware of are conspiring against you: 1) the "id" of an object is consistent for the lifetime of the object, but may be reused afte

Re: How to get a unique id for bound methods?

2005-08-19 Thread Bengt Richter
On Fri, 19 Aug 2005 13:29:19 -0700, "Russell E. Owen" <[EMAIL PROTECTED]> wrote: >I have several situations in my code where I want a unique identifier >for a method of some object (I think this is called a bound method). I >want this id to be both unique to that method and also stable (so I can

Re: Python jobs (was Re: Python for Webscripting (like PHP))

2005-08-19 Thread Aahz
In article <[EMAIL PROTECTED]>, Erik Max Francis <[EMAIL PROTECTED]> wrote: >Peter Decker wrote: >> >> Then start looking for telecommuting people. There are lots of us who >> can use work and have excellent telecommuting references, but who >> don't happen to live in a major metro area! > >And th

trying to check the creation date of a file

2005-08-19 Thread David Fickbohm
People, I am trying to determine the creation date of files in a folder. I am using the following code to find the folder and confirm that files exist in the folder. If someone could give me an idea how to check a creation date it would be appreciated. Thanks dave def delete_old_files (t:\dm\~

looking to GIVE my first oral favor

2005-08-19 Thread allie
im new to this, i guess you can say im still curious about having extra marital lovers. i've only had 1 encounter with a married man and I loved it so much. its such a strong burning desire now. when I look at men, i'm always wondering how they look nude, or their cock size. basically, i want

Re: trying to check the creation date of a file

2005-08-19 Thread Larry Bates
use os.stat docs are here: http://docs.python.org/lib/module-stat.html Larry Bates David Fickbohm wrote: > People, > > I am trying to determine the creation date of files in a folder. > I am using the following code to find the folder and confirm that files > exist in the folder. If someone co

servers in python

2005-08-19 Thread Max
I am writing a Hashcash program in python. Rather than create an email client plugin, I have done this thru a proxy server which adds the Hashcash before forwarding. What I want to know is whether this is safe. I currently use this code: class HashcashServer (smtpd.PureProxy): def process_

Re: Database of non standard library modules...

2005-08-19 Thread Nigel Rowe
Steve Holden wrote: > Robert Kern wrote: >> Jon Hewer wrote: >> >>>Is there an online database of non standard library modules for Python? >> >> >> http://cheeseshop.python.org/pypi >> > While cheeseshop might resonate with the Monty Python fans I have to say > I think the name sucks in terms

Re: while c = f.read(1)

2005-08-19 Thread Bengt Richter
On Fri, 19 Aug 2005 16:31:47 +1000, John Machin <[EMAIL PROTECTED]> wrote: >Bengt Richter wrote: >> On 18 Aug 2005 22:21:53 -0700, "Greg McIntyre" <[EMAIL PROTECTED]> wrote: >> >> >>>I have a Python snippet: >>> >>> f = open("blah.txt", "r") >>> while True: >>> c = f.read(1) >>> if c ==

Re: while c = f.read(1)

2005-08-19 Thread John Machin
[EMAIL PROTECTED] wrote: > Alright, everyone seems to have gone off on a tangent here, so I'll try > to stick to your code... > """ > This is what I would ideally like: > > > f = open("blah.txt", "r") > while c = f.read(1): > # ... work on c > > > But I get a syntax error. > > >

Re: wanna stop by my homemade glory hole?

2005-08-19 Thread Stephen Kellett
>wanna stop by my homemade glory hole? I don't think anyone on this group will be interested in trying their Python with that. Take it somewhere else. -- Stephen Kellett Object Media Limitedhttp://www.objmedia.demon.co.uk/software.html Computer Consultancy, Software Development Windows C++,

Re: Python jobs (was Re: Python for Webscripting (like PHP))

2005-08-19 Thread Terry Reedy
"Gregory Piñero" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I'd love Python work, just like everyone else here. On a related topic, >what's the >policy/etiquette of posting a resume on here, or mentioning >what kind of work >you're looking for? I would take absence of such p

Re: How to get a unique id for bound methods?

2005-08-19 Thread Paolino
Russell E. Owen wrote: > The "hash" function looks promising -- it prints out consistent values > if I use it instead of "id" in the code above. Is it stable and unique? > The documentation talks about "objects" again, which given the behavior > of id makes me pretty nervous. > I dont know how

Re: Newbie Question

2005-08-19 Thread John Machin
Tom Strickland wrote: > I have a file that contains many lines, each of which consists of a string > of comma-separated variables, mostly floats but some strings. Each line > looks like an obvious tuple to me. How do I save each line of this file as a > tuple rather than a string? Or, is that th

Re: stdin -> stdout

2005-08-19 Thread John Machin
limodou wrote: > 2005/8/19, max(01)* <[EMAIL PROTECTED]>: > >>hi. >> >>i was wondering, what's the simplest way to echo the standard input to >>the standard output, with no modification. >> >>i came up with: >> >>... >>while True: >> try: >> raw_input() >> except EOFError: >> break >>.

Re: global interpreter lock

2005-08-19 Thread Bryan Olson
Donn Cave wrote: > Bryan Olson wrote: >>On a uniprocessor system, the GIL is no problem. On multi- >>processor/core systems, it's a big loser. > > > I rather suspect it's a bigger winner there. > > Someone who needs to execute Python instructions in parallel > is out of luck, of course, b

Karrigell tutorial published

2005-08-19 Thread Luis M. Gonzalez
Karrigell has new tutorial here: http://karrigell.sourceforge.net/en/tutorial.html For those who don't know what Karrigell is, I'd just say that it is the most pythonic, simple, fun, straightforward and full-featured web framework available today. Check it out! http://karrigell.sourceforge.net/

Re: How to get a unique id for bound methods?

2005-08-19 Thread Russell E. Owen
In article <[EMAIL PROTECTED]>, Benji York <[EMAIL PROTECTED]> wrote: >Russell E. Owen wrote: >> The id of two different methods of the same object seems to be the >> same, and it may not be stable either. > >Two facts you're (apparently) unaware of are conspiring against you: > >1) the "id" of

Re: pickle.load not working?

2005-08-19 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > oh, well how do I make "derek" be an instance of 'chatuser' ? Spot the difference:: In [228]: class A: pass .228.: In [229]: a = A In [230]: repr(a) Out[230]: '' In [231]: b = A() In [232]: repr(b) Out[232]: '<__main__.A instance

Re: trying to check the creation date of a file

2005-08-19 Thread John Machin
David Fickbohm wrote: > People, > > I am trying to determine the creation date of files in a folder. > I am using the following code to find the folder and confirm that files > exist in the folder. Presumably you meant "intend to use the following pseudocode" (not "am using the following code")

wanna stop by my homemade glory hole?

2005-08-19 Thread Steph
my husband is installing an extra bathroom poolside. there is a perfect size hole (unless you have a huge cock) to stick your dick through into the adjoing room. come around the side of my house(perfect if you look like a repair man) enter into the unfisnished bathroom and I'll service you fro

Re: How to get a unique id for bound methods?

2005-08-19 Thread Bengt Richter
On Fri, 19 Aug 2005 16:33:22 -0700, "Russell E. Owen" <[EMAIL PROTECTED]> wrote: [...] > >The current issue is associated with Tkinter. I'm trying to create a tk >callback function that calls a python "function" (any python callable >entity). > >To do that, I have to create a name for tk that is

Version of TAR in tarfile module? TAR 1.14 or 1.15 port to Windows?

2005-08-19 Thread Claudio Grondi
I need to unpack on a Windows 2000 machine some Wikipedia media .tar archives which are compressed with TAR 1.14 (support for long file names and maybe some other features) . It seems, that Pythons tarfile module is able to list far more files inside the archives than WinRAR or 7zip or TotalCommand

Re: Moinmoin config

2005-08-19 Thread Mark
The missing link under /var/www/html was exactly the problem. Somehow missed this in the labyrinth of setup instructions. I have another question, and as of yet, have not found another discussion group for moinmoin, so sorry, but here goes: I have a table and would like the table borders to go a

Re: Python jobs

2005-08-19 Thread Mike Meyer
"Terry Reedy" <[EMAIL PROTECTED]> writes: > generally counter-indicated unless the name (.marketplace) or charter say > otherwise. Exceptions would be a low volume of things of direct and narrow > interest. So I consider the rare job announcements posted here ok. The > same for book announcem

Re: global interpreter lock

2005-08-19 Thread Mike Meyer
Bryan Olson <[EMAIL PROTECTED]> writes: > I don't see much point in trying to convince programmers that > they don't really want concurrent threads. They really do. Some > don't know how to use them, but that's largely because they > haven't had them. I doubt a language for thread-phobes has much >

Re: Save Binary data.

2005-08-19 Thread Mike Meyer
Larry Bates <[EMAIL PROTECTED]> writes: > Directories with large numbers of files was a problem in FAT16 and > FAT32 filesystems but not really a problem in NTFS or Linux (at > least that I've found). Depends on how you define "large" and what Linux file system you're using. Of course, if you ope

Re: Python jobs

2005-08-19 Thread Aahz
In article <[EMAIL PROTECTED]>, Mike Meyer <[EMAIL PROTECTED]> wrote: > >Maybe the Python jobs lists needs a "available developers" >counterpart? Or would it be to big/dynamic to maintain using whatever >is behind the jobs list? Part of the reason the Jobs page hasn't moved to a wiki is that ofte

Re: BeautifulSoup

2005-08-19 Thread Mike Meyer
"Paul McGuire" <[EMAIL PROTECTED]> writes: > Here's a pyparsing program that reads my personal web page, and spits > out HTML with all of the HREF's reversed. Parsing HTML isn't easy, which makes me wonder how good this solution really is. Not meant as a comment on the quality of this code or PyP

Re: Moinmoin config

2005-08-19 Thread mbstevens
Mark wrote: > The missing link under /var/www/html was exactly the problem. Somehow > missed this in the labyrinth of setup instructions. > > I have another question, and as of yet, have not found another > discussion group for moinmoin, so sorry, but here goes: > > I have a table and would like

ANN: Binary Distribution of pyMinGW-241

2005-08-19 Thread A.B., Khalid
This is to inform those interested in Python and MinGW that a binary distribution of pyMinGW-241 is now available. This is mainly a packaging of the March release in binary form for those who are finding it difficult to build Python or its standard extensions in MinGW. WHAT'S INSIDE -

Well, another try Re: while c = f.read(1)

2005-08-19 Thread en.karpachov
On 18 Aug 2005 22:21:53 -0700 Greg McIntyre wrote: > f = open("blah.txt", "r") > while True: > c = f.read(1) > if c == '': break # EOF > # ... work on c > > Is some way to make this code more compact and simple? It's a bit > spaghetti. > > This is what I would ideally like:

Re: Well, another try Re: while c = f.read(1)

2005-08-19 Thread James
> for data in iter(lambda:f.read(1024), ''): > for c in data: What are the meanings of Commands 'iter' and 'lambda', respectively? I do not want you to indicate merely the related help pages. Just your ituitive and short explanations would be enough since I'm really newbie to Python. -James

Re: Well, another try Re: while c = f.read(1)

2005-08-19 Thread Robert Kern
James wrote: >>for data in iter(lambda:f.read(1024), ''): >>for c in data: > > What are the meanings of Commands 'iter' and 'lambda', respectively? I > do not want you to indicate merely the related help pages. Just your > ituitive and short explanations would be enough since I'm really newbie

Re: Version of TAR in tarfile module? TAR 1.14 or 1.15 port to Windows?

2005-08-19 Thread Martin v. Löwis
Claudio Grondi wrote: > What TAR version is built into the tarfile module? None: the tarfile module is not built on top of GNU tar. Instead, it is a complete reimplementation. > Is there a TAR 1.14 or 1.15 port to Windows > available in Internet for download (which URL)? http://sources.redhat.co

Re: BeautifulSoup

2005-08-19 Thread Paul McGuire
Mike - Thanks for asking. Typically I hang back from these discussions of parsing HTML or XML (*especially* XML), since there are already a number of parsers out there that can handle the full language syntax. But it seems that many people trying to parse HTML aren't interested in fully parsing a

<    1   2