Can't uninstall wxPython

2005-11-11 Thread Justin
I have two versions of wxPython installed on my Mac (OS X Tiger). One is version 2.6.1.0 and the other is version 2.6.0.0. I want to keep the newer version, but I can't seem to uninstall either one using the uninstall_wxPython.py script. When I run that script, I get this error message: $

Re: LARGE numbers

2005-11-11 Thread Mike Meyer
Tuvas [EMAIL PROTECTED] writes: I've been thinking about writing a program to generate the world's largest prime numbers, just for the fun of it. This would require being able to hold an 800 digit number into memory (25 megabits, or a little over 3 megs of memory for just one variable...)

Which blog do you use?

2005-11-11 Thread could ildg
I want to to get a free blog sapce these days, which has category for my posts. What blog do you use? I'll apprecaiteyour recommendation. -- http://mail.python.org/mailman/listinfo/python-list

Re: Good python reference?

2005-11-11 Thread Fredrik Lundh
derek [EMAIL PROTECTED] wrote: Hello! I'm new to the group and am looking for a decent reference for information about the history / evolution of the Python language and its features. Typing, scoping, etc... I'd appreciate any good links. $ tar xvfz Python-2.4.2.tgz $ cd Python-2.4.2 $ more

Re: modify dictionary while iterating

2005-11-11 Thread Peter Otten
[EMAIL PROTECTED] wrote: hi I wish to pop/del some items out of dictionary while iterating over it. a = { 'a':1, 'b':2 } for k, v in a.iteritems(): if v==2: del a[k] the output say RuntimeError: dictionary changed size during iteration how can i suppress this message in an

Re: modify dictionary while iterating

2005-11-11 Thread Ben Finney
[EMAIL PROTECTED] wrote: I wish to pop/del some items out of dictionary while iterating over it. Iterate over a copy. a_orig = { 'a': 1, 'b': 2 } a = dict(a_orig) for k, v in a_orig.iteritems(): if v == 2: del a[k] -- \ I know the guy who writes all

How do I bind multiple Pmw.Balloon tooltip with Buttons to the same widget?

2005-11-11 Thread Hako
hi, I find a code in FAQTs about how to bind a tooltip with a button. FAQTs link http://www.faqts.com/knowledge_base/view.phtml/aid/20565/fid/264 but not enough informatin for how to make multiple tooltip. Someone can help me and show a little example how it's done. thanks in advance. --

Re: Diff. between Class types and classic classes

2005-11-11 Thread venk
Dear Colin, Forgive me for this late reply. Your explanation was of great help to me. Thank you very much. It was crystal clear. -- http://mail.python.org/mailman/listinfo/python-list

how to start a process and get it's pid?

2005-11-11 Thread Yves Glodt
Hello, another question rose for me today... Is there a way to start an external process, in it's own context (not as the exec-() functions do), and get it's pid...? e.g.: pid = wonderfulstartprocfunction('/usr/bin/wine bla.exe') #... later if (...): os.kill(pid,9) best regards,

Re: how to start a process and get it's pid?

2005-11-11 Thread Gerhard Häring
Yves Glodt wrote: Hello, another question rose for me today... Is there a way to start an external process, in it's own context (not as the exec-() functions do), and get it's pid...? [...] Check out the subprocess module if you're using Python 2.4. Otherwise, you can always use

Re: LARGE numbers

2005-11-11 Thread Giovanni Bajo
[EMAIL PROTECTED] wrote: An early alpha-quality release is available at http://home.comcast.net/~casevh/ Given the module named Decimal in Python 2.4, I'd suggest you to rename your library. -- Giovanni Bajo -- http://mail.python.org/mailman/listinfo/python-list

RE: Looking Python script to compare two files

2005-11-11 Thread Tim Golden
[david] So if I want to use these tools: antiword,pdf2text, can I pack these tools and python script into a windows EXE file? I know there is open source tool which can pack python script and libs and generate the windows EXE file. I'm not especially qualified to answer this, but I think

output buffering

2005-11-11 Thread JD
Hello, When reading a large datafile, I want to print a '.' to show the progress. This fails, I get the series of '.'s after the data has been read. Is there a trick to fix this? Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: output buffering

