ANN: Python for Math Teachers (5 ShowMeDos)

2007-07-18 Thread Ian Ozsvald
Summary: Kirby Urner introduces Python for math teachers: http://showmedo.com/videos/series?name=JkD78HdCD Detail: Kirby gives an introduction to math topics and Python, moves on to subclassing (OOP), RSA cryptography and graphics using Stickworks (built on VPython). About ShowMeDo.com: Free

dejagnu equivalent

2007-07-18 Thread Rustom Mody
Does anyone know if a dejagnu equivalent exists for python? [Dejagnu is in tcl] -- http://mail.python.org/mailman/listinfo/python-list

Re: Can a low-level programmer learn OOP?

2007-07-18 Thread Alex Martelli
Dennis Lee Bieber [EMAIL PROTECTED] wrote: On Mon, 16 Jul 2007 11:45:04 -0700, Chris Carlen [EMAIL PROTECTED] declaimed the following in comp.lang.python: The more I play with Python, the more I like it. Perhaps I will understand OOP quicker than I thought. What I've learned so far

Open HTML file in IE

2007-07-18 Thread gravey
Hello. Apologies if this is a basic question, but I want to open a HTML file from my local drive (is generated by another Python script) in Internet Explorer. I've had a look at the webbrowser module and this doesn't seem to be what I need. Any help much appreciated. --

Weekly Python Patch/Bug Summary

2007-07-18 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 394 open ( +2) / 3827 closed (+35) / 4221 total (+37) Bugs: 1046 open ( +4) / 6773 closed (+16) / 7819 total (+20) RFE : 262 open ( -1) / 293 closed ( +1) / 555 total ( +0) New / Reopened Patches __ make

Re: wxPython and threads

2007-07-18 Thread Stef Mientki
Benjamin wrote: I'm writing a search engine in Python with wxPython as the GUI. I have the actual searching preformed on a different thread from Gui thread. It sends it's results through a Queue to the results ListCtrl which adds a new item. This works fine or small searches, but when the

Posted messages not appearing in this group

2007-07-18 Thread Sanjay
Hi All, I tried posting in this group twice since last week, but the messages did not appear in the forum. Don't know why. Trying this message again... Sanjay -- http://mail.python.org/mailman/listinfo/python-list

Re: Best method for inter process communications

2007-07-18 Thread Hendrik van Rooyen
Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote: On Tue, 17 Jul 2007 08:08:45 +0200, Hendrik van Rooyen wrote: I heard a rumour once that a hello world string takes something like 10k bytes in XMLRPC - have never bothered to find out if its BS... Just try it out: In [8]: import xmlrpclib In

Re: Can a low-level programmer learn OOP?

2007-07-18 Thread Hendrik van Rooyen
Dennis Lee Bieber [EMAIL PROTECTED] wrote: Don't confuse Python's roaming names with OOP, though. There are OOP languages that still follow the variable=memory address containing object structure. roaming names is a brilliant description! Thanks Dennis! - Hendrik --

Re: Pickled objects over the network

2007-07-18 Thread Hendrik van Rooyen
Walker Lindley wrote: 8 complaint about pickle error on receiving side - Google for netstrings. It looks to me like you are trying to unpickle something that is not a whole pickle... Append the length of the pickle to the front of it, and on the receiving side, first receive

Re: In a dynamic language, why % operator asks user for type info?

2007-07-18 Thread Duncan Booth
Asun Friere [EMAIL PROTECTED] wrote: On Jul 17, 5:38 pm, Duncan Booth [EMAIL PROTECTED] wrote: indeed anything which has an __int__ method may be passed to the %d formatter: Anything?! Sorry to be persnickety here, but what about this: class C : def __int__ (self) : pass '%d' %

Re: accessing javascript variables within psp code

2007-07-18 Thread Bruno Desthuilliers
BAnderton a écrit : Hello all, Question: Is there any way to access a javascript variable from within psp code? Short answer : no (or at least: not directly). And it has nothing to do with PSP. OT Long answer: this has to do with the http protocol. Things go like this: 1/ the client

Re: Design question regarding exceptions.

