PythonQt 1.0 released

2007-05-09 Thread Florian Link
We are proud to announce the PythonQt 1.0 major release, a dynamic and lightweight script binding of the Qt4 framework to the Python language. Various aspects have been improved since the initial release both on functionality and performance side. A number of examples have been added to make it

CPU usage.

2007-05-09 Thread Navid Parvini
Dear All, I want to get the CPU usage in my code. Is there any module in Python to get it? Also I want to get in on Windows and Linux. Thank you in advance. Navid - Ahhh...imagining that irresistible new car smell? Check outnew cars at

Re: interesting exercise

2007-05-09 Thread Charles Sanders
Michael Tobis wrote: Here is the bloated mess I came up with. I did see that it had to be recursive, and was proud of myself for getting it pretty much on the first try, but the thing still reeks of my sorry old fortran-addled mentality. Recursion is not necessary, but is much, much clearer.

Minor bug in tempfile module (possibly __doc__ error)

2007-05-09 Thread James T. Dennis
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 before giving up.

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

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 program

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, since Idle is

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

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 both

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 think

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

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: 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 before

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

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 lines of the

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: 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

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

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

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 =

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

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 with

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

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

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

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: 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 not

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 object that

Re: view workspace, like in MatLab ?

2007-05-09 Thread Dave
Stef Mientki S.Mientki-nospam at 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.

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 - SERVICEPARAMETER id=_775 Semantics=subfunction DDORef=_54

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)

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

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 23:25

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, however when

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 the

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 Manual, I get the

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 In the 2.4 Python

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 script,

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('020914A')

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 In the 2.4

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 (Jan. 2000) as

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

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

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 located in

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 GridPlayer

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: 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. All

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 of my

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 found

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 built.

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 no

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 simple:

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 the

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 on, it

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, but

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 difficult

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: 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 network

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 with

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 equivalent

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

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 type |

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 win32. How

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); n=23' 'x=L[:];

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 limit1) 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: 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 It is talking

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 start, maybe

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

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 remove

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 = input type=hidden name=RFP value=-1/ !--input type=hidden name=EnteredBy

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(set0,

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 a few

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); n=23' 'x=L[:];

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. Don't forget to adjust your tin

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.

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 partition

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 and

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

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

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 the type of

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 efficient.

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? Have

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 kind of

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. --

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

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

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 try using

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: 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

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 --I want to

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 --

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 --

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

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):

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: 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 --

Re: Inheritance problem

2007-05-09 Thread attn . steven . kuo
On May 9, 11:33 am, Bjoern Schliessmann usenet- [EMAIL PROTECTED] 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

Re: Single precision floating point calcs?

2007-05-09 Thread Terry Reedy
Grant Edwards [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] | 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? Make your own Python build from altered

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

2007-05-09 Thread Noralf Tr�nnes
Thank you very much! That did the trick. Noralf. -- http://mail.python.org/mailman/listinfo/python-list

Re: preferred windows text editor?

2007-05-09 Thread nufuhsus
On May 9, 2:06 pm, T. Crane [EMAIL PROTECTED] wrote: Right now I'm using Notepad++. What are other people using? I am very noob to this Python game (though it has been around since 1995 me thinks) and currently (I was using ActivePython and then IDLE) I have been using a combination of Notepad2

  1   2   >