Re: time module precision

2005-01-10 Thread janeaustine50
Peter Hansen wrote: > [EMAIL PROTECTED] wrote: > > So the problem (waiting tens to hundreds of us without busy looping) > > still remains... > > That's actually not a "problem", it's your solution > to a problem. Can you describe the _real_ problem, what > you are trying to do? _Why_ do you want

Re: Python3: on removing map, reduce, filter

2005-01-10 Thread Terry Reedy
"Andrey Tatarinov" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > How does GvR suggestions on removing map(), reduce(), filter() While GvR *might* prefer removing them completely on any given day, I think moving them to a functional module, as others have suggested and requested,

Re: Long strings as function parameters

2005-01-10 Thread Terry Reedy
"Dan Bishop" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > In Python, *every* expression is a pointer. Minor but to me important nit: this should start "In the CPython implementation of Python" ... Humans can understand and execute Python code without knowing about computer me

Re: SuSE 9.1: updating to python-2.4

2005-01-10 Thread David Fraser
Torsten Mohr wrote: Hi, along with my distribution SuSE 9.1 came python 2.3.3. I'd like to update to 2.4 now, is this an easy thing to do or will lots of installed modules refuse to work then? Is there an easy way to find out what i need to update? Thanks for any hints, Torsten. What you probably w

Re: raw sockets ? i need a python sniffer

2005-01-10 Thread lbolognini
Would this suit you? http://www.nullcube.com/software/pyopenbsd.html Lorenzo -- http://mail.python.org/mailman/listinfo/python-list

Re: Statement local namespaces summary (was Re: python3: 'where' keyword)

2005-01-10 Thread Duncan Booth
Nick Coghlan wrote: > Grammar Change > -- > Current:: >statement ::=stmt_list NEWLINE | compound_stmt > > New:: >statement ::=(stmt_list NEWLINE | compound_stmt) [local_namespace] >local_namespace ::= "with" ":" suite > > > Semantics > - > The code:: > >

Re: Securing a future for anonymous functions in Python

2005-01-10 Thread Jacek Generowicz
"Anna" <[EMAIL PROTECTED]> writes: > With class and def, I at least have a *name* to start with - class > Square pretty obviously is going to have something to do with > geometric shapes, I would hope (or maybe with boring people...). Or maybe with multiplying something by itself. Or maybe the au

Re: Securing a future for anonymous functions in Python

2005-01-10 Thread Jacek Generowicz
Nick Coghlan <[EMAIL PROTECTED]> writes: > > Usually one or two have trouble grasping that "int" would be perfectly > > adequate in this situation. > > The ability to pass around functions at run-time was probably the > hardest thing to get my head around when I started with Python, And I suspec

Re: SuSE 9.1: updating to python-2.4

2005-01-10 Thread Wolfram Kraus
Heyho! Torsten Mohr wrote: Hi, along with my distribution SuSE 9.1 came python 2.3.3. I'd like to update to 2.4 now, is this an easy thing to do or will lots of installed modules refuse to work then? I installed Python 2.4 under SuSE 9.1 and had no problems so far. If you install it via "./configur

Old Paranoia Game in Python

2005-01-10 Thread Sean P.Kane
I ported the old (and long since removed) game from the bsd-game pacakge called, Paranoia, based on the old Paranoia role playing game from C to Python as a simple exercise in learning the language and pure late night boredom. Anyways, here it is for anyone looking for a few minutes of nostalgi

BayPIGgies: January 13, 7:30pm

2005-01-10 Thread aahzpy
WARNING: the last meeting of BayPIGgies at Stanford is currently scheduled for March. Our host, Danny Yoo, is leaving Stanford, and we need to find a new location. If you wish to assist with the search, please join the BayPIGgies mailing list. Meanwhile, let's all give hearty thanks to Danny for

Bug in Python 2.4 raw_input(u'xyz') Win/command line?

2005-01-10 Thread Petr Prikryl
Hi, Could you test the following example for your non-English language with accented characters? I have observed a problem when running Python 2.4, Windows version (python-2.4.msi) and using raw_input() with unicode prompt string in a console program (ran in the DOS window). I do use the follow

Re: Getting rid of "self."

2005-01-10 Thread Alex Martelli
BJörn Lindqvist <[EMAIL PROTECTED]> wrote: ... > > http://starship.python.net/crew/mwh/hacks/selfless.py > > That's excellent! There is one small problem with the code though: It shows the fundamentals of how to rewrite the bytecode, yes. > .class Hi(Selfless): > .__attrs__ = ["x"] > .

