Re: Help me use my Dual Core CPU!

2006-09-12 Thread Paul Rubin
"Simon Wittber" <[EMAIL PROTECTED]> writes: > I've just noticed that os.fork is not available on Win32. Ouch. Use the subprocess module. -- http://mail.python.org/mailman/listinfo/python-list

Re: Validation of email

2006-09-12 Thread Tim Roberts
Norman Khine <[EMAIL PROTECTED]> wrote: > >What is the best way to generate a long authentication string and email >this so that the user can reply and verify that the email address they >have provided is authentic, similar I guess to the way Bugzilla works? > >Should this be server side or client?

Re: elementtree: line numbers and iterparse

2006-09-12 Thread Stuart McGraw
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Stuart McGraw wrote: > > Now I find i need to get and save the input file line > > number of each node. Googling turned up a way > > to do it by subclassing FancyTreeBuilder, > > (http://groups.google.com/group/comp.l

Re: How can I get the function's caller?

2006-09-12 Thread Steve Holden
David wrote: > Inside a function I need to get the function's caller's name. How can I get > it? > > thanks in advance. > The "function caller", like most objects in Python, needn't actually have a name. It could, for example, be a lambda stored as a list element. What do you need this name fo

Re: Help me use my Dual Core CPU!

2006-09-12 Thread Simon Wittber
Michael wrote: > Also, Paul Boddie posted a module for parallel systems a while back as well > which might be useful (at least for ideas): >* http://cheeseshop.python.org/pypi/parallel > I've checked this out, it looks like a good idea which I could build further on. I've just noticed that os

How to compare to directories?

2006-09-12 Thread could . net
I want to compare 2 directories: dir1 and dir2. What I want to do is to get these informations: 1. does they have the same number of files and sub-directories? 2. does each file with the same name have the same size and date information? So, how can I do it in python? Thank you! -- http://mail.p

How can I get the function's caller?

2006-09-12 Thread David
Inside a function I need to get the function's caller's name. How can I get it? thanks in advance. David -- http://mail.python.org/mailman/listinfo/python-list

Re: table (ascii text) lin ayout recognition

2006-09-12 Thread James Stroud
[EMAIL PROTECTED] wrote: > Hello, > > I am looking for python code useful to process > tables that are in ASCII text. The code must > determine where are the columns (fields). > Concerned tables for my application are various, > but their columns are not very complicated > to locate for a human, b

Re: best small database?

2006-09-12 Thread Fredrik Lundh
Blair P. Houghton wrote: > Can't be any harder than switching between incompatible filesystems, > unless you assume it should "just work...". so what file systems are you using that don't support file names and binary data ? -- http://mail.python.org/mailman/listinfo/python-list

Re: best small database?

2006-09-12 Thread Blair P. Houghton
Larry Bates wrote: > As far as "rational extension" is concerned, I think I can relate. > As a developer of imaging systems that store multiple-millions of > scanned pieces of paper online for customers, I can promise you > the file system is quite efficient at storing files (and that is > what th

Re: best way of testing a program exists before using it?

2006-09-12 Thread Nick Craig-Wood
Tim Golden <[EMAIL PROTECTED]> wrote: > OK, I've never sent in a patch before (blushes for shame > as he thinks of all the years he's been using Python). Would > you mind pointing me towards some doc or post which tells > me where to look and what to do. Should I checkout svn and > patch agai

Re: question about including something like sqlite in python

2006-09-12 Thread Frank Millman
John Salerno wrote: > I was just thinking, since Python 3.0 is supposed to clean up a lot of > the unnecessary or redundant features of Python and make other things > more streamlined, does it seem to anyone that including SQLite goes > against this goal? > > This is just me thinking out loud, min

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-12 Thread Roy Smith
In article <[EMAIL PROTECTED]>, "Carl Banks" <[EMAIL PROTECTED]> wrote: > Alex Martelli wrote: > > > IBM (PL/I's inventor and rabid defender) found out the hard way that > > making the parser more complicated, slow and bug-prone in order to allow > > such absurd obfuscation was NOT a popular tra

Re: What's more pythonic?

2006-09-12 Thread Richard Jones
Paul Rubin wrote: > Dan Stromberg <[EMAIL PROTECTED]> writes: >> def __cmp__(self, other): >> if self.a < other.a: >> return -1 >> elif self.a > other.a: >> return 1 >> else: >> return 0 > > I think I'd have written > >return cmp(self.a, other.a) /me agrees -- http://mail.python.or

Re: elementtree: line numbers and iterparse

2006-09-12 Thread Fredrik Lundh
Stuart McGraw wrote: > I have a broad (~200K nodes) but shallow xml file > I want to parse with Elementtree. There are too many > nodes to read into memory simultaneously so I use > iterparse() to process each node sequentially. > > Now I find i need to get and save the input file line > numbe

Re: Random Drawing Simulation -- performance issue

2006-09-12 Thread Robert Kern
Paul Rubin wrote: > "Travis E. Oliphant" <[EMAIL PROTECTED]> writes: >>> I need to simulate scenarios like the following: "You have a deck of >>> 3 orange cards, 5 yellow cards, and 2 blue cards. You draw a card, >>> replace it, and repeat N times." >>> >> Thinking about the problem as drawing samp

table (ascii text) lin ayout recognition

2006-09-12 Thread vbfoobar
Hello, I am looking for python code useful to process tables that are in ASCII text. The code must determine where are the columns (fields). Concerned tables for my application are various, but their columns are not very complicated to locate for a human, because even when ignoring the semantic of

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-12 Thread Paddy
Cliff Wells wrote: > On Tue, 2006-09-12 at 18:05 -0700, Robert Hicks wrote: > > metaperl wrote: > > > Istvan Albert wrote: > > > > metaperl wrote: > > > > > --> python -i > > > > > >>> class = "algebra" > > > > > File "", line 1 > > > > > class = "algebra" > > > > > ^ > > > > > Syn

Re: [ANN] XPN 0.6.5 released

2006-09-12 Thread Nemesis
Mentre io pensavo ad una intro simpatica "Nemesis" scriveva: > XPN (X Python Newsreader) is a multi-platform newsreader with Unicode > support. It is written with Python+GTK. It has features like > scoring/actions, X-Face and Face decoding, muting of quoted text, > newsrc import/export, find artic

Re: How to get the "longest possible" match with Python's RE module?

2006-09-12 Thread Bryan Olson
Licheng Fang wrote: > Basically, the problem is this: > p = re.compile("do|dolittle") p.match("dolittle").group() > 'do' > > Python's NFA regexp engine trys only the first option, and happily > rests on that. There's another example: > p = re.compile("one(self)?(selfsufficient)?")

Re: What's more pythonic?

2006-09-12 Thread Paul Rubin
Dan Stromberg <[EMAIL PROTECTED]> writes: > def __cmp__(self, other): > if self.a < other.a: > return -1 > elif self.a > other.a: > return 1 > else: > return 0 I think I'd have written

Re: How to get the "longest possible" match with Python's RE module?

2006-09-12 Thread Bryan Olson
Tim Peters wrote: > [...] The most valuable general technique he (eventually ;-) > explained he called "unrolling", and consists of writing a regexp in > the form: > >normal* (?: special normal* )* > > where the sets of characters with which `normal` and `special` can > start are disjoint.

What's more pythonic?

2006-09-12 Thread Dan Stromberg
Is sample1 or sample2 the more pythonic way of comparing? class sample1 def __init__(self, a, b): self.a = a self.b = b def __cmp__(self, other): return self.a.__cmp__(other.a) ...or: class sample2 def __init__(self, a, b):

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-12 Thread Carl Banks
Alex Martelli wrote: > IBM (PL/I's inventor and rabid defender) found out the hard way that > making the parser more complicated, slow and bug-prone in order to allow > such absurd obfuscation was NOT a popular trade-off -- despite IBM's > alleged monopoly power, PL/I is now basically dead while t

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-12 Thread Roy Smith
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Alex Martelli) wrote: > metaperl <[EMAIL PROTECTED]> wrote: > > > Diez B. Roggisch wrote: > > > metaperl schrieb: > > > > --> python -i > > > class = "algebra" > > > > File "", line 1 > > > > class = "algebra" > > > > ^ >

Re: Random Drawing Simulation -- performance issue

2006-09-12 Thread Paul Rubin
"Travis E. Oliphant" <[EMAIL PROTECTED]> writes: > > I need to simulate scenarios like the following: "You have a deck of > > 3 orange cards, 5 yellow cards, and 2 blue cards. You draw a card, > > replace it, and repeat N times." > > > Thinking about the problem as drawing sample froms a discrete >

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-12 Thread Alex Martelli
Steve Holden <[EMAIL PROTECTED]> wrote: > Otherwise you could try and fix the error, like the PL/1 F-level > compiler used to. This would usually work when all that was wrong was a > missing semicolon, but it frequently went completely berserk in other Ah, yeah, I forgot that particularly endear

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-12 Thread Alex Martelli
metaperl <[EMAIL PROTECTED]> wrote: > Diez B. Roggisch wrote: > > metaperl schrieb: > > > --> python -i > > class = "algebra" > > > File "", line 1 > > > class = "algebra" > > > ^ > > > SyntaxError: invalid syntax > > > > > > > > > Why isn' t the parser smart enough to see

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-12 Thread Alex Martelli
metaperl <[EMAIL PROTECTED]> wrote: Yes, keywords are always reserved. The one major language that tried to do otherwise was PL/I, where you could code, e.g.: if if = if then then = else else else = if ((of course, '=' was also polimorpically read as either assignment OR comparison -- I gathe

Re: How to get the "longest possible" match with Python's RE module?

2006-09-12 Thread Tim Peters
[Bryan Olson] >>> Unfortunately, the stuff about NFA's is wrong. Friedl's awful >>> book [Tim Peters] >> Strongly disagree: [...] [Bryan] > I know I'm disagreeing with a lot of smart people in panning > the book. That's allowed :-) >>> What Python uses is search-and-backtrack. Unfortunately suc

elementtree: line numbers and iterparse

2006-09-12 Thread Stuart McGraw
I have a broad (~200K nodes) but shallow xml file I want to parse with Elementtree. There are too many nodes to read into memory simultaneously so I use iterparse() to process each node sequentially. Now I find i need to get and save the input file line number of each node. Googling turned up

Re: Random Drawing Simulation -- performance issue

2006-09-12 Thread Travis E. Oliphant
Brendon Towle wrote: > I need to simulate scenarios like the following: "You have a deck of > 3 orange cards, 5 yellow cards, and 2 blue cards. You draw a card, > replace it, and repeat N times." > Thinking about the problem as drawing sample froms a discrete distribution defined by the popu

need some guild for embeded python

2006-09-12 Thread ezx
i want to use python in my linux phone ,motorola e680i, i think i can use a embeded python interpretor on that phone . some one has good idea? Hai -- http://mail.python.org/mailman/listinfo/python-list

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-12 Thread Carl Banks
metaperl wrote: > --> python -i > >>> class = "algebra" > File "", line 1 > class = "algebra" > ^ > SyntaxError: invalid syntax > >>> > > > Why isn' t the parser smart enough to see that class followed by an > identifier is used for class definition but class followed by equals is

Re: How to get the "longest possible" match with Python's RE module?

2006-09-12 Thread Tim Peters
[Licheng Fang] >> Basically, the problem is this: >> >> >>> p = re.compile("do|dolittle") >> >>> p.match("dolittle").group() >> 'do' ... >> The Python regular expression engine doesn't exaust all the >> possibilities, but in my application I hope to get the longest possible >> match, starting fro

Re: best small database?

2006-09-12 Thread David Isaac
Thanks to all for the suggestions and much else to think about. Summarizing: Those who were willing to consider a database suggested: anydbm Gadfly SQLite (included with Python 2.5) Schevo Some preferred using the file system. The core suggestion was to choose a directory structure along with sp

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-12 Thread Cliff Wells
On Tue, 2006-09-12 at 18:05 -0700, Robert Hicks wrote: > metaperl wrote: > > Istvan Albert wrote: > > > metaperl wrote: > > > > --> python -i > > > > >>> class = "algebra" > > > > File "", line 1 > > > > class = "algebra" > > > > ^ > > > > SyntaxError: invalid syntax > > > > > > De

Re: Dice gen and analyser script for RPGs: comments sought

2006-09-12 Thread Richard Buckle
Paul Rubin wrote (re ) > I looked at this for a minute Thanks for taking the time to look over it; I greatly appreciate it! > and found it carefully written but somewhat hard to understand. Obviously, as the author, I ha

Re: How to get the "longest possible" match with Python's RE module?

2006-09-12 Thread Bryan Olson
Licheng Fang wrote: > Basically, the problem is this: > p = re.compile("do|dolittle") p.match("dolittle").group() > 'do' > > Python's NFA regexp engine trys only the first option, and happily > rests on that. There's another example: > p = re.compile("one(self)?(selfsufficient)?")

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-12 Thread Robert Hicks
metaperl wrote: > Istvan Albert wrote: > > metaperl wrote: > > > --> python -i > > > >>> class = "algebra" > > > File "", line 1 > > > class = "algebra" > > > ^ > > > SyntaxError: invalid syntax > > > > Designing a syntax to avoid all possible newbie errors is impractical > > beca

Re: "filtered view" upon lists?

2006-09-12 Thread Raymond Hettinger
[Wildemar Wildenburger] > I don't know how else to call what I'm currently implementing: An object > that behaves like a list but doesn't store it's own items but rather > pulls them from a larger list (if they match a certain criterion). > Changes to the filter are instantly reflected in the under

Re: How to get the "longest possible" match with Python's RE module?

2006-09-12 Thread Bryan Olson
Tim Peters wrote: > [Bryan Olson] >> Unfortunately, the stuff about NFA's is wrong. Friedl's awful >> book > > Strongly disagree: [...] I know I'm disagreeing with a lot of smart people in panning the book. >> What Python uses is search-and-backtrack. Unfortunately such >> engines don't have mu

Re: python reference counting and exceptions

2006-09-12 Thread Gabriel Genellina
At Tuesday 12/9/2006 15:37, Andreas Huesgen wrote: In c++, it is possible to write a locking system similar to the one below: void myFunction() { # create a resource lock. Locks some resource ResourceLock myLock; # the following line may throw an exception doSt

Re: Gadfly server startup error

2006-09-12 Thread Steve Holden
Ralf Muschall wrote: > Hello, > > I just tried the recent gadfly (from SF), using Python > 2.4.2 (hand built, since my Suse 8.2 had only 2.2.2). > > The direct operation of gadfly works. > > After calling gfserver, I get (in addition to a complete > users manual dumped on the screen) the followi

Re: Help me use my Dual Core CPU!

2006-09-12 Thread Paul Rubin
[EMAIL PROTECTED] (Cameron Laird) writes: > Me, too. I'd love to talk over Linda with other aficionados, > and/or hunt together for an excuse to use her/it. How about an Mnesia-like database for Python? (Mnesia is an embedded database for Erlang programs.) I see in the PyLinda page that * 1

Re: CONSTRUCT -

2006-09-12 Thread Ilias Lazaridis
Steve Holden wrote: > Simon Forman wrote: > > Fredrik Lundh wrote: > >>Simon Forman wrote: > >> > >>>I'm sorry, your post makes very little sense. > >> > >>you're somewhat new here, right ? ;-) > >> > > > > Yah, I've been posting here about three months now. Why, did I miss > > something? :-) >

RE: python reference counting and exceptions

2006-09-12 Thread Delaney, Timothy (Tim)
Andreas Huesgen wrote: > In c++, it is possible to write a locking system similar to the one > below: > > > void myFunction() > { > # create a resource lock. Locks some resource > ResourceLock myLock; > > # the following line may throw an exception > doStuff(); > } RII

Re: Help me use my Dual Core CPU!

2006-09-12 Thread Ramon Diaz-Uriarte
On 9/13/06, Carl J. Van Arsdall <[EMAIL PROTECTED]> wrote: > Cameron Laird wrote: > > Tim Golden <[EMAIL PROTECTED]> wrote: (...) > >> | other types of concurrency which I might be able to use. I really like > >> | the PyLinda approach > >> (...) > > . > > Me, too. I'd love

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-12 Thread Steve Holden
metaperl wrote: > Istvan Albert wrote: > >>metaperl wrote: >> >>>--> python -i >>> >>class = "algebra" >>> >>> File "", line 1 >>>class = "algebra" >>> ^ >>>SyntaxError: invalid syntax >> >>Designing a syntax to avoid all possible newbie errors is impractical >>because as soon a

python reference counting and exceptions

2006-09-12 Thread Andreas Huesgen
Hello, I have a question refering python's reference counting/garbage collection in combination with thrown exceptions. I'm very new to this mailinglist, so I hope, that this question has not been asked and answered before. In c++, it is possible to write a locking system similar to the one be

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-12 Thread metaperl
Istvan Albert wrote: > metaperl wrote: > > --> python -i > > >>> class = "algebra" > > File "", line 1 > > class = "algebra" > > ^ > > SyntaxError: invalid syntax > > Designing a syntax to avoid all possible newbie errors is impractical > because as soon as you are finished with o

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-12 Thread metaperl
Diez B. Roggisch wrote: > metaperl schrieb: > > --> python -i > class = "algebra" > > File "", line 1 > > class = "algebra" > > ^ > > SyntaxError: invalid syntax > > > > > > Why isn' t the parser smart enough to see that class followed by an > the few reserved words won't

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-12 Thread metaperl
Istvan Albert wrote: > metaperl wrote: > > --> python -i > > >>> class = "algebra" > > File "", line 1 > > class = "algebra" > > ^ > > SyntaxError: invalid syntax > > Designing a syntax to avoid all possible newbie errors is impractical > because as soon as you are finished with o

Resolved: Secure XMLRPC Server / PEM Files

2006-09-12 Thread Daniel Crespo
Hi everybody, For those who want to implement a SecureXMLRPCServer (HTTPS), here is what I finally found in the Internet. I will summarise everything for the people like me that need extra help just to get running an HTTPS XMLRPC Server :) This summary is not intended to be exhaustive, but just t

Re: Is it just me, or is Sqlite3 goofy?

2006-09-12 Thread [EMAIL PROTECTED]
Tim Chase wrote: > >> "But honestly, boss, I didn't write this code! It was my > >> evil alter-ego that puts VARCHAR values containing Gilbert & > >> Sullivan lyrics into the Amount_Due CURRENCY fields!" > >> > > Hence the phrase "Going for a song"? > > I am the very model of a modern major datab

pyLinda?

2006-09-12 Thread Gardner Pomper
Hi,I have been lurking and see that there are a number of people interested in pyLinda. I thought that I might post some very basic questions here that I don't seem to have found on the web site. I expect the answers are there, so if you could post a url to the page that answers them, that would be

Re: Is it just me, or is Sqlite3 goofy?

2006-09-12 Thread Gabriel Genellina
Paul Boddie wrote: > Don't ask me! :-) I found it awkward enough scrolling up and down an n > * 100 page plain text document formatted for a line printer in my Web > browser, let alone spending time working out the cross-references > throughout the text, all in the five to ten minutes I spent l

Re: Is it just me, or is Sqlite3 goofy?

2006-09-12 Thread Fredrik Lundh
Paul Boddie wrote: > Don't ask me! :-) I found it awkward enough scrolling up and down an n > * 100 page plain text document formatted for a line printer in my Web > browser, let alone spending time working out the cross-references > throughout the text, all in the five to ten minutes I spent look

Re: Random Drawing Simulation -- performance issue

2006-09-12 Thread Simon Forman
Brendon Towle wrote: > I need to simulate scenarios like the following: "You have a deck of > 3 orange cards, 5 yellow cards, and 2 blue cards. You draw a card, > replace it, and repeat N times." > > So, I wrote the following code, which works, but it seems quite slow > to me. Can anyone point out

Re: Help me use my Dual Core CPU!

2006-09-12 Thread Carl J. Van Arsdall
Cameron Laird wrote: > In article <[EMAIL PROTECTED]>, > Tim Golden <[EMAIL PROTECTED]> wrote: > . > . > . > >> | I know threads won't help (in CPython at least) so I'm investigating >> | other types of concurrency which I might b

Re: error

2006-09-12 Thread Gabriel Genellina
At Tuesday 12/9/2006 09:16, [EMAIL PROTECTED] wrote: Today is my first day of working on python. I want to execute python script through C++ program. I found one very good article with example I suggest *first* try to familiarize a little with Python (read the tutorial, it's easy and it's wel

Re: Help me use my Dual Core CPU!

2006-09-12 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Tim Golden <[EMAIL PROTECTED]> wrote: . . . >| I know threads won't help (in CPython at least) so I'm investigating >| other types of concurrency which I might be able to use. I really like >| th

Re: Is it just me, or is Sqlite3 goofy?

2006-09-12 Thread Paul Boddie
Fredrik Lundh wrote: > Paul Boddie wrote: > > > To be fair, that text originates in section 12.3, referring to input > > parameters to procedures. > > which is the section that section 4.1 ("data types") refers to for more > details on mappings between host data and SQL data. guess it depends on >

Re: Help me use my Dual Core CPU!

2006-09-12 Thread Brian L. Troutwine
John Henry wrote: > I don't know what CPython is but I have developed a Python application > under Windows that utilize the Dure Core CPU when it's present. It's the default python implementation, the one you find at python.org. It happens to be written in C. Other python implementations included

Re: Is it just me, or is Sqlite3 goofy?

2006-09-12 Thread Tim Chase
>> "But honestly, boss, I didn't write this code! It was my >> evil alter-ego that puts VARCHAR values containing Gilbert & >> Sullivan lyrics into the Amount_Due CURRENCY fields!" >> > Hence the phrase "Going for a song"? I am the very model of a modern major database, For gigabytes of informat

Re: Is it just me, or is Sqlite3 goofy?

2006-09-12 Thread A.M. Kuchling
On Tue, 12 Sep 2006 15:54:25 -0500, A.M. Kuchling <[EMAIL PROTECTED]> wrote: > (Any new changes won't get in 2.5c2, which should be > released tomorrow, but will get into 2.5final if the fixes are made by > about the 17th.) And in fact the formatted development version no longer reflects

Re: Create TarFile using python

2006-09-12 Thread itzel
yes, i did. I'm checking the link in ASPN and I think that it'll works for "my problem" thanks a lot!! One more question... I'll need do it frecuently: add more directories into the same block. Is the same procedure? Thanks!!! ps. sorry about gramatic, I don't write english frecuently Y

Re: Help me use my Dual Core CPU!

2006-09-12 Thread John Henry
I don't know what CPython is but I have developed a Python application under Windows that utilize the Dure Core CPU when it's present. I don't know that I can say for sure that "threads won't help". Have you done some testing before using other approaches to see if it indeed won't help? Simon W

Validating CSS in python

2006-09-12 Thread Jan Niklas Fingerle
Hi, I want to validate CSS in python. I could take the grammar from w3.org [1] and throw it against one of the many python parsing libraries, but I still hope there's a ready-to-use solution somewhere around. The big point is that I don't want to *understand* CSS, I just need to validate it (and

Re: Create TarFile using python

2006-09-12 Thread Gerold Penz
itzel schrieb: > I need a script that group a > list of files using Tar file utility and then, compress that block > using a compress utility (gzip i think). Hi! This script packs all files and directories inside the ``source_dir`` into the TAR-GZ-Archive (``destination``): import os.path

Re: Newbie - ? get IDLE going on cygwin

2006-09-12 Thread Thorsten Kampe
* David J. Braden (2006-09-12 18:35 +0100) > I can run Python in command-line mode fine from the cygwin shell; the > cygwin distribution also includes IDLE, which is apparently completely > installed, yet I am unable to get IDLE running. When I double-click > idle.bat (or idle.pyw) I am prompted

Re: Is it just me, or is Sqlite3 goofy?

2006-09-12 Thread A.M. Kuchling
On 12 Sep 2006 13:03:09 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Ok, I appologize for saying that. Got a little carried away > by the flames. Apology accepted; no problem. > That and fixing the broken examples. That's also done. I fixed the executescript.py example, and tr

Re: Random Drawing Simulation -- performance issue

2006-09-12 Thread David J. Braden
Brendon Towle wrote: > I need to simulate scenarios like the following: "You have a deck of 3 > orange cards, 5 yellow cards, and 2 blue cards. You draw a card, replace > it, and repeat N times." > > So, I wrote the following code, which works, but it seems quite slow to > me. Can anyone point

Re: Help me use my Dual Core CPU!

2006-09-12 Thread Michael
Simon Wittber wrote: > I've just bought a new notebook, which has a dual core CPU. > > I write cross platform games in Python, and I'd really like to be able > to use this second core (on my machine, and on user's machines) for any > new games I might write. > > I know threads won't help (in CPy

Getting PyXML and dom/minidom to ignore whitespace

2006-09-12 Thread nikhilhs1110
Is there a way to get PyXML and dom/minidom to ignore whitespace? Or a simple way to strip it away? Thanks. -Nick -- http://mail.python.org/mailman/listinfo/python-list

Re: Is it just me, or is Sqlite3 goofy?

2006-09-12 Thread Steve Holden
[EMAIL PROTECTED] wrote: > A.M. Kuchling wrote: > >>On 12 Sep 2006 10:24:00 -0700, >> [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> >>>So, knowing that, would you agree that >>> >>> >>>If switching to a larger database such as PostgreSQL or Oracle >>>is later necessary, the switch should be

Re: Secure XMLRPC Server / PEM Files

2006-09-12 Thread Daniel Crespo
Hi Laszlo, > Try this (untested): > > openssl req -config openssl.cnf -new -out my-server.csr > openssl rsa -in privkey.pem -out my-server.key Here's what I tried: C:\OpenSSL\bin>openssl req -config openssl.cnf -new -out my-server.csr Loading 'screen' into random state - done Generating a 1024 b

Re: Clarify Regex in Python.

2006-09-12 Thread Terry Hancock
[EMAIL PROTECTED] wrote: > After may frustrated attempts I came to know that "match" function > in python re package actually start the matchs at the begining of the > subject, where "search" will find the given pattern any where in the > subject. > > My Problem is, I want to know how can I f

Re: Is it just me, or is Sqlite3 goofy?

2006-09-12 Thread Steve Holden
Tim Chase wrote: >>dynamic typing != random typing. if your program is using the >>DB-API to add data to an SQLite database, who, exactly, is >>inserting the values? who's producing the data? under what >>circumstances would that code produce or insert arbitrarily >>typed data? > > > Must be th

Ideas on interconnecting objects? (was: "filtered view" upon lists?)

2006-09-12 Thread Wildemar Wildenburger
> That's all very well, but you might want to Google for "YAGNI". :) > You still haven't given us mcuh of a clue about the real need. There is no "real need". I'm trying things, looking what works out eventually. I don't do that for a living (if I did, I'd be starved by now). Or do you mean the r

Marshaled input / output from Perforce server

2006-09-12 Thread Kim Bendtsen
I'm trying to write a script in python that communicates with a perforce server. I can get the output from perforce by using -G and the popen command. I have a problem when I'm trying to send a request to the server using marshaled input. I cannot find a single example anywhere on the net describi

Gadfly server startup error

2006-09-12 Thread Ralf Muschall
Hello, I just tried the recent gadfly (from SF), using Python 2.4.2 (hand built, since my Suse 8.2 had only 2.2.2). The direct operation of gadfly works. After calling gfserver, I get (in addition to a complete users manual dumped on the screen) the following error message: |Traceback (most rec

[ANN] XPN 0.6.5 released

2006-09-12 Thread Nemesis
XPN (X Python Newsreader) is a multi-platform newsreader with Unicode support. It is written with Python+GTK. It has features like scoring/actions, X-Face and Face decoding, muting of quoted text, newsrc import/export, find article and search in the body, spoiler char/rot13, random taglines and con

Re: Is it just me, or is Sqlite3 goofy?

2006-09-12 Thread [EMAIL PROTECTED]
Mike Owens wrote: > On 12 Sep 2006 10:47:22 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > Why? I'm not requesting that dynamic typing be removed from > > sqlite. I'm not even requesting that the slander in the sqlite docs > > be removed. What I'm requesting is that these "features" of

Re: Is it just me, or is Sqlite3 goofy?

2006-09-12 Thread Tim Chase
> dynamic typing != random typing. if your program is using the > DB-API to add data to an SQLite database, who, exactly, is > inserting the values? who's producing the data? under what > circumstances would that code produce or insert arbitrarily > typed data? Must be the code written by a Dr.

Re: Is it just me, or is Sqlite3 goofy?

2006-09-12 Thread [EMAIL PROTECTED]
A.M. Kuchling wrote: > On 12 Sep 2006 10:24:00 -0700, > [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > So, knowing that, would you agree that > > > > > > If switching to a larger database such as PostgreSQL or Oracle > > is later necessary, the switch should be relatively easy. > > > > > >

Re: best small database?

2006-09-12 Thread Cliff Wells
On Tue, 2006-09-12 at 12:29 -0700, Kay Schluehr wrote: > Just one stupid remark since the limits of my language are the limits > of my world: I've not the slightest association with the seemingly > nonsense word "buzhug" and don't even know how to pronounce it > correctly. Would you have the kindn

Re: Is it just me, or is Sqlite3 goofy?

2006-09-12 Thread Mike Owens
On 12 Sep 2006 10:47:22 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Why? I'm not requesting that dynamic typing be removed from > sqlite. I'm not even requesting that the slander in the sqlite docs > be removed. What I'm requesting is that these "features" of > sqlite be better presented

Re: "filtered view" upon lists?

2006-09-12 Thread Steve Holden
Wildemar Wildenburger wrote: > Steve Holden wrote: > >>> I think SQL views are the direct analog. >>> >> I don't think they are. If you add a non-conforming row to a SQL view >> it doesn't appear int he view. If you modify a row in an updateable >> view so it no longer confirms with the view's c

Re: Is it just me, or is Sqlite3 goofy?

2006-09-12 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: >> that's just the old "C++/Java is better than Smalltalk/Python/Ruby" >> crap. we've seen it before, and it's no more true when it comes from >> you than when it comes from some Java head. people who've actually used >> dynamic typing knows that it doesn't mean that all

Re: best small database?

2006-09-12 Thread Kay Schluehr
Pierre Quentel wrote: > - SnakeSQL : another SQL engine, less mature I think and very slow when > I tested it And strange bugs when I used it. > - buzhug : Pythonic syntax (uses list comprehensions or methods like > create(), select() on the db object), much faster than all the above. > I'm obvi

Re: Is it just me, or is Sqlite3 goofy?

2006-09-12 Thread [EMAIL PROTECTED]
Fredrik Lundh wrote: > [EMAIL PROTECTED] wrote: > > > Because I can extrapolate. I *know* before even trying it that > > if I export all my data from a sqlite db to a csv file and then try > > to import it into Access that there will be problems if the fields > > aren't static typed. > > that's jus

Re: Create TarFile using python

2006-09-12 Thread Peter Maas
itzel wrote: > I have a problem. I'm new in python and I need a script that group a > list of files using Tar file utility and then, compress that block > using a compress utility (gzip i think). I already found some > information and i try to apply it, but my scripy doesn't work. Did you look h

Re: "filtered view" upon lists?

2006-09-12 Thread Wildemar Wildenburger
[EMAIL PROTECTED] wrote: > Note that if you just have to scan the "view list", then you can use > the lazy: > > itertool.ifilter(predicate, iterable) Yeah, had found that already; thanks anyway. This function is actually the very reason I'm even asking this: 'If the std libs solve this problem f

Re: "filtered view" upon lists?

2006-09-12 Thread Wildemar Wildenburger
Steve Holden wrote: >> I think SQL views are the direct analog. >> > I don't think they are. If you add a non-conforming row to a SQL view it doesn't appear int he view. If you modify a row in an updateable view so it no longer confirms with the view's conditions it disappears from the view.

Random Drawing Simulation -- performance issue

2006-09-12 Thread Brendon Towle
I need to simulate scenarios like the following: "You have a deck of 3 orange cards, 5 yellow cards, and 2 blue cards. You draw a card, replace it, and repeat N times." So, I wrote the following code, which works, but it seems quite slow to me. Can anyone point out some obvious thing that I'

Re: Is it just me, or is Sqlite3 goofy?

2006-09-12 Thread A.M. Kuchling
On 12 Sep 2006 10:24:00 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > So, knowing that, would you agree that > > > If switching to a larger database such as PostgreSQL or Oracle > is later necessary, the switch should be relatively easy. > > > is misleading if not outright untrut

Re: BaseHTTPServer weirdness

2006-09-12 Thread Eddie Corns
Ron Garret <[EMAIL PROTECTED]> writes: >In article <[EMAIL PROTECTED]>, > Steve Holden <[EMAIL PROTECTED]> wrote: >> I wouldn't necessarily say you are wrong here, It's just that the cgi >> module has sort of "just growed", so it isn't conveniently factyored for >> reusability in other contexts

Re: Is it just me, or is Sqlite3 goofy?

2006-09-12 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > Because I can extrapolate. I *know* before even trying it that > if I export all my data from a sqlite db to a csv file and then try > to import it into Access that there will be problems if the fields > aren't static typed. that's just the old "C++/Java is better than

Re: best small database?

2006-09-12 Thread Cliff Wells
On Mon, 2006-09-11 at 13:23 +, David Isaac wrote: > I have no experience with database applications. > This database will likely hold only a few hundred items, > including both textfiles and binary files. > > I would like a pure Python solution to the extent reasonable. Since no one's mention

  1   2   3   >