Re: Inheritance and Design Question

2009-05-27 Thread Carl Banks
On May 27, 12:58 pm, imageguy wrote: > I have an object the I would like to use as a base class.  Some of the > methods I would like to override completely, but others I would simply > like to call the base class method and use the return value in the > child method.  The purpose here is to elimin

Re: DB-API execute params, am I missing something?

2009-05-27 Thread Teguh Iskanto
On Thu, May 28, 2009 at 11:12 AM, Lawrence D'Oliveiro wrote: > In message <784h2cf1kem0...@mid.uni-berlin.de>, Diez B. Roggisch wrote: > > > Lawrence D'Oliveiro wrote: > > > >> In message , Dennis > >> Lee Bieber wrote: > >> > >>> Notice that db.literal() call? That's part of the mechanism used t

Re: Inheritance and Design Question

2009-05-27 Thread Andre Engels
On Wed, May 27, 2009 at 9:58 PM, imageguy wrote: > I have an object the I would like to use as a base class.  Some of the > methods I would like to override completely, but others I would simply > like to call the base class method and use the return value in the > child method.  The purpose here

Re: unpickling a stream

2009-05-27 Thread ryles
On May 26, 3:25 pm, mso...@linuxmail.org wrote: > Hello, > > I want to send a stream of pickled objects over a socket.  Is there a > standard way of ensuring that only complete objects are unpickled on > the receiving side. > > client pseudo code: >   loop forever: >     receive some bytes on the s

Re: What text editor is everyone using for Python

2009-05-27 Thread Paul Rudin
"Rhodri James" writes: > The feature that caused me to uninstall python-mode.el was its > bloody-minded determination to regard '_' as a word character, > something which caused me more typing that it ever saved. Probably you could have changed this in a few minutes. Or does fiddling with emacs

Re: Adding a Par construct to Python?

2009-05-27 Thread Steven D'Aprano
On Wed, 27 May 2009 12:58:02 +, Albert van der Horst wrote: >>And how is reduce() supposed to know whether or not some arbitrary >>function is commutative? > > Why would it or need it? A Python that understands the ``par'' keyword > is supposed to know it can play some tricks with optimizing

Re: What text editor is everyone using for Python

2009-05-27 Thread Steven D'Aprano
On Wed, 27 May 2009 22:34:45 -0400, Chris Jones wrote: > I'm unsure about a python editor for everyone but since acquiring habits > takes time, I'm in favor of sticking to one editor for everything. Or use an editor which follows user interface standards, rather than invents its own conventions

Re: Searching for pyvm

2009-05-27 Thread VanL
Vladimir G. Ivanovic wrote: > I'm looking for the sources to pyvm, a python virtual machine > implementation which can run Python 2.4 bytecode. The tarball for pyvm returns a 404, but you can still get the code to pyvm by getting archive.org's copy: http://web.archive.org/web/20061012230953/http:

Re: What text editor is everyone using for Python

2009-05-27 Thread Chris Jones
I'm unsure about a python editor for everyone but since acquiring habits takes time, I'm in favor of sticking to one editor for everything. CJ -- http://mail.python.org/mailman/listinfo/python-list

Re: DB-API execute params, am I missing something?

2009-05-27 Thread John Machin
On May 28, 11:12 am, Lawrence D'Oliveiro wrote: > In message <784h2cf1kem0...@mid.uni-berlin.de>, Diez B. Roggisch wrote: > > > Lawrence D'Oliveiro wrote: > > >> In message , Dennis > >> Lee Bieber wrote: > > >>> Notice that db.literal() call? That's part of the mechanism used to > >>> escape and

Re: What text editor is everyone using for Python