Re: Python serial data aquisition

2005-01-10 Thread Flavio codeco coelho
[EMAIL PROTECTED] (Michael Fuhr) wrote in message news:<[EMAIL PROTECTED]>... > If the actual byte and/or bit order is different then you'll have > to modify the expression, but this should at least give you ideas. Thanks Michael and Steve, I'll put your Ideas to the test ASAP, meanwhile, could y

Re: Long strings as function parameters

2005-01-10 Thread Nick Coghlan
Jeremy Bowers wrote: I had thought there was an obvious class in the standard library to assist with this, but I must have been wrong. buffer is the closest current contender, but I believe it's on the outer due to some problems with its implementation. I think the intention is to eventually have

RE: interpreter Py_Initialize/Py_Finalize mem leak?

2005-01-10 Thread Roman Suzi
On Mon, 10 Jan 2005, Delaney, Timothy C (Timothy) wrote: >Roman Suzi wrote: > >> In pure curiosity I tried to compile loop.c from Demo/embed >> and started it with 'print 2+2'. It seems, that both 2.3 and 2.4 >> pythons have memory leaks in Py_Initialize/Py_Finalize calls. >> (That is, interpreter

Re: static compiled python modules

2005-01-10 Thread Nick Coghlan
Thomas Linden wrote: How can I tell python to use the compiled in modules and not try to load them from outside? http://www.python.org/dev/doc/devel/api/importing.html Take a look at the last three entries about registering builtin modules. Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] |

Re: Python serial data aquisition

2005-01-10 Thread Paul Rubin
[EMAIL PROTECTED] (Flavio codeco coelho) writes: > I'll put your Ideas to the test ASAP, meanwhile, could you point me to > references to these bit operations in Python? I am new to this stuff, > and might need to do more of this to support other hardware... > > I havent been able to find anything

Re: python3: accessing the result of 'if'

2005-01-10 Thread Nick Coghlan
Steve Holden wrote: Excuse me, these are supposed to be IMPROVEMENTS to Python? I think it's more messing around before coming to the conclusion that, of the many things that 'where' helps with, this sure as hell ain't one of them :) Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Bri

Re: Python Operating System???

2005-01-10 Thread Michael Sparks
Roose wrote: ... > I was thinking that there would be a Lisp interpreter in a kernel, > which afaik doesn't exist. There's an implementation of scheme that runs as a kernel module in Linux - it's designed to allow people to experiment with exploring kernel data structures at run time, and other f

Re: windows mem leak

2005-01-10 Thread Nick Craig-Wood
Bob Smith <[EMAIL PROTECTED]> wrote: > Attached is the code. Run it yourself and see. This seems to run nmap over series of consecutive IP addresses. nmap can do that all by itself. From its man page:: Nmap also has a more powerful notation which lets you specify an IP addres

Re: Python serial data aquisition

2005-01-10 Thread Steve Holden
Flavio codeco coelho wrote: [EMAIL PROTECTED] (Michael Fuhr) wrote in message news:<[EMAIL PROTECTED]>... If the actual byte and/or bit order is different then you'll have to modify the expression, but this should at least give you ideas. Thanks Michael and Steve, I'll put your Ideas to the test A

Re: 20050119: quoting strings

2005-01-10 Thread Steve Holden
Xah Lee wrote: #strings are enclosed in double quotes quotes. e.g. a="this and that" print a #multiple lines must have an escape backslash at the end: b="this\n\ and that" print b #One can use r"" for raw string. c=r"this\n\ and that" print c #To avoid the backslash escape, one can use triple doubl

Re: tuples vs lists

2005-01-10 Thread Gerrit
Steve Holden wrote: > worzel wrote: > >'Two-Pull' it is then, thanks. > > > Well, it might be "Two-Pull" in American, but in English it's "tyoopl" > -- NOT "choopl" (blearch!). I've also heard people say "tuppl". > > So, basically, say whatever you want. Language is about communication :-) Or ju

Re: Datetime module

2005-01-10 Thread [EMAIL PROTECTED]
take a look at the logging module as well, in the documentation (paragraph 6.29.2 for release 2.4) you find a basic example -- http://mail.python.org/mailman/listinfo/python-list

Re: python3: 'where' keyword