2007-07-18 Thread Bruno Desthuilliers
asincero a écrit : I have a class called Users that provides a higher level of abstraction to an underlying users table in a pgsql database. It has methods like addUser() and deleteUser() which, obviously, wrap the corresponding SQL statements. My question is would it better to let any

Re: a=0100; print a ; 64 how to reverse this?

2007-07-18 Thread Bruno Desthuilliers
Karthik Gurusamy a écrit : On Jul 17, 5:35 am, Bruno Desthuilliers bruno. [EMAIL PROTECTED] wrote: mosi a écrit : Problem: how to get binary from integer and vice versa? The simplest way I know is: a = 0100 a 64 but: a = 100 (I want binary number) does not work that way. a.__hex__

Re: Interpreting non-ascii characters.

2007-07-18 Thread ddtl
On Wed, 18 Jul 2007 08:29:58 +1000, John Machin [EMAIL PROTECTED] wrote: ... I have a bunch of directories and files from different systems (each directory contains files from the same system) which are encoded differently (though all of them are in Russian), so the following encodings are

Real-time Update

2007-07-18 Thread ReTrY
I'm writing a program with Tkinter GUI, When the program is running it need to be updated every five seconds (data comes from internet). How should I do that ? How to make a function in main loop ? -- http://mail.python.org/mailman/listinfo/python-list

Compatibility of python2.5 with pytohn2.3

2007-07-18 Thread VISHAL KANAUJIA
Hi all, I am new member of this post. I have a C application which uses Python(version 2.3) extensively with SWIG wrappers. I want to upgrade the Python to latest version2.5. Is there any compatibility issue between two versions? Does latest Python2.5 provide backward compatibility to previous

Re: Discover instance variables

2007-07-18 Thread Dave Baum
In article [EMAIL PROTECTED], JonathanB [EMAIL PROTECTED] wrote: I can handle the formatting and changing the variable itself, no problem, but how do I get a list of all the variables in a class instance? I almost put a list in there called vars and appended all the variables to it so I

Subprocess Poll() to sport Application Crash

2007-07-18 Thread Robert Rawlins - Think Blue
Hello Guys, I have an application which launches a sub-process using the sub process/Popen module, which seems to work great. However on occasion the launched process will crash, it doesn't appear to full terminate though as when I run a 'top' command from the Linux system the process is still

Subprocess Poll

2007-07-18 Thread Robert Rawlins - Think Blue
Hello Guys, I have an application which launches a sub-process using the sub process/Popen module, which seems to work great. However on occasion the launched process will crash, it doesn't appear to full terminate though as when I run a 'top' command from the Linux system the process is still

Re: how to find available classes in a file ?

2007-07-18 Thread Alex Popescu
On Jul 17, 4:41 am, Gabriel Genellina [EMAIL PROTECTED] wrote: En Mon, 16 Jul 2007 20:13:19 -0300, Alex Popescu [EMAIL PROTECTED] escribió: On Jul 17, 1:44 am, Stef Mientki [EMAIL PROTECTED] wrote: I want to have a (dynamically) list of all classes defined in a py-file. Is there a way

Re: Pickled objects over the network