2009-05-27 Thread John Yeung
On May 27, 2:09 pm, Stef Mientki wrote: > John Yeung wrote: > > > I kind of marvel at how few people complain about [SciTE's] > > Python indentation.  (I'd like to think it's because anyone > > who edits Python code in SciTE has downloaded my patch, but > > I am confident that is not the case.) >

Re: DB-API execute params, am I missing something?

2009-05-27 Thread Lawrence D'Oliveiro
In message <784h2cf1kem0...@mid.uni-berlin.de>, Diez B. Roggisch wrote: > Lawrence D'Oliveiro wrote: > >> In message , Dennis >> Lee Bieber wrote: >> >>> Notice that db.literal() call? That's part of the mechanism used to >>> escape and quote parameters -- it only returns strings that are safe f

newbie: popen question

2009-05-27 Thread thebiggestbangtheory
hello everyone :-), I am a newbie to python. I am trying to run a bash script from within a python program. I would greatly appreciate any pointers/comments about how to get around the problem I am facing. I want to run bash script: code.sh from within a python program. c

Re: Popen File I/O

2009-05-27 Thread D'Arcy J.M. Cain
On Wed, 27 May 2009 19:39:21 -0500 Eric Pruitt wrote: > I am creating a file-like interface for Popen. Do I need to return True or > False for "isatty()"? I am thinking True but I am not familiar with the > semantics of what defines a tty. >>> import os >>> x = os.popen("ls") >>> type(x)

Popen File I/O

2009-05-27 Thread Eric Pruitt
Hello, I am creating a file-like interface for Popen. Do I need to return True or False for "isatty()"? I am thinking True but I am not familiar with the semantics of what defines a tty. Thanks, Eric -- http://mail.python.org/mailman/listinfo/python-list

Re: A fast way to read last line of gzip archive ?

2009-05-27 Thread python
Dave, Not the OP, but really enjoyed your analysis and solution. Excellent job!! Thank you! Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Python, Tkinter and popen problem

2009-05-27 Thread norseman
Peter Otten wrote: norseman wrote: This was sent 5/19/09 and as yet has received no comments. I'm resending just in case a new reader might have an answer. If you had posted two tiny scripts demonstrating your problem instead of the longwinded explanation I might have tinkered. Peter

Re: What text editor is everyone using for Python

