Matplotlib w/ TK Backend.

2005-06-07 Thread Kenneth Miller
Hello All, I need a python module to do real time graphs so I chose Matplotlib. I am trying to compile matplotlib at the moment and I have some problems, well not really. It compiles fine, it's how it compiles that's the problem. I am attempting to build it with the Tkinter backend as o

Re: computer algebra packages

2005-06-07 Thread Kay Schluehr
Rahul wrote: > Hi. > Well is there an open source computer algebra system written in python > or at least having a python interface? > I know of 2 efforts: pythonica and pyginac...are there any others? > > rahul Not in the moment. But I have a question to you: why do you seek for a CAS in Python?

Garbage collection with QT

2005-06-07 Thread Marco Bartel
Hello, I got a question regarding garbage collection in python when using PyQT. How can i safely get rid of an Object instance and delete it permanently. For example when having a QTable with a bunch of records inside and closing the window hosting it, the memory space will not being freed up an

OO re-factoring (was Pythonese/Efficiency/Generalese critique [on Tutor])

2005-06-07 Thread Lee Cullens
In my original post I noted my recent exposure to Python and put up a little utility to my iDisk asking for a Pythonese/Efficiency/ Generalese critique. Javier, Kent and Liam were gracious enough to offer comments, which were greatly appreciated. To follow through with the learning exercis

Re: reloading my own modules

2005-06-07 Thread Lowell Kirsh
Hi, Skip Montanaro wrote: > Also, since it's clear you have already imported dbtest and util, there's no > need to check in sys.modules: > > import dbtest, util > reload(dbtest) > reload(util) Won't this load the modules twice on the first run? I only want to load the modules once e

Re: import error using BOOST in linux

2005-06-07 Thread Jesper Olsen
Have you set LD_LIBRARY_PATH ? -Jesper -- http://mail.python.org/mailman/listinfo/python-list

Re: separate IE instances?

2005-06-07 Thread J Correia
>Chris Curvey" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > thanks for all the help. I'll give the ShellExecute() approach a try > in the morning. > > The short version of what I'm trying to do is > > Have my website login to a 3rd party website on behalf of my customer, > fil

some profiler questions

2005-06-07 Thread Mac
I'm writing a bunch of algorithms in Python for solving a certain class of problems, and I was interested in doing some comparisons between them and would like to collect various high-level runtime stats, such as the number of invocations of certain key subroutines. I have my own code to do this.

need some cgi help please

2005-06-07 Thread nephish
Hey there. Here is the deal i have a script that is supposed to open a file based on criteria from a web form. i cant seem to get it to work though. here is the code: form = cgi.FieldStorage() DataRecord = form['DataTime'].value Customer = form['CustName'].value # should be automatically fill

Re: xmlrpclib - methodHelp doesn't work

2005-06-07 Thread [EMAIL PROTECTED]
oh. missed that one. thanks a lot. -- http://mail.python.org/mailman/listinfo/python-list

Re: Binary numbers

2005-06-07 Thread [EMAIL PROTECTED]
Douglas Soares de Andrade wrote: > Hi ! > > How to work with binary numbers in python ? Is there a way to print a number > in its binary form like we do with oct() or hex() ? > > Im doing a project that i have to work with binaries and i tired of convert > numbers to string all the time to perfor

Re: Binary numbers

2005-06-07 Thread Kent Johnson
Douglas Soares de Andrade wrote: > Hi ! > > How to work with binary numbers in python ? Is there a way to print a number > in its binary form like we do with oct() or hex() ? This is a popular topic in the Python Cookbook, maybe one of these recipes will suit you: http://aspn.activestate.com/AS

Re: Help! File objects and scoping

2005-06-07 Thread Dave Benjamin
bens wrote: > I'm trying to return an 'mmap' object from a function. The return > works, but some of the object's methods crash. Here are two examples > > doesntwork.py > --- > import mmap > import os > > name="/any/real/file/on/my/hard/drive" > > def getfile(name): >

Re: Help! File objects and scoping

2005-06-07 Thread Kent Johnson
bens wrote: > I'm trying to return an 'mmap' object from a function. The return > works, but some of the object's methods crash. Here are two examples > > doesntwork.py > --- > import mmap > import os > > name="/any/real/file/on/my/hard/drive" > > def getfile(name): >

