[ANN] Release 0.55 of Task Coach

2006-01-14 Thread Frank Niessink
Hi all, I'm pleased to announce release 0.55 of Task Coach. New in this release: Bug fixed: * Sorting by total budget was broken. Feature added: * Simple reminders. Dependency changed: * Task Coach now requires wxPython 2.6.1.0-unicode or newer (this is only relevant if you use the source

Re: How to remove subset from a file efficiently?

2006-01-14 Thread bonono
fynali wrote: [bonono] Have you tried the explicit loop variant with psyco ? Sure I wouldn't mind trying; can you suggest some code snippets along the lines of which I should try...? [fynali] Needless to say, I'm utterly new to python and my programming skills know-how

problem of types:

2006-01-14 Thread Laurent
I do not understand why he is talking me about 'str', no str given!!! I have this: - def to_float(elt): if type(elt) is list: return map(to_float, elt) else: return float(elt) def Denombrement(A,b,c,type): . . . A = to_float(A)

Re: problem of types:

2006-01-14 Thread Fredrik Lundh
Laurent wrote: I do not understand why he is talking me about 'str', no str given!!! I have this: - def to_float(elt): if type(elt) is list: this uses type if __name__ == '__main__': A = [[1,0],[0,1]] b = [2,2] c = [1,1] type =

Re: Subclassing socket

2006-01-14 Thread Steve Holden
[EMAIL PROTECTED] wrote: Steve, To your question of why you'd ever receive value: This is very common in any network programming. If you send a packet of data that has a header and payload, and the header contains the length (N) of the payload, then at some point you have to receive N

Re: Newbie to XML-RPC: looking for advice

2006-01-14 Thread Fredrik Lundh
David Hirschfield wrote: All the above works fine...but I'm finding the following: while the actual creation and pickling of the objects only takes a millisecond or so, the actual time before the client call completes is a third of a second or more. So where's the slowdown? It doesn't

two questions about thread

2006-01-14 Thread iclinux
hi there, I'm new to python, and have two questions: a. how to exit the whole process in a thread? b. when thread doing a infinite loops, how to terminate the process?: it seems that the follow doesn't work, in my Windows XP: thread.start() thread.join() Regards --

Re: Pythonic wrappers for SQL?

2006-01-14 Thread Lawrence Oluyede
Il 2006-01-14, Kenneth McDonald [EMAIL PROTECTED] ha scritto: I need to do some data manipulation, and SQLite is a nice little product for it, except of course that I'd need to write SQL. Are there any good libraries out there that let one write (basic) queries in a Pythonic syntax,

Re: filling out forms online with python

2006-01-14 Thread Steve Holden
Steve Young wrote: Hi, I was wondering if there's a way to fill out forms online using python. Say for example if you wanted to make a search on some search engine without having to actually open a browser or something like that. Thanks. Take a look at ClientForm and other libraries

Re: How to remove subset from a file efficiently?

2006-01-14 Thread fynali
$ cat cleanup.py #!/usr/bin/python postpaid_file = open('/home/oracle/stc/test/PSP333') outfile = open('/home/oracle/stc/test/PSP-CBR.dat', 'w') barred = {} for number in open('/home/oracle/stc/test/CBR333'): barred[number] = None # just add it as a key

Re: Indentation/whitespace

2006-01-14 Thread Jon Perez
Joe wrote: As for me, I'm not suggesting that braces are better than indentation. In fact, requiring indentation is a good idea, and I agree that braces can be quite ugly. It is the lack of visible block closing when there's more than one level that I dislike. ... I'm talking about double

Re: How to remove subset from a file efficiently?

2006-01-14 Thread fynali
$ cat cleanup_use_psyco_and_list_compr.py #!/usr/bin/python import psyco psyco.full() postpaid_file = open('/home/sajid/python/wip/stc/2/PSP333') outfile = open('/home/sajid/python/wip/stc/2/PSP-CBR.dat.psyco', 'w') barred = {} for number in

Re: python create mail

2006-01-14 Thread Tim Roberts
[EMAIL PROTECTED] wrote: hey I need help in sending email, It seems that while using this set of commands from smtplib import SMTP s = SMTP() s.set_debuglevel(1) s.connect('outmail.huji.ac.il') I should be able to get a connection but what I get is this error T:\Anya\workmail1.py