2009-05-27 Thread Rhodri James
On Wed, 27 May 2009 16:56:12 +0100, Bruno Desthuilliers wrote: Rhodri James a écrit : On Tue, 26 May 2009 14:22:29 +0100, Roy Smith wrote: My pet peeve is syntax-aware editors which get things wrong. For example, the version of emacs I'm using now doesn't parse this properly: '''A tri

Re: A fast way to read last line of gzip archive ?

2009-05-27 Thread Igor Katson
So in summary, the choices when tested on my system ended up at: last 26 last-chunk2.7 last-chunk-2 2.3 last-popen1.7 last-gzip 1.48 last-decompress 1.12 So by being willing to mix in some more direct code with the GzipFile ob

Re: 4 hundred quadrillonth?

2009-05-27 Thread Luis Zarrabeitia
On Wednesday 27 May 2009 04:26:57 pm Mark Dickinson wrote: > Luis Zarrabeitia wrote: > > On Thursday 21 May 2009 08:50:48 pm R. David Murray wrote: > >> In py3k Eric Smith and Mark Dickinson have implemented Gay's floating > >> point algorithm for Python so that the shortest repr that will round >

Re: Inheritance and Design Question

2009-05-27 Thread Terry Reedy
imageguy wrote: I have an object the I would like to use as a base class. Some of the methods I would like to override completely, but others I would simply like to call the base class method and use the return value in the child method. The purpose here is to eliminate the duplication of valua

Re: Inheritance and Design Question

2009-05-27 Thread Matimus
On May 27, 12:58 pm, imageguy wrote: > I have an object the I would like to use as a base class.  Some of the > methods I would like to override completely, but others I would simply > like to call the base class method and use the return value in the > child method.  The purpose here is to elimin

Re: Inheritance and Design Question

2009-05-27 Thread Scott David Daniels
imageguy wrote: I have an object the I would like to use as a base class. Some of the methods I would like to override completely, but others I would simply like to call the base class method and use the return value in the child method. The purpose here is to eliminate the duplication of valua

Re: 4 hundred quadrillonth?

2009-05-27 Thread Mark Dickinson
Luis Zarrabeitia wrote: > On Thursday 21 May 2009 08:50:48 pm R. David Murray wrote: > >> In py3k Eric Smith and Mark Dickinson have implemented Gay's floating >> point algorithm for Python so that the shortest repr that will round >> trip correctly is what is used as the floating point repr

Inheritance and Design Question

2009-05-27 Thread imageguy
I have an object the I would like to use as a base class. Some of the methods I would like to override completely, but others I would simply like to call the base class method and use the return value in the child method. The purpose here is to eliminate the duplication of valuable code in the pa

Re: 4 hundred quadrillonth?

2009-05-27 Thread Luis Zarrabeitia
On Wednesday 27 May 2009 02:33:38 pm Ned Deily wrote: > In article <200905271107.21750.ky...@uh.cu>, > > > Little question: what was the goal of such a change? (is there a pep for > > me to > > read?) > > See discussion starting here: > > http://article.gmane.org/gmane.comp.python.devel/103191/ Th

Re: download all mib files from a web page

2009-05-27 Thread Scott David Daniels
powah wrote: ... I fixed one error, now if the filename is misspelled, how to ignore the error and continue? You really should go through the tutorial. It will explain this and other important things well. But, since I'm feeling generous: Replace this: u=urllib2.urlopen(link) p=u.re

Re: Multiprocessing problem with producer/consumer

2009-05-27 Thread Piet van Oostrum
> Wu Zhe (WZ) wrote: >WZ> I am writing a server program with one producer and multiple consumers, >WZ> what confuses me is only the first task producer put into the queue gets >WZ> consumed, after which tasks enqueued no longer get consumed, they remain >WZ> in the queue forever. >WZ> from m

Re: List reference at offset

2009-05-27 Thread Colin . Hankins
On May 27, 11:19 am, Peter Otten <__pete...@web.de> wrote: > colin.hank...@touit.com wrote: > > Disclaimer: I'm learning python and would like to use it in a > > project. > > > The project will have many large matricies. In one particular instance > > I need to reference a smaller submatrix of the

Re: Python, Tkinter and popen problem

2009-05-27 Thread Peter Otten
norseman wrote: > This was sent 5/19/09 and as yet has received no comments. > I'm resending just in case a new reader might have an answer. If you had posted two tiny scripts demonstrating your problem instead of the longwinded explanation I might have tinkered. Peter -- http://mail.python.

Re: Building mySQL-python with python 2.6

2009-05-27 Thread Christian Heimes
abolotnov wrote: > say I obtain and install "an alternative" compiler. how do I tell > python which one to use? > > I am sorry for asking dumb questions. Can't find the answers in the > docs/mans. http://docs.python.org/install/index.html#gnu-c-cygwin-mingw Christian -- http://mail.python.org/

Re: 4 hundred quadrillonth?

2009-05-27 Thread Ned Deily
In article <200905271107.21750.ky...@uh.cu>, Luis Zarrabeitia wrote: > On Thursday 21 May 2009 08:50:48 pm R. David Murray wrote: > > In py3k Eric Smith and Mark Dickinson have implemented Gay's floating > > point algorithm for Python so that the shortest repr that will round > > trip correctly i

Python, Tkinter and popen problem

2009-05-27 Thread norseman
can I do to get things running correctly? I want the master to echo the child's print statements and the child get the 'continue' character so it will. Today is: 20090527 Versions noted above. Steve -- http://mail.python.org/mailman/listinfo/python-list

Re: List reference at offset

2009-05-27 Thread Peter Otten
colin.hank...@touit.com wrote: > Disclaimer: I'm learning python and would like to use it in a > project. > > The project will have many large matricies. In one particular instance > I need to reference a smaller submatrix of the larger matrix. I don't > want to create a new copy or even change a

Re: Building mySQL-python with python 2.6

2009-05-27 Thread abolotnov
> You might be able to use mingw32 as well. say I obtain and install "an alternative" compiler. how do I tell python which one to use? I am sorry for asking dumb questions. Can't find the answers in the docs/mans. -- http://mail.python.org/mailman/listinfo/python-list

Re: download all mib files from a web page

2009-05-27 Thread powah
On May 27, 12:29 pm, powah wrote: > I want to download all mib files from the web > page:http://www.juniper.net/techpubs/software/junos/junos94/swconfig-net-m... > > All mib filenames are of this format:www.juniper.net/techpubs... .txt > > I write this program but has the following error. > Pleas

Re: download all mib files from a web page

2009-05-27 Thread powah
On May 27, 1:50 pm, Jeff McNeil wrote: > On May 27, 12:29 pm, powah wrote: > > > > > > > I want to download all mib files from the web > > page:http://www.juniper.net/techpubs/software/junos/junos94/swconfig-net-m... > > > All mib filenames are of this format:www.juniper.net/techpubs... .txt > >

Announce: pcp-0.1

2009-05-27 Thread Michael Werner
Name:pcp-0.1 Description: Python Interface to SGI's Performance Co-Pilot client API License: GNU LGPL Download:ftp://oss.sgi.com/www/projects/pcp/download/python- pcp-0.1.tar.gz Web: http://oss.sgi.com/projects/pcp/ Author: Michael Werner Email: mtw at protom

Re: What text editor is everyone using for Python

2009-05-27 Thread Stef Mientki
John Yeung wrote: On May 26, 9:43 am, Mel wrote: SciTE I like one big uncomplicated window, tabbed file panes, syntax coloring and help with indentation. There's nothing to it I hate. It would be nice if customization were easier. This is a decent summary of SciTE, but I kind of m

Re: print stream behavior

2009-05-27 Thread Andreas Kraemer
On May 27, 10:52 am, Peter Otten <__pete...@web.de> wrote: > This is a longstanding quirk of the CPython implementation. The > PRINT_ITEM_TO opcode triggers a PyFile_WriteObject() call which in turn does > the C equivalent of > > if isinstance(f, file): >    file.write(f, s) > else: >    write = ge

Re: multiprocessing / forking memory usage

2009-05-27 Thread Randall Smith
Thanks Piet. You gave a good explanation and I think I understand much better now. Piet van Oostrum wrote: Randall Smith (RS) wrote: RS> I'm trying to get a grasp on how memory usage is affected when forking as RS> the multiprocessing module does. I've got a program with a parent process

Re: print stream behavior

2009-05-27 Thread Peter Otten
Andreas Kraemer wrote: > I don't understand the behavior of the print statement when streaming > to a "file-like" object. From the documentation at > http://www.python.org/doc/2.4.4/ref/print.html I understand that the > file-like object needs to have a write() method that - I assume - is > called

Re: download all mib files from a web page

2009-05-27 Thread Jeff McNeil
On May 27, 12:29 pm, powah wrote: > I want to download all mib files from the web > page:http://www.juniper.net/techpubs/software/junos/junos94/swconfig-net-m... > > All mib filenames are of this format:www.juniper.net/techpubs... .txt > > I write this program but has the following error. > Pleas

List reference at offset

2009-05-27 Thread Colin . Hankins
Disclaimer: I'm learning python and would like to use it in a project. The project will have many large matricies. In one particular instance I need to reference a smaller submatrix of the larger matrix. I don't want to create a new copy or even change any of the values, I just want to quickly and

Re: How to create a list of functions depending on a parameter?

2009-05-27 Thread Luis Zarrabeitia
On Tuesday 26 May 2009 05:00:14 am Paul Rudin wrote: > > class Foo(object): > > def __init__(self, pos): > self.pos = pos > > def __call__(self, arg): > return self.pos + arg > > f = [Foo(x) for x in range(10)] Or, without the class: In [1]: def get_incrementor(n): ...:

print stream behavior

2009-05-27 Thread Andreas Kraemer
I don't understand the behavior of the print statement when streaming to a "file-like" object. From the documentation at http://www.python.org/doc/2.4.4/ref/print.html I understand that the file-like object needs to have a write() method that - I assume - is called when the print statement is invok

Re: Python Socket Issues with VirtualBox

2009-05-27 Thread Luis Zarrabeitia
On Friday 22 May 2009 11:05:42 am Alan Franzoni wrote: > TechieInsights was kind enough to say: [...] > My first guess would be that you didn't specify the interface to bind to, > and the interface order changes once you install virtualbox since it > possibly adds a virtual interface of its own, [

download all mib files from a web page

2009-05-27 Thread powah
I want to download all mib files from the web page: http://www.juniper.net/techpubs/software/junos/junos94/swconfig-net-mgmt/juniper-specific-mibs-junos-nm.html#jN18E19 All mib filenames are of this format: www.juniper.net/techpubs ... .txt I write this program but has the following error. Please

Re: What text editor is everyone using for Python

2009-05-27 Thread Gunter Henriksen
> This, ladies and gentlemen of the jury, points > up the essential difference between a modal and > a non-modal way of doing things. That is one reason I love emacs... I not only get a selection of several "major modes", I can also have multiple "minor modes" active at the same time! And I can e

Re: How does Python's OOP feel?

2009-05-27 Thread Bruno Desthuilliers
Ikon a écrit : I'm rather new to Python. I have PHP for my main language and I do some Java. They all have a very strict OO schema. I would describe PHP's "OO schema" as "very strict" (FWIW, I wouldn't qualify anything PHP as "strict" in any way...) As I red through Python's tutorial it sea

Re: What text editor is everyone using for Python

2009-05-27 Thread Bryan
On May 26, 5:07 am, Lacrima wrote: > I am new to python. > And now I am using trial version of Wing IDE. > But nobody mentioned it as a favourite editor. > So should I buy it when trial is expired or there are better choices? First read this and think about where you want to invest your time, IDE

Re: What text editor is everyone using for Python

2009-05-27 Thread Bruno Desthuilliers
Rhodri James a écrit : On Tue, 26 May 2009 14:22:29 +0100, Roy Smith wrote: My pet peeve is syntax-aware editors which get things wrong. For example, the version of emacs I'm using now doesn't parse this properly: '''A triple-quoted string. Some editors won't get this right''' The solutio