Re: separate IE instances?

2005-06-07 Thread Chris Curvey
thanks for all the help. I'll give the ShellExecute() approach a try in the morning. The short version of what I'm trying to do is Have my website login to a 3rd party website on behalf of my customer, fill out a form, and submit it. I'm just using CGI to keep things simple, but overlapping

Re: Trouble Encoding

2005-06-07 Thread Kent Johnson
John Roth wrote: > <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >> I'm using feedparser to parse the following: >> >> Adv: Termite Inspections! Jenny Moyer welcomes >> you to her HomeFinderResource.com TM A "MUST See … >> >> I'm receiveing the following error when i try

Re: Binary numbers

2005-06-07 Thread Douglas Soares de Andrade
Hi ! Pardon me, but what itoa has to do it the history ? See ya ! Em Quarta 08 Junho 2005 00:34, Dan Bishop escreveu: > Douglas Soares de Andrade wrote: > > Hi ! > > > > How to work with binary numbers in python ? Is there a way to print a > > number in its binary form like we do with oct() or h

Re: Binary numbers

2005-06-07 Thread Dan Bishop
Douglas Soares de Andrade wrote: > Hi ! > > How to work with binary numbers in python ? Is there a way to print a number > in its binary form like we do with oct() or hex() ? > > Im doing a project that i have to work with binaries and i tired of convert > numbers to string all the time to perform

Binary numbers

2005-06-07 Thread Douglas Soares de Andrade
Hi ! How to work with binary numbers in python ? Is there a way to print a number in its binary form like we do with oct() or hex() ? Im doing a project that i have to work with binaries and i tired of convert numbers to string all the time to perform some operations. I searched about it in ma

Help! File objects and scoping

2005-06-07 Thread bens
I'm trying to return an 'mmap' object from a function. The return works, but some of the object's methods crash. Here are two examples doesntwork.py --- import mmap import os name="/any/real/file/on/my/hard/drive" def getfile(name): somefile=file(name, 'r+b') mm

Re: how to export data from ZODB to text files

2005-06-07 Thread John J. Lee
[EMAIL PROTECTED] (ls) writes: > Hi Peter, > > Thank you for your reply. I already can access file using code > > > >>> from ZODB import FileStorage, DB > >>> storage = > FileStorage.FileStorage('mydatabase.fs') > >>> db = DB(storage) > >>> connection = db.open() >

Re: method = Klass.othermethod considered PITA