2005-01-10 Thread Nick Coghlan
Andrey Tatarinov wrote: And about examples for usage "where" keyword reading http://manatee.mojam.com/~skip/python/fastpython.html I understand that almost every example should use that keyword =) I suspect polluting the outer namespace would still be faster, since Python wouldn't have to create

Re: python3: 'where' keyword

2005-01-10 Thread Carl Banks
Paul Rubin wrote: > "Carl Banks" <[EMAIL PROTECTED]> writes: > > And a suite, be it a def statement, a where block, or whatever, belongs > > in a statement, not an expression. > > So do you approve of the movement to get rid of the print statement? Any little incremental change in Python you coul

Re: python3: 'where' keyword

2005-01-10 Thread Paul Rubin
"Carl Banks" <[EMAIL PROTECTED]> writes: > > So do you approve of the movement to get rid of the print statement? > > Any little incremental change in Python you could make by having or not > having a print statement would be minor compared to the H-Bomb of > ugliness we'd get if suites of stateme

Port blocking

2005-01-10 Thread Mark Carter
Supposing I decide to write a server-side application using something like corba or pyro. What's the chance that in big corporations, the client's ports (in both senses of the word: fee-paying, and application) will be blocked, thereby immediately scuppering whatever I have written? Has this p

Re: Port blocking

2005-01-10 Thread Paul Rubin
Mark Carter <[EMAIL PROTECTED]> writes: > Supposing I decide to write a server-side application using something > like corba or pyro. > > What's the chance that in big corporations, the client's ports (in > both senses of the word: fee-paying, and application) will be blocked, > thereby immediatel

Re: Statement local namespaces summary (was Re: python3: 'where' keyword)

2005-01-10 Thread Nick Coghlan
Duncan Booth wrote: Nick Coghlan wrote: Grammar Change -- Current:: statement ::=stmt_list NEWLINE | compound_stmt New:: statement ::=(stmt_list NEWLINE | compound_stmt) [local_namespace] local_namespace ::= "with" ":" suite Semantics - The code:: with: trans

Re: python3: 'where' keyword

2005-01-10 Thread Carl Banks
Paul Rubin wrote: > "Carl Banks" <[EMAIL PROTECTED]> writes: > > > So do you approve of the movement to get rid of the print statement? > > > > Any little incremental change in Python you could make by having or not > > having a print statement would be minor compared to the H-Bomb of > > ugliness

Re: Port blocking

2005-01-10 Thread Mark Carter
Paul Rubin wrote: Mark Carter <[EMAIL PROTECTED]> writes: Supposing I decide to write a server-side application using something like corba or pyro. Usually you wouldn't run a public corba or pyro service over the internet. You'd use something like XMLRPC over HTTP port 80 partly for the precise p

Command line and GUI tools : need a single threading solution

2005-01-10 Thread Adrian Casey
I have a collection of multi-threaded command line tools which I want wrap a PyQt gui around. I'm using queues to route messages from the command line tools to the PyQt gui. The command line tools use python threads to do their work. The gui uses a QThread object to read incoming messages. This

Re: Command line and GUI tools : need a single threading solution

2005-01-10 Thread Diez B. Roggisch
> I'm thinking it may be possible to modify the command line tools to use qt > threads instead of native python threads. Is this the way to go? Are > there other options? Why don't you use python threads in qt - I do so and so far it didn't make any troubles for me. And I would strongly advise a

Re: Port blocking

2005-01-10 Thread Diez B. Roggisch
> Usually you wouldn't run a public corba or pyro service over the > internet. You'd use something like XMLRPC over HTTP port 80 partly > for the precise purpose of not getting blocked by firewalls. What exactly makes sending bytes over port 80 more secure than over any other port? It has always

Re: Command line and GUI tools : need a single threading solution

2005-01-10 Thread Phil Thompson
> I have a collection of multi-threaded command line tools which I want wrap > a > PyQt gui around. I'm using queues to route messages from the command line > tools to the PyQt gui. The command line tools use python threads to do > their work. The gui uses a QThread object to read incoming messag

Re: Datetime module