Re: What text editor is everyone using for Python

2009-05-27 Thread godshorse
On May 26, 7:07 pm, Lacrima wrote: > I am new to python. > And now I am using trial version of Wing IDE. > But nobody mentioned it as a favourite editor. > So should I buy it when trial is expired or there are better choices? Hello, I too new to Python. I tried several IDEs and ended up with Win

Re: dbfpy - cannot store new record

2009-05-27 Thread Ethan Furman
Laszlo Nagy wrote: Here is the next problem. For boolean/logical fields, I can set their value to True/False easily. However, setting NULL seems impossible: rec = tbl.newRecord() rec["SOMEFIELD1"] = True # Works fine rec["SOMEFIELD2"] = False # Works fine rec["SOMEFIELD3"] = None # Will store F

Re: Building mySQL-python with python 2.6

2009-05-27 Thread Scott David Daniels
Christian Heimes wrote: abolotnov schrieb: Hi, I am trying to build mySQL-python with python 2.6 on windows and can't figure what's wrong with it. ... You need Visual Studio 2008. Other versions of VS aren't supported by Python 2.6. You might be able to use mingw32 as well. --Scott David Da

Re: 4 hundred quadrillonth?

2009-05-27 Thread Luis Zarrabeitia
On Thursday 21 May 2009 08:50:48 pm R. David Murray wrote: > In py3k Eric Smith and Mark Dickinson have implemented Gay's floating > point algorithm for Python so that the shortest repr that will round > trip correctly is what is used as the floating point repr Little question: what was the g

