Re: Inheritance problem

2007-05-09 Thread attn . steven . kuo
On May 9, 11:33 am, Bjoern Schliessmann wrote: > [EMAIL PROTECTED] wrote: > > class longList(shortList): > > > def __init__(self): > > > shortList.setList() > > > self.setList() > > Addition: Always call the base class __init__ in your constructor if > there exists one, i. e. >

Re: preferred windows text editor?

2007-05-09 Thread Jason
On May 9, 12:06 pm, "T. Crane" <[EMAIL PROTECTED]> wrote: > Right now I'm using Notepad++. What are other people using? > > trevis IDLE for short scripts, PyDev under Eclipse for big Python projects, and the Python shell for basic one-offs. --Jason -- http://mail.python.org/mailman/listinfo/

Re: preferred windows text editor?

2007-05-09 Thread Stef Mientki
PyScripter or JALcc Stef T. Crane wrote: > Right now I'm using Notepad++. What are other people using? > > trevis > > -- http://mail.python.org/mailman/listinfo/python-list

Re: Inheritance problem

2007-05-09 Thread Bjoern Schliessmann
[EMAIL PROTECTED] wrote: > class longList(shortList): > > def __init__(self): > > shortList.setList() > > self.setList() Addition: Always call the base class __init__ in your constructor if there exists one, i. e. class longList(shortList) def __init__(self): s

RE: preferred windows text editor?

2007-05-09 Thread Looney, James B
I'm using Vim (http://www.vim.org/). -JB -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of T. Crane Sent: Wednesday, May 09, 2007 12:07 PM To: python-list@python.org Subject: preferred windows text editor? Right now I'm using Notepad++. What are other peop

input

2007-05-09 Thread HMS Surprise
Just wanted a input routine that would let me pause my jython program until I press enter. Searched tutorial, lang ref, and lib and found input and raw_input. Both hang the program and it must be killed. s = raw_input('--> ') What has Mr Duh done wrong now? jh -- http://mail.python.org/mailman

Re: preferred windows text editor?

2007-05-09 Thread kyosohma
On May 9, 1:06 pm, "T. Crane" <[EMAIL PROTECTED]> wrote: > Right now I'm using Notepad++. What are other people using? > > trevis For Python, I still prefer IDLE or PythonWin. For other things like cmd, ini, and other text files, I use either Notepad++ or UltraEdit. Mike -- http://mail.python

Re: path stuff

2007-05-09 Thread kyosohma
On May 9, 1:11 pm, fscked <[EMAIL PROTECTED]> wrote: > I am walking some directories looking for a certain filename pattern. > This part works fine, but what if I want to exclude results from a > certain directory being printed? > > eg > > d:\dir\mydir1\filename.txt <--

Re: Inheritance problem

2007-05-09 Thread Neil Cerutti
On 2007-05-09, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I'm trying to solve a problem using inheritance and > polymorphism in python 2.4.2 It's not an inheritance problem, it's a notation problem. Python uses explicit 'self', saving you the trouble of devising a naming convention for data me

path stuff

2007-05-09 Thread fscked
I am walking some directories looking for a certain filename pattern. This part works fine, but what if I want to exclude results from a certain directory being printed? eg d:\dir\mydir1\filename.txt <--I want to see this one d:\dir\mydir2\archived\filename.txt

Re: ctypes: Problems using Windows-DLL from VB example code

2007-05-09 Thread Thomas Heller
>> Have you tried to pass the structure by reference? >> >> dso_lib.port_init(byref(init_data)) > > That gives me another exeption: > > print dso_lib.port_init(byref(init_data)) > ValueError: Procedure called with not enough arguments (4 bytes missing) or > wrong calling convention Please t

Inheritance problem

2007-05-09 Thread amidzic . branko
I'm trying to solve a problem using inheritance and polymorphism in python 2.4.2 I think it's easier to explain the problem using simple example: class shortList: def __init__(self): self.setList() def setList(self): a = [1,2,3] print a class longList

preferred windows text editor?