2005-01-10 Thread Mark McEahern
[EMAIL PROTECTED] wrote: I am writing a script that acts as an AIM bot [using twisted.IM's base scripts] and I want to add a logging feature. I got it to log who sends what to whom, but what I want to add is the date and time that the message was sent (or recieved by the bot), I tried to look at da

Re: python3: 'where' keyword

2005-01-10 Thread Paul Rubin
"Carl Banks" <[EMAIL PROTECTED]> writes: > Paul Rubin wrote: > > "Carl Banks" <[EMAIL PROTECTED]> writes: > > > > So do you approve of the movement to get rid of the print > statement? > > > > > > Any little incremental change in Python you could make by having or > not > > > having a print statem

Re: Securing a future for anonymous functions in Python

2005-01-10 Thread Anna
Jacek Generowicz wrote: > "Anna" <[EMAIL PROTECTED]> writes: > > > With class and def, I at least have a *name* to start with - class > > Square pretty obviously is going to have something to do with > > geometric shapes, I would hope (or maybe with boring people...). > > Or maybe with multiplying

Re: Statement local namespaces summary (was Re: python3: 'where' keyword)

2005-01-10 Thread Nick Coghlan
Nick Coghlan wrote: Disallowing local namespaces for statement lists would suggest something like this: statement ::= (simple_stmt (NEWLINE | ";" stmt_list NEWLINE | local_namespace) ) | (compound_stmt [local_namespace]) local_namespace ::= "

Re: Old Paranoia Game in Python

2005-01-10 Thread Lucas Raab
[EMAIL PROTECTED] wrote: Aahz wrote: Trust the computer, the computer is your friend. However, the computer isn't a fuckin' mind reader. If you're going to post source code on the usenet, don't have lines longer than 72 characters. Otherwise you'll find your code has wrapped lines. This not only c

Re: Port blocking

2005-01-10 Thread Mark Carter
Mark Carter wrote: Paul Rubin wrote: Usually you wouldn't run a public corba or pyro service over the internet. You'd use something like XMLRPC over HTTP port 80 partly for the precise purpose of not getting blocked by firewalls. I'm not sure if we're talking at cross-purposes here, but the appl

Re: windows mem leak

2005-01-10 Thread Nick Coghlan
Bob Smith wrote: Peter Hansen wrote: Bob Smith wrote: Attached is the code. Run it yourself and see. You too Peter. Be gentle with me, this was my first attempt with threads. Thanks, Bob, and I will, but not before you answer some of my questions. I had good reasons to ask them, one of which is t

Re: tuples vs lists

2005-01-10 Thread Antoon Pardon
Op 2005-01-08, Bruno Desthuilliers schreef <[EMAIL PROTECTED]>: > worzel a écrit : >> I get what the difference is between a tuple and a list, but why would I >> ever care about the tuple's immuutability? > > Because, from a purely pratical POV, only an immutable object can be > used as kay in a

Re: Powerful CGI libraries for Python?

2005-01-10 Thread Thomas Guettler
Am Mon, 10 Jan 2005 10:11:16 +0800 schrieb sam: > Hi, > > I m looking for a CGI libraries just like perl's CGI.pm for Python. > From google, I found quite a few of CGI libraries already written for > python. But I haven't had experience to try any of them in Python. > > Can anyone share your

Re: Python3: on removing map, reduce, filter

2005-01-10 Thread Nick Coghlan
Terry Reedy wrote: "Andrey Tatarinov" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] How does GvR suggestions on removing map(), reduce(), filter() While GvR *might* prefer removing them completely on any given day, I think moving them to a functional module, as others have suggest

C structure in the Python extension

2005-01-10 Thread Dave win
Howdy: When I was writting interface functions of the extending python, I meet a question. As I using the "PyArg_ParseTuple(args,arg_type,...)" function call, if I wanna use the personal defined argument, such as the C structure which I made. How to make it? static PyObject* Call_V_A

Re: Speed revisited

2005-01-10 Thread Nick Coghlan
John Machin wrote: My wild guess: Not a common use case. Double-ended queue is a special purpose structure. As Kent said, the suggestion of making index 0 insertions and deletions on lists more efficent was made, and the decision was to leave list alone and provide collections.deque instead. This

Re: python3: 'where' keyword

2005-01-10 Thread Jonas Galvez
Andrey Tatarinov wrote: > It would be great to be able to reverse usage/definition parts > in haskell-way with "where" keyword. Hi folks, I really like this idea. But I couldn't help but think of a few alternative ways. I'm no language design expert by any means, but I'm a little concerned with

Re: Port blocking