Re: How do I sample randomly based on some probability(wightage)?

2009-05-27 Thread Scott David Daniels
Sumitava Mukherjee wrote: I need to randomly sample from a list where all choices have weights attached to them. The probability of them being choosen is dependent on the weights. I am not sure why everybody is normalizing by dividing the weights. This isa possibility (I had fun writing it). de

Re: Building mySQL-python with python 2.6

2009-05-27 Thread Christian Heimes
abolotnov schrieb: >> You need Visual Studio 2008. Other versions of VS aren't supported by >> Python 2.6. > > Aren't 2005, 2008+ versions all have same c compiler - it's just the > IDE versions that are different? There are important differences between the several versions of VC++. The most imp

Re: Adding a Par construct to Python?

2009-05-27 Thread sunnia
On May 20, 10:38 pm, Luis Zarrabeitia wrote: > On Wednesday 20 May 2009 04:32:59 pm Carl Banks wrote: > > > I wasn't really arguing that locking individual objects was a > > significant penalty in computer time, only in programmer time.  The > > locks on reference counts are what's expensive. > >

Re: Building mySQL-python with python 2.6

2009-05-27 Thread abolotnov
> You need Visual Studio 2008. Other versions of VS aren't supported by > Python 2.6. Aren't 2005, 2008+ versions all have same c compiler - it's just the IDE versions that are different? -- http://mail.python.org/mailman/listinfo/python-list