2007-05-09 Thread T. Crane
Right now I'm using Notepad++. What are other people using? trevis -- http://mail.python.org/mailman/listinfo/python-list

Re: ctypes: Problems using Windows-DLL from VB example code

2007-05-09 Thread Noralf Tr�nnes
> Have you tried to pass the structure by reference? > > dso_lib.port_init(byref(init_data)) > > Thomas > That gives me another exeption: print dso_lib.port_init(byref(init_data)) ValueError: Procedure called with not enough arguments (4 bytes missing) or wrong calling convention Noralf.

Re: Boost python : get the shape of a numpy ndarray in C++ code.

2007-05-09 Thread Roman Yakovenko
On 9 May 2007 08:08:46 -0700, TG <[EMAIL PROTECTED]> wrote: > Hi there. > > I'm strugling here with some boost python code (damn I hate C++) : > > All I want to do is to initialize the content of an array with a numpy > ndarray parameter. I have this, which actually works. But I want to > add some

Re: ctypes: Problems using Windows-DLL from VB example code

2007-05-09 Thread Thomas Heller
Noralf Trønnes schrieb: > Hi > > I'm trying to use a DLL from Python using ctypes. > The call to dso_lib.capture_hold_chk() does return 232. So it seem to work. > The call to dso_lib.port_init(init_data) gives: > WindowsError: exception: access violation reading 0x0006 > > Any suggestions? >

Re: Getting some element from sets.Set

2007-05-09 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > Since any element of the set serves as a name (and you know the sets are > all non- empty), it'd be very nice to have a .element() method, or some > such. I guess "iter(s).next()" works okay, but it's not very readable, > and I wonder if it's effi

Re: Towards faster Python implementations - theory

2007-05-09 Thread John Nagle
Paul Boddie wrote: > On 9 May, 08:09, "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote: > >>I am relatively new on this turf, and from what I have seen so far, it >>would not bother me at all to tie a name's type to its first use, so that >>the name can only be bound to objects of the same type as t

ctypes: Problems using Windows-DLL from VB example code

2007-05-09 Thread Noralf Tr�nnes
Hi I'm trying to use a DLL from Python using ctypes. The call to dso_lib.capture_hold_chk() does return 232. So it seem to work. The call to dso_lib.port_init(init_data) gives: WindowsError: exception: access violation reading 0x0006 Any suggestions? Thanks. Noralf Here is my python code:

Single precision floating point calcs?

2007-05-09 Thread Grant Edwards
I'm pretty sure the answer is "no", but before I give up on the idea, I thought I'd ask... Is there any way to do single-precision floating point calculations in Python? I know the various array modules generally support arrays of single-precision floats. I suppose I could turn all my variabl

Re: tkinter - Screen Resolution

2007-05-09 Thread rahulnag22
On May 9, 10:37 am, [EMAIL PROTECTED] wrote: > Hi, > I have developed a GUI using tkinter (grid geometory manager). > The structure is a top frame containing multiple subframes. Each > subframe has a combination of widgets like(Entry, label, > button,listboxes). The subframes are placed with a padx

Re: Getting some element from sets.Set

2007-05-09 Thread Steven Bethard
[EMAIL PROTECTED] wrote: > I've also previously run into the same need as the original poster. I > no longer recall the details, but I think maybe I was implementing a > union/find type algorithm. This basically involves partitioning a > universe set into partitions, where any element of a partit

tkinter - Screen Resolution

2007-05-09 Thread rahulnag22
Hi, I have developed a GUI using tkinter (grid geometory manager). The structure is a top frame containing multiple subframes. Each subframe has a combination of widgets like(Entry, label, button,listboxes). The subframes are placed with a padx and pady offset with regards to the other subframes. A

Re: BUSTED!!! 100% VIDEO EVIDENCE that WTC7 was controlled demolition!! NEW FOOTAGE!!! Ask yourself WHY havn't I seen this footage before?

2007-05-09 Thread James Beck
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > James Beck wrote: > > > > In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] > > says... > > > James Beck wrote: > > > > > > > > Yep, you must have access to better drugs than I do. > > > > You get to hallucinate your stuff up. > > > > Do