2005-01-10 Thread Grant Edwards
On 2005-01-10, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: >> Usually you wouldn't run a public corba or pyro service over >> the internet. You'd use something like XMLRPC over HTTP port >> 80 partly for the precise purpose of not getting blocked by >> firewalls. > > What exactly makes sending by

Re: Securing a future for anonymous functions in Python

2005-01-10 Thread Ville Vainio
> "James" == James Stroud <[EMAIL PROTECTED]> writes: James> I think we should not try too hard to make everything James> "English" like. Its a crappy language anyway (though its James> the only one I speak good). Matt Neuberg, QOTW material, unless you stole this from someone els

Re: OT: google groups bug, or worse?

2005-01-10 Thread Tomi Häsä
[EMAIL PROTECTED] wrote: > I'm concerned that google groups is not correctly reflecting > the python lists. > [...] > Is it a google bug? Yes, Google Groups Beta is missing messages: http://groups-beta.google.com/group/google-labs-groups2/browse_thread/thread/c4108ad41c189d34?tvc=2 http://tinyurl

Re: python3: 'where' keyword

2005-01-10 Thread Carl Banks
Paul Rubin wrote: > > The Zen of Python, by Tim Peters > > Beautiful is better than ugly. => +1 macros > Explicit is better than implicit. => +1 macros > Simple is better than complex. => +1 macros > Complex is better than complicated. => I don't understand this, +0 > Fl

Re: Port blocking

2005-01-10 Thread Ville Vainio
> "Mark" == Mark Carter <[EMAIL PROTECTED]> writes: Mark> Mark Carter wrote: >> Paul Rubin wrote: >>> Usually you wouldn't run a public corba or pyro service over >>> the internet. You'd use something like XMLRPC over HTTP port >>> 80 partly for the precise purpose of not

Re: OT: spacing of code in Google Groups

2005-01-10 Thread Tomi Häsä
Dan Bishop wrote: > > And for a long time, Google groups postings *were* whitespace > significant. But the new interface broke it. > > > I made a complaint several weeks ago to Google support, > > asking them too quit stripping leading whitespace, > > and the sent me a reply saying they appreciate

Re: python3: 'where' keyword

2005-01-10 Thread Paul Rubin
"Carl Banks" <[EMAIL PROTECTED]> writes: > When I asked you to do this, it was just a rhetorical way to tell you > that I didn't intend to play this game. It's plain as day you're > trying to get me to admit something. I'm not falling for it. > > If you have a point to make, why don't you just m

Re: a new Perl/Python a day

2005-01-10 Thread François Pinard
[Andy Gross] > On Jan 10, 2005, at 12:11 AM, Scott Bryce wrote: > >No. Perl may have some interesting idiosyncrasies > I [...] still have to look at the documentation to remember that I > need to type '$|' to turn buffering off. Ditto for the rest of the > perl line-noise syntax. Behind each l

Dr. Dobb's Python-URL! - weekly Python news and links (Jan 9)

2005-01-10 Thread Josiah Carlson
QOTW: Jim Fulton: "[What's] duck typing?" Andrew Koenig: "That's the Australian pronunciation of 'duct taping'." "I'm thinking that the I-Ching is a vast untapped resource for programming wisdom, plus it makes it funny." -- Mark Carter Nick Coghlan brings up the 'lambdas are going away in 3

Re: Using ICL to compile C extensions

2005-01-10 Thread John Carter
On 3 Jan 2005 21:18:13 -0800, [EMAIL PROTECTED] wrote: >Hi, > >Does anyone know how I can use "icl" (Intel C++) to compile C >extensions? I'm on Windows, and my Python is compiled using VS7.1 >(binary distribution). Right now, when I run setup.py install, it uses >cl.exe (MSVC++ Toolkit 2003), and

Re: Developing Commercial Applications in Python

2005-01-10 Thread bit_bucket5
See http://www.journynx.com/ Commercial timesheet app written in Python. [EMAIL PROTECTED] wrote: > Hello All, > I am trying to convince my client to use Python in his new product. He > is worried about the license issues. Can somebody there to point me any > good commercial applications developed

Re: python3: 'where' keyword

2005-01-10 Thread Carl Banks
Paul Rubin wrote: > "Carl Banks" <[EMAIL PROTECTED]> writes: > > When I asked you to do this, it was just a rhetorical way to tell you > > that I didn't intend to play this game. It's plain as day you're > > trying to get me to admit something. I'm not falling for it. > > > > If you have a point