2005-06-07 Thread John J. Lee
Steven Bethard <[EMAIL PROTECTED]> writes: > John J. Lee wrote: > > Steven Bethard <[EMAIL PROTECTED]> writes: > >>In Python 2.4: > >> > >>py> class A(object): > >>... def foo(self): > >>... print 'foo' > >>... bar = foo > >>... > >>py> import pickle > >>py> pickle.loads(pickle.dump

Re: method = Klass.othermethod considered PITA

2005-06-07 Thread John J. Lee
Erik Max Francis <[EMAIL PROTECTED]> writes: [...] > requesting. In my particular case, there isn't much need to make sure > things are properly overridden in subclasses, since functionality > tends to get added, rather than modified. (The "Why would you want to [...] Well done, have this gold s

Re: Controlling source IP address within urllib2

2005-06-07 Thread John J. Lee
"Dan" <[EMAIL PROTECTED]> writes: > John, > Thanks for your input. I can kind of see the light in this, but I'm > having difficulty knowing where the "do_open" method comes from. Also, AbstractHTTPHandler > I'll need to follow redirects, so I assume then I would add a > HTTPRedirectHandler in

Re: School Administration Software

2005-06-07 Thread Larry Bates
You may want to take a look at: Centre http://www.miller-group.net/ Open Admin http://richtech.ca/openadmin/about.html A low cost, but pretty mature package is also available: SchoolMation http://www.schoolmation.net/schoolmationweb/main/index.php I don't have personal experience, but Google t

computer algebra packages

2005-06-07 Thread Rahul
Hi. Well is there an open source computer algebra system written in python or at least having a python interface? I know of 2 efforts: pythonica and pyginac...are there any others? rahul -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython: GridBagSizer, EXPAND, and HtmlListBox

2005-06-07 Thread Adam Endicott
Just an update if anyone runs across this through google. It appears this was an issue fixed in 2.6.0.1 (or 2.6.1.0, I forget which exactly). I was using 2.6.0.0. -- http://mail.python.org/mailman/listinfo/python-list

Re: SMTP help please

2005-06-07 Thread Mike Meyer
Martin Franklin <[EMAIL PROTECTED]> writes: > server = smtplib.SMTP("mailserver.somewhere.com") Why are you beating up Kee's mail server (hint: "whois somewhere.com")? See RFC 2606 http://www.ietf.org/rfc/rfc2606.txt > and search for "example.com" for how to pick example domain names properly.

Re: Reading a CSV file into a list of dictionaries

2005-06-07 Thread Robert Kern
Laurent RAHUEL wrote: > I thought you knew the number of cols and what you should expect in each. > Then it sounded pretty easy to build a list of dictionaries. If you don't > know what you're supposed to find in your file and how this file is > structured I guess you don't know what you are doing

Re: time consuming loops over lists

2005-06-07 Thread Andrea Griffini
On Tue, 07 Jun 2005 23:38:29 +0200, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: >> I don't see a "break" so why the "/2" ? also IIUC the > >That was the assumption of an equal distribution of the data. In >O-notationn this would be O(n) of course. It was a joke ... the issue is that there was

Re: time consuming loops over lists

2005-06-07 Thread John Machin
Diez B. Roggisch wrote: > [EMAIL PROTECTED] wrote: > >> X-No-Archive: yes >> Can some one help me improve this block of code...this jus converts the >> list of data into tokens based on the range it falls into...but it >> takes a long time.Can someone tell me what can i change to improve >> it...

Re: programmnig advise needed

2005-06-07 Thread Andrea Griffini
On 7 Jun 2005 12:14:45 -0700, [EMAIL PROTECTED] wrote: >I am writing a Python program that needs to read XML files and contruct >a tree object from the XML file (using wxTree). Supposing your XML file has a single top level node (so that it's a legal XML file) then the following code should be ab

Re: Reading a CSV file into a list of dictionaries

2005-06-07 Thread Laurent RAHUEL
John Machin wrote: > Laurent RAHUEL wrote: >> RFQ wrote: >> >> >>>Hi, I'm struggling here to do the following with any success: >>> >>>I have a comma delimited file where each line in the file is something >>>like: >>> >>>PNumber,3056,Contractor,XYZ Contracting,Architect,ABC Architects,... >> >

Re: time consuming loops over lists

2005-06-07 Thread Diez B. Roggisch
> I don't see a "break" so why the "/2" ? also IIUC the That was the assumption of an equal distribution of the data. In O-notationn this would be O(n) of course. Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: Trouble Encoding

2005-06-07 Thread John Roth
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'm using feedparser to parse the following: > > Adv: Termite Inspections! Jenny Moyer welcomes > you to her HomeFinderResource.com TM A "MUST See … > > I'm receiveing the following error when i try to print the feedparser > pars

Re: SMTP help please

2005-06-07 Thread Ivan Shevanski
>From: Larry Bates <[EMAIL PROTECTED]> >To: Ivan Shevanski <[EMAIL PROTECTED]> >Subject: Re: SMTP help please >Date: Tue, 07 Jun 2005 07:39:01 -0500 > >I have found that the SmtpWriter class "hides" all the >complexity in creating emails like you want to send. > >Check it out here: > >http://moti

Re: poker card game revisited (code included)

2005-06-07 Thread flupke
Erik Max Francis wrote: > flupke wrote: > First of all, my apologies for the double posts. I can only see this reply and can't see my original messages. I posted the message from home and work and they didn't show up. We use the same isp at home and at work so it's probably a problem on their

Re: time consuming loops over lists

2005-06-07 Thread Andrea Griffini
On Tue, 07 Jun 2005 18:13:01 +0200, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: >Another optimization im too lazy now would be to do sort of a "tree >search" of data[i] in rngs - as the ranges are ordered, you could find >the proper one in log_2(len(rngs)) instead of len(rngs)/2. I don't see

Re: file permissions on windows XP (home)

2005-06-07 Thread barney
Thanks, I tried creating a test file but I get "Access is denied" from windows explorer! The folder appears to be read only but when I try and uncheck read only/apply/repopen the folder properties its still read only. This read only flag seems to propagate down from the My Music directory but unch

Re: split up a list by condition?

2005-06-07 Thread Andrew Dalke
Reinhold Birkenfeld wrote: >>> So I think: Have I overlooked a function which splits up a sequence >>> into two, based on a condition? Such as >>> >>> vees, cons = split(wlist[::-1], lambda c: c in vocals) > This is clear. I actually wanted to know if there is a function which I > overlooked whic

Re: separate IE instances?

2005-06-07 Thread J Correia
> "Chris Curvey" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > I would have given up on this a long time ago, but I can create two > > IEXPLORE processes simultaneously (and get the behavior I want) by just > > manually launching them from the Start menu. (Of course, that does

Re: Trouble Encoding

2005-06-07 Thread Jarek Zgoda
[EMAIL PROTECTED] napisał(a): > why is it even trying latin-1 at all? I don't see it anywhere in > feedparser.py or my code. Check your site.py or sitecustomize.py module, you can have non-standard default encoding set there. -- Jarek Zgoda http://jpa.berlios.de/ | http://www.zgodowie.org/ --

Re: ANN: ActivePython 2.4.1 for Mac OS X is now available!

2005-06-07 Thread Trent Mick
> Trent Mick wrote: > >Meanwhile, some of you may be interested to know that we are busily > >working on bringing Komodo to Mac OS X. We expect to offer a beta in > >August and release later this year. [John Abel wrote] > Komodo for OSX? Now that's something I would be interested in > purchasing.

import error using BOOST in linux

2005-06-07 Thread GujuBoy
i am using BOOST in linux with python and i can compile my CPP file just fine to make a .so but everytime i do a import i get this error >>> import dirgesh Traceback (most recent call last): File "", line 1, in ? ImportError: libboost_python.so.1.32.0: cannot open shared object file: No such fil

Re: Reading a CSV file into a list of dictionaries

2005-06-07 Thread John Machin
Laurent RAHUEL wrote: > RFQ wrote: > > >>Hi, I'm struggling here to do the following with any success: >> >>I have a comma delimited file where each line in the file is something >>like: >> >>PNumber,3056,Contractor,XYZ Contracting,Architect,ABC Architects,... > > > This is NOT a CSV file. A CS

Re: split up a list by condition?

2005-06-07 Thread Paul McGuire
Re-run this with the input string "The quick brown fox is named 'Aloysius'." and we discover that 'A', 'y', "'" and '.' are also consonants. (Actually, this is bug-compatible with the OP's original example.) -- Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: Help with SMTP

2005-06-07 Thread Ivan Shevanski
Ok, all my problems are solved except for one. . .If I want my program to send a message back to me do I need the from adress? Because I don't specifically know it for the person using the program. Any help is appreciated =D -Ivan ___

Re: Trouble Encoding

2005-06-07 Thread fingermark
why is it even trying latin-1 at all? I don't see it anywhere in feedparser.py or my code. deelan wrote: > [EMAIL PROTECTED] wrote: > > I'm using feedparser to parse the following: > > > > Adv: Termite Inspections! Jenny Moyer welcomes > > you to her HomeFinderResource.com TM A "MUST See …

Re: split up a list by condition?

2005-06-07 Thread Grooooops
> vees, cons = [], [] > [(vees, cons)[ch in vocals].append(ch) for ch in wlist] Wow, that's horribly twisted Reinhold... I spent about an hour last night trying something similar, to no end... :) Neat tricks people... I like Duncan's use of "or" to solve it. I didn't see that in the python docs o

Re: Reading a CSV file into a list of dictionaries

2005-06-07 Thread Laurent RAHUEL
RFQ wrote: > Hi, I'm struggling here to do the following with any success: > > I have a comma delimited file where each line in the file is something > like: > > PNumber,3056,Contractor,XYZ Contracting,Architect,ABC Architects,... This is NOT a CSV file. A CSV file would be : PNumber,Contracto

Re: Wxpython demo crashes

2005-06-07 Thread Greg Krohn
Pekka Karjalainen wrote: > I'm using WinXP (Finnish), Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC > v.1310 32 bit (Intel)] on win32 and wxPython 2.6.0.1. > > When I go to the Process and Events section in the wxDemo and run the > Process demo, bad things can happen. It crashes. I think the cras

Re: different time tuple format

2005-06-07 Thread [EMAIL PROTECTED]
In your case it is the EEST, as this is the DST timezone (see again: http://docs.python.org/lib/module-time.html) ** [EMAIL PROTECTED]:~ $ python ** Python 2.4.1 (#2, Mar 30 2005, 21:51:10) ** [GCC 3.3.5 (Debian 1:3.3.5-8ubuntu2)] on linux2 ** Type "help", "copyright", "credits" or "license" for m

Re: split up a list by condition?

2005-06-07 Thread Reinhold Birkenfeld
Duncan Booth wrote: > Reinhold Birkenfeld wrote: > >> Hi, >> >> while writing my solution for "The python way?", I came across this >> fragment: >> >> vees = [c for c in wlist[::-1] if c in vocals] >> cons = [c for c in wlist[::-1] if c not in vocals] >> >> So I think: Have I overlooke

Re: split up a list by condition?

2005-06-07 Thread Reinhold Birkenfeld
Raymond Hettinger wrote: >>> while writing my solution for "The python way?", I came across this >>> fragment: >>> vees = [c for c in wlist[::-1] if c in vocals] >>> cons = [c for c in wlist[::-1] if c not in vocals] >>> >>> So I think: Have I overlooked a function which splits up a sequence >>> i

Re: different time tuple format

2005-06-07 Thread Maksim Kasimov
Rick Holbert wrote: > Like the last poster said, use %Z. On my Mandriva Linux system I get the > following results: > > time.localtime() > > (2005, 6, 7, 15, 7, 12, 1, 158, 1) > time.strptime("2005-06-07 15:07:12 EDT", "%Y-%m-%d %H:%M:%S %Z") > (2005, 6, 7, 15, 7, 12, 1, 158, 1) does

Re: DB API 2.0 and transactions

2005-06-07 Thread vincent wehren
"Christopher J. Bottaro" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] | Hi, | Why is there no support for explicit transactions in the DB API? I mean | like transaction() to start the trans and commit() and rollback() would end | the trans or something. | | The reason why I as

programmnig advise needed

2005-06-07 Thread mitsura
Hi, I am writing a Python program that needs to read XML files and contruct a tree object from the XML file (using wxTree). The XML however is not an hiearchical XML file. It contains and tags. The tags link the elements together. Example: ... element 1 attributes ... element 2 attribute

Re: the python way?

2005-06-07 Thread Reinhold Birkenfeld
Andrew Dalke wrote: > Reinhold Birkenfeld wrote: >> To make it short, my version is: >> >> import random >> def reinterpolate2(word, vocals='aeiouy'): >> wlist = list(word) >> random.shuffle(wlist) >> vees = [c for c in wlist[::-1] if c in vocals] >> cons = [c for c in wlist[::-1]

Re: different time tuple format

2005-06-07 Thread Rick Holbert
Like the last poster said, use %Z. On my Mandriva Linux system I get the following results: >>> time.localtime() (2005, 6, 7, 15, 7, 12, 1, 158, 1) >>> time.strptime("2005-06-07 15:07:12 EDT", "%Y-%m-%d %H:%M:%S %Z") (2005, 6, 7, 15, 7, 12, 1, 158, 1) Rick Maksim Kasimov wrote: > hi all, sorry

Re: poker card game revisited (code included)

2005-06-07 Thread Erik Max Francis
flupke wrote: > i've included the code so people can take a look. > I've tried to expand on the thread of 26/05/2005 on "Checking for a full > house". Code is suboptimal as I coded it rather quickly. > I've added the "normal" classes one would expect from a cardgame: card, > deck, hand etc. > > 1

Wxpython demo crashes

2005-06-07 Thread Pekka Karjalainen
I'm using WinXP (Finnish), Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win32 and wxPython 2.6.0.1. When I go to the Process and Events section in the wxDemo and run the Process demo, bad things can happen. It crashes. I think the crash is caused by characters outside t

Re: different time tuple format

2005-06-07 Thread [EMAIL PROTECTED]
http://docs.python.org/lib/module-time.html tells us the last element is the DST flag, on your computer that applies for localtime(). To get this with strptime() you have to tweak the %Z formatter - this is platform specific. -- http://mail.python.org/mailman/listinfo/python-list

Re: Create our own python source repository

2005-06-07 Thread qwweeeit
Hi Rob, thank you for your reply. I am further commenting on your doubts ("I'm not entirely sure what the point of your exercise is") and on your proposal of a project for more structured tutorials. About the second item, I fully agree with you. I should be even more drastic: for a certain argumen

Re: separate IE instances?

2005-06-07 Thread J Correia
"Chris Curvey" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I would have given up on this a long time ago, but I can create two > IEXPLORE processes simultaneously (and get the behavior I want) by just > manually launching them from the Start menu. (Of course, that doesn't > mean

How to maintain scroll-region view while changing canvas size?

2005-06-07 Thread syed_saqib_ali
Please take a look at and run the code snippet shown below. It creates a canvas with vertical & Horizontal scroll-bars. If you shrink the window to smaller than the area of the canvas, the scroll-bars work as advertised. That's great. However, if you click the Left Mouse button, it calls code w

How to call python functions from matlab?

2005-06-07 Thread sdhyok
PyMat enables to call matlab functions from python. But, what I want is to call python functions from matlab. Is there any library for it? Thanks. Daehyok Shin -- http://mail.python.org/mailman/listinfo/python-list

different time tuple format

2005-06-07 Thread Maksim Kasimov
hi all, sorry if i'm reposting why time.strptime and time.localtime returns tuple with different DST (9 item of the tuple)? is there some of setting to fix the problem? Python 2.2.3 (#1, May 31 2005, 11:33:52) [GCC 2.95.4 20020320 [FreeBSD]] on freebsd4 Type "help", "copyright", "credits" or "l

Re: What are OOP's Jargons and Complexities?

2005-06-07 Thread Xah Lee
The Rise of Class Hierarchy Because of psychological push for purity, in Java there are no longer plain subroutines. Everything is a method of some class. Standard functions like opening a file, square root a number, for loop thru a list, if else branching statements, or simple arithmetic operatio

Re: xmlrpclib - methodHelp doesn't work

2005-06-07 Thread Kent Johnson
[EMAIL PROTECTED] wrote: > I tried out the examples in this website for XML-RPC using python - > http://www.onlamp.com/pub/a/python/2000/11/22/xmlrpcclient.html?page=2 > But I get the following errors when I try to execute the code. Here is > the snippet of the code with the error messages. me

DB API 2.0 and transactions

2005-06-07 Thread Christopher J. Bottaro
Hi, Why is there no support for explicit transactions in the DB API? I mean like transaction() to start the trans and commit() and rollback() would end the trans or something. The reason why I ask is because I wrote a daemon that interacts with a Postgres DB. The value of CURRENT_TIMESTAMP accor

Re: separate IE instances?

2005-06-07 Thread Chris Curvey
I would have given up on this a long time ago, but I can create two IEXPLORE processes simultaneously (and get the behavior I want) by just manually launching them from the Start menu. (Of course, that doesn't mean that I can launch them programmatically, but I'm hoping that someone can give me a

xmlrpclib - methodHelp doesn't work

2005-06-07 Thread [EMAIL PROTECTED]
I tried out the examples in this website for XML-RPC using python - http://www.onlamp.com/pub/a/python/2000/11/22/xmlrpcclient.html?page=2 But I get the following errors when I try to execute the code. Here is the snippet of the code with the error messages. >>> meerkatsvr.system.methodSignature

Re: School Administration Software

2005-06-07 Thread [EMAIL PROTECTED]
Greg Lindstrom wrote: > Hello- > [snip] > So...do any of you have experience with any of this software? This is > for a small (~400 students k-12), private school that is not swimming in > taxpayer dollars and I would rather use Open Source because we will > probably need to customize some reports

Re: time consuming loops over lists

2005-06-07 Thread Peter Otten
[EMAIL PROTECTED] wrote: > Can some one help me improve this block of code...this jus converts the > list of data into tokens based on the range it falls into...but it > takes a long time.Can someone tell me what can i change to improve > it... > > def Tkz(tk,data): > no_of_bins = 10 >

Re: time consuming loops over lists

2005-06-07 Thread querypk
wow i dint know that a single statement like that would make such a difference. Thanks you very much. that really improves the performance -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading a CSV file into a list of dictionaries

2005-06-07 Thread GMane Python
Sounds like you want to use the ConfigObject module. http://www.voidspace.org.uk/python/modules.shtml#configobj -dave "RFQ" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, I'm struggling here to do the following with any success: > > I have a comma delimited file where each lin

Re: How do I know when a thread quits?

2005-06-07 Thread dowskimania
I'm no threads expert, but if you use the higher-level "threading" module, you could try something like this: import threading import time def countToTen(): for i in range(1,11): print i time.sleep(0.5) child = threading.Thread(target=countToTen) class ma

Re: time consuming loops over lists

2005-06-07 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: X-No-Archive: yes Can some one help me improve this block of code...this jus converts the list of data into tokens based on the range it falls into...but it takes a long time.Can someone tell me what can i change to improve it... if data[i] in xrange(r

time consuming loops over lists

2005-06-07 Thread querypk
X-No-Archive: yes Can some one help me improve this block of code...this jus converts the list of data into tokens based on the range it falls into...but it takes a long time.Can someone tell me what can i change to improve it... def Tkz(tk,data): no_of_bins = 10 tkns = [] dmax = ma

School Administration Software

2005-06-07 Thread Greg Lindstrom
Hello- I just picked up my daughters' report cards for the year (they did well, thank-you) and was approached by the school administrator about writing an Acess application to help track attendance for next year (excused/unexcused, after so many unexcused absences a letter will be generated, e

Dr. Dobb's Python-URL! - weekly Python news and links (Jun 7)

2005-06-07 Thread Simon Brunning
QOTW: "[expletives deleted]" - John Machin, snipping a section of Perl code. "What sort of programmer are you? If it works on your computer, it's done, ship it!" - Grant Edwards Guido invites us to comment on PEP 343. This Python Enhancement Proposal includes a 'with' statement, allowin

Re: If - Or statements

2005-06-07 Thread Patrick Down
What about: if True in [thefile.endswith(x) for x in ('mp3','mp4','ogg','aac','wma')]: -- http://mail.python.org/mailman/listinfo/python-list

Re: anygui,anydb, any opinions?

2005-06-07 Thread Thomas Bartkus
"James Tanis" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Previously, on Jun 6, Thomas Bartkus said: > > # "James Tanis" <[EMAIL PROTECTED]> wrote in message > # news:[EMAIL PROTECTED] > # > > # > > # > My 2 cents, I'm much more productive with Python and QT Builder as I > # > am

Re: ANN: ActivePython 2.4.1 for Mac OS X is now available!

2005-06-07 Thread John Abel
Trent Mick wrote: >Today ActiveState is announcing support for Mac OS X. I'm happy to >announce that ActivePython 2.4.1 for Mac OS X is now available for free >download from: > >http://www.ActiveState.com/Products/ActivePython/ > >This brings the number of free ActivePython platforms to four

Embedding Python in Multi-threading App. Any Guidelines, Hints, Recipes ??

2005-06-07 Thread adsheehan
Hi, I am embedding Python into a multi-threaded application running on Solaris. Python will enable end users to customize and re-program many aspects of the application. I expect that the C++ application will be natively multi-threaded and will embed multiple Python sub-interpreters. Called Pytho

ANN: ActivePython 2.4.1 for Mac OS X is now available!

2005-06-07 Thread Trent Mick
Today ActiveState is announcing support for Mac OS X. I'm happy to announce that ActivePython 2.4.1 for Mac OS X is now available for free download from: http://www.ActiveState.com/Products/ActivePython/ This brings the number of free ActivePython platforms to four -- with the existing Linu

Re: Create our own python source repository

2005-06-07 Thread Rob Cowie
I'm not entirely sure what the point of your exercise is - if you have access to the net, ,why do you want to collate code examples? They are frequently updated in the cookbook so an offline repository would quickly become out of date. However you've aroused my interest in something related. W

Re: redirecting messgaef from sys.stdout

2005-06-07 Thread harold fellermann
On 07.06.2005, at 16:43, Ahmad Hosseinzadeh wrote: > Hello, > > I’m trying to run an external program in my > application. Both are coded in python. I need to write > an independent module that is used in the main > application. Its responsibility is to run the external > program and redirect its

re:how to export data from ZODB to text files

2005-06-07 Thread ls
Hi Peter, Thank you for your reply. I already can access file using code >>> from ZODB import FileStorage, DB >>> storage = FileStorage.FileStorage('mydatabase.fs') >>> db = DB(storage) >>> connection = db.open() >>> root = connection.root() But this is the point

redirecting messgaef from sys.stdout

2005-06-07 Thread Ahmad Hosseinzadeh
Hello, I’m trying to run an external program in my application. Both are coded in python. I need to write an independent module that is used in the main application. Its responsibility is to run the external program and redirect its stdout and stderr to the main application. The application’s stdo

Re: How do I know when a thread quits?

2005-06-07 Thread harold fellermann
we had some off-group mails. A summary is posted to improve the knowledge base of the list. Prashanth wrote: > Hi, > > I can use the threading module but I am just looking if there is a > reliable way using the thread module. > > If I use a lock... > Let us assume that the child thread has done

Re: reloading my own modules

2005-06-07 Thread Skip Montanaro
Lowell> import dbtest, util Lowell> for module in ['dbtest', 'util']: Lowell> if module in sys.modules.keys(): Lowell> reload(sys.modules[module]) Lowell> Is this the best way to do it? It seems a bit verbose, but not Lowell> really all that bad. I was just w

RE: Dr. Dobb's Python-URL! - weekly Python news and links (Jun 7)

2005-06-07 Thread Tim Golden
[Simon Brunning] | Subject: Dr. Dobb's Python-URL! - weekly Python news and links (Jun 7) [... snipped whole thing ...] Just wanted to say thank you to Simon and all the other people who have edited the Python-URL! weekly digest over the years. Despite my being a pretty much constant reader of c.

Dr. Dobb's Python-URL! - weekly Python news and links (Jun 7)

2005-06-07 Thread Simon Brunning
QOTW: "[expletives deleted]" - John Machin, snipping a section of Perl code. "What sort of programmer are you? If it works on your computer, it's done, ship it!" - Grant Edwards Guido invites us to comment on PEP 343. This Python Enhancement Proposal includes a 'with' statement, allowin

Re: How do I know when a thread quits?

2005-06-07 Thread Peter Hansen
Prashanth Ellina wrote: > I have used the low-level thread module to write a multi-threaded app. > > tid = thread.start_new_thread(process, ()) > tid is an integer thread ident. > > the thread takes around 10 seconds to finish processing. Meanwhile the > main thread finished execution and exits.

Re: how to export data from ZODB to text files

2005-06-07 Thread Peter Hansen
ls wrote: > I looking for help with ZODB data export to text file. I have file > Data.fs > [snip] > Could you point me in to some Python code examples, code contributions > and so on. You can download the "standalone" ZODB code and run it under regular Python without Zope installed or involved,

Re: How do I know when a thread quits?

2005-06-07 Thread harold fellermann
Hi, > I want a reliable way of knowing when the child > thread finished execution so that I can make the main thread wait till > then. > > Any ideas? use a lock. the subthread allocates the lock and releases it after processing. the main thread must wait until the lock is released. otherwiese, u

How do I know when a thread quits?

2005-06-07 Thread Prashanth Ellina
Hi, I have used the low-level thread module to write a multi-threaded app. tid = thread.start_new_thread(process, ()) tid is an integer thread ident. the thread takes around 10 seconds to finish processing. Meanwhile the main thread finished execution and exits. This causes an error because the

Re: EnumKey vs EnumValue

2005-06-07 Thread Pykid
Ok, this was not how I understood it to work earlier when I was going over this. I do want to eventually see the values under each key, so I guess if I want to see what is under each key I need to then reopen it and send that value to EnumValue. Tried that and ended up with this which seems to wo

Re: file permissions on windows XP (home)

2005-06-07 Thread Duncan Booth
Peter Hansen wrote: >> >> Why is python returing True from os.access? >> Why isn't chmod doing anything? > > Check your results using os.stat() after doing that, perhaps? If it > shows the right values for the permissions, then clearly the problem has > nothing to do with Python per se, or yo

  1   2   >