Re: [Tutor] Open a text file, read and print pattern matching

2011-01-08 Thread Steven D'Aprano
Please excuse the double post, I had a problem with my email program. tee chwee liong wrote: hi, i have a sampledata as below. Pls refer to output, if found -1, how to list out all the Lane number? And if there is no -1, print PASS. My code is as below section. Code###

Re: [Tutor] Open a text file, read and print pattern matching

2011-01-08 Thread Corey Richardson
On 01/09/2011 01:25 AM, tee chwee liong wrote: > hi, > > i have a sampledata as below. Pls refer to output, if found -1, how to > list out all the Lane number? And if there is no -1, print PASS. My code > is as below section. > > thanks > tcl76 > > sampledata > Platform: PC > T

Re: [Tutor] Open a text file, read and print pattern matching

2011-01-08 Thread Steven D'Aprano
tee chwee liong wrote: hi, i have a sampledata as below. Pls refer to output, if found -1, how to list out all the Lane number? And if there is no -1, print PASS. My code is as below section. thanks tcl76 sampledata Platform: PC Tempt : 25 TAP0 :0 TAP1 :1 ++

[Tutor] Open a text file, read and print pattern matching

2011-01-08 Thread tee chwee liong
hi, i have a sampledata as below. Pls refer to output, if found -1, how to list out all the Lane number? And if there is no -1, print PASS. My code is as below section. thanks tcl76 sampledata Platform: PC Tempt : 25 TAP0 :0 TAP1 :1

Re: [Tutor] Named-value formatting fails

2011-01-08 Thread Steven D'Aprano
A more detailed response. Tim Johnson wrote: I'm using 2.6.5 on ubuntu 10.04. I'm evaluating a very large string using a named-value formatting scheme. The process fails with the following error message: """not enough arguments for format string""" I'd take that as a fairly straightforward err

Re: [Tutor] Named-value formatting fails

2011-01-08 Thread Steven D'Aprano
There's a shorter answer and a longer answer to this question. The shorter answer is here. The longer answer will follow. Tim Johnson wrote: I'm using 2.6.5 on ubuntu 10.04. I'm evaluating a very large string using a named-value formatting scheme. The process fails with the following error mess

[Tutor] Named-value formatting fails

2011-01-08 Thread Tim Johnson
I'm using 2.6.5 on ubuntu 10.04. I'm evaluating a very large string using a named-value formatting scheme. The process fails with the following error message: """not enough arguments for format string""" In the first place, I wouldn't expect to even see this error message, because as the python doc

Re: [Tutor] Parse MPL files

2011-01-08 Thread Alan Gauld
"Walter Prins" wrote I'm looking for a way to parse MPL files (.MPL or .mpl extension). These files are contained in the tree of some cameras that support the AVCHD ... and some cameras filming with a stream mpeg-ts. Try this for a starter for 10 http://eiman.tv/misc/flashdump.txt I

Re: [Tutor] Parse MPL files

2011-01-08 Thread Walter Prins
On 7 January 2011 22:16, PyProg PyProg wrote: > Hi all, > > I'm looking for a way to parse MPL files (.MPL or .mpl extension). > These files are contained in the tree of some cameras that support the > AVCHD ... and some cameras filming with a stream mpeg-ts. > I've only been able to locate this

Re: [Tutor] Parse MPL files

2011-01-08 Thread Alan Gauld
Parts of the data is inaccessible (very large parts in fact).The structure is like that: It is binary data so you need to open the file with a b flag (rb or wb) and you will probably need to use the struct module to convert the binary data into normal Pyython data types. Search the internet

Re: [Tutor] Command line scripts

2011-01-08 Thread Alan Gauld
"David Hutto" wrote If I use as command line script, is there any disruption in the execution of the code using wxpython. I don't understand the question. wxPython is a GUI toolkit so how would you have a command line script using wxPython? Or do you mean running a wxPython GUI program from t

[Tutor] Command line scripts

2011-01-08 Thread David Hutto
This is somewhat of a cross post,but I think it applies here as well. If I use as command line script, is there any disruption in the execution of the code using wxpython. In other words, is a command line app different from bindings in a compiled app? @ trace def play(self, event =