"Re: Re: Probleme mit der Installation der openSource Bittorrent.... python vs JAVA"

2005-01-10 Thread xunling
i still need an answer ... anyone out there who could help me plz? :/ thx - xun -- http://mail.python.org/mailman/listinfo/python-list

Re: Statement local namespaces summary (was Re: python3: 'where' keyword)

2005-01-10 Thread Anna
+1 I really like the idea of this. It removes all my objections to lambdas, and replaces it with something clear and readable. I look forward to seeing what comes of it. Anna -- http://mail.python.org/mailman/listinfo/python-list

Re: Powerful CGI libraries for Python?

2005-01-10 Thread Jeff Reavis
You may want to check out Spyce http://spyce.sourceforge.net/index.html It will work as cgi (or using fast cgi or mod python) and has templating, session support, active tags, etc. -jjr -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Operating System???

2005-01-10 Thread Arich Chanachai
Arich Chanachai wrote: Paul Rubin wrote: "Roose" <[EMAIL PROTECTED]> writes: What I really wonder about is the possibility of integrating Mono with a kernel and building upward (the "shell" if you will) using IronPython. -- http://mail.python.org/mailman/listinfo/python-list

Re: else condition in list comprehension

2005-01-10 Thread Luis M. Gonzalez
It's me wrote: > > z = [i + (2, -2)[i % 2] for i in range(10)] > > But then why would you want to use such feature? Wouldn't that make the > code much harder to understand then simply: > > z=[] > for i in range(10): > if i%2: > z.append(i-2) > else: > z.append(i+2) > > Or

pulling info from website

2005-01-10 Thread bob
i am trying to write a script for Xbox media center that will pull information from the bbc news website and display the headlines , how do i pull this info into a list??? -- http://mail.python.org/mailman/listinfo/python-list

Re: pulling info from website

2005-01-10 Thread Duncan Booth
bob wrote: > i am trying to write a script for Xbox media center that will pull > information from the bbc news website and display the headlines , how > do i pull this info into a list??? > > Google for "Python RSS reader" and read some of the results. http://effbot.org/zone/effnews.htm proba

Writing huge Sets() to disk

2005-01-10 Thread Martin MOKREJŠ
Hi, I have sets.Set() objects having up to 20E20 items, each is composed of up to 20 characters. Keeping them in memory on !GB machine put's me quickly into swap. I don't want to use dictionary approach, as I don't see a sense to store None as a value. The items in a set are unique. How can I wri

Re: else condition in list comprehension

2005-01-10 Thread Steven Bethard
Luis M. Gonzalez wrote: It's me wrote: z = [i + (2, -2)[i % 2] for i in range(10)] But then why would you want to use such feature? Wouldn't that make the code much harder to understand then simply: z=[] for i in range(10): if i%2: z.append(i-2) else: z.append(i+2) Or are

Re: Writing huge Sets() to disk

2005-01-10 Thread Martin MOKREJŠ
Batista, Facundo wrote: [Martin MOKREJ?] #- I have sets.Set() objects having up to 20E20 items, #- each is composed of up to 20 characters. Keeping Are you really sure?? Either I'll have to construct them all over again say 20-30 times, or I'll find a way to keep them on disk. #- How can I wri

RE: Writing huge Sets() to disk

2005-01-10 Thread Robert Brewer
Martin MOKREJŠ wrote: > I have sets.Set() objects having up to 20E20 items, > each is composed of up to 20 characters. Keeping > them in memory on !GB machine put's me quickly into swap. > I don't want to use dictionary approach, as I don't see a sense > to store None as a value. The items in a s

RE: Writing huge Sets() to disk

2005-01-10 Thread Batista, Facundo
Title: RE: Writing huge Sets() to disk [Martin MOKREJŠ] #- > At least you'll need a disk of 34694 EXABYTES!!! #- #- Hmm, you are right. So 20E15 then? I definitely need to be Right. Now you only need 355 PETABytes. Nowadays disk is cheap, but... #- in range 1-14. ;-) Why? .    Fac

Re: pulling info from website

2005-01-10 Thread Rick Holbert
Bob, Have a look at feedparser: http://www.feedparser.org/ http://diveintomark.org/projects/feed_parser/ For bbc news feeds, I use the following url: http://www.bbc.co.uk/syndication/feeds/news/ukfs_news/front_page/rss091.xml bob wrote: > i am trying to write a script for Xbox media center th

syntax error in eval()