Re: which is more pythonic/faster append or +=[]

2007-05-09 Thread 7stud
On May 8, 11:05 pm, [EMAIL PROTECTED] (Alex Martelli) wrote: > alf <[EMAIL PROTECTED]> wrote: > > two ways of achieving the same effect > > > l+=[n] > > > or > > > l.append(n) > > > so which is more pythonic/faster? > > .append - easy to measure, too: > > brain:~ alex$ python -mtimeit 'L=range(3);

Re: change of random state when pyc created??

2007-05-09 Thread Alan G Isaac
Diez B. Roggisch wrote: > Not really, but that depends on what you know about the concept of sets and > maps as collections of course. > > The contract for sets and dicts doesn't imply any order whatsoever. Which is > essentially the reason why > > set(xrange(10))[0] > > doesn't exist, and quite

Re: Getting some element from sets.Set

2007-05-09 Thread [EMAIL PROTECTED]
On May 4, 5:06 pm, John Machin <[EMAIL PROTECTED]> wrote: > Errmm, union and intersection operations each apply to two (or more) > sets, not to the elements of a set. > You have n sets set0, set1, > > Let u be the number of unique somevalues (1 <= u <= n) > > If u > 1, then after setn = union

Re: String parsing

2007-05-09 Thread Paul Boddie
On 9 May, 06:42, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > [HTMLParser-based solution] Here's another approach using libxml2dom [1] in HTML parsing mode: import libxml2dom # The text, courtesy of Dennis. sample = """ """ # Parse the string in HTML mode. d = libxml2dom.parseString(sa

Re: Suggestions for how to approach this problem?

2007-05-09 Thread John Salerno
John Salerno wrote: > So I need to remove the line breaks too, but of course not *all* of them > because each reference still needs a line break between it. After doing a bit of search and replace for tabs with my text editor, I think I've narrowed down the problem to just this: I need to remov

Sorting attributes by catagory

2007-05-09 Thread Ron Adam
This is for a new version of pydoc if I can get the class attributes sorted out. The module level attributes aren't too difficult to categorize. (I might be just too tired to see the obvious.) The original pydoc did this a somewhat round about way, so I would like to find a more direct method

Re: Specification for win32com.client package

2007-05-09 Thread Tim Golden
[EMAIL PROTECTED] wrote: > On May 9, 8:25 am, Tim Golden <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] wrote: >>> The wiki idea sounds like a good one. I was thinking about doing some >>> kind of Python site about the modules and I think the popular 3rd >>> party ones would be a good place to sta

Re: Gui thread and async jobs.

2007-05-09 Thread Phil Thompson
On Wednesday 09 May 2007 3:58 pm, Grant Edwards wrote: > On 2007-05-08, king kikapu <[EMAIL PROTECTED]> wrote: > > Hi, i am reading the book "Python Cookbook, 2nd edition" and i > > encountered a very handy recipe, the one that is called > > "Combining GUIs and Asynchronous I/O with Threads" > > >

Re: How safe is a set of floats?

