Re: rfind bug ?

2010-04-21 Thread Stef Mientki
On 21-04-2010 10:56, Chris Rebert wrote: > On Wed, Apr 21, 2010 at 1:51 AM, Stef Mientki wrote: > >> With the following code, I would expect a result of 5 !! >> >> >>>>> a= 'word1 word2 word3' >>>>> a.rfind(' ',7)

Re: rfind bug ?

2010-04-21 Thread Stef Mientki
On 21-04-2010 12:33, Alf P. Steinbach wrote: > * Chris Rebert: >> On Wed, Apr 21, 2010 at 2:59 AM, Stef Mientki >> wrote: >>> On 21-04-2010 10:56, Chris Rebert wrote: >>>> On Wed, Apr 21, 2010 at 1:51 AM, Stef Mientki >>>> wrote: >>>

how to make a piece of code lowercase, except strings / comment ?

2010-05-06 Thread Stef Mientki
. Is there an easy way to make a piece of code lowercase, except all string items (single / double /triple quoted and comment) ? thanks, Stef Mientki -- http://mail.python.org/mailman/listinfo/python-list

Re: Do any debuggers support "edit and continue?"

2010-05-12 Thread Stef Mientki
On 12-05-2010 19:42, Joel Koltner wrote: > Just curious... in Microsoft's Visual Studio (and I would presume some > other tools), for many languages (both interpreted and compiled!) > there's an "edit and conitnue" option that, when you hit a breakpoint, > allows you to modify a line of code before

Re: wxPython: How to get letter colour from TextCtrl

2010-05-17 Thread Stef Mientki
On 17-05-2010 23:29, D. Schramm wrote: > Hello, > > I've got a problem getting the colour of a single letter within the > TextCtrl widget: > > letterstyle = wx.TextAttr() > self.p1.GetStyle(self.p1.XYToPosition(0,0),letterstyle) > color = letterstyle.GetTextColour() > print color > > This should di

Ugly modification of a class, can it be done better ?