2005-11-11 Thread Fredrik Lundh
JD [EMAIL PROTECTED] wrote: When reading a large datafile, I want to print a '.' to show the progress. This fails, I get the series of '.'s after the data has been read. Is there a trick to fix this? assuming that you're printing to stdout, sys.stdout.flush() should do the trick. /F

Re: derived / base class name conflicts

2005-11-11 Thread bruno at modulix
[EMAIL PROTECTED] wrote: (snip) So putting two underscores in front of an instance variable (or any identifier used inside the scope of a class statement) invokes a name mangling mechanism (snip) Is it commonplace to use underscores I assume you mean double underscore... when defining

Re: Command-line tool able to take multiple commands at one time?

2005-11-11 Thread bruno at modulix
Peter A. Schott wrote: Per subject - I realize I can copy/paste a line at a time into an interactive session when I'm trying to debug, but was wondering if there is any tool out there that allows me to copy sections of working Python scripts to paste into my interactive console and let those

Needed class whose instances are many test cases

2005-11-11 Thread Sumit
I have scinario like I have to Create resource(in __init__()) Before Running a set of testcases and then In Testcases resources are going to used and then It will cleared off after Running the testcases by destructor __del__() import unittest import time class app_adminfunc(unittest.TestCase):

Re: Newb ??

2005-11-11 Thread Norman Silverstone
did you test the script? here's a simulator: snip Fredrik, thank you very much indeed for taking the trouble to show me the way. I am sorry that I made the comment I did, that will teach me to read more carefully. It is said that there is no fool like an old fool and, as I am approaching 78

Re: MoinMoin - Can't create new pages

2005-11-11 Thread Kolossi
In case anyone else finds this thread, the solution is that for Moin = 1.3.5, the 404 handling in IIS has to be changed for the Wiki Virtual Directory. See my blog at http://www.bloglines.com/blog/Kolossi?id=13 for details. -- http://mail.python.org/mailman/listinfo/python-list

Re: XML GUI

2005-11-11 Thread Jarek Zgoda
py napisał(a): Looking for information on creating a GUI using a configuration file (like an XML file or something). Also, how do you map actions (button clicks, menu selections, etc) to the XML? Depending on GUI toolkit, you will have a range of choices: Glade for GTK, XRC for wxPython, Qt

Re: output buffering

2005-11-11 Thread JD
On 2005-11-11, Fredrik Lundh [EMAIL PROTECTED] wrote: JD [EMAIL PROTECTED] wrote: When reading a large datafile, I want to print a '.' to show the progress. This fails, I get the series of '.'s after the data has been read. Is there a trick to fix this? assuming that you're printing to

Re: SuSe 10.0 missing Idle

2005-11-11 Thread Michael Ströder
Joseph Garvin wrote: SuSE probably has a seperate package, something like python-tk, that will install IDLE. # rpm -qf `which idle` python-idle-2.4.1-3 Ciao, Michael. -- http://mail.python.org/mailman/listinfo/python-list

Re: Good python reference?

2005-11-11 Thread Hans Georg Krauthaeuser
derek schrieb: Hello! I'm new to the group and am looking for a decent reference for information about the history / evolution of the Python language and its features. Typing, scoping, etc... I'd appreciate any good links. Thanks! - Derek Looking at the title of your mail I would answer

Re: Needed class whose instances are many test cases

2005-11-11 Thread Chris Smith
Sumit == Sumit [EMAIL PROTECTED] writes: Sumit I have scinario like I have to Create resource(in Sumit __init__()) Before Running a set of testcases and then In Sumit Testcases resources are going to used and then It will Sumit cleared off after Running the testcases by

Re: Looking Python script to compare two files

2005-11-11 Thread david
Thanks Tim! I will have a try,maybe this weekend and let you know the result. -- http://mail.python.org/mailman/listinfo/python-list

Re: Needed class whose instances are many test cases