2007-05-09 Thread Dave Borne
On 4 May 2007 07:21:49 -0700, Thomas Nelson <[EMAIL PROTECTED]> wrote: > I want to generate all the fractions between 1 and limit (with > limit>1) in an orderly fashion, without duplicates. Might I suggest the Stern-Brocot tree (http://en.wikipedia.org/wiki/Stern-Brocot_tree) It will eliminate the

Re: which is more pythonic/faster append or +=[]

2007-05-09 Thread 7stud
On May 8, 11:05 pm, [EMAIL PROTECTED] (Alex Martelli) wrote: > alf <[EMAIL PROTECTED]> wrote: > > two ways of achieving the same effect > > > l+=[n] > > > or > > > l.append(n) > > > so which is more pythonic/faster? > > .append - easy to measure, too: > > brain:~ alex$ python -mtimeit 'L=range(3);

Re: Specification for win32com.client package

2007-05-09 Thread kyosohma
On May 9, 8:25 am, Tim Golden <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > The wiki idea sounds like a good one. I was thinking about doing some > > kind of Python site about the modules and I think the popular 3rd > > party ones would be a good place to start, maybe starting with win3

Re: Towards faster Python implementations - theory

2007-05-09 Thread Terry Reedy
"Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | I am relatively new on this turf, and from what I have seen so far, it | would not bother me at all to tie a name's type to its first use, so that | the name can only be bound to objects of the same type as the typ

Boost python : get the shape of a numpy ndarray in C++ code.

2007-05-09 Thread TG
Hi there. I'm strugling here with some boost python code (damn I hate C++) : All I want to do is to initialize the content of an array with a numpy ndarray parameter. I have this, which actually works. But I want to add some kind of data check such as : * is array two dimensional ? * are the dim

Re: N00b question on Py modules

2007-05-09 Thread Ant
On May 9, 2:47 pm, Sion Arrowsmith <[EMAIL PROTECTED]> wrote: ... > How so? Python style gurus discourage use of global variables. So > does all the C++ (and to a lesser extent C) advice I've ever > encountered. And Java outright forbids the concept. Class variables (public static), are the equiva

Re: Gui thread and async jobs.

2007-05-09 Thread Grant Edwards
On 2007-05-08, king kikapu <[EMAIL PROTECTED]> wrote: > Hi, i am reading the book "Python Cookbook, 2nd edition" and i > encountered a very handy recipe, the one that is called > "Combining GUIs and Asynchronous I/O with Threads" > > It is talking about retain a main GUI thread, doing async work >

Re: Newbie prob: How to write a file with 3 threads?

2007-05-09 Thread Bjoern Schliessmann
est wrote: > I'd like to say VERY VERY VERY thank you for your detailed > information, that's a lot encourage for a beginner. In fact I am > writing a multi thread download ultility, and I found that very > hard for me. You don't need any system threads for multiple download threads. Since netwo

Re: String parsing

2007-05-09 Thread HMS Surprise
BTW, here's what I used, the other ideas have been squirreled away in my neat tricks and methods folder. for el in data.splitlines(): if el.find('LastUpdated') <> -1: s = el.split("=")[-1].split('"')[1] print 's:', s Thanks

RE: Simulating simple electric circuits

2007-05-09 Thread Hamilton, William
> From: Bjoern Schliessmann > Sounds more familiar than the analog approach. Maybe I misunderstood > something ... but I can't transfer my problem to this way of > thinking yet. My biggest problem is the fact that relays aren't > really interested in voltage, but current. > > Also, I find it diffi

Re: Suggestions for how to approach this problem?

2007-05-09 Thread John Salerno
James Stroud wrote: > If you can count on the person not skipping any numbers in the > citations, you can take an "AI" approach to hopefully weed out the rare > circumstance that a number followed by a period starts a line in the > middle of the citation. I don't think any numbers are skipped,

Re: Simulating simple electric circuits

2007-05-09 Thread Bjoern Schliessmann
Arnaud Delobelle wrote: > When you turn a switch off, it would send a message to the paths > that depend on it (maybe via the controller?) so that they would > be > deactivated. In turn the lightbulbs on these paths would be > informed that they are no longer active. > > When you turn a switch o

Re: Suggestions for how to approach this problem?

2007-05-09 Thread John Salerno
Dave Hansen wrote: > Questions: > > 1) Do the citation numbers always begin in column 1? Yes, that's one consistency at least. :) > 2) Are the citation numbers always followed by a period and then at > least one whitespace character? Yes, it seems to be either one or two whitespaces. > find t

Re: Suggestions for how to approach this problem?