2010-05-20 Thread Stef Mientki
ng a global variable (Base_Grid_Double_Click) in the module, initial set to None, but can be changed by the main program to some callback function. (see the code below) Is this a valid construction ( sorry I'm not a programmer), or are there better ways to accomplish similar dynamic behavio

Re: Ugly modification of a class, can it be done better ?

2010-05-26 Thread Stef Mientki
On 21-05-2010 03:27, Steven D'Aprano wrote: > Sorry for breaking threading, but Stef's original post has not come > through to me. > > >> On Thu, May 20, 2010 at 8:13 PM, Stef Mientki >> wrote: >> > >>> So I want to change the be

Re: GUIs - A Modest Proposal

2010-06-06 Thread Stef Mientki
Aren't all programms going webbased in the near future ? And if so, wouldn't it be better to hook to GWT or something like that (I can't oversee all the conesquences)? cheers, Stef Mientki On 06-06-2010 04:22, ant wrote: > I get the strong feeling that nobody is really happy

Re: Will and Abe's "Guide to Pyjamas"

2010-06-15 Thread Stef Mientki
On 14-06-2010 17:53, lkcl wrote: >> oh look - there's a common theme, there: "web technology equals >> useless" :) >> > this is getting sufficiently ridiculous, i thought it best to > summarise the discussions of the past few days, from the perspective > of four-year-olds: > > http://pyjs.org

Hwy doesn't len(None) return zero ?

2010-06-30 Thread Stef Mientki
prevent exceptions, i've to write ( I often forget) if Result and ( len ( Result ) > 1 ) : So I wonder why len is not allowed on None and if there are objections to extend the len function . thanks, Stef Mientki -- http://mail.python.org/mailman/listinfo/python-list

Re: Hwy doesn't len(None) return zero ?

2010-06-30 Thread Stef Mientki
On 30-06-2010 20:56, Gary Herron wrote: > On 06/30/2010 11:39 AM, Stef Mientki wrote: >> hello, >> >> I've lot of functions that returns their result in some kind of tuple / list >> / array, >> and if there is no result, these functions return None. >>

Re: Anyone using GPG or PGP encryption/signatures in your Python apps?

2010-07-02 Thread Stef Mientki
per proposed for inclusion in the stdlib. Great Geremy !, but it's difficult to find, and I couldn't find any documentation. Did I not look at the right places ? thanks Stef Mientki -- http://mail.python.org/mailman/listinfo/python-list

Re: Opinions please -- how big should a single module grow?

2010-07-09 Thread Stef Mientki
to split a module in 2 parts, part 1 : everything that would normally accessible from the outside part 2 : everything that is only used inside the module I think in this way a user of the module (that doesn't know the module yet) has a far more easier entrance. cheers, Stef Mientki -- http://mail.python.org/mailman/listinfo/python-list

does someone has a binary 32-bit windows installer for arac ?

2010-08-16 Thread Stef Mientki
thanks, Stef Mientki -- http://mail.python.org/mailman/listinfo/python-list

Re: Save/load like matlab?

2010-08-23 Thread Stef Mientki
On 23-08-2010 21:44, Daniel Fetchinson wrote: >> I wonder if there is a way to save and load all python variables just like >> matlab does, so I can build a code step by step by loading previous states. >> >> I am handling a python processing code for very large files and multiple >> processing st

pyc-files contains absolute paths, is this a bug ?

2009-06-07 Thread Stef Mientki
where I like, and it runs fine. Now when I've run it once, I move the subdirectory to another location, at it doesn't run. Looking with a hex editor into some pyc-files, I see absolute paths to the old directory. Is this normal, or am I doing something completely wrong ? thanks, St

Re: Wrapping LabVIEW and DAQmx Libraries for Python

2009-06-08 Thread Stef Mientki
hi Ketteth, I was waiting for someone, making these available. The hardware modules of NI are very good, and they have a huge range of DAQ cards, even relative cheap ones. We use USB 6009 and 9162 container a lot ( now in Delphi, because the lack of Python drivers :-( I took a biref look at y

zipfile doesn't compress very good, are there other solutions ?

2009-06-11 Thread Stef Mientki
( the documentation isn't overwhelming). thanks, Stef Mientki -- http://mail.python.org/mailman/listinfo/python-list

Re: zipfile doesn't compress very good, are there other solutions ?

2009-06-11 Thread Stef Mientki
Peter Otten wrote: Stef Mientki wrote: I packed all sources with zipfile, but the compression doesn't seem to be very good. If you don't specify the compression, the files are not compressed at all. Just in case you didn't know... .. and would you be willing t

Re: zipfile doesn't compress very good, are there other solutions?

2009-06-11 Thread Stef Mientki
Peter Otten wrote: Stef Mientki wrote: Peter Otten wrote: Stef Mientki wrote: I packed all sources with zipfile, but the compression doesn't seem to be very good. If you don't specify the compression, the files are not compressed at all. Just i

Re: Tool for browsing python code

2009-06-16 Thread Stef Mientki
Lucas P Melo wrote: Is there any tool for browsing python code? (I'm having a hard time trying to figure this out) Anything like cscope with vim would be great. maybe a good IDE like PyScripter would do ? cheers, Stef -- http://mail.python.org/mailman/listinfo/python-list

Re: simple GUI for my application?

2009-06-16 Thread Stef Mientki
Filipe Teixeira wrote: Hi, I'm really struggling to find the best GUI to make a simple application. I'm doing a program to load all the ini files in the current folder, or the folder that the user chooses and list the specifics entries in it. So, the program would be like this: Som tabs here l

[ANN] first full alpha release of PyLab_Works v0.3

2009-06-16 Thread Stef Mientki
*, wxPython. Although the PyLab_Works programs are compiled with Py2Exe, all the source files are explicitly included. have fun, Stef Mientki -- http://mail.python.org/mailman/listinfo/python-list

Re: first full alpha release of PyLab_Works v0.3

2009-06-17 Thread Stef Mientki
program didn't start because .dll is missing (sorry I don't have the name)... I don't know if that is just an issue with the installer with vista or not (missing msv something 71. dll) You probably mean the microsoft visual C++ runtime (msvcr71.dll), windows vista has a brand new way (v

Re: What does Guido want in a GUI toolkit for Python?

2009-06-28 Thread Stef Mientki
Martin v. Löwis wrote: I sorta' wish he'd just come out and say, "This is what I think would be suitable for a GUI toolkit for Python: ...". He is not in the business of designing GUI toolkits, but in the business of designing programming languages. So he abstains from specifying (or even

Adding an object to the global namespace through " f_globals" is that allowed ?

2009-07-01 Thread Stef Mientki
de effects, other than overruling a possible object with the name A def some_function ( ...) : A = object ( ...) sys._getframe(1).f_globals [ Name ] = A thanks, Stef Mientki -- http://mail.python.org/mailman/listinfo/python-list

Re: Adding an object to the global namespace through " f_globals" is that allowed ?

2009-07-03 Thread Stef Mientki
ryles wrote: On Jul 2, 1:25 am, Terry Reedy wrote: The next statement works, but I'm not sure if it will have any dramatical side effects, other than overruling a possible object with the name A def some_function ( ...) : A = object ( ...) s

Re: Reversible Debugging

2009-07-04 Thread Stef Mientki
Patrick Sabin wrote: Hello, I am interested if there are any python modules, that supports reversible debugging aka stepping backwards. Any links or ideas would be helpful, because I am thinking of implementing something like that. In some cases it would be nice to have something like that,

Re: Adding an object to the global namespace through " f_globals" is that allowed ?

2009-07-05 Thread Stef Mientki
Terry Reedy wrote: Stef Mientki wrote: hello, I need to add an object's name to the global namespace. The reason for this is to create an environment, where you can add some kind of math environment, where no need for Python knowledge is needed. The next statement works, but I'm n

Re: Python and webcam capture delay?

2009-07-06 Thread Stef Mientki
jack catcher (nick) wrote: Hi, I'm thinking of using Python for capturing and showing live webcam stream simultaneously between two computers via local area network. Operating system is Windows. I'm going to begin with VideoCapture extension, no ideas about other implementation yet. Do you ha

Re: Python/pyobjC Apps on iPhone now a possibility?

2009-07-07 Thread Stef Mientki
ded Python interpreter would only be adding pressure to the constraints; even if it was an optimized interpreter. I don't know iPhone, but I've done some experiments with 400 MHz arm, running Windows Mobile, and found PocketPyGUI running very very well on these devices. cheers,

Re: Python/pyobjC Apps on iPhone now a possibility?

2009-07-07 Thread Stef Mientki
J Kenneth King wrote: Stef Mientki writes: So, the question is, can the same thing be done for Python apps? I love Python and all, but it'd be apt to ask, what's the point? The iPhone is running on what? A 400Mhz ARM processor? Resources on the device are alrea

Re: Package for fast plotting of many data points in Python?

2009-07-09 Thread Stef Mientki
tt-industries wrote: Hi, I am programming a oscilloscope module in Python. For this reason, I want to plot very many data points as fast as possible. This can be more than 100 000 at once. At once is impossible ;-) So far I have been using the ploting module of wxPython. which plotting modul

how to run the "main" section of another module ?

2009-07-12 Thread Stef Mientki
s a lot of overhead, I want to run some main program, that has a main section, and uses my library under construction. So how do I call from within the library module, in a main section in that library module, a main in another module ? thanks, Stef Mientki -- http://mail.python.org/mailman/listinfo/python-list

Re: how to run the "main" section of another module ?

2009-07-12 Thread Stef Mientki
Stef Mientki wrote: hello, when I''m working in a library, and want to test some of the library functions, I need to switch to a main application, (which has a normal main-section) and run that. If the library is simply, I add a main section to the library, so no problem. But if t

Re: how to run the "main" section of another module ?

2009-07-12 Thread Stef Mientki
SM> if __name__ == '__main__': SM>import db_test SM>new_globals = {} SM>new_globals [ '__name__' ] = '__main__' SM>new_globals [ '__file__' ] = 'not really valuable' SM>execfile ( 'db_test.py', new_globals ) Why not: import db_test db_test.main() I think that is what

any suggestions to synchronize typed text and speech ?

2009-07-19 Thread Stef Mientki
? thanks, Stef Mientki -- http://mail.python.org/mailman/listinfo/python-list

Re: any suggestions to synchronize typed text and speech ?

2009-07-20 Thread Stef Mientki
thanks Marcus, Marcus Wanner wrote: On 7/19/2009 4:15 PM, Stef Mientki wrote: hello, I'm using Scintilla as a wxPython widget with great pleasure. I now have an application where I want to make notes during a conversation, but also want to record the speech during that conversation

Re: any suggestions to synchronize typed text and speech ?

2009-07-21 Thread Stef Mientki
hi Marcus, That sounds like a very specialized type of thing, Well from an application point of view, with the current netbooks, this looks like a perfect tool for any conversation or meeting. which only the few people with experience with wxPython, PyAudio, and Scintilla could help you with...

sqlite3 performance problems only in python

2009-07-23 Thread Stef Mientki
abase in Delphi, using the same query, takes less than 5 seconds (including displaying the full table in a grid). Are there in Python faster ways to get the query results ? Would it be faster if I used an ODBC coupling and PyODBC to interface the database ? thanks, Stef Mientki -- http://mail.pyt

Re: sqlite3 performance problems only in python

2009-07-23 Thread Stef Mientki
Tim Chase wrote: until now I used only small / simple databases in Python with sqlite3. Now I've a large and rather complex database. The most simple query (with just a result of 100 rows), takes about 70 seconds. And all that time is consumed in "cursor.fetchall" Using the same database in Del

Re: sqlite3 performance problems only in python

2009-07-23 Thread Stef Mientki
Piet van Oostrum wrote: Stef Mientki (SM) wrote: SM> btw, I don't know if it's of any importance, the SQL-statement I perform is SM> select OPNAMEN.*, NAME, NAME_, SCORES.SCORE, PATIENT.* SM> from OPNAMEN SM>inner join POID_VLID

Re: sqlite3 performance problems only in python

2009-07-23 Thread Stef Mientki
David Stanek wrote: On Thu, Jul 23, 2009 at 9:02 AM, Stef Mientki wrote: btw, I don't know if it's of any importance, the SQL-statement I perform is select OPNAMEN.*, NAME, NAME_, SCORES.SCORE, PATIENT.* from OPNAMEN inner join POID_VLID on OP

Re: sqlite3 performance problems only in python

2009-07-23 Thread Stef Mientki
Che M wrote: On Jul 23, 3:58 pm, Stef Mientki wrote: Piet van Oostrum wrote: Stef Mientki (SM) wrote: SM> btw, I don't know if it's of any importance, the SQL-statement I perform is SM> select OPNAMEN.*, NAME, NAME_, SCORES.SCORE, PATIENT.* SM&g

Re: Looking for a dream language: sounds like Python to me.

2009-07-28 Thread Stef Mientki
Matlab, from The Mathworks, has a companion product called Simulink. This allows the user to graphically build ‘algorithms’ in block form. There is a similar Python function. Where can I find a Python functionality like simulink ? thanks, Stef Mientki -- http://mail.python.org/mailman

Why is "unpacking" of tuples only allowed when there's 1 tupple ?

2009-08-15 Thread Stef Mientki
ers, why can't I use (Polynome is again a tuple of 2 arrays) : (which already gives an error in the IDE) Respons = signal.lfilter ( *Polynome, Signal ) and thus I've to use: Respons = signal.lfilter ( Polynome[0], Polynome[1], Signal ) I use Python 2.5.2

Re: Why is "unpacking" of tuples only allowed when there's 1 tupple ?

2009-08-15 Thread Stef Mientki
thanks Jan, for the clear explanation. cheers, Stef Jan Kaliszewski wrote: Dnia 15-08-2009 o 22:50:39 Stef Mientki napisał(a): hello, I'm not sure if "unpacking" is the right term but if I have a tuple of 2 arrays, I can either call a function with: Space_State =

Re: debugger

2009-08-22 Thread Stef Mientki
Albert Hopkins wrote: On Sat, 2009-08-22 at 01:17 -0700, flagmino wrote: [...] I am trying to debug: I press shift-F9 and F7. I end up in the interpreter where I enter s2 (1, 2). >From that point if I press F7, the program restart all over. If I press Enter, the program gets out of debug mod

Re: Python for professsional Windows GUI apps?

2009-08-26 Thread Stef Mientki
David C Ullrich wrote: On Mon, 24 Aug 2009 22:22:20 -0700, sturlamolden wrote: On 25 Aug, 05:56, Peter Decker wrote: I use the Dabo Class Designer to visually design my forms. So what's you're point? :) Nothing, except lobbying for wxFormBuilder for anyone who still doesn't

Re: Python for professsional Windows GUI apps?

2009-08-26 Thread Stef Mientki
Gilles Ganault wrote: On Tue, 25 Aug 2009 13:24:39 +0200, Wolfgang Keller wrote: The area of _desktop_ database application development indeed looks like a vast and very hostile desert in the Python landscape. The only framework that seems to be worth trying is Dabo. Unfortunately there's

Re: IDE for python similar to visual basic

2009-08-28 Thread Stef Mientki
qwe rty wrote: On Aug 29, 1:22 am, Craig wrote: Try wingware i have it and i like it. --- On Fri, 8/28/09, qwe rty wrote: From: qwe rty Subject: IDE for python similar to visual basic To: python-l...@python.org Date: Friday, August 28, 2009, 5:19 PM i have been searching for am IDE

Re: Flowcharting in Python?

2009-09-07 Thread Stef Mientki
Justin wrote: Hi guys, Does anyone know of any code or projects around that are written in Python or can be used by Python to write a flowcharting application? I haven't been able to find any, but the closest thing I have come across is FlowchartPython which allows you to code in Python from flow

Re: logging sound / speech handler?

2009-09-09 Thread Stef Mientki
Gregor Horvath wrote: Hi, For an application in an industrial environment where the workers are not always sitting in front of the monitor, but are within earshot of the PC I would need an sound / speech handler for the standard logging system. It should beep or better say the logging message. (

Re: set breakpoint in another module/file

2009-09-22 Thread Stef Mientki
Daniel wrote: Is there a way with pdb to set a breakpoint in another module directly using a command similar to set_trace() ? For example, I'd like to do something like this in my source code: import pdb pdb.setbreak(42, "/path/to/universe.py", "name == 'hitchhiker'") I think winpdb ( nothi

Re: Python Editor or IDE ActiveX control

2010-08-26 Thread Stef Mientki
On 27-08-2010 00:22, Thomas Jollans wrote: > On Thursday 26 August 2010, it occurred to Sathish S to exclaim: >> Hi Ppl, >> >> Is there any python IDE or editor that has an ActiveX control which could >> be embed in other Windows applications. I'm basically looking to write a >> application that c

what is this kind of string: b'string' ?

2010-09-01 Thread Stef Mientki
in winpdb I see strings like this: >>>a = b'string' >>>a 'string' >>> type(a) what's the "b" doing in front of the string ? thanks, Stef Mientki -- http://mail.python.org/mailman/listinfo/python-list

Re: State Machines in Python

2010-09-04 Thread Stef Mientki
On 04-09-2010 15:36, Jack Keegan wrote: > Hi girls & guys, > > Just joined the group. I'm new to Python but been picking it up pretty easy. > I love it! I'm hoping > to use it to make a controlling application for an experiment. Basically I > want to use it to > interface with some data acquisit

are there pros or contras, keeping a connection to a (sqlite) database ?

2010-09-08 Thread Stef Mientki
connection to the database continuously "open" ? thanks, Stef Mientki -- http://mail.python.org/mailman/listinfo/python-list

is there a library/program that converts sqlite database from windows-1252 to utf-8 ?

2010-09-11 Thread Stef Mientki
thanks, Stef Mientki -- http://mail.python.org/mailman/listinfo/python-list

Re: is there a library/program that converts sqlite database from windows-1252 to utf-8 ?

2010-09-11 Thread Stef Mientki
On 11-09-2010 21:11, Robert Kern wrote: > SQLite internally stores its strings as UTF-8 or UTF-16 encoded Unicode. So > it's not clear what > you mean when you say the database is "windows-1252". Can you be more > specific? I doubt that, but I'm not sure ... For some databases written by other p

is there a way to get the encoding of python file

2010-09-12 Thread Stef Mientki
hello, Is it possible to get the encoding of a python file from the first source line, (if there's any), after importing it ( with '__import__' ) # -*- coding: windows-1252 -*- thanks, Stef -- http://mail.python.org/mailman/listinfo/python-list

Re: is there a library/program that converts sqlite database from windows-1252 to utf-8 ?

2010-09-12 Thread Stef Mientki
On 12-09-2010 00:07, Robert Kern wrote: > On 9/11/10 4:45 PM, Stef Mientki wrote: >> On 11-09-2010 21:11, Robert Kern wrote: >>> SQLite internally stores its strings as UTF-8 or UTF-16 encoded Unicode. So >>> it's not clear what >>> you mean when you sa

Re: is there a way to get the encoding of python file

2010-09-13 Thread Stef Mientki
On 12-09-2010 19:28, Robert Kern wrote: > On 9/12/10 4:14 AM, Stef Mientki wrote: >> hello, >> >> Is it possible to get the encoding of a python file from the first source >> line, >> (if there's any), >> after importing it ( with '__import_

utf-8 coding sometimes it works, most of the time it don't work.

2010-09-21 Thread Stef Mientki
e__ import absolute_import, unicode_literals >From the Pyjamas and PyScripter group I've no answer untill now. any clues where to look for the problem ? thanks, Stef Mientki -- http://mail.python.org/mailman/listinfo/python-list

Re: utf-8 coding sometimes it works, most of the time it don't work.

2010-09-22 Thread Stef Mientki
hello Uli, thanks, I think you hit the nail on it's head, PyScripter indeed changes default encoding but .. On Wed, Sep 22, 2010 at 9:16 AM, Ulrich Eckhardt wrote: > Stef Mientki wrote: > > When running this python application from the command line ( or launched > > from an

Re: JavaScript vs Python

2010-11-09 Thread Stef Mientki
On 09-11-2010 10:25, Lawrence D'Oliveiro wrote: > In message , Chris > Rebert wrote: > >> On Mon, Nov 8, 2010 at 10:52 PM, Lawrence D'Oliveiro >> wrote: >> >>> Because JavaScript is actually a decent language in its own right. >> "The Good Parts" of it anyway. > Python, too, has its good parts, y

is there an Python equivalent for the PHP super globals like $_POST, $_COOKIE ?

2010-11-11 Thread Stef Mientki
hello, finally got Python running at my server. Now I would like to replace the PHP server scripts with Python ( for easier maintenance). But I can't find how th get to PHP's equivalent of $_Post and $_Cookie ? Google finds lots of links, but I can't find the answer. thank

Re: is there an Python equivalent for the PHP super globals like $_POST, $_COOKIE ?

2010-11-11 Thread Stef Mientki
On 11-11-2010 19:01, Steve Holden wrote: > On 11/11/2010 9:22 AM, Stef Mientki wrote: >> hello, >> >> finally got Python running at my server. >> >> Now I would like to replace the PHP server scripts with Python ( for easier >> maintenance). >> >&

Re: is there an Python equivalent for the PHP super globals like $_POST, $_COOKIE ?

2010-11-11 Thread Stef Mientki
On 11-11-2010 19:36, david wright wrote: > > > *From:* Stef Mientki > *To:* python-list@python.org > *Sent:* Thu, November 11, 2010 10:20:03 AM > *Subject:* Re: is there an Pyt

<    2   3   4   5   6   7