2005-11-11 Thread Ben Finney
Sumit [EMAIL PROTECTED] wrote: I have scinario like I have to Create resource(in __init__()) Before Running a set of testcases and then In Testcases resources are going to used and then It will cleared off after Running the testcases by destructor __del__() This is a poor design; your tests

creating single-instance executables using python/py2exe

2005-11-11 Thread Satchidanand Haridas
Hi, I have created an application using python/wxPython and py2exe. I have associated a certain file extension with this application so that when I double-click the file, my application is launched. The application runs fine except that a new instance is created when I double click on two

Re: how to start a process and get it's pid?

2005-11-11 Thread Fredrik Lundh
Daniel Crespo wrote: os.spawnl(os.P_NOWAIT, c:/windows/notepad.exe) 1944 I don't get the correct PID. When I do os.spawnl(os.P_NOWAIT, c:/windows/notepad.exe) I get 168 (for example), while in the tasklist appears notepad.exe with the 2476 PID. Why? not sure, but the return value

Re: LARGE numbers

2005-11-11 Thread casevh
Already done for next version. Tentatively, there will be a package called ar (Arbitrary Radix) and the module will be called BigInt. I'm also working on an arbitrary radix BigFloat module. Case -- http://mail.python.org/mailman/listinfo/python-list

Import statements for timeit module

2005-11-11 Thread ChaosKCW
Hi I was wondering if someone could help with the import statements needed to use the timeit module in the following code. I need to access the cur object. Thanks, import cx_Oracle import timeit def VerifyTagIntegrity(con, TableOwner): cur = con.cursor() sql = 'select (select count(*)

Re: how to start a process and get it's pid?

2005-11-11 Thread Daniel Crespo
Hi os.spawnl(os.P_NOWAIT, c:/windows/notepad.exe) 1944 I don't get the correct PID. When I do os.spawnl(os.P_NOWAIT, c:/windows/notepad.exe) I get 168 (for example), while in the tasklist appears notepad.exe with the 2476 PID. Why? Thanks Daniel --

Re: testing C code with python