2007-05-09 Thread John Salerno
Necmettin Begiter wrote: > Is this how the text looks like: > > 123 > some information > > 124 some other information > > 126(tab here)something else > > If this is the case (the numbers are at the beginning, and after the numbers > there is either a newline or a tab, the logic might be this

Re: Simulating simple electric circuits

2007-05-09 Thread Bjoern Schliessmann
Dave Baum wrote: > Are you trying to do logic simulation (digital) or analog circuit > simulation? Mh, a mix of both :) I want to simulate (in principle simple) magnetic relay circuits. The only "evil tricks" that are used are - shortcuts (e. g. a relay coil is bypassed and thus the relay gets

Re: Questions about bsddb

2007-05-09 Thread Nick Vatamaniuc
On May 9, 8:23 am, [EMAIL PROTECTED] wrote: > Hello, > > I need to build a large database that has roughly 500,000 keys, and a > variable amount of data for each key. The data for each key could > range from 100 bytes to megabytes.The data under each will grow with > time as the database is being b

Re: String parsing

2007-05-09 Thread HMS Surprise
> This looks to be simple HTML (and I'm presuming that's a type on > that ?> ending). A quick glance at the Python library reference (you do > have a copy, don't you) reveals at least two HTML parsing modules... > No that is not a typo and bears investigation. Thanks for the find. I foun

IDLE can't import Tkinter

2007-05-09 Thread Romain FEUILLETTE
Hello, I'have just install Python 2.5.1 on Linux and the IDLE doesn't seem to works because it didn't find Tcl/Tk Is there someone to explain how to modify the file "setup.py" to tell the install that Tcl/Tk are at the paht : "/usr/bin/tclsh" and "usr/bin/wish/" ? I have attached to log file

Re: Simulating simple electric circuits

2007-05-09 Thread Bjoern Schliessmann
Stef Mientki wrote: > Bjoern Schliessmann wrote: >> - sources (here begin currents) >> - ground (here end currents) > that doesn't bring you anywhere ;-) It does :) > Current doesn't start or end at some location, > current flows through a closed circuit. The part I omit is the voltage source.

Re: N00b question on Py modules

2007-05-09 Thread Sion Arrowsmith
<[EMAIL PROTECTED]> wrote: >Thanks a lot for the responses ppl. Python's treatment of global >variables was an eye-opener. I have coded in Java & C/C++ in the past >and there the behaviour is diametrically opposite. How so? Python style gurus discourage use of global variables. So does all the C+

Re: change of random state when pyc created??

2007-05-09 Thread Diez B. Roggisch
Alan Isaac wrote: > > "Peter Otten" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> Alan Isaac wrote: >> There is nothing wrong with the random module -- you get the same numbers > on >> every run. When there is no pyc-file Python uses some RAM to create it >> and therefore your

Re: change of random state when pyc created??

2007-05-09 Thread Alan Isaac
"Peter Otten" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Alan Isaac wrote: > There is nothing wrong with the random module -- you get the same numbers on > every run. When there is no pyc-file Python uses some RAM to create it and > therefore your GridPlayer instances are locate

Does RETURN_VALUE always result in an empty stack?

2007-05-09 Thread dwhall
I'm developing PyMite and would like to know a little detail about Python 2.5's design. Is it true that when the RETURN_VALUE executes and pops its argument, that at that point the stack should *always* be empty? I mean just the argument stack for that execution frame. I want to use this knowled

Re: Specification for win32com.client package

2007-05-09 Thread Tim Golden
[EMAIL PROTECTED] wrote: > The wiki idea sounds like a good one. I was thinking about doing some > kind of Python site about the modules and I think the popular 3rd > party ones would be a good place to start, maybe starting with win32. > How much information do you think would need to be on a site

Re: Specification for win32com.client package

2007-05-09 Thread kyosohma
On May 8, 7:34 am, Tim Golden <[EMAIL PROTECTED]> wrote: > Peter Fischer wrote: > > Hello Tim, > > > thank you for your answer and sorry for the multiple e-mails. Thank you > > also for > > the hint on the book. I already read into it in our local library. Its > > good, but a > > little outdated

Re: Boolean confusion

2007-05-09 Thread Greg Corradini
On 2007-05-09, Greg Corradini <[EMAIL PROTECTED]> wrote: > > Hello all, > I'm having trouble understanding why the following code evaluates as it > does: > string.find('020914A','.') and len('020914A') > 10 > True len('020914A') > 10 and string.find('020914A','.') > -1

Re: Boolean confusion

2007-05-09 Thread Greg Corradini
Thank you Diez and Antoon for demystifing this problem. I see where I've been going wrong. Diez B. Roggisch-2 wrote: > > Greg Corradini wrote: > >> >> Hello all, >> I'm having trouble understanding why the following code evaluates as it >> does: >> > string.find('020914A','.') and len

Re: error in the if, elif, else statement ?

2007-05-09 Thread John Machin
On May 9, 5:46 pm, [EMAIL PROTECTED] wrote: > Hello together, > > I wrote a script for the engineering software abaqus/CAE. It worked > well until I implemented a selection in order to variate the variable > "lGwU" through an if elif, else statement. I am going to post the > first 82 lines of the s

Re: Boolean confusion

2007-05-09 Thread Antoon Pardon
On 2007-05-09, Greg Corradini <[EMAIL PROTECTED]> wrote: > > Hello all, > I'm having trouble understanding why the following code evaluates as it > does: > string.find('020914A','.') and len('020914A') > 10 > True len('020914A') > 10 and string.find('020914A','.') > -1 > >

Re: Boolean confusion

2007-05-09 Thread Diez B. Roggisch
Greg Corradini wrote: > > Hello all, > I'm having trouble understanding why the following code evaluates as it > does: > string.find('020914A','.') and len('020914A') > 10 > True len('020914A') > 10 and string.find('020914A','.') > -1 > > In the 2.4 Python Reference Ma

Boolean confusion

2007-05-09 Thread Greg Corradini
Hello all, I'm having trouble understanding why the following code evaluates as it does: >>> string.find('020914A','.') and len('020914A') > 10 True >>> len('020914A') > 10 and string.find('020914A','.') -1 In the 2.4 Python Reference Manual, I get the following explanation for t

Re: Using the CSV module

2007-05-09 Thread John Machin
On May 9, 6:40 pm, "Nathan Harmston" <[EMAIL PROTECTED]> wrote: > Hi, > > I ve been playing with the CSV module for parsing a few files. A row > in a file looks like this: > > some_id\t|\tsome_data\t|t\some_more_data\t|\tlast_data\t\n > > so the lineterminator is \t\n and the delimiter is \t|\t, ho

Re: psycopg2 error

2007-05-09 Thread Luis P. Mendes
Hello Martin, Em Wed, 09 May 2007 06:17:09 +0200, Martin v. Löwis escreveu: >> ImportError: libpq.so.5: cannot open shared object file: No such file or >> directory >> >> libpq files are readable by the world: [EMAIL PROTECTED] pgsql # ll lib/ -d >> drwxr-xr-x 3 postgres postgres 1528 2007-05-07

Questions about bsddb

2007-05-09 Thread sinoodle
Hello, I need to build a large database that has roughly 500,000 keys, and a variable amount of data for each key. The data for each key could range from 100 bytes to megabytes.The data under each will grow with time as the database is being built. Are there some flags I should be setting when op

Problems in string replacement

2007-05-09 Thread saif . shakeel
HI, Thanks for the reply.that seems to work,but i was doing this so as to attach it to a bigger code where it will be utilised before a parsing. #Input file and Output file path from user file_input = raw_input("Enter The ODX File Path:") (shortname,ext)=os.path.splitext(file_input) f

Re: replacing string in xml file

2007-05-09 Thread saif . shakeel
On May 8, 4:46 pm, [EMAIL PROTECTED] wrote: > On May 8, 4:30 pm, Stefan Behnel <[EMAIL PROTECTED]> wrote: > > > > > > > [EMAIL PROTECTED] schrieb: > > > > Hi, > > > I need to replace a string in xml file with something else.Ex > > > > - > > > rate > > > rate > > > > > > > > > > >

Re: view workspace, like in MatLab ?

2007-05-09 Thread Dave
Stef Mientki mailbox.kun.nl> writes: > > hello, > > is there a function / library / IDE that displays all the user defined > variables, like the workspace in MatLab ? > > thanks, > Stef Mientki Using ipython (which I would highly recommend!) you can use the %whos 'magic' function. This works

Re: Towards faster Python implementations - theory

2007-05-09 Thread Paul Boddie
On 9 May, 08:09, "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote: > > I am relatively new on this turf, and from what I have seen so far, it > would not bother me at all to tie a name's type to its first use, so that > the name can only be bound to objects of the same type as the type > of the objec

Re: view workspace, like in MatLab ?

2007-05-09 Thread Nick Vatamaniuc
On May 9, 5:00 am, Stef Mientki <[EMAIL PROTECTED]> wrote: > hello, > > is there a function / library / IDE that displays all the user defined > variables, > like the workspace in MatLab ? > > thanks, > Stef Mientki Stef, In the Python interactive prompt you can try: [var for var in dir() if n

Re: Multiple regex match idiom

2007-05-09 Thread Nick Vatamaniuc
On May 9, 5:00 am, Hrvoje Niksic <[EMAIL PROTECTED]> wrote: > I often have the need to match multiple regexes against a single > string, typically a line of input, like this: > > if (matchobj = re1.match(line)): > ... re1 matched; do something with matchobj ... > elif (matchobj = re2.match(line))

Re: Using the CSV module

2007-05-09 Thread Nathan Harmston
I ve just finished writing one, I wanted to stay with the batteries included approach as much as possible though. Is there anyway I can request a change to the csv module? Thanks Nathan On 09/05/07, Stefan Sonnenberg-Carstens <[EMAIL PROTECTED]> wrote: > Most of the time I found the CSV module

Spotting Crashed Application

2007-05-09 Thread Robert Rawlins - Think Blue
Hello Guys, I've got an application that I've written, and it sits in an embedded system, from time to time the application will crash, I'm not quite sure what's causing this, but as we test it more and more we'll grasp a better understanding and fix the issues. However, until then I need a

Re: Using the CSV module

2007-05-09 Thread Stefan Sonnenberg-Carstens
Most of the time I found the CSV module not as useful as it might be - due to the restrictions you describe. Why not write a simple parser class ? On Mi, 9.05.2007, 10:40, Nathan Harmston wrote: > Hi, > > I ve been playing with the CSV module for parsing a few files. A row > in a file looks like

Re: Multiple regex match idiom

2007-05-09 Thread Charles Sanders
Hrvoje Niksic wrote: > I often have the need to match multiple regexes against a single > string, typically a line of input, like this: > > if (matchobj = re1.match(line)): > ... re1 matched; do something with matchobj ... > elif (matchobj = re2.match(line)): > ... re2 matched; do something wi

view workspace, like in MatLab ?

2007-05-09 Thread Stef Mientki
hello, is there a function / library / IDE that displays all the user defined variables, like the workspace in MatLab ? thanks, Stef Mientki -- http://mail.python.org/mailman/listinfo/python-list

Multiple regex match idiom

2007-05-09 Thread Hrvoje Niksic
I often have the need to match multiple regexes against a single string, typically a line of input, like this: if (matchobj = re1.match(line)): ... re1 matched; do something with matchobj ... elif (matchobj = re2.match(line)): ... re2 matched; do something with matchobj ... elif (matchobj = re

Re: __getattr__ and __getattribute__

2007-05-09 Thread km
Oh thats lucid! thanks for the explanation. regards KM - On 5/9/07, Gabriel Genellina <[EMAIL PROTECTED]> wrote: En Tue, 08 May 2007 08:22:03 -0300, km <[EMAIL PROTECTED]> escribió: > i find it difficult to understand the difference b

Using the CSV module

2007-05-09 Thread Nathan Harmston
Hi, I ve been playing with the CSV module for parsing a few files. A row in a file looks like this: some_id\t|\tsome_data\t|t\some_more_data\t|\tlast_data\t\n so the lineterminator is \t\n and the delimiter is \t|\t, however when I subclass Dialect and try to set delimiter is "\t|\t" it says del

Re: msbin to ieee

2007-05-09 Thread revuesbio
Hi, I found something interresting. First, MBF Files come from metastock software but i use another one (MLDownloader) to get quotes and convert them to MBF format probably using functions you've just described (C, borland,...). In final, all my files are created by mldownloader. 2nd, I've tri

Re: Towards faster Python implementations - theory

2007-05-09 Thread Hendrik van Rooyen
"John Nagle" <[EMAIL PROTECTED]> wrote: 8< summary of existing work and thinking -- > The point here is that we don't need language changes or declarations > to make Python much faster. All we need are a few restrictions that > insure that, when you're doing

Re: error in the if, elif, else statement ?

2007-05-09 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, juan-manuel.behrendt wrote: > Hello together, > > I wrote a script for the engineering software abaqus/CAE. It worked > well until I implemented a selection in order to variate the variable > "lGwU" through an if elif, else statement. I am going to post the > first 82 line

MailingLogger 3.0.0 Released!

2007-05-09 Thread Chris Withers
Mailinglogger enables log entries to be emailed either as the entries are logged or as a summary at the end of the running process. This pair of enhanced emailing handlers for the python logging framework is now available as a standard python package and as an egg. The handlers have the followi

Re: Minor bug in tempfile module (possibly __doc__ error)

2007-05-09 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, James T. Dennis wrote: > Tonight I discovered something odd in the __doc__ for tempfile > as shipped with Python 2.4.4 and 2.5: it says: > > This module also provides some data items to the user: > > TMP_MAX - maximum number of names that will be tried be

error in the if, elif, else statement ?

2007-05-09 Thread juan-manuel . behrendt
Hello together, I wrote a script for the engineering software abaqus/CAE. It worked well until I implemented a selection in order to variate the variable "lGwU" through an if elif, else statement. I am going to post the first 82 lines of the script, since the error message points at line 80: from

Re: RotatingFileHandler bugs/errors and a general logging question.

2007-05-09 Thread Vinay Sajip
On May 9, 12:52 am, [EMAIL PROTECTED] wrote: > The infrastructure in which I am work needs the ability to have log > files written to from multiple instances of the same script and > potentially from hundreds or more different machines. > > I know that the documentation suggests using a networklogg

Re: Plot with scipy

2007-05-09 Thread redcic
Thank you all for your answers. Setting "interactive : True" is often suggested to me but it does not solve my problem. I tried different other things (following your advices) but I still have the same problem. Maybe the source of my problem is the fact that I use the SciTE editor. What do you thin

Re: Gui thread and async jobs.

2007-05-09 Thread Jarek Zgoda
king kikapu napisał(a): > Hi, i am reading the book "Python Cookbook, 2nd edition" and i > encountered a very handy recipe, the one that is called "Combining > GUIs and Asynchronous I/O with Threads" > > It is talking about retain a main GUI thread, doing async work with > worker threads and have

Re: change of random state when pyc created??

2007-05-09 Thread Peter Otten
Alan Isaac wrote: > This may seem very strange, but it is true. > If I delete a .pyc file, my program executes with a different state! > Can someone explain this to me? There is nothing wrong with the random module -- you get the same numbers on every run. When there is no pyc-file Python uses s

Re: Strange terminal behavior after quitting Tkinter application

2007-05-09 Thread Chris
On May 7, 10:02 pm, "Hamilton, William " <[EMAIL PROTECTED]> wrote: > > From: Chris > > > I'll admit to being surprised at seeing a claim that atkinter > > > application, started within an interactive session, without a > mainloop, > > > even runs... I could see it maybe happening from Idle

Re: Designing a graph study program

2007-05-09 Thread Alexander Schliep
andrea <[EMAIL PROTECTED]> writes: > Well then I wanted to draw graphs and I found that pydot is working > really nicely. > BUT I'd like to do this, an interactive program to see ho the > algorithms works... > For example in the breath search first, every time the algorithm > colors a node, the pr

Re: changing a var by reference of a list

2007-05-09 Thread Jorgen Bodde
Hi Bruno, Unfortunately SQLAlchemy will be too involved at this point I will have to rewrite a lot of code to remove my current DB solution and use that. Howerver I've learned from my mistake and the next project will use it, as it seems to be a nice way of mapping objects to databases.. I'v solv

<    1   2