2005-01-10 Thread harold fellermann
Hi all, I am trying to dynamically add class attributes at runtime using the function eval(), i.e. I want to do something like >>> class X : pass ... >>> X.attr = 5 but without knowing either the attributes name nor its value. However, I encounter a syntax error I cannot understand: Python 2.4 (#

Re: syntax error in eval()

2005-01-10 Thread Steven Bethard
harold fellermann wrote: Python 2.4 (#1, Dec 30 2004, 08:00:10) [GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> class X : pass ... >>> attrname = "attr" >>> eval("X.%s = val" % attrname , {"X":X, "val":5})

Re: Speed revisited

2005-01-10 Thread Bulba!
On Sun, 09 Jan 2005 22:51:47 GMT, Andrea Griffini <[EMAIL PROTECTED]> wrote: >>Tip 1: Once you have data in memory, don't move it, move a pointer or >>index over the parts you are inspecting. >> >>Tip 2: Develop an abhorrence of deleting data. > >I've to admit that I also found strange that deleti

RE: Writing huge Sets() to disk

2005-01-10 Thread Batista, Facundo
Title: RE: Writing huge Sets() to disk [Martin MOKREJ?] #-   I have sets.Set() objects having up to 20E20 items, #- each is composed of up to 20 characters. Keeping Are you really sure?? #-   How can I write them efficiently to disk? To be more exact, I think that there's some mistake

Re: Writing huge Sets() to disk

2005-01-10 Thread Martin MOKREJŠ
Batista, Facundo wrote: [Martin MOKREJŠ] #- > At least you'll need a disk of 34694 EXABYTES!!! #- #- Hmm, you are right. So 20E15 then? I definitely need to be Right. Now you only need 355 PETABytes. Nowadays disk is cheap, but... #- in range 1-14. ;-) Why? I need to test for occurence every such

Re: syntax error in eval()

2005-01-10 Thread Duncan Booth
harold fellermann wrote: > Python 2.4 (#1, Dec 30 2004, 08:00:10) > [GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> class X : pass > ... > >>> attrname = "attr" > >>> eval("X.%s = val" % attrname , {"X":X

Re: syntax error in eval()

2005-01-10 Thread harold fellermann
Thank you, Duncan and Steven. I completely forgot about setattr. Of course that's the way ... as its name might suggest *g* What you are doing wrong is attempting to use eval before exhausting all the simpler techniques. Why not just call 'setattr'? setattr(X, 'attr', 5) BTW, the syntax error is

Re: Writing huge Sets() to disk

2005-01-10 Thread Paul McGuire
"Martin MOKREJ©" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > I have sets.Set() objects having up to 20E20 items, > each is composed of up to 20 characters. Keeping > them in memory on !GB machine put's me quickly into swap. > I don't want to use dictionary approach, as I d

Re: python3: 'where' keyword

2005-01-10 Thread Andrey Tatarinov
Nick Coghlan wrote: And about examples for usage "where" keyword reading http://manatee.mojam.com/~skip/python/fastpython.html I understand that almost every example should use that keyword =) I suspect polluting the outer namespace would still be faster, since Python wouldn't have to create the

Re: Writing huge Sets() to disk

2005-01-10 Thread Martin MOKREJŠ
Robert Brewer wrote: Martin MOKREJŠ wrote: I have sets.Set() objects having up to 20E20 items, each is composed of up to 20 characters. Keeping them in memory on !GB machine put's me quickly into swap. I don't want to use dictionary approach, as I don't see a sense to store None as a value. The it

Re: Securing a future for anonymous functions in Python

2005-01-10 Thread Jacek Generowicz
"Anna" <[EMAIL PROTECTED]> writes: > Jacek Generowicz wrote: > > "Anna" <[EMAIL PROTECTED]> writes: > > > > > With class and def, I at least have a *name* to start with - class > > > Square pretty obviously is going to have something to do with > > > geometric shapes, I would hope (or maybe with b

Re: Statement local namespaces summary (was Re: python3: 'where' keyword)

2005-01-10 Thread Andrey Tatarinov
Nick Coghlan wrote: Abstract The proposal is to add the capacity for statement local namespaces to Python. This allows a statement to be placed at the current scope, while the statement's 'setup code' is indented after the statement:: with: I think using 'with' keyword can c

Re: Writing huge Sets() to disk

2005-01-10 Thread Martin MOKREJÅ
Paul McGuire wrote: "Martin MOKREJÂ" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hi, I have sets.Set() objects having up to 20E20 items, each is composed of up to 20 characters. Keeping them in memory on !GB machine put's me quickly into swap. I don't want to use dictionary approac

ftplib with unknown file names

2005-01-10 Thread rbt
How can I use ftplib to retrieve files when I do not know their names? I can do this to get a listing of the directory's contents: ftp_server.retrlines('LIST') The output from this goes to the console and I can't figure out how to turn that into something I can use to actually get the files (lik

Re: Securing a future for anonymous functions in Python

2005-01-10 Thread Jeff Shannon
Jacek Generowicz wrote: "Anna" <[EMAIL PROTECTED]> writes: But first, wouldn't something like: [x+1 for x in seq] be even clearer? I'm glad you mentioned that. [...] As to whether it is clearer. That depends. I would venture to suggest that, given a pool of laboratory rats with no previous exposure

Importing Problem on Windows

2005-01-10 Thread brolewis
I have a directory that has two files in it: parse.py parser.py parse.py imports a function from parser.py and uses it to parse out the needed information. On Linux, the following code works without a problem: parse.py, line 1: from parser import regexsearch However, when I run the same command

Re: complex numbers

2005-01-10 Thread Alfred Z. Newmane
J|rgen Exner wrote: > [EMAIL PROTECTED] wrote: >> #python supports complex numbers. > [...] > > So? > >> # Perl doesn't support complex numbers. But there are packages that >> supports it. > > The Math::Complex module is part of the standard installation > already, no need for any "packages" (whate

Re: Old Paranoia Game in Python

2005-01-10 Thread [EMAIL PROTECTED]
Lucas Raab wrote: > [EMAIL PROTECTED] wrote: > > Aahz wrote: > > > >>Trust the computer, the computer is your friend. > > > > > > However, the computer isn't a fuckin' mind reader. > > > > If you're going to post source code on the usenet, don't > > have lines longer than 72 characters. Otherwise

Re: ftplib with unknown file names

2005-01-10 Thread Jeremy Jones
rbt wrote: How can I use ftplib to retrieve files when I do not know their names? I can do this to get a listing of the directory's contents: ftp_server.retrlines('LIST') The output from this goes to the console and I can't figure out how to turn that into something I can use to actually get the

Re: Python Operating System???

2005-01-10 Thread Roose
"Paul Rubin" wrote in message news:[EMAIL PROTECTED] > "Roose" <[EMAIL PROTECTED]> writes: > > Are you actually going to answer any of my questions? Let's see > > this "JavaScript task scheduler" you have written! > > I wrote it at a company and can't release it. It ra

RE: Writing huge Sets() to disk

2005-01-10 Thread Robert Brewer
Martin MOKREJŠ wrote: > Robert Brewer wrote: > > Martin MOKREJŠ wrote: > > > >> I have sets.Set() objects having up to 20E20 items, > >>each is composed of up to 20 characters. Keeping > >>them in memory on !GB machine put's me quickly into swap. > >>I don't want to use dictionary approach, as I

Re: Securing a future for anonymous functions in Python

2005-01-10 Thread Anna
Same here. -- http://mail.python.org/mailman/listinfo/python-list

Re: Securing a future for anonymous functions in Python

2005-01-10 Thread Anna
You cut something from that... """It's not, after all, the word "lambda" itself; I would still have some issues with using, say "function", instead of "lambda", but at least then I would immediately know what I was looking at...""" I would have fewer ambiguities about using, say "func" rather tha

Re: Writing huge Sets() to disk

2005-01-10 Thread Adam DePrince
On Mon, 2005-01-10 at 11:11, Martin MOKREJ¦ wrote: > Hi, > I have sets.Set() objects having up to 20E20 items, > each is composed of up to 20 characters. Keeping > them in memory on !GB machine put's me quickly into swap. > I don't want to use dictionary approach, as I don't see a sense > to stor

Re: Writing huge Sets() to disk

2005-01-10 Thread Martin MOKREJŠ
Robert Brewer wrote: Martin MOKREJŠ wrote: Robert Brewer wrote: Martin MOKREJŠ wrote: I have sets.Set() objects having up to 20E20 items, each is composed of up to 20 characters. Keeping them in memory on !GB machine put's me quickly into swap. I don't want to use dictionary approach, as I don't s

  1   2   >