Re: XML Writer in wxPython

2006-01-14 Thread Tim Roberts
Marco Meoni [EMAIL PROTECTED] wrote: Have you ever write an XML Writer in wxPython? A Writer that from a GUI can compose XML Files. XML is usually pretty easy to write by hand, just using print statements. Do you alreday have a tree of objects you want to write? -- - Tim Roberts, [EMAIL

Re: ssh question

2006-01-14 Thread DarkBlue
should read ssh , (probably should not post anything so late in the evening) Db -- http://mail.python.org/mailman/listinfo/python-list

Re: full screen gui

2006-01-14 Thread Yarvin
Hey umm the program seems to work fine for me. I'm running Linux though... might be different on windows Alvin -- http://mail.python.org/mailman/listinfo/python-list

Re: How to remove subset from a file efficiently?

2006-01-14 Thread bonono
fynali wrote: $ cat cleanup_use_psyco_and_list_compr.py #!/usr/bin/python import psyco psyco.full() postpaid_file = open('/home/sajid/python/wip/stc/2/PSP333') outfile = open('/home/sajid/python/wip/stc/2/PSP-CBR.dat.psyco', 'w') barred = {} for number

Re: Pythonic wrappers for SQL?

2006-01-14 Thread David Blewett
Quoting Kenneth McDonald [EMAIL PROTECTED]: I need to do some data manipulation, and SQLite is a nice little product for it, except of course that I'd need to write SQL. Are there any good libraries out there that let one write (basic) queries in a Pythonic syntax, rather than directly in

Re: Wats the code?

2006-01-14 Thread Kr z
It's socket threading. I'm had to create a client/server multi-threading simulator where the client sends 1000 threads to the server to "stress" the server. The server can handle more than 1 client concurrently. I would like to hear your comments, tips and relevant soure codes. Do advise.

Removing RuntimeWarning

2006-01-14 Thread Ellinghaus, Lance
Title: Removing RuntimeWarning I have a simple question When I use os.tempnam() I receive a RuntimeWarning. How can I not have that show up? I know I should not use tempnam() and I will move away from it in the near future, but for now I have to use it. Thank you, Lance --

Python Client accessing Tomcat

2006-01-14 Thread Michael Oliver
I am trying to write a Python client to access a Tomcat servlet using Tomcat Realm authentication with no success. I can use the httplib to connect to localhost port 8080 ok and post and get and all that is fine, but when I try to set username and password and access a protected part of

I've started new blog

2006-01-14 Thread sandy
Hi all, I've started a new blog for discussion about the help can be provided to freshers. visit following URL: http://forfreshers.blogspot.com/ please visit and let the frshers get benifit from our discussion. thank you in advance. sandeep. --

Re: How to remove subset from a file efficiently?

2006-01-14 Thread fynali
$ cat cleanup_use_psyco_and_list_compr.py #!/usr/bin/python import psyco psyco.full() postpaid_file = open('/home/sajid/python/wip/stc/2/PSP333') outfile = open('/home/sajid/python/wip/stc/2/PSP-CBR.dat.psyco', 'w') barred = {} for number in

Re: How to remove subset from a file efficiently?

2006-01-14 Thread fynali
Sorry, pls read that ~15 secs. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to remove subset from a file efficiently?

2006-01-14 Thread bonono
fynali wrote: Sorry, pls read that ~15 secs. That is more or less about it. As set() is faster than dict(), about 2x on my machine and I assume a portion of your time is in set/dict creation as it is pretty large data set. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to remove subset from a file efficiently?

2006-01-14 Thread fynali
$ cat cleanup_use_psyco_and_list_compr.py #!/usr/bin/python #import psyco #psyco.full() postpaid_file = open('/home/sajid/python/wip/stc/2/PSP333') outfile = open('/home/sajid/python/wip/stc/2/PSP-CBR.dat.psyco', 'w') barred = {} for number in

Re: Pythonic wrappers for SQL?

2006-01-14 Thread EleSSaR^
Kenneth McDonald si è profuso/a a scrivere su comp.lang.python tutte queste elucubrazioni: there any good libraries out there that let one write (basic) queries in a Pythonic syntax, rather than directly in SQL? You need an ORM. Beyond SQLAlchemy (I don't have experience with it) i would

Re: Marshal Obj is String or Binary?

2006-01-14 Thread Max
Giovanni Bajo wrote: What you see isn't always what you have. Your database is capable of storing \ x 0 0 characters, but your string contains a single byte of value zero. When Python displays the string representation to you, it escapes the values so they can be displayed. He can still

Re: Marshal Obj is String or Binary?

2006-01-14 Thread Steven D'Aprano
On Sat, 14 Jan 2006 12:36:59 +0200, Max wrote: He can still store the repr of the string into the database, and then reconstruct it with eval: Yes, but len(repr('\x00')) is 4, while len('\x00') is 1. Incorrect: len(repr('\x00')) 6 repr('\x00') '\\x00' So if he uses BLOB his data

filtering DNS proxy

2006-01-14 Thread Patrick Useldinger
Hi all, I am looking to write a filtering DNS proxy which should - receive DNS queries - validate them again an ACL which looks as follows: { 'ip1':['name1','name2',...], 'ip2':['name1','name3'], ... } - if the request is valid (ie. if the sending IP address is allowed to ask for

Re: Is 'everything' a refrence or isn't it?

2006-01-14 Thread Bryan Olson
Fredrik Lundh wrote: You're comparing identities, not values. The value is the set of things that you can access via an object's methods (via the type). Which does make '==' kind of weird. It may or may not refer to a method of the object. The identity is not, in itself, a part of the

Re: Marshal Obj is String or Binary?

2006-01-14 Thread Giovanni Bajo
Max wrote: What you see isn't always what you have. Your database is capable of storing \ x 0 0 characters, but your string contains a single byte of value zero. When Python displays the string representation to you, it escapes the values so they can be displayed. He can still store the

Re: Is 'everything' a refrence or isn't it?

2006-01-14 Thread Fredrik Lundh
Bryan Olson wrote: The identity is not, in itself, a part of the value. Python doesn't query the object to determine it's type or identity, but it always has to query the object to access the value. A look at the C implementation of a typical object might help: typedef struct

Re: How to remove subset from a file efficiently?

2006-01-14 Thread Raymond Hettinger
b = set(file('/home/sajid/python/wip/stc/2/CBR333')) file('PSP-CBR.dat,ray','w').writelines(itertools.ifilterfalse(b.__contains__,file('/home/sajid/python/wip/stc/2/PSP333'))) -- $ time ./cleanup_ray.py real0m5.451s user0m4.496s sys

WSGI

2006-01-14 Thread Lad
Hello, is there any mod_cgi - WSGI gateway available? (I know only about fast_cgi -WSGI gateway .) Regards, L -- http://mail.python.org/mailman/listinfo/python-list

Re: Removing RuntimeWarning

2006-01-14 Thread Fredrik Lundh
Lance Ellinghaus wrote: When I use os.tempnam() I receive a RuntimeWarning. How can I not have that show up? I know I should not use tempnam() and I will move away from it in the near future, but for now I have to use it. the warnings module lets you add filters to the warnings subsystem.

Re: Is 'everything' a refrence or isn't it?

2006-01-14 Thread Scott David Daniels
Steven D'Aprano wrote: Let's try not to be too deep here, okay? Before asking what is the value of foo?, we have to agree on what we mean by value. It is easy to tie yourself into knots here. An important help to some people's understanding of objects is realizing how they are used. Sometimes

Re: Is 'everything' a refrence or isn't it?

2006-01-14 Thread Antoon Pardon
On 2006-01-14, Steven D'Aprano [EMAIL PROTECTED] wrote: On Thu, 12 Jan 2006 16:11:53 -0800, rurpy wrote: It would help if you or someone would answer these five questions (with something more than yes or no :-) 1. Do all objects have values? All objects ARE values. Some values themselves

Re: Sudoku solver: reduction + brute force

2006-01-14 Thread Pavol . Severa
ago wrote: Inspired by some recent readings on LinuxJournal and an ASPN recipe, I decided to revamp my old python hack... The new code is a combination of (2) reduction methods and brute force and it is quite faster than the ASPN program. If anyone is interested I attached the code in

Re: Sudoku solver: reduction + brute force

2006-01-14 Thread Pavol . Severa
ago wrote: Inspired by some recent readings on LinuxJournal and an ASPN recipe, I decided to revamp my old python hack... The new code is a combination of (2) reduction methods and brute force and it is quite faster than the ASPN program. If anyone is interested I attached the code in

Running python apps from within python apps

2006-01-14 Thread aph
Hello. I'm sure this has been asked before, but I can't find an answer anywhere. I want to create a truly dynamic app which can get new functions on-the-fly and run them without having to re-start the main app. I've found the code module that looks kind of hopefull. For instance this works

Re: Running python apps from within python apps

2006-01-14 Thread Claudio Grondi
aph wrote: Hello. I'm sure this has been asked before, but I can't find an answer anywhere. I want to create a truly dynamic app which can get new functions on-the-fly and run them without having to re-start the main app. I've found the code module that looks kind of hopefull. For

Getting better traceback info on exec and execfile - introspection?

2006-01-14 Thread R. Bernstein
In doing the extension to the python debugger which I have here: http://sourceforge.net/project/showfiles.php?group_id=61395package_id=175827 I came across one little thing that it would be nice to get done better. I notice on stack traces and tracebacks, an exec or execfile command appears as

Re: Running python apps from within python apps

2006-01-14 Thread aph
actually 'exec()' is the function I was looking for. Working code: class myApp: def kalle(self,str): return str.upper() def run_script(self,script): exec(script) app = myApp() app.run_script(print self.kalle('hello')) Thanks... --

Re: Spanish Translation of any python Book?

2006-01-14 Thread gene tani
Luis M. González wrote: Lamentablemente, no conozco ningún tutorial o libro en castellano... http://www.python.org/doc/NonEnglish.html#spanish -- http://mail.python.org/mailman/listinfo/python-list

Re: Running python apps from within python apps

2006-01-14 Thread Claudio Grondi
aph wrote: actually 'exec()' is the function I was looking for. Working code: class myApp: def kalle(self,str): return str.upper() def run_script(self,script): exec(script) app = myApp() app.run_script(print self.kalle('hello')) Thanks... Sorry, I see,

Re: Running python apps from within python apps

2006-01-14 Thread Peter Hansen
aph wrote: actually 'exec()' is the function I was looking for. Working code: class myApp: def kalle(self,str): return str.upper() def run_script(self,script): exec(script) app = myApp() app.run_script(print self.kalle('hello')) A very minor point, but

Dynamically changing button text in python

2006-01-14 Thread marijuanated
Hi all, I am wondering if i could change a button text dynamically in its handler. for example,can we do something like this: curButton.bind(Button-1,self.StopServer) def StopServer(self,event): curButton[text] = Start Server Thanks, Sundar --

Re: two questions about thread

2006-01-14 Thread Diez B. Roggisch
iclinux wrote: hi there, I'm new to python, and have two questions: a. how to exit the whole process in a thread? sys.exit() Works only if Thread.setDaemon(True) is invoked on all threads. b. when thread doing a infinite loops, how to terminate the process?: it seems that the

Re: Stackless Python

2006-01-14 Thread alexander . limi
Christian Tismer wrote: Thanks to Carl Friedrich, I restarted the Zope process. I have no idea why it broke, the site was running since 38 days without problems. The Zope/Plone process was still there, blocking the port. Maybe I should go for something simpler than Plone... Hi Christian,

Re: Sudoku solver: reduction + brute force

2006-01-14 Thread Bas
There is more in this thread: http://groups.google.com/group/comp.lang.python/browse_frm/thread/479c1dc768f740a3/9252dab14e8ecabb?q=sudokurnum=2#9252dab14e8ecabb Enjoy, Bas -- http://mail.python.org/mailman/listinfo/python-list

Recursive tree list from dictionary

2006-01-14 Thread David Pratt
Hi. I am wanting to create a tree list result structure from a dictionary to categorize results. The dictionary contains elements that identify its parent. The levels of categorization is not fixed, so there is a need for the code to be recursive to drill down to the lowest level. I have

Re: Pythonic wrappers for SQL?

2006-01-14 Thread David Pratt
Hi Kenneth. Try SQLAlchemy. Regards, David Kenneth McDonald wrote: I need to do some data manipulation, and SQLite is a nice little product for it, except of course that I'd need to write SQL. Are there any good libraries out there that let one write (basic) queries in a Pythonic

Re: Is 'everything' a refrence or isn't it?

2006-01-14 Thread Aahz
In article [EMAIL PROTECTED], Scott David Daniels [EMAIL PROTECTED] wrote: An important help to some people's understanding of objects is realizing how they are used. Sometimes an object is used to mediate between the real world and a program. For example, you could design an object which

Re: Pythonic wrappers for SQL?

2006-01-14 Thread Steve Holden
Kenneth McDonald wrote: I need to do some data manipulation, and SQLite is a nice little product for it, except of course that I'd need to write SQL. Are there any good libraries out there that let one write (basic) queries in a Pythonic syntax, rather than directly in SQL? SQLObject

Re: Recursive tree list from dictionary

2006-01-14 Thread Max Erickson
David Pratt [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: Hi. I am wanting to create a tree list result structure from a dictionary to categorize results. The dictionary contains elements that identify its parent. The levels of categorization is not fixed, so there is a need for the

Re: Recursive tree list from dictionary

2006-01-14 Thread bearophileHUGS
This isn't much tested, so don't trust it much, and I hope it's not overkill. You can find Graph here: http://sourceforge.net/projects/pynetwork/ With this you can plot the tree, if you want: g.springCoords(); g.plot2d() Bear hugs, bearophile def scan(g, parent): subs = [scan(g, sub) for

Re: Newcomer question wrt variable scope/namespaces

2006-01-14 Thread Diez B. Roggisch
Florian Daniel Otel wrote: Gary, First of all, many thanks for the reply. Do I understand it correctly that actually the rule has to be refined as pertaining to the (so called) immutable types (like e.g. integers, tuples/strings) whereas lists and dictionaries are mutable types and the

Re: Recursive tree list from dictionary

2006-01-14 Thread Alan Franzoni
Il Sat, 14 Jan 2006 13:52:43 -0400, David Pratt ha scritto: source_list =[ I don't understand what you mean by saying that 'levels of categorization is not fixed', are there more than two keys in any dictionary? Basically, thus, you have a list of dictionaries and you want to get a list of

Re: Recursive tree list from dictionary

2006-01-14 Thread David Pratt
Hi Allan, Max, and bearophile Many thanks for your replies to this. The number of levels can be deeper than two for creating child, sibling relationships. This can lead to futher nesting as shown in my sample result list (the result I am attempting to acheive) which is reason that I believe

Re: how do real python programmers work?

2006-01-14 Thread Mike Meyer
Roy Smith [EMAIL PROTECTED] writes: Mike Meyer [EMAIL PROTECTED] wrote: we need a term for development environment built out of Unix tools We already have one. The term is emacs. So people using a development environment built around vim's pyhon mode are using emacs? mike -- Mike

Re: how do real python programmers work?

2006-01-14 Thread Mike Meyer
Tom Anderson [EMAIL PROTECTED] writes: On Thu, 12 Jan 2006, Mike Meyer wrote: well, we need a term for development environment built out of Unix tools Disintegrated development environment? Differentiated development environment? How about just a development environment? I'd like the

Re: Why keep identity-based equality comparison?

2006-01-14 Thread Mike Meyer
Antoon Pardon [EMAIL PROTECTED] writes: If you want to argue that the builtin sets should do that, you can - but that's unrelated to the question of how the comparison operators behave for the rest of the bulitin types. What I argue is that there is no single order for a specific type. I

Limitting the Contents of an Entry Widget in Tkinter

2006-01-14 Thread Dustan
How do I limit what the user can enter in an Entry Widget? I know I can set it to display '*' to hide a password, but what I want to do is limit the contents to numeric characters. What is the easiest way of doing this? -- http://mail.python.org/mailman/listinfo/python-list

Re: [OT] - Requesting Comments for Process Definition and Presentation

2006-01-14 Thread Ilias Lazaridis
Steve Holden wrote: Ilias Lazaridis wrote: Ilias Lazaridis wrote: comp.lang.python / comp.lang.ruby I would like to ask for feedback on the Process Definition and Presentation. [...] Based on the summary of the feedback so far, I've focused on one page - the main page: Although it

SQLObject connection/transaction blowing up

2006-01-14 Thread jacob . miles
I'm trying to connect to a mysql database, with autoCommit and caching off, and I'm trying to create a transaction. Why does this blow up? from sqlobject import * connectionString = 'mysql://[EMAIL PROTECTED]/mc_image_library_dev?cache=autoCommit=' connection = connectionForURI

SQLObject connection pooling

2006-01-14 Thread jacob . miles
Hello. Does SQLObject provide connection pooling? If so, is it automatic or do I have to do something to manage it? If not, how do people generally solve this problem? Thanks for any help. - Jake -- http://mail.python.org/mailman/listinfo/python-list

Re: Freezing

2006-01-14 Thread Mike Meyer
[EMAIL PROTECTED] writes: Mike Meyer: Actually, I like the len model, which would be a new builtin that uses the __freeze__ method. Well, I presume this is a matter of personal tastes and consistency too. This time I appreciate the freeze() too, but probably some people can think that adding

Re: Why keep identity-based equality comparison?

2006-01-14 Thread Noam Raphael
Mike Meyer wrote: [EMAIL PROTECTED] writes: try: return a == b except TypeError: return a is b This isn't easy. It's an ugly hack you have to use everytime you want to iterate through a heterogenous set doing equality tests. I wouldn't define this as an ugly hack. These are

Re: SQLObject connection pooling

2006-01-14 Thread EleSSaR^
[EMAIL PROTECTED] si è profuso/a a scrivere su comp.lang.python tutte queste elucubrazioni: Hello. Does SQLObject provide connection pooling? If so, is it automatic or do I have to do something to manage it? If not, how do people generally solve this problem? I think you will have better

Re: PDA Implementations

2006-01-14 Thread Mike Meyer
gregarican [EMAIL PROTECTED] writes: I am in the process of creating an app that runs on various PDA platforms. Currently I have it running on ARM Linux (Sharp Zaurus) and am starting to port it over to ARM Windows Mobile (Dell Axim). Using Python has made the task particularly easier and

Re: Dynamically changing button text in python

2006-01-14 Thread Paul Rubin
[EMAIL PROTECTED] writes: for example,can we do something like this: curButton.bind(Button-1,self.StopServer) def StopServer(self,event): curButton[text] = Start Server Yes. -- http://mail.python.org/mailman/listinfo/python-list

Re: Marshal Obj is String or Binary?

2006-01-14 Thread Mike
Thanks everyone. Why Marshal not Pickle: Well, Marshal is supposed to be faster. But then, if I wanted to do the whole repr()-eval() hack, I am already defeating the purpose by refusing to save bytes as bytes in terms of both size and speed. At this point, I am considering one of the following:

Re: SQLObject connection/transaction blowing up

2006-01-14 Thread paul kölle
[EMAIL PROTECTED] wrote: I'm trying to connect to a mysql database, with autoCommit and caching off, and I'm trying to create a transaction. Why does this blow up? As the traceback is telling you, your connectionString is missing the actual values. Not sure about the cache parameter but:

Re: Marshal Obj is String or Binary?

2006-01-14 Thread Mike Meyer
Giovanni Bajo [EMAIL PROTECTED] writes: [EMAIL PROTECTED] wrote: Try... for i in bytes: print ord(i) or len(bytes) What you see isn't always what you have. Your database is capable of storing \ x 0 0 characters, but your string contains a single byte of value zero. When Python displays the

Re: Is 'everything' a refrence or isn't it?

2006-01-14 Thread Bryan Olson
Fredrik Lundh wrote: Bryan Olson wrote: The identity is not, in itself, a part of the value. Python doesn't query the object to determine it's type or identity, but it always has to query the object to access the value. A look at the C implementation of a typical object might help:

Re: SQLObject connection/transaction blowing up

2006-01-14 Thread jacob . miles
No - I want autoCommit to be false. It defaults to true. SQLObject's documentation says to leave the value blank for false, and to specify any non-blank value for true. Is the SQLObject documentation wrong? Should I specify autoCommit=0? -- http://mail.python.org/mailman/listinfo/python-list

Re: Why keep identity-based equality comparison?

2006-01-14 Thread Mike Meyer
Noam Raphael [EMAIL PROTECTED] writes: Also note that using the current behaviour, you can't easily treat objects that do define a meaningful value comparison, by identity. Yes you can. Just use the is operator. Sorry, I wasn't clear enough. In treating I meant how containers treat the objects

Re: New Python.org website ?

2006-01-14 Thread Tim Parkin
Fuzzyman wrote: Tim Parkin wrote: [snip..] Hi Fuzzyman, Thanks for the feedback and volunteering to contribue... The list of already built sections is not really up to date but I have added a few tickets to the trac on some sections of content that need working on. If Great - can you

Re: How to remove subset from a file efficiently?

2006-01-14 Thread Bengt Richter
On 13 Jan 2006 23:17:05 -0800, [EMAIL PROTECTED] wrote: fynali wrote: $ cat cleanup_ray.py #!/usr/bin/python import itertools b = set(file('/home/sajid/python/wip/stc/2/CBR333'))

Re: Is 'everything' a refrence or isn't it?

2006-01-14 Thread Mike Meyer
Bryan Olson [EMAIL PROTECTED] writes: Mike Meyer wrote: Bryan Olson writes: [EMAIL PROTECTED] wrote: The reason is that I am still trying to figure out what a value is myself. Do all objects have values? Yes. Can you justify this, other than by quoting the manual whose problems caused this

Re: Is 'everything' a refrence or isn't it?

2006-01-14 Thread Mike Meyer
Steven D'Aprano [EMAIL PROTECTED] writes: On Sat, 14 Jan 2006 04:22:53 +, Donn Cave wrote: | 2. What is the value of object()? [ I assume you mean, the object returned by object(). ] It doesn't really have a value. I can't think of any kind of computation that could use this object

Re: two questions about thread

2006-01-14 Thread Bryan Olson
iclinux wrote: a. how to exit the whole process in a thread? b. when thread doing a infinite loops, how to terminate the process?: As others noted, the threading module offers Thread.setDaemon. As the doc says: The entire Python program exits when no active non-daemon threads are left.

Re: Is 'everything' a refrence or isn't it?

2006-01-14 Thread Mike Meyer
Donn Cave [EMAIL PROTECTED] writes: | 3. If two objects are equal with ==, does that | mean their values are the same? Yes. | 3.0 == 3 | True Evidently the value of 3.0 is the same as the value of 3. And they do. They are two different representations of the same value. More in another

Re: Marshal Obj is String or Binary?

2006-01-14 Thread Jean-Paul Calderone
On Sat, 14 Jan 2006 16:58:55 -0500, Mike Meyer [EMAIL PROTECTED] wrote: Giovanni Bajo [EMAIL PROTECTED] writes: [EMAIL PROTECTED] wrote: Try... for i in bytes: print ord(i) or len(bytes) What you see isn't always what you have. Your database is capable of storing \ x 0 0 characters, but

Just want to walk a single directory

2006-01-14 Thread SB
Hi, I have a super-simple need to just walk the files in a single directory. I thought this would do it, but permanentFilelist ends up containing all folders in all subdirectories. Could someone spot the problem? I've scoured some threads using XNews reg expressions involving os.walk, but

Re: Is 'everything' a refrence or isn't it?

2006-01-14 Thread Paul Rubin
Mike Meyer [EMAIL PROTECTED] writes: Whether the '==' operation conforms to your idea of what equality means is unclear. Care to say what it does mean, then? class boffo(int): def __eq__(x,y): return True a,b = boffo(2), boffo(3) print a+b, a==b, (a+2)==(b+2) I'd say

Re: Is 'everything' a refrence or isn't it?

2006-01-14 Thread Steven D'Aprano
On Sat, 14 Jan 2006 14:14:01 +, Antoon Pardon wrote: On 2006-01-14, Steven D'Aprano [EMAIL PROTECTED] wrote: On Thu, 12 Jan 2006 16:11:53 -0800, rurpy wrote: It would help if you or someone would answer these five questions (with something more than yes or no :-) 1. Do all objects

Re: Just want to walk a single directory

2006-01-14 Thread Tim Peters
[EMAIL PROTECTED] I have a super-simple need to just walk the files in a single directory. I thought this would do it, but permanentFilelist ends up containing all folders in all subdirectories. All folders everywhere, or all file (not directory) names in the top two levels? It looks like

Re: Limitting the Contents of an Entry Widget in Tkinter

2006-01-14 Thread James Stroud
Dustan wrote: How do I limit what the user can enter in an Entry Widget? I know I can set it to display '*' to hide a password, but what I want to do is limit the contents to numeric characters. What is the easiest way of doing this? You can check the source of tkSimpleDialog.askfloat,

Re: New Python.org website ?

2006-01-14 Thread Martin Maney
Mike Meyer [EMAIL PROTECTED] wrote: http://beta.python.org In particular, creating a good-looking design that remains readable in all possible browser configurations is impossible. Getting one that is readable in all reasonable browser configurations is hard, unless you make your

Re: Is 'everything' a refrence or isn't it?

2006-01-14 Thread Steven D'Aprano
On Sat, 14 Jan 2006 17:33:07 -0500, Mike Meyer wrote: Steven D'Aprano [EMAIL PROTECTED] writes: On Sat, 14 Jan 2006 04:22:53 +, Donn Cave wrote: | 2. What is the value of object()? [ I assume you mean, the object returned by object(). ] It doesn't really have a value. I can't think of

On Numbers

2006-01-14 Thread Mike Meyer
In the discussion of equality, the issue that decimal('3.0') == 3.0 is False came up as a reason for changing the behavior of ==. The problem with this is that the proposed change doesn't really fix anything, it just gives different wrong behavior. The correct fix would seem to be fixing python's

Re: Marshal Obj is String or Binary?

2006-01-14 Thread Steven D'Aprano
On Sat, 14 Jan 2006 13:50:24 -0800, Mike wrote: Thanks everyone. Why Marshal not Pickle: Well, Marshal is supposed to be faster. Faster than cPickle? Even faster would be to write your code in assembly, and dump that ridiculously bloated database and just write everything to raw bytes on

Re: Is 'everything' a refrence or isn't it?

2006-01-14 Thread Mike Meyer
Paul Rubin http://[EMAIL PROTECTED] writes: Mike Meyer [EMAIL PROTECTED] writes: Whether the '==' operation conforms to your idea of what equality means is unclear. Care to say what it does mean, then? I'd say a==b doesn't necessarily mean a and b have the same value. Care to say what it

Re: Just want to walk a single directory

2006-01-14 Thread SB
Thanks Tim, this definitely does it. I was trying to prevent having to spend time absorbing the core of how generators work, because this simple is all I need to do, and I don't have the updated python cookbook book. The one I have discussed the old os.path.walk. Tim Peters [EMAIL PROTECTED]

Re: Is 'everything' a refrence or isn't it?

2006-01-14 Thread Mike Meyer
Steven D'Aprano [EMAIL PROTECTED] writes: On Sat, 14 Jan 2006 14:14:01 +, Antoon Pardon wrote: On 2006-01-14, Steven D'Aprano [EMAIL PROTECTED] wrote: On Thu, 12 Jan 2006 16:11:53 -0800, rurpy wrote: It would help if you or someone would answer these five questions (with something more

Re: Is 'everything' a refrence or isn't it?

2006-01-14 Thread Mike Meyer
Steven D'Aprano [EMAIL PROTECTED] writes: object instances are like electrons (note for pedants: in classical physics, not QED): they are all exactly the same, distinguishable only by their position in time and space (or memory location). Except all electrons aren't exactly the same - because

Re: New Python.org website ?

2006-01-14 Thread Mike Meyer
Martin Maney [EMAIL PROTECTED] writes: Mike Meyer [EMAIL PROTECTED] wrote: http://beta.python.org In particular, creating a good-looking design that remains readable in all possible browser configurations is impossible. Getting one that is readable in all reasonable browser configurations is

Re: Is 'everything' a refrence or isn't it?

2006-01-14 Thread Donn Cave
Quoth Mike Meyer [EMAIL PROTECTED]: | Paul Rubin http://[EMAIL PROTECTED] writes: | Mike Meyer [EMAIL PROTECTED] writes: | Whether the '==' operation conforms to your idea of what equality | means is unclear. | Care to say what it does mean, then? | I'd say a==b doesn't necessarily mean a and b

  1   2   >