Re: Building mySQL-python with python 2.6

2009-05-27 Thread Christian Heimes
abolotnov schrieb: > Hi, I am trying to build mySQL-python with python 2.6 on windows and > can't figure what's wrong with it. > > D:\temp\mysqlPyC\MySQL–python–1.2.3c1>python setup.py build > running build > running build_py > copying MySQLdb\release.py –> build\lib.win32–2.6\MySQLdb > running bu

Building mySQL-python with python 2.6

2009-05-27 Thread abolotnov
Hi, I am trying to build mySQL-python with python 2.6 on windows and can't figure what's wrong with it. D:\temp\mysqlPyC\MySQL–python–1.2.3c1>python setup.py build running build running build_py copying MySQLdb\release.py –> build\lib.win32–2.6\MySQLdb running build_ext building '_mysql' extension

Re: What text editor is everyone using for Python

2009-05-27 Thread rustom
I dont think Ive seen it said on this thread (if yes sorry for missing it) If you use emacs 1. DONT use the python.el that comes with emacs but use python-mode.el that comes from python 2. Use python as an interpreter ie not as you would use C or Java or ... which is to say 2.1 Start python as an

Re: Adding a Par construct to Python?

2009-05-27 Thread Albert van der Horst
In article <02204669$0$25303$c3e8...@news.astraweb.com>, Steven D'Aprano wrote: >On Sun, 17 May 2009 18:24:34 +0200, Diez B. Roggisch wrote: > >>> But reduce()? I can't see how you can parallelize reduce(). By its >>> nature, it has to run sequentially: it can't operate on the nth item >>> until

nntplib.NNTPTemporaryError: 441 Article has no body -- just headers

2009-05-27 Thread Jon Bendtsen
Hi I'm trying to expand cvsmail.py so it posts to newsgroups, but i constantly get this error message: nntplib.NNTPTemporaryError: 441 Article has no body -- just headers If i put the test message into a file then i can post it just fine, no problems. But if i put the message into a StringIO, the

Re: pyparsing question: single word values with a double quoted string every once in a while

2009-05-27 Thread Piet van Oostrum
> hubritic (h) wrote: >h> I want to parse a log that has entries like this: >h> [2009-03-17 07:28:05.545476 -0500] rprt s=d2bpr80d6 m=2 mod=mail >h> cmd=msg module=access rule=x_dynamic_ip action=discard attachments=0 >h> rcpts=1 >h> >routes=DL_UK_ALL,NOT_DL_UK_ALL,default_inbound,firewallsa

Multiprocessing problem with producer/consumer