2007-07-18 Thread Jean-Paul Calderone
On Tue, 17 Jul 2007 14:57:16 -0700, Walker Lindley [EMAIL PROTECTED] wrote: I'm working on a distributed computing program and need to send Python objects over a TCP socket. Specifically, the objects that I'm working with subclass the builtin list type (I don't know whether or not that matters),

Re: how to find available classes in a file ?

2007-07-18 Thread Alex Popescu
On Jul 17, 4:41 am, Gabriel Genellina [EMAIL PROTECTED] wrote: En Mon, 16 Jul 2007 20:13:19 -0300, Alex Popescu [EMAIL PROTECTED] escribió: On Jul 17, 1:44 am, Stef Mientki [EMAIL PROTECTED] wrote: I want to have a (dynamically) list of all classes defined in a py-file. Is there a way

XL-RPC Recipe

2007-07-18 Thread Thomas
Hi list! I'm struggling with a recipe from the Python Cookbook (2nd ed.) concerning XML-RPC. It's recipe 15.2 Serving XML-RPC Requests, and since I thought it's a popular book some other folks might have discovered (and probably solved) the same issue. The recipe provides server and client code,

Re: Single-stepping through a python script

2007-07-18 Thread Diez B. Roggisch
Craig Howard wrote: Craig Howard schrieb: Hello All: Is is possible to compile a code object and single-step through its execution? import pdb; pdb.set_trace() Look up the pdb module documentation. Diez Sorry, I didn't give enough detail. Is it possible to

Re: XL-RPC Recipe

2007-07-18 Thread Thomas
Ah, sorry, found the answer myself (not that I wasn't looking for it for days...): I was aware that the recipe is online at ActiveState's site (http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/81549), but I didn't read all of the comments carefully: KAMOSAWA Masao wrote on 2006/04/29 that

Re: Posted messages not appearing in this group

2007-07-18 Thread Alex Popescu
Sanjay skpatel20 at gmail.com writes: Hi All, I tried posting in this group twice since last week, but the messages did not appear in the forum. Don't know why. Trying this message again... Sanjay Something similar seemed to happen to me too, but when checking with gmane I've

Re: Semantics of file.close()

2007-07-18 Thread Hrvoje Niksic
Evan Klitzke [EMAIL PROTECTED] writes: But the writes are buffered, and close causes the buffer to be flushed. file.close can throw an exception just like fclose, but it will still ensure that the file is closed. Is this buffering being done by Python or the kernel? It is done in the user

Re: Pickled objects over the network

2007-07-18 Thread Nick Craig-Wood
Jean-Paul Calderone [EMAIL PROTECTED] wrote: On Tue, 17 Jul 2007 14:57:16 -0700, Walker Lindley [EMAIL PROTECTED] wrote: I'm working on a distributed computing program and need to send Python objects over a TCP socket. [snip] Hopefully I'm doing something obviously wrong, but if anyone can

Re: Compatibility of python2.5 with pytohn2.3

2007-07-18 Thread Gerhard Häring
VISHAL KANAUJIA wrote: Hi all, I am new member of this post. I have a C application which uses Python(version 2.3) extensively with SWIG wrappers. I want to upgrade the Python to latest version2.5. Is there any compatibility issue between two versions? Does latest Python2.5 provide

Re: how to find available classes in a file ?

2007-07-18 Thread Alex Popescu
Alex Popescu the.mindstorm.mailinglist at gmail.com writes: On Jul 17, 4:41 am, Gabriel Genellina gagsl-... at yahoo.com.ar wrote: En Mon, 16 Jul 2007 20:13:19 -0300, Alex Popescu the.mindstorm.mailingl... at gmail.com escribi I apologize for posting the previous message a couple of

Re: pytz giving incorrect offset and timezone

2007-07-18 Thread Sanjay
Hi Simon, localize worked perfectly. Thanks a lot for the vital help! Your elaboration on the concepts was also very nice and informative! thanks Sanjay -- http://mail.python.org/mailman/listinfo/python-list

Copy List

2007-07-18 Thread Robert Rawlins - Think Blue
Hello Guys, What's the best way to create a copy of a list? I've seen several method and I'm not sure what to use. This will be in a class and one method creates a list which I then want to move to the self scope, like so: __Init__(self): Self.myList = []

Re: Copy List

2007-07-18 Thread Tim Williams
On 18/07/07, Robert Rawlins - Think Blue [EMAIL PROTECTED] wrote: What's the best way to create a copy of a list? I've seen several method and I'm not sure what to use. This will be in a class and one method creates a list which I then want to move to the self scope, like so: listB =

Re: Copy List

2007-07-18 Thread Joe Riopel
On 7/18/07, Robert Rawlins - Think Blue [EMAIL PROTECTED] wrote: What's the best way to create a copy of a list? I am pretty new to python but this works: list_one = [0,1,2,3,4,5,6,7,8,9] list_two = [i for i in list_one] print list_two [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] --

Re: Copy List

2007-07-18 Thread Joe Riopel
I forgot to mention that you can go here for a little more of an explanation: http://diveintopython.org/native_data_types/mapping_lists.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Copy List

2007-07-18 Thread Rustom Mody
The standard idiom (I guess) is to use the slice a=[1,2,3,4] b=a b is a True b [1, 2, 3, 4] c=a[:] c is a False c [1, 2, 3, 4] This is shallow copy If you want deep copy then from copy import deepcopy -- http://mail.python.org/mailman/listinfo/python-list

best SOAP module

2007-07-18 Thread Sells, Fred
I need to talk to a vendor side via SOAP, Googling is overwhelming and many hits seem to point to older attempts. Can someone tell me which SOAP module is recommended. I'm using Python 2.4. --- The information contained in

New guy question - user form

2007-07-18 Thread meg99
I am using a scheduling sw package that uses Python as its scripting language much like Excel uses Visual Basic. I am fluent in VB but I am just beginning in Python. What I need to do is this: I need to create a user form that will contain some predefined data (captured from the scheduling sw

Re: accessing javascript variables within psp code

2007-07-18 Thread Carsten Haese
On Wed, 2007-07-18 at 01:29 +, BAnderton wrote: Hello all, Question: Is there any way to access a javascript variable from within psp code? I'm aware of how to do the reverse of this (js_var='%=psp_var%'). Here's a non-working example of what I'm trying to do: - - - (begin

Charlotte Python Group

2007-07-18 Thread Calvin Spealman
I am looking to start a meetup in or near Charlotte. I already have a couple people interested, and I see some folks subscribing to new python groups on meetup. If I can find a few more people, it could be worth it. Is anyone in the area and interested in a group? Anyone who might want to do a

Re: The Modernization of Emacs: exists already

2007-07-18 Thread Xah Lee
About a month ago, i posted a message about modernization of emacs. I enlisted several items that i think emacs should adapt. Today I added another section to the frequestly asked questions. The new section is pasted below. The full article can be found at

Re: Discover instance variables

2007-07-18 Thread Bjoern Schliessmann
JonathanB wrote: So given that example, is there a clean way to get this output: Data for Earth: Name = Earth WTN = 5.0 Ag = 0 Na = 0 ... ... Notes = None Sure, save the __init__ parameters explicitly in a dict. self.data = {Name: name, WTN: WTN, Ag: Ag,

Re: The Modernization of Emacs: exists already

2007-07-18 Thread Rustom Mody
Xah Lee: I agree with what you say now and most of what you wrote a month back -- I even learnt something useful from there -- longlines mode. Emacs is important to me and (I guess) to many of the subscribers here. But how does posting an emacs related question help on a python mailing list??

Re: The Modernization of Emacs: exists already

2007-07-18 Thread Wildemar Wildenburger
Rustom Mody wrote: But how does posting an emacs related question help on a python mailing list?? One Word: Ego. Don't reply. /W -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with building extension in Python

2007-07-18 Thread cornpicker
I solved my problem. I had the math.h import step in the wrong location. The import step needed to be outside of the function -- I'm so embarrassed. Code: [Download] 1. 2. # 3. # Use C math functions 4. # 5. 6. # Import the native C functions we need 7. cdef extern from

Re: Copy List

2007-07-18 Thread Lawrence Oluyede
Joe Riopel [EMAIL PROTECTED] wrote: I am pretty new to python but this works: list_one = [0,1,2,3,4,5,6,7,8,9] list_two = [i for i in list_one] print list_two [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] list_two = list_one[:] or list_two = list(list_one) are better :D -- Lawrence,

Re: best SOAP module

2007-07-18 Thread Lawrence Oluyede
Sells, Fred [EMAIL PROTECTED] wrote: I need to talk to a vendor side via SOAP, Googling is overwhelming and many hits seem to point to older attempts. Can someone tell me which SOAP module is recommended. I'm using Python 2.4. Try soaplib: http://trac.optio.webfactional.com/ -- Lawrence,

Re: The Modernization of Emacs: exists already

2007-07-18 Thread Rustom Mody
Eh? Me? you?? Who??? Did I say something offensive? Sorry if I did... but I dont understand... I must say that I found the earlier post useful to me as an old-time emacs user who's not quite upto all the latest stuff. However it was quite off topic for a python list. The flame war that followed

Re: The Modernization of Emacs: exists already

2007-07-18 Thread Joe Riopel
Sorry, I don't understand why this is still on the python mailing list. :wq -- http://mail.python.org/mailman/listinfo/python-list

Mouse/keyboard watcher?

2007-07-18 Thread skip
Sorry to bomb this list with an off-topic post, however... Ages ago I wrote a mouse/keyboard watcher in Python+Tk: http://sf.net/projects/watch. It's been idle for a long while though, isn't terribly portable and doesn't work properly with tools like Synergy (http://sf.net/projects/synergy2).

Re: Break up list into groups

2007-07-18 Thread Miki
Hello Dan, Yet another option (using itertools.groupby): from itertools import groupby class GrouperToggler: def __init__(self): self.group = 1 def __call__(self, value): # New packet, toggle group if value 0x80: self.group = 1 - self.group

Re: The Modernization of Emacs: exists already

2007-07-18 Thread Wolfgang Mederle
Xah Lee wrote: In Emacs's documentation, the term Meta key should be replaced with the Alt key, to reflect current usage, since that is the keyboard 99% of personal computer users know. The Meta key name is a major point of confusion for getting people to learn Emacs. This is utter

Re: Charlotte Python Group

2007-07-18 Thread Wildemar Wildenburger
Calvin Spealman wrote: I am looking to start a meetup in or near Charlotte. I already have a couple people interested, and I see some folks subscribing to new python groups on meetup. If I can find a few more people, it could be worth it. Is anyone in the area and interested in a group?

Property Descriptor - Public Getter, Private Setter

2007-07-18 Thread gamehack
Hi all, I was looking around the net to figure out how I can use the property() descriptor to make a property readable by everyone and only settable by the class or any derived classes. Thanks. Regards, gh -- http://mail.python.org/mailman/listinfo/python-list

Re: Pickled objects over the network

2007-07-18 Thread Walker Lindley
Thanks for all the help, I tried sending the length and then the string and that appears to work, so I'll take a look at Pyro, too. -Walker On 7/18/07, Nick Craig-Wood [EMAIL PROTECTED] wrote: Jean-Paul Calderone [EMAIL PROTECTED] wrote: On Tue, 17 Jul 2007 14:57:16 -0700, Walker Lindley

Re: shutil.copyfile problem for GIS data

2007-07-18 Thread Larry Bates
Ahmed, Shakir wrote: Need help to copy a personal geodatabase from one location to another: Trying to copy a personal geodatabase from one location to another location where all the users are retrieving data from the second location: 1.I can copy over the updated personal

Re: wxPython and threads

2007-07-18 Thread James Matthews
Sounds like a race condition. is List Ctrl waiting for the gui to return? Maybe make the processing more then one thread! On 7/17/07, Stef Mientki [EMAIL PROTECTED] wrote: Benjamin wrote: I'm writing a search engine in Python with wxPython as the GUI. I have the actual searching preformed on

Pydev 1.3.8 Released

2007-07-18 Thread Fabio Zadrozny
Hi All, Pydev and Pydev Extensions 1.3.8 have been released Details on Pydev Extensions: http://www.fabioz.com/pydev Details on Pydev: http://pydev.sf.net Details on its development: http://pydev.blogspot.com Release Highlights in Pydev Extensions:

Re: Open HTML file in IE

2007-07-18 Thread Larry Bates
gravey wrote: Hello. Apologies if this is a basic question, but I want to open a HTML file from my local drive (is generated by another Python script) in Internet Explorer. I've had a look at the webbrowser module and this doesn't seem to be what I need. Any help much appreciated. There

Re: Property Descriptor - Public Getter, Private Setter

2007-07-18 Thread Diez B. Roggisch
gamehack wrote: Hi all, I was looking around the net to figure out how I can use the property() descriptor to make a property readable by everyone and only settable by the class or any derived classes. Thanks. Forget it. You can try and come up with an implementation that will check the

Re: Mouse/keyboard watcher?

2007-07-18 Thread Skip Montanaro
Someone, I thought from this list or maybe python-dev, told me about a newer open source application in the same space which is more portable and actively maintained/developed. Alas, I can't recall the name... Found it: workrave (http://www.workrave.org/). Sorry for the noise. Skip --

wxPython, searching, and threads

2007-07-18 Thread Benjamin
Hello! I am writing a search engine with wxPython as the GUI. As the search thread returns items, it adds them to a Queue which is picked up by the main GUI thread calling itself recursively with wx.CallAfter. These are then added to a ListCtrl. This works fine for small searches, but with larger

Re: New guy question - user form

2007-07-18 Thread Diez B. Roggisch
meg99 schrieb: I am using a scheduling sw package that uses Python as its scripting language much like Excel uses Visual Basic. I am fluent in VB but I am just beginning in Python. What I need to do is this: I need to create a user form that will contain some predefined data (captured

Re: Pickled objects over the network

2007-07-18 Thread Rustom Mody
Sure pyro may be the solution but it may also be overkill Why not use safe_load from the yaml module? -- http://mail.python.org/mailman/listinfo/python-list

help with create menu in wxpython

2007-07-18 Thread franciscodg
hi group: I have the following code: .. .. #MENU menuFile = wx.Menu() menuFile.Append(14, Exit,Sale del programa) menuHelp = wx.Menu() menuHelp.Append(41, about Mutamatic,Informacion de Mutamatic) menuBar = wx.MenuBar()

Re: help with create menu in wxpython

2007-07-18 Thread Stef Mientki
better ask in the wx discussion group: [EMAIL PROTECTED] cheers, Stef Mientki -- http://mail.python.org/mailman/listinfo/python-list

Threading XL [was: Re: The Modernization of Emacs: exists already]

2007-07-18 Thread Wildemar Wildenburger
Rustom Mody wrote: Eh? Me? you?? Who??? Did I say something offensive? Sorry if I did... but I dont understand... No no, it's cool. Maybe I was a little too terse. Xah Lee likes to crosspost his pseudo-philosophical tech-musings to several discussion groups at regular intervalls. He's not

The basics difficulties

2007-07-18 Thread MooMooBunnyLips
I'm trying to get this basic sample to work: http://docs.python.org/ext/dnt-basics.html When I get to the last step: $ python setup.py build I get this error: error: Python was build with Visual Studio version 8.0 and extensions need to be built with the same version of the compiler, but it

Re: Fast powerset function

2007-07-18 Thread Arash Arfaee
Hi All With your help I found lots of good method and algorithm. Also I found out if I exchange all for loop with while loop it make the program much faster and also it consumes less memory (almost half!) Just wanna thank you all. Cheers, Arash On 7/13/07, Mark Dickinson [EMAIL PROTECTED]

Re: Implementaion of random.shuffle

2007-07-18 Thread George Sakkis
On Jul 16, 10:51 pm, Steven D'Aprano [EMAIL PROTECTED] wrote: On Mon, 16 Jul 2007 16:55:53 +0200, Hrvoje Niksic wrote: 2**19937 being a really huge number, it's impossible to exhaust the Mersenne twister by running it in sequence. Impossible? Surely this will do it: for n in

Re: Pickled objects over the network

2007-07-18 Thread Eduardo \EdCrypt\ O. Padoan
On 7/18/07, Jean-Paul Calderone [EMAIL PROTECTED] wrote: On Tue, 17 Jul 2007 14:57:16 -0700, Walker Lindley [EMAIL PROTECTED] wrote: [...] The obvious thing you're doing wrong is using pickle over a network. ;) http://jcalderone.livejournal.com/15864.html Ok, maybe not the best tools to the

Re: Tibco Rendezvous

2007-07-18 Thread rdahlstrom
Sent you an email - have you found anything else on this? I'm not all that familiar with ctypes, and am having a little trouble getting started with this. Anything I could use just to get started would be fantastic - I can go from there. Thanks! On Jul 13, 1:43 pm, Kip Lehman [EMAIL PROTECTED]

Re: Open HTML file in IE

2007-07-18 Thread brad
gravey wrote: Hello. Apologies if this is a basic question, but I want to open a HTML file from my local drive (is generated by another Python script) in Internet Explorer. I've had a look at the webbrowser module and this doesn't seem to be what I need. Any help much appreciated. You may

Re: Deleting files and folders used by other processes on Windows

2007-07-18 Thread brad
[EMAIL PROTECTED] wrote: Hi, I have been looking into making my file cleaning script more intelligent. The goal of the script is to delete everything on a drive except for a couple of folders which are skipped by the script. Recently, I noticed that some files where not being deleted

Deleting files and folders used by other processes on Windows

2007-07-18 Thread tkondal
Hi, I have been looking into making my file cleaning script more intelligent. The goal of the script is to delete everything on a drive except for a couple of folders which are skipped by the script. Recently, I noticed that some files where not being deleted because a process was using them. Is

wxPython, searching, and threads

2007-07-18 Thread Benjamin
Hello! I am writing a search engine with wxPython as the GUI. As the search thread returns items, it adds them to a Queue which is picked up by the main GUI thread calling itself recursively with wx.CallAfter. These are then added to a ListCtrl. This works fine for small searches, but with larger

How do you debug when a unittest.TestCase fails?

2007-07-18 Thread Emin.shopper Martinian.shopper
Dear Experts, How do you use pdb to debug when a TestCase object from the unittest module fails? Basically, I'd like to run my unit tests and invoke pdb.pm when something fails. I tried the following with now success: Imagine that I have a module _test.py that looks like the following:

Re: Property Descriptor - Public Getter, Private Setter

2007-07-18 Thread James Stroud
gamehack wrote: Hi all, I was looking around the net to figure out how I can use the property() descriptor to make a property readable by everyone and only settable by the class or any derived classes. Thanks. Regards, gh Congratulations, you have discovered a principal use of

Re: How do you debug when a unittest.TestCase fails?

2007-07-18 Thread Jean-Paul Calderone
On Wed, 18 Jul 2007 16:40:46 -0400, Emin.shopper Martinian.shopper [EMAIL PROTECTED] wrote: Dear Experts, How do you use pdb to debug when a TestCase object from the unittest module fails? Basically, I'd like to run my unit tests and invoke pdb.pm when something fails. I tried the following

Re: merge two ranges

2007-07-18 Thread George Sakkis
On Jul 17, 1:29 pm, anoweb [EMAIL PROTECTED] wrote: I have two ranges of numbers and I need to determine if they overlap or adjacent and if so return a new range containing the values. The values are low and high for each pair, such that the first value of the tuple is always less than or

Re: How do you debug when a unittest.TestCase fails?

2007-07-18 Thread Emin.shopper Martinian.shopper
Thanks for the reply, but neither of those work for me. I don't seem to have the trial program installed. Where do you get it? Also, when I use the try/catch block, I get the following error: Traceback (most recent call last): File _test.py, line 10, in module pdb.pm() File

Re: Real-time Update

2007-07-18 Thread Aahz
In article [EMAIL PROTECTED], ReTrY [EMAIL PROTECTED] wrote: I'm writing a program with Tkinter GUI, When the program is running it need to be updated every five seconds (data comes from internet). How should I do that ? How to make a function in main loop ? See the Tkinter example from my

type conversions for comparison operators

2007-07-18 Thread Russ
I recently discovered a bug in one of my programs that surprised me because I thought Python's dynamic type checking would have caught it. Suppose I have a function that returns an integer, such as def numItems: return len(self.items) Now I want to do a test like this: if object.numItems() 2:

Exiting from python shell

2007-07-18 Thread Tobiah
For years now, I've been exiting the shell by typing 'exit\n', being chid by the shell, and then typing ^D. I can't remember a time that I typed the ^D the first time. Call me an idiot if you must, but since someone took the trouble to catch the command 'exit' in a special way, would it have

Question about how to use cog as a preprocessor :-(

2007-07-18 Thread Steven W. Orr
I have the following module: #! /usr/bin/python COG_DEBUG=1 def wrapper( dd ): if dd == 1: def dfunc( *args ): print print , for ii in args: print repr(ii) print compd dfunc return dfunc else: def nfunc(

Re: Python-URL! - weekly Python news and links (Jul 16)

2007-07-18 Thread Cameron Laird
In article [EMAIL PROTECTED], Kay Schluehr [EMAIL PROTECTED] wrote: Gabriel Genellina schrieb: QOTW: That's a property of open source projects. Features nobody really needs are not implemented. - Gregor Horvath It's a good QOTW but social romantic nonsense nevertheless. Not sure if it's

Newbie: freebsd admin scripting

2007-07-18 Thread Muffin
I am using python for the first time on Unix and on FBSD. I need a few pointer, tips or tricks on scripting on config files. Mostly admin type configs like the rc.conf file usually setup like: someiteam=somevalue#sometype of description Where I would like to toggle the somevalue in an

problem with psqlite2 return types

2007-07-18 Thread Danny
Howdy, I'm having troubles with psqlite2 and the return types from a query. The problem is that my data which is numeric, is being returned as a string. I'm aware of the detect_types=sqlite.PARSE_DECLTYPES argument to the connect function. Here's my connection code:

Re: Exiting from python shell

2007-07-18 Thread James Stroud
Tobiah wrote: For years now, I've been exiting the shell by typing 'exit\n', being chid by the shell, and then typing ^D. I can't remember a time that I typed the ^D the first time. Call me an idiot if you must, but since someone took the trouble to catch the command 'exit' in a special

Re: Newbie: freebsd admin scripting

2007-07-18 Thread Evan Klitzke
On 7/17/07, Muffin [EMAIL PROTECTED] wrote: I am using python for the first time on Unix and on FBSD. I need a few pointer, tips or tricks on scripting on config files. Mostly admin type configs like the rc.conf file usually setup like: someiteam=somevalue#sometype of description

Re: Exiting from python shell

2007-07-18 Thread Mark Elston
* James Stroud wrote (on 7/18/2007 4:27 PM): Tobiah wrote: For years now, I've been exiting the shell by typing 'exit\n', being chid by the shell, and then typing ^D. I can't remember a time that I typed the ^D the first time. Call me an idiot if you must, but since someone took the trouble

Re: Python-URL! - weekly Python news and links (Jul 16)

2007-07-18 Thread David Boddie
On Wed Jul 18 23:20:51 CEST 2007, Cameron Laird wrote: Kay Schluehr kay.schluehr at gmx.net wrote: Not sure if it's important enough to be mentioned in weekly Python news but Europython 2007 actually happened and took place in Vilnius. *I* sure think it's important; is there a summary or

Running Python with XAMPP

2007-07-18 Thread Mathias K.
Hello everyone! I just installed Python 2.5 and i want to use Python to build websites. I could load mod_python successfully with Apache but i fail to let the .py-files to be executed! In /htdocs/python i got my test file: [code=python.py] from mod_python import apache def index(req):

Interprocess communication

2007-07-18 Thread Murali
Hi Python Gurus, I am writing a GUI app (on linux) using pygtk which would launch some external applications and display their stdout and stderr inside the output window of my application synchronously. I am using the subprocess module's Popen to launch the external programs and to capture their

Re: Exiting from python shell

2007-07-18 Thread James Matthews
try raise SystemExit On 7/18/07, Mark Elston [EMAIL PROTECTED] wrote: * James Stroud wrote (on 7/18/2007 4:27 PM): Tobiah wrote: For years now, I've been exiting the shell by typing 'exit\n', being chid by the shell, and then typing ^D. I can't remember a time that I typed the ^D the

Re: how to implementation latent semantic indexing in python..

2007-07-18 Thread malkarouri
On 13 Jul, 17:18, 78ncp [EMAIL PROTECTED] wrote: hi... how to implementation algorithm latent semantic indexing in python programming...?? thank's for daniel who answered my question before.. -- View this message in

Issue with CSV

2007-07-18 Thread Rohan
Hello, I'm working on a script which collects some data and puts into a csv file which could be exported to excel. so far so good, I'm able to do what I described. When I run the script for the second time after a certain period of time the results should appear next to the results of the last

Re: Newbie: freebsd admin scripting

2007-07-18 Thread Will Maier
On Wed, Jul 18, 2007 at 04:31:35PM -0700, Evan Klitzke wrote: I found a built in mod for parseconfig but it deal with .ini file styles (windows) that include a [section] header as well as uses someiteam=somevalue format. I believe it requires the header though. I think you're referring

Re: Break up list into groups

2007-07-18 Thread George Sakkis
On Jul 17, 1:48 pm, Matimus [EMAIL PROTECTED] wrote: I did some more experimenting and came up with the code below. It shows several methods. When run, the script tests the robustness of each method (roughly), and profiles it using timeit. The results from running on my laptop are shown below

  1   2   >