2005-11-11 Thread Ruben Charles
On 11/10/05, Peter Hansen [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: A simple question - Is it common/good practice to test C code using Python? For example one could wrap individual C functions, and test each of them using python, maybe not for low-level things but at least for

Re: creating single-instance executables using python/py2exe

2005-11-11 Thread Sybren Stuvel
Satchidanand Haridas enlightened us with: a new instance is created when I double click on two different files. Is there a way in which I can make sure only one instance is created? You could open a listening socket to listen for open file commands. If opening that socket fails (address

Re: A Tcl/Tk programmer learns Python--any advice?

2005-11-11 Thread Roy Smith
Robert Hicks [EMAIL PROTECTED] wrote: Why does there need to be OO in the core? That is one thing I have never understood. If you want OO, get a package that fits your style of OO and package require you are off and running. That probably isn't what you would be looking at Tcl for anyway. The

Re: Needed class whose instances are many test cases

2005-11-11 Thread Roy Smith
In article [EMAIL PROTECTED], Ben Finney [EMAIL PROTECTED] wrote: This is a poor design; your tests will each be starting in a different state, and will likely not run the same way if run in a different order, making them fragile. Test cases should each run individually, from a known

Re: modify dictionary while iterating

2005-11-11 Thread Fuzzyman
Iterate over the keys ( for entry in adict.keys(): ) All the best, Fuzzy http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

something wrong in wx

2005-11-11 Thread Robert
something wrong in wx I wrote program training na Artificial Neural Network. It work well in console mode, but when I try to add GUI there is an error: FANN Error 10: Error reading info from train data file zapis.txt, line: 2 There is a code: # this work #!/usr/bin/python import

Re: Python obfuscation

2005-11-11 Thread Magnus Lycka
The Eternal Squire wrote: Two things: ... 2) Only sell to an honest customer willing to be locked into nondisclosure agreements. This goes back to the maxim of good salesmanship: Know Your Customer. If you have this, you don't need the obfuscation. --

Re: Python obfuscation

2005-11-11 Thread Magnus Lycka
petantik wrote: Alex Martelli wrote: I think that's feeble protection. If you have valuable code, and distribute it, people WILL crack it -- just check the warez sites for experimental proof... EVERYTHING that people are really interested in DOES get cracked, no matter what tricky machine-code

Re: modify dictionary while iterating

2005-11-11 Thread skip
I wish to pop/del some items out of dictionary while iterating over it. Ben Iterate over a copy. Ben a_orig = { 'a': 1, 'b': 2 } Ben a = dict(a_orig) Ben for k, v in a_orig.iteritems(): Ben if v == 2: Ben del a[k] Or iterate over

Re: Job - PYTHON Engineers, BitTorrent, Inc., San Francisco, CA

2005-11-11 Thread Jeffrey Schwab
camdenjobs wrote: PYTHON Engineers, BitTorrent, Inc., San Francisco, CA Interested candidates should forward their resumes to ... Please understand that due to the large volume of responses, I will not be able to acknowledge each of you individually. Now, that's confidence! May such

Re: output buffering

2005-11-11 Thread skip
jd When reading a large datafile, I want to print a '.' to show the jd progress. This fails, I get the series of '.'s after the data has jd been read. Is there a trick to fix this? As Fredrik indicated, you need to flush the output buffer. You might also want to check out the

Re: Python obfuscation

2005-11-11 Thread Ben Sizer
Mike Meyer wrote: Yu-Xi Lim [EMAIL PROTECTED] writes: Ben's analogy of the house is not a perfect example, but it's still a fair one. You know that if some one really wants to break into your house, he will get in, regardless of your sophisticated laser trip wire system, ex-SAS guards,

Re: What do you use as symbols for Python ?

2005-11-11 Thread Sion Arrowsmith
Gary Herron [EMAIL PROTECTED] wrote: Another similar approach that keeps those values together in a single namespace is this (my favorite): class State: OPENED, CLOSED, ERROR = range(3) Then you can refer to the values as State.OPENED State.CLOSED State.ERROR The extra

Re: Python obfuscation

2005-11-11 Thread Ben Sizer
Mike Meyer wrote: There are ways to distribute Python modules so that the user can't just open them in a text editor. There are also ways to get cryptographic security for distributed modules. I know distributing as bytecode helps, but I was under the impression that the disassembers worked

Re: modify dictionary while iterating

2005-11-11 Thread François Pinard
[EMAIL PROTECTED] I wish to pop/del some items out of dictionary while iterating over it. a = { 'a':1, 'b':2 } for k, v in a.iteritems(): if v==2: del a[k] A simple change would be using items() instead of iteritems(). Or else, you may prefer to loop over keys, and retrieve values,

Re: help make it faster please

2005-11-11 Thread Sion Arrowsmith
[EMAIL PROTECTED] wrote: Oh sorry indentation was messed here...the wordlist = countDict.keys() wordlist.sort() should be outside the word loop now def create_words(lines): cnt = 0 spl_set = '[,;{}_?!():-[\.=+*\t\n\r]+' for content in lines: words=content.split()

Re: Abstract Base Classes

2005-11-11 Thread Colin J. Williams
Ben Finney wrote: Howdy all, Okay, so Guido doesn't like Abstract Base Classes[0], and interfaces are the way of the future[1]. But they're not here now, and I understand ABCs better. This is a very interesting discussion - not all of it understandable to me. Are interfaces really in our

Re: gmpy 1.01 rc near... anybody wanna test

2005-11-11 Thread Alex Martelli
[EMAIL PROTECTED] wrote: I've created Windows binaries for Python 2.3 and 2.4. It should be compatible with PentiumPro or later processors. Thanks! I hope to package up a release early next week, and to include these. Alex -- http://mail.python.org/mailman/listinfo/python-list

Re: Newb ??

2005-11-11 Thread Alex Martelli
Norman Silverstone [EMAIL PROTECTED] wrote: ... Incidentally, I am only just starting to learn about functions and have not come across the module 're'. Also why is it (lo+hi)//2 and not (lo+hi)/2. Using // ensures truncation, which is what you want. A single / may mean truncating division

Re: how to start a process and get it's pid?

2005-11-11 Thread Daniel Crespo
import subprocess p = subprocess.Popen(c:/windows/notepad.exe) p.pid 1948 Yes, it works. But in my case, I need to run the program totally separated from my main program. So, when I start a new program through subprocess, it doesn't unlink. I mean, if I close my main app, so does the

Is there a built-in method for transforming (1, None, Hello!) to 1, None, Hello!?

2005-11-11 Thread Daniel Crespo
Is there a built-in method for transforming (1,None,Hello!) to 1,None,Hello!? Thanks -- http://mail.python.org/mailman/listinfo/python-list

Calling values from a webform to Python

2005-11-11 Thread mjakowlew
hi, I'm trying to pass some values from a webform into a python script. ___ html form action=proccessForm.py pName: input type=text name=filename//p pEmail: input type=text name=title//p pinput type=submit name=submit value= Submit /p /form /html

Re: how to start a process and get it's pid?

2005-11-11 Thread Daniel Crespo
not sure, but the return value looks like a PID, so maybe you're seeing the PID for the cmd.exe instance used to run the program. or something. No. There wasn't a 196 PID for any of the processes. -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a built-in method for transforming (1, None, Hello!) to 1, None, Hello!?

2005-11-11 Thread Grant Edwards
On 2005-11-11, Daniel Crespo [EMAIL PROTECTED] wrote: Is there a built-in method for transforming (1,None,Hello!) to 1,None,Hello!? What transformation? The two are identical: x = (1,None,Hello!) y = 1,None,Hello! x == y True -- Grant Edwards grante Yow!

Re: Import statements for timeit module

2005-11-11 Thread bruno at modulix
ChaosKCW wrote: Hi I was wondering if someone could help with the import statements needed to use the timeit module in the following code. I need to access the cur object. Thanks, import cx_Oracle import timeit def VerifyTagIntegrity(con, TableOwner): cur = con.cursor()

Re: Is there a built-in method for transforming (1, None, Hello!) to 1, None, Hello!?

2005-11-11 Thread [EMAIL PROTECTED]
do you mean this ? otherwise, don't know what you want. a, b, c = (1, None, Hello!) Daniel Crespo wrote: Is there a built-in method for transforming (1,None,Hello!) to 1,None,Hello!? Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a built-in method for transforming (1, None, Hello!) to 1, None, Hello!?

2005-11-11 Thread Simon Brunning
On 11 Nov 2005 07:21:46 -0800, Daniel Crespo [EMAIL PROTECTED] wrote: Is there a built-in method for transforming (1,None,Hello!) to 1,None,Hello!? There's no conversion to do: (1,None,Hello!) (1, None, 'Hello!') 1,None,Hello! (1, None, 'Hello!') They are both tuples contining identicle

This Week in PyPy 2

2005-11-11 Thread Michael Hudson
Introduction This is the second of what will hopefully be many summaries of what's been going on in the world of PyPy in the last week. I'd still like to remind people that when something worth summarizing happens to recommend if for This Week in PyPy as mentioned on:

Re: derived / base class name conflicts

2005-11-11 Thread christopherlmarshall
I see what you mean now. It would indeed be enlightening if I wanted to study the internals of Tkinter, and perhaps one day I will. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python obfuscation

2005-11-11 Thread Mike Meyer
Ben Sizer [EMAIL PROTECTED] writes: A recent, heavily publicized case where Sony added copy protection to a product cost them sales, and from what I've heard, even legal fees. I think that's a poor example - the cost hasn't come from the mere act of adding protection, but the method in which

Re: LARGE numbers

2005-11-11 Thread Alex Martelli
[EMAIL PROTECTED] wrote: ... Python does support large numbers, but it's not very fast for such large numbers. There is a Python module called GMPY that uses the GMP (Gnu Multiple Precision) library for faster operations on large numbers. As the author of gmpy, I'd like to point out that

Re: derived / base class name conflicts

2005-11-11 Thread christopherlmarshall
Your suggestion ('_name' - implementation, 'name' - API) makes sense as a convention between programmers that know a fair amount about each other's classes before using them. I don't think it is reasonable in general to only subclass from base classes you have studied the full API of, however.

Re: Newb ??

2005-11-11 Thread Fredrik Lundh
Norman Silverstone wrote: did you test the script? here's a simulator: snip Fredrik, thank you very much indeed for taking the trouble to show me the way. I am sorry that I made the comment I did, that will teach me to read more carefully. It is said that there is no fool like an old

Re: Import statements for timeit module

2005-11-11 Thread Alex Martelli
ChaosKCW [EMAIL PROTECTED] wrote: So timeit is mostly useless then ? No, it's a precious jewel, but if you want to use it you must allow it to import the code you want it to run. Alex -- http://mail.python.org/mailman/listinfo/python-list

Re: how to start a process and get it's pid?

2005-11-11 Thread Yves Glodt
Gerhard Häring wrote: Yves Glodt wrote: Hello, another question rose for me today... Is there a way to start an external process, in it's own context (not as the exec-() functions do), and get it's pid...? [...] Check out the subprocess module if you're using Python 2.4. Otherwise,

Re: derived / base class name conflicts

2005-11-11 Thread Alex Martelli
[EMAIL PROTECTED] wrote: ... I don't think it is reasonable in general to only subclass from base classes you have studied the full API of, however. The double I think you underestimate the level of coupling that inevitably occurs between base and derived classes. In general, such coupling

Inserting Records into SQL Server - is there a faster interface than ADO

2005-11-11 Thread geskerrett
I have a program that reads records from a binary file and loads them into an MS-SQL Server database. It is using a stored proc, passing the parameters. I am using pywin32 to create a connection object. Once the connection is open I simple pass the SQL formatted commands using

Re: Is there a built-in method for transforming (1, None, Hello!) to 1, None, Hello!?

2005-11-11 Thread Alex Martelli
Daniel Crespo [EMAIL PROTECTED] wrote: Is there a built-in method for transforming (1,None,Hello!) to 1,None,Hello!? You're mentioning two different literal syntaxes for the same object (a tuple) -- the one with parentheses works everywhere, the other one _almost_ everywhere (not where

Nufox : Nouveaux examples...

2005-11-11 Thread Salvatore
Sur : http://www.salvatore.exolia.net:9090/ (Nécessite Firefox ou Mozilla) Cordialement Salvatore. -- http://mail.python.org/mailman/listinfo/python-list

Re: LARGE numbers

2005-11-11 Thread Paul Rubin
[EMAIL PROTECTED] (Alex Martelli) writes: As the author of gmpy, I'd like to point out that the speed difference isn't all that large, if all you're doing is ordinary arithmetic -- a few times at most (it can be better if you need some of GMP's functionality which gmpy exposes, such as

Re: Python obfuscation

2005-11-11 Thread petantik
Ben Sizer wrote: Mike Meyer wrote: There are ways to distribute Python modules so that the user can't just open them in a text editor. There are also ways to get cryptographic security for distributed modules. I know distributing as bytecode helps, but I was under the impression that

Re: Import statements for timeit module

2005-11-11 Thread ChaosKCW
So timeit is mostly useless then ? -- http://mail.python.org/mailman/listinfo/python-list

Re: gmpy 1.01 rc near... anybody wanna test

2005-11-11 Thread David Gutierrez
Include me in your list, please. David From: [EMAIL PROTECTED] (Alex Martelli) To: python-list@python.org Subject: Re: gmpy 1.01 rc near... anybody wanna test Date: Fri, 11 Nov 2005 07:10:01 -0800 MIME-Version: 1.0 Received: from smtp-vbr7.xs4all.nl ([194.109.24.27]) by mc10-f5.hotmail.com

Re: Python obfuscation

2005-11-11 Thread Mike Meyer
Ben Sizer [EMAIL PROTECTED] writes: Mike Meyer wrote: There are ways to distribute Python modules so that the user can't just open them in a text editor. There are also ways to get cryptographic security for distributed modules. As for cryptographic security, could you provide a link or

Re: Nufox : Nouveaux examples...

2005-11-11 Thread bruno at modulix
Salvatore wrote: Sur : http://www.salvatore.exolia.net:9090/ (Nécessite Firefox ou Mozilla) pardon-my-french Heu, Salvatore, tu te serais pas un peu trompé de ng, là ?-) (x-post et fu2 f.c.l.py) /pardon-my-french -- bruno desthuilliers python -c print '@'.join(['.'.join([w[::-1] for w in

Nufox : New examples

2005-11-11 Thread Salvatore
On : http://www.salvatore.exolia.net:9090/ (Firefox ou Mozilla) Regards -- http://mail.python.org/mailman/listinfo/python-list

Re: Inserting Records into SQL Server - is there a faster interface than ADO

2005-11-11 Thread Jarek Zgoda
[EMAIL PROTECTED] napisał(a): Is there a faster method I can use to connect to the SQL server ? Or does anyone have any optimization tips the can offer ? This has nothing with python, but the fastest way to load large amount of data to MS SQL Server database is DTS import from flat file. To

Re: Inserting Records into SQL Server - is there a faster interface than ADO

2005-11-11 Thread Alan Kennedy
[EMAIL PROTECTED] I have a program that reads records from a binary file and loads them into an MS-SQL Server database. It is using a stored proc, passing the parameters. [snip] So my questions is Is there a faster method I can use to connect to the SQL server ? Or does anyone have

Re: Calling values from a webform to Python

2005-11-11 Thread bruno at modulix
mjakowlew wrote: hi, I'm trying to pass some values from a webform into a python script. (snip) Also this is done through Zope if that makes a difference to anyone. Yes, it makes a difference. Zope is a world in itself, and is slighty OT here. Note that there's a Zope mailing-list:

Re: LARGE numbers

2005-11-11 Thread Scott David Daniels
Paul Rubin wrote: [EMAIL PROTECTED] (Alex Martelli) writes: For numbers of this size, won't gmpy use FFT-based multiplication? That's potentially orders of magnitude faster than ordinary n**2 multiplication. But Python is no slouch with its use of Karatsuba multiplication. (in other words,

Re: Python-based Document Management System?

2005-11-11 Thread W. Borgert
If you search for CONTENT management system, there is Plone: A user-friendly and powerful open source Content Management ... http://plone.org/ No, I'm looking for a DMS, not a CMS. My impression from the Plone web page is, that it does not have DMS features. Cheers, WB --

Re: Python-based Document Management System?

2005-11-11 Thread Fredrik Lundh
W. Borgert wrote: If you search for CONTENT management system, there is Plone: A user-friendly and powerful open source Content Management ... http://plone.org/ No, I'm looking for a DMS, not a CMS. My impression from the Plone web page is, that it does not have DMS features. maybe

Re: Import statements for timeit module

2005-11-11 Thread Scott David Daniels
bruno at modulix wrote: ChaosKCW wrote: Hi I was wondering if someone could help with the import statements needed to use the timeit module in the following code. I need to access the cur object. Thanks, ... 'cur' is local to the function, so it's not an attribute of your module, so you

Re: Inserting Records into SQL Server - is there a faster interfacethan ADO

2005-11-11 Thread Scott David Daniels
Alan Kennedy wrote: [EMAIL PROTECTED] I have a program that reads records from a binary file and loads them into an MS-SQL Server database. It is using a stored proc, passing the parameters. So my questions is Is there a faster method I can use to connect to the SQL server ? Or

Re: Lie Hetland book: Beginning Python..

2005-11-11 Thread Scott David Daniels
Magnus Lycka wrote: Vittorio wrote: Using the same symbol for both string substitutions and SQL placeholder such as pysqlite 1 and the MySQL interface does, is not really a bright idea in my opinion. Who thinks this is pretty? sql = SELECT %s FROM %s WHERE %s = %%s cur.execute(sql %

Re: LARGE numbers

2005-11-11 Thread casevh
Paul Rubin wrote: [EMAIL PROTECTED] (Alex Martelli) writes: As the author of gmpy, I'd like to point out that the speed difference isn't all that large, if all you're doing is ordinary arithmetic -- a few times at most (it can be better if you need some of GMP's functionality which gmpy

Re: LARGE numbers

2005-11-11 Thread Paul Rubin
[EMAIL PROTECTED] writes: Python's native longs use Karatsuba multiplication with is O(n^1.585). My early version of DecInt (BigDecimal) uses 4-way Toom-Cook ... Wow, cool! Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Invoking Python from Python

2005-11-11 Thread Scott David Daniels
Cameron Laird wrote: ... I should make that explicit: application developers, you don't have to tell customers everything your programs do. Your obligation is to make 'em meet requirements. If it helps *you* that they do more, so be it. I'd agree with the proviso that you at least inform

Re: Import statements for timeit module

2005-11-11 Thread bruno at modulix
ChaosKCW wrote: So timeit is mostly useless then ? I wouldn't say so. -- bruno desthuilliers python -c print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for p in '[EMAIL PROTECTED]'.split('@')]) -- http://mail.python.org/mailman/listinfo/python-list

RE: Inserting Records into SQL Server - is there a faster interface thanADO

2005-11-11 Thread Tim Golden
[EMAIL PROTECTED] I have a program that reads records from a binary file and loads them into an MS-SQL Server database. It is using a stored proc, passing the parameters. I am using pywin32 to create a connection object. Once the connection is open I simple pass the SQL formatted

Re: What do you use as symbols for Python ?

2005-11-11 Thread Scott David Daniels
Sion Arrowsmith wrote: ... class State: Enum = range(3) OPENED, CLOSED, ERROR = Enum Names = { OPENED: OPENED, CLOSED: CLOSED, ERROR: ERROR } so you can used State.Names[state] to provide something user-readable, ... Or use a function like: def named(value, classes): for

Re: output buffering

2005-11-11 Thread Larry Bates
This is something I wrote that might help. http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/299207 -Larry Bates JD wrote: Hello, When reading a large datafile, I want to print a '.' to show the progress. This fails, I get the series of '.'s after the data has been read. Is there a

Re: testing C code with python

2005-11-11 Thread Scott David Daniels
[EMAIL PROTECTED] wrote: A simple question - Is it common/good practice to test C code using Python? I certainly do such testing (hand-wrapped, because it doesn't seem to cost too much time to do so. Usually I develop in Python and accumulate my tests there, then write the C equivalent, and

PIL- error message- cannot open libtiff.so.3

2005-11-11 Thread Tuvas
Okay, so I've been getting this error message when trying to use PIL to open a JPEG, that there isn't a library by the name of libtiff.so.3 . I've been searching the documentation, there isn't any reference to this library. Also, I don't know why it's doing this as I'm trying to open a JPEG, and

Re: testing C code with python

2005-11-11 Thread christopherlmarshall
I have recently started using tcl to do this with C++ code and will soon be switching to doing it with python. I think it is a fantastic way to arrange to test C++ and C code. Python makes an excellent test-harness, and writing interfaces for complex units of C++ code to enable them to be tested

Dynamically Update Class Definitions?

2005-11-11 Thread chrisspen
Is there a way to loop through all instantiated objects and update their classes when a source file changes? I know about Michael Hudson's method (http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/160164), but you have to modify all your classes to subclass AutoReloader. Is there something

Re: LARGE numbers

2005-11-11 Thread Tuvas
Well, as I'll be doing lots of multiplication, guess that GMPY is the way to go. I'll use DecInt only for converting to strings if I find anything interesting. This is all just kind of a theoretical aproach, but, it can be lots of fun. Who knows if Python'll help find the largest prime number

Re: What do you use as symbols for Python ?

2005-11-11 Thread Daniel Evers
Hi! Never would have thought of this... I mixed this with the class-version and created a new class derived from str for easier printing and added an iterator: --- class Enum: class Type(str): def __init__(self, name): self.__name = name

Re: PIL- error message- cannot open libtiff.so.3

2005-11-11 Thread Fredrik Lundh
Tuvas wrote: Okay, so I've been getting this error message when trying to use PIL to open a JPEG, that there isn't a library by the name of libtiff.so.3 . I've been searching the documentation, there isn't any reference to this library. Also, I don't know why it's doing this as I'm trying to

  1   2   3   >