2009-05-27 Thread Wu Zhe
I am writing a server program with one producer and multiple consumers, what confuses me is only the first task producer put into the queue gets consumed, after which tasks enqueued no longer get consumed, they remain in the queue forever. from multiprocessing import Process, Pool, Queue, cpu_cou

Re: What text editor is everyone using for Python

2009-05-27 Thread flyingfrog
On 27 Mag, 08:44, Ben Finney wrote: > Lacrima writes: > > I am new to python. > > And now I am using trial version of Wing IDE. > > But nobody mentioned it as a favourite editor. > > So should I buy it when trial is expired or there are better choices? > > I think your time will be better spent l

Re: DB-API execute params, am I missing something?

2009-05-27 Thread Diez B. Roggisch
Lawrence D'Oliveiro wrote: > In message , Dennis > Lee Bieber wrote: > >> Notice that db.literal() call? That's part of the mechanism used to >> escape and quote parameters -- it only returns strings that are safe for >> insertion into the SQL statement. > > Does it deal with "like"-wildcards?

Re: DB-API execute params, am I missing something?

2009-05-27 Thread Paul Boddie
On 26 Mai, 13:46, Gabriel Rossetti wrote: > > def getParams(curs): >     curs.execute("select * from param where id=%d", 1001) First of all, you should use the database module's parameter style, which is probably "%s" - something I've thought should be deprecated for a long time due to the confus

Re: which database is suitable for small applications

2009-05-27 Thread Kalyan Chakravarthy
Hi Ankit, Thanks for your advice, can I get some sample code, to store data in to flat files and how to give flat file connections to my Python code, Because I am very new to Python and flat files Thanks in Advance Kalyan On Wed, May 27, 2009 at 10:18 AM, Ankit wrote: > Hi Kaly

Re: DB-API execute params, am I missing something?

2009-05-27 Thread Lawrence D'Oliveiro
In message , Dennis Lee Bieber wrote: > Notice that db.literal() call? That's part of the mechanism used to > escape and quote parameters -- it only returns strings that are safe for > insertion into the SQL statement. Does it deal with "like"-wildcards? -- http://mail.python.org/mailman/listi

Re: How do I sample randomly based on some probability(wightage)?

2009-05-27 Thread bearophileHUGS
Sumitava Mukherjee: >I need to randomly sample from a list where all choices have weights attached >to them.< Like this? http://code.activestate.com/recipes/498229/ Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: which database is suitable for small applications

2009-05-27 Thread Ankit
Hi Kalyan... If your application does not require you to add very heavy data then you can also use flat files to do your stuff. Its always a better to use Databases but given your low level use and newness to python... i would advise you to take up flat files instead. store your data there and ac

Can pdb debugger save history list ?

2009-05-27 Thread robert song
Hello,everyone. Is there any configure file that can be set to save history list for python gdb debugger? thank you very much. -- http://mail.python.org/mailman/listinfo/python-list

Question in VB DLL COM event in Delphi Programming

2009-05-27 Thread Tan, Yih Hung
Dear Sir, I have a question regarding Delphi COM programming. I have a VB DLL (ActiveX COM DLL) and this DLL contain 2 classes, one is for normal client function calling, and the other one is events raised by this DLL to notify the client. Now, I would like to incorporate this DLL into Delphi (bin

Re: What text editor is everyone using for Python

2009-05-27 Thread Jeremiah Dodds
On Wed, May 27, 2009 at 6:29 AM, Teguh Iskanto wrote: > > > BTW: "screen" does split screen too :) > > HTH > > Unfortunately, screen only does horizontal splitting. (I heard that vertical splitting is supposed to be in the next version of it, and is in the dev trunk, but I don't know). That said

Re: How to ask smart questions question

2009-05-27 Thread Ben Finney
Carl Banks writes: > On May 26, 7:48 am, Gary Herron wrote: > > The proper response to a question like this has to be   > >  http://www.catb.org/~esr/faqs/smart-questions.html as anything else > > is complete guesswork. > > Is there a Cliff's Notes version of this? > > I may be a cynic but I w