Re: Comparing float and decimal

2008-09-26 Thread Tim Roberts
Mark Dickinson <[EMAIL PROTECTED]> wrote: >On Sep 25, 8:55 am, Tim Roberts <[EMAIL PROTECTED]> wrote: >> Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: >> >0.1 actually is >> >> >In [98]: '%.50f' % 0.1 >> >Out[9

Re: Spring Python 0.7.0 is released

2008-09-26 Thread Tim Roberts
f every announcement, no matter how often you do updates. (Followup: I did go to the web site, and I STILL don't know what "Spring Python" is or does. Should I really have to Google for "spring java framework" to learn this?) -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to read a jpg bytearray from a Flash AS3 file

2008-10-02 Thread Tim Roberts
I want. How do I >access this data? I'm used to getting it like this: > >name = form['name'].value > >But I don't think this will work in this case. TIA. What led you to ask that here, instead of taking 60 seconds to load cgi.py in an editor and searc

Re: how to make smtplib.SMTP('localhost') work on window xp

2008-10-02 Thread Tim Roberts
TP server for the Internet provider at the remote site. When you run your own SMTP server, it is WAY too easy to leave your configuration open for spammers to abuse. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: I built a nice html templater!

2008-10-02 Thread Tim Roberts
dn't have enough Python HTML templaters already. Did you take even 3 minutes to look for a solution before you wrote this? There is even a nearly identical solution in the Python cookbook. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: how best to use a dictionary in this function?

2008-10-04 Thread Tim Roberts
our parameters positionally. Callers of calc_profit would have to use named parameters. It also makes your default arguments a bit less natural. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: processing the genetic code with python?

2006-03-09 Thread Tim Roberts
r oddball cases) would they be base pairs. Isn't that just a standard way to write DNA pairs? After all, every "a" is paired with a "t", and every "c" is paired with a "g", so it is redundant to specify both ends of the pair. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: It is fun.the result of str.lower(str())

2006-03-09 Thread Tim Roberts
7;b') > >If you guess them correctly, please explain. Can you tell us what you expected these to do? It might help future questioners. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: cgi problem

2006-03-09 Thread Tim Roberts
gt;Thanks. It looks like you've written your cgi completely from >scratch. I was hoping to use the cgi module, which has some >convenient features for reading the query parameters and POST content. Yes, but the CGI module doesn't write anything, so the advice of writing a "Lo

Re: Pythong CGI scrips on Windows Server 2003

2006-03-10 Thread Tim Roberts
ase, I found it much more productive to disable IIS and install the Win32 version of Apache. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Loop Backwards

2006-03-16 Thread Tim Roberts
r example, to comp.lang.c and comp.lang.c++. >This example is why everyone is more excited about Ruby than Python. That statement is just not true. I've looked at Ruby, but syntactically it will never sway me from Python. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Tried Ruby (or, "what Python *really* needs" or "perldoc!")

2006-03-16 Thread Tim Roberts
g out non-obvious gotchas. However, I'm sure it's a bear to administer. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Large algorithm issue -- 5x5 grid, need to fit 5 queens plus some squares

2006-03-16 Thread Tim Roberts
so that none of them threatens another". That's very different from his problem specification. It turns out there is only 1 unique (non-rotated, non-reflected) solution to the problem as he posted it. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Large algorithm issue -- 5x5 grid, need to fit 5 queens plus some squares

2006-03-17 Thread Tim Roberts
for q3 in range(q2+1,25): for q4 in range(q3+1,25): for q5 in range(q4+1,25): check( [q1+1,q2+1,q3+1,q4+1,q5+1] ) -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Xah's Edu Corner: The Concepts and Confusions of Pre-fix, In-fix, Post-fix and Fully Functional Notations

2006-03-18 Thread Tim Roberts
R when his message is visible. I'm also using Agent, and that toggles his extended characters from quoted-printable to visible for me. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Converting to ARGB and writing to a bitmap

2006-03-18 Thread Tim Roberts
0 ) fout.write(bmfh) # Do the BITMAPINFOHEADER. bmih = struct.pack('LLLHHLL', 40, width, height, 1, 32, 0, 0, 0, 0, 0, 0 ) fout.write(bmih) # Expand the pixels, scan by scan. for i in range(height): words = array.array('H')

Re: Xah's Edu Corner: The Concepts and Confusions of Pre-fix, In-fix, Post-fix and Fully Functional Notations

2006-03-20 Thread Tim Roberts
Roedy Green <[EMAIL PROTECTED]> wrote: >On Sun, 19 Mar 2006 02:08:11 GMT, Tim Roberts <[EMAIL PROTECTED]> wrote, >quoted or indirectly quoted someone who said : > >>Try pressing Ctrl-R when his message is visible. I'm also using Agent, and >>that toggl

Re: Passing parameters to VB

2006-03-21 Thread Tim Roberts
I can set the whole cell to bold by this: xl = win32com.client.Dispatch("Excel.Application") wb = xl.ActiveWorkbook ws = wb.Worksheets(1) r = ws.Range("A1") r.Characters.Font.Bold = True -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to recgonize an USB device in FreeBSD?

2006-03-21 Thread Tim Roberts
d you be a bit more specific? -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Server.sendmail with no "to_addrs" parameter.

2006-03-23 Thread Tim Roberts
at does not appear to have been addressed to him, but SMTP doesn't care. So, the way a BCC works is that the address goes into the envelope (in the to_addrs list), but not in the message body. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Can't get the real contents form page in internet as the tag "no-chche"

2006-03-23 Thread Tim Roberts
he "Refresh" header means that you are supposed to go fetch the contents of that new page immediately. Try using urllib2.open on THAT address, and you should get your content. This is one way to handle a web site reorganization and still allow older URLs to work. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: (not really) randon ideas

2006-03-27 Thread Tim Roberts
ng about the vulgar construct "prolly" that really irks me, even more than "sth" for "something" or "proggie" for "program". You're only saving two keystrokes over the correct word, "probably", and because it's split between the h

Re: sending emails to a list of recipients

2006-03-27 Thread Tim Roberts
? You should just be able to pass the list: s.sendmail( msg['From'], emails, msg.as_string() ) Or, if you must, msg['To'] = emails s.sendmail( msg['From'], msg['To'], msg.as_string() ) It needs to be a list or tuple of individual addresses, e-mail

Re: sending emails to a list of recipients [update]

2006-03-27 Thread Tim Roberts
o the human being at the other end, and like all e-mail headers, must be a single string. (Note that it does not actually have to have anything to do with the people who actually receive the message.) SMTP.sendmail, on the other hand, sets up the "envelope" of the message for th

Re: 1.090516455488E9 / 1000000.000 ???

2006-03-28 Thread Tim Roberts
like 1/3 cannot be represented exactly in decimal. Further, the more arithmetic you do, the less precise is your result. Floating point is a very tricky world of approximation. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: web

2006-03-28 Thread Tim Roberts
> >Thanks for your time, >Daniel N. >Phone. 1.416.834.1592 >e-mail. [EMAIL PROTECTED] >url. http://2ExtremeStupids.com Mmm, yes, spamming the technical newsgroups is a GREAT way to convince the world that you are reliable, trustworthy, and knowledgable. Not. -- - Tim Rob

Re: Python 2.5 licensing: stop this change

2006-04-03 Thread Tim Roberts
months, XFree86 was effectively dead and X.Org had taken over the world, with the same code base but a more traditional license. I held my breath until I read the actual document... -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: wxpython in action book

2006-04-03 Thread Tim Roberts
EVERYWHERE. The thought processes are the same -- you create UI, you handle events. You also might look at Dabo, which is a wrapper around wxPython for exactly this kind of app. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python CGI problem: correct result, but incorrect browser response.

2006-04-06 Thread Tim Roberts
member that this will fail: print """ Set-Cookie: sessionID=LAABUQLUCZIQJTZDWTFE; Set-Cookie: username=testuser; Status:302 Location:edit.py """ because you get a blank line first, which terminates the headers. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: CGI module: get form name

2006-04-12 Thread Tim Roberts
ate the form name in a hidden field, but there ought to >be some way to get directly at the form name but I'm just not seeing it. I >looked in the os.environ() - don't see it there. Nope, the form name is not transmitted as part of the HTTP request. It only exists for the conv

Re: Help for a complete newbie

2006-04-14 Thread Tim Roberts
er-for-letter like the tutorial states. Letter for letter, maybe, but not space for space. Indentation is important in Python. The "ready =", "if ready", and "else:" statements must start in column 1. The two print statements need to be indented, as they are. -

Re: hex int and string

2009-11-28 Thread Tim Roberts
Marco Mariani wrote: >luca72 wrote: > >> i have checked and pyscard accept also the decimal notation, > >I'm not sure you ever understood what the problem was, or where, but I'm >happy you feel like you've solved it. +1 QOTW. Great reply. -- Ti

Re: why do I get this behavior from a while loop?

2009-11-28 Thread Tim Roberts
"S. Chris Colbert" wrote: > >What a newbie mistake for me to make. Don't feel too badly about it. Even very experienced programmers get bitten by this issue. Until someone points it out, it's certainly not obvious. -- Tim Roberts, t...@probo.com Providenza &a

Re: need clarification on -0

2009-11-28 Thread Tim Roberts
plement), I am particularly sensitive to this. Processors are usually architected so that you don't normally see the -0, but it leads you to think about arithmetic a bit differently. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Question on Python as career

2009-12-03 Thread Tim Roberts
the profile >expectancy? I am amazed that a PhD does not already have some clues about the answers to these questions. Your best plan is to start exploiting your network of contacts. If you don't already have a network of commercial contacts, then you have a long, hard road ahead of you

Re: Organization of GUIs

2009-12-05 Thread Tim Roberts
t's possible to handle that, but each layer has to know about "notifications", and has to be able to hand "notifications" up the hierarchy tree until it gets to someone who knows what to do about it. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Socket question

2009-12-05 Thread Tim Roberts
perlsyntax wrote: > >I just want to know could it be done makeing my own socket tool that >connect to two server at the same time.And what link do i need to look at? You can certainly connect to two (or any number) servers at the same time, but you have to create two sockets to do it

Re: Float precision and float equality

2009-12-05 Thread Tim Roberts
gt;> round(x-y,6) 0.0 Mark's solution is the generically correct one, which takes into account the rough range of the values. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: eiger replacement?

2009-12-11 Thread Tim Roberts
d a slight address book malfunction when he sent this. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: power of explicit self?

2009-12-13 Thread Tim Roberts
ve the same kind of code to push "this", for example, even though "this" is not shown in the parameter list. I agree with the other repliers. "Explicit" self is not "implemented" anywhere. It's just an implementation decision. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: strptime not strict enough

2009-12-15 Thread Tim Roberts
time. >Where do I get strict date parsing? You do it yourself. Strict date parsing is incredibly tricky. The eGenix mx.DateTime module might be more to your liking. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: strptime not strict enough

2009-12-20 Thread Tim Roberts
Chris Rebert wrote: >On Tue, Dec 15, 2009 at 9:47 PM, Tim Roberts wrote: >> Tobias Weber wrote: >>> >>>despite the directives for leading zero stime.strptime('09121', >>>'%y%m%d') returns the first of December. Shouldn't it raise V

Re: [wxPy] Why I can not change a ListItem property?

2009-12-26 Thread Tim Roberts
er-draw control. See the ListCtrl_virtual.py example, for instance. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: getting name of passed reference

2009-12-30 Thread Tim Roberts
MyFunc( 27 ) MyFunc( "abcde" ) If the thing passed in is a list or an object, you can modify the object in place without trickery. You can check that with the "type" operator: if type(varPassed) == list: pass -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Significant whitespace

2010-01-03 Thread Tim Roberts
oint value "1.1" in a new variable called "DO10I". -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Sikuli: the coolest Python project I have yet seen...

2010-01-26 Thread Tim Roberts
works by using image analysis to locate the regions on the screen to be tickled. It's a novel idea, although others have correctly pointed out that it's not the most efficient way to automate applications. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mai

Re: myths about python 3

2010-01-28 Thread Tim Roberts
announcement. It is, for the most part, THE canonical example of the wrong way to conduct a development effort. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Anyone with Experience Using WinTV Capture Cards?

2009-09-26 Thread Tim Roberts
ce >> with such use that might suggest sources? > >Win XP OS. Any general methods for dealing with such commercially built >capture cards? Let me Google that for you. http://www.lmgtfy.com?q=python+video+capture+windows Most such devices use DirectShow, so you need a C++ extensi

Re: What does the list_folders() method of mailbox.Maildir actually ?do (if anything)?

2009-09-26 Thread Tim Roberts
was added in Maildir++, and the subfolder names start with a dot. It's not a "wierd extension thereof". -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: for loop: range() result has too many items

2009-10-15 Thread Tim Roberts
a simple concept, I've been surprised how many places itertools.count() has come in handy for me. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: help to convert c++ fonction in python

2009-10-17 Thread Tim Roberts
) def Decrypt( s ) s1 = base64.decode( s ) return ''.join( chr(ord(x)^y) for x,y in itertools.izip(s1,itertools.cycle(key)) ) -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: help to convert c++ fonction in python

2009-10-17 Thread Tim Roberts
ols.izip(s,itertools.cycle(key)) ) s = 'Hello, there' print s t = Crypt(s) print t u = Decrypt(t) print s -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: help to convert c++ fonction in python

2009-10-18 Thread Tim Roberts
nor care how they are used, but let us hope the O.P. understands their limitations. These are roughly as useful as the old ROT13 encoding. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: ftplib connection fails with multiple nics

2009-10-19 Thread Tim Roberts
her machines. Any ideas on how to fix this? 10093 is WSANOTINITIALISED, implying that WSAStartup has not been called. Are you doing this in a thread? Are these all the same version of the operating system? -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: disable image loading to speed up webpage load

2009-11-05 Thread Tim Roberts
IE, then you need to tell IE to disable image loading. I don't know a way to do that through the IE COM interface. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Is it possible to get the Physical memory address of a variable in python?

2009-11-11 Thread Tim Roberts
stance of a driver for this. The driver will find the physical addresses. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: Urwid 0.9.9 - Console UI Library

2009-11-20 Thread Tim Roberts
so. The fact that it doesn't say so means it isn't supported. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: python and Postgresq

2009-11-24 Thread Tim Roberts
the experiences that lead you to say this. I've use both extensively (plus the old "pg"), and I've found psycopg to be unconditionally the better choice, especially for big applications where performance is critical. -- Tim Roberts, t...@probo.com Providenza & Boekelheide,

Re: How to measure elapsed time under Windows?

2010-02-13 Thread Tim Roberts
which was supported clear back in the original NT 3.1, 1992. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Few Small Questions Regarding CGI

2010-02-15 Thread Tim Roberts
joy99 wrote: > >I am trying to learn CGI. I was checking Python Docs. There are >multiple modules. Which one to start with? Well, it seems to me that the first place to start is the built-in CGI module, in "cgi.py". I'm not aware of any other CGI-based modules in the s

Re: MODULE FOR I, P FRAME

2010-02-18 Thread Tim Roberts
f you want to save the raw MPEG data, you can certainly do that, but such data is often not divided into "frames". -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: MODULE FOR I, P FRAME

2010-02-20 Thread Tim Roberts
ate them. If you want to manipulate the frames (as bitmaps), then you have little choice but to decode the MPEG as you receive it, manipulate the bitmaps, and re-encode it back to MPEG. That's going to take a fair amount of time... -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc.

Re: The future of "frozen" types as the number of CPU cores increases

2010-02-20 Thread Tim Roberts
Chris Rebert wrote: >On Thu, Feb 18, 2010 at 11:58 AM, John Nagle wrote: >> >>   Python isn't ready for this.  Not with the GIL. > >Is any language, save perhaps Erlang, really ready for it? F# is. I only wish the syntax was a little less Perl-like. Too many s

Re: MODULE FOR I, P FRAME

2010-02-22 Thread Tim Roberts
rkers, pull the I/P/B state from that, and periodically "forget" to pass the buffer through. Your filter could have MPEG in and out. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Writing an assembler in Python

2010-02-22 Thread Tim Roberts
can help me with the parsing of the assembly code? > >One "dead simple" option is the re module. Yes, indeed. I have implemented TWO different FPGA-based microassemblers in Python using the essentially undocumented but magically delicious re.Scanner class. Simple and flexible. -- T

Re: What's Going on between (Verify) Python and win7?

2010-02-24 Thread Tim Roberts
:\tmp\y>echo data 4567>data.txt C:\tmp\y>copy ..\x\check.py . 1 file(s) copied. C:\tmp\y>check.py data 4567 C:\tmp\y> Would you like to post your exact code? -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: python 2.6: how to modify a PIL image from C without copying forth and back

2010-03-02 Thread Tim Roberts
nd poke at the innards to find the buffer with the pixels. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: python 2.6: how to modify a PIL image from C without copying forth and back

2010-03-04 Thread Tim Roberts
hat are "dirty". Just include lots of comments saying what you did and why. Personally, because so much of PIL is in C, I would judge internal changes to be unlikely. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: indentation error

2010-03-06 Thread Tim Roberts
^ >IndentationError: unindent does not match any outer indentation level The most likely cause is mixing spaces with tabs. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: file seek is slow

2010-03-09 Thread Tim Roberts
r, it's not valid to have "main" return "void". The standards require that it be declared as returning "int". Again, "void" happens to work in VC++, but there are architectures where it does not. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: result of os.times() is different with 'time' command Options

2010-03-14 Thread Tim Roberts
hing. Your Python code causes /bin/ls to be loaded into memory, and it's probably still in a file cache when you run the second command. You can't really do an analysis like this with a task that only takes a few milliseconds. There are too many variables. -- Tim Roberts, t...@probo.

Re: Python bindings tutorial

2010-03-18 Thread Tim Roberts
ints for use. With an EXE, the transfer address goes to "main". So, when you load an EXE as a DLL, you will be RUNNING the program. That's is usually not what you want. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: device identification

2010-03-22 Thread Tim Roberts
buses hub/port tree and find a match for your device. It's not worth the trouble. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: device identification

2010-03-24 Thread Tim Roberts
trying to manipulate? I have a lot of USB experience -- perhaps I can offer advice. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Advice Criticism on Python App

2010-03-24 Thread Tim Roberts
ePrice= purPrice >self.purchaseQuantity = purQuant The "constructor" concept here is not very Pythonic. Why not replace those both with: def __init__(self, stockCode="", purPrice=0, purQuant=0): self.code = stockCode self.purchasePr

Re: Advice Criticism on Python App

2010-03-26 Thread Tim Roberts
Steven D'Aprano wrote: >On Wed, 24 Mar 2010 21:14:23 -0700, Tim Roberts wrote: > >> Jimbo wrote: >>> >>>class stock: >>>code = "" >>>purchasePrice= 0 >>>purchaseQuantity = 0 >>>pri

Re: Developement Question?

2010-04-01 Thread Tim Roberts
27;d just have Excel print to a PDF. No conversion, no scripting. There are a number of open source PDF converters. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Incorrect scope of list comprehension variables

2010-04-03 Thread Tim Roberts
ist comprehension created a new scope. I don't that was ever promised. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Changing the EAX register with Python

2010-11-18 Thread Tim Roberts
uot;, your question is "where can I find a Linux debugger that can be controlled from Python?" I don't know the answer to that. gdb is quite powerful, and you can certainly control it by connecting to its stdin and stdout connections. -- Tim Roberts, t...@probo.com Providenza & B

Re: CGI FieldStorage instances?

2010-11-21 Thread Tim Roberts
ry variable is >complicated and confusing. Is there an easier way? Have you looked at the source code? That's the beauty of Python. It's all exposed for you. MiniFieldStorage has a .name attribute and a .value attribute. So, for example: print form['action'].value

Re: Matlab equivalent syntax in Python

2010-11-25 Thread Tim Roberts
meit" module and the "trace" module. There's nothing that will display the results in a pretty graph, so the answer depends on what you are after. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: SQLite date fields

2010-11-25 Thread Tim Roberts
. SQLite's flexibility is cool, but it means you have to be smart about how you store the data. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: SQLite date fields

2010-11-28 Thread Tim Roberts
Duncan Booth wrote: >Tim Roberts wrote: > >>>However, when it comes to writing-back data to the table, SQLite is >>>very forgiving and is quite happy to store '25/06/2003' in a date >>>field, >> >> SQLite is essentially typeless. ALL

Re: PIL how to enlarge image

2010-12-04 Thread Tim Roberts
don't need the original any more: img = img.resize((120,120)) -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie question about importing modules.

2010-12-17 Thread Tim Roberts
you are delivering a program to clients, then you should look at something like py2exe, which will examine your code and produce a zip file that includes all of the files your application will need. If you are delivering a script for someone that will definitely have Python installed, then you just ne

Re: Newbie question about importing modules.

2010-12-18 Thread Tim Roberts
s is a bit alien to me. That certainly works for individual scripts, but even with PHP there are customary central locations where complicated packages are installed. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to order base classes?

2010-12-23 Thread Tim Roberts
so the mix-ins can modify the behavior. class BlueSpanishListBox( ListBox, ColorBlueMixIn, SpanishMixIn ): ... Reading it, a BlueSpanishListBox is-a ListBox that happens to have a few additional features. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Interrput a thread

2011-01-02 Thread Tim Roberts
quot;should I die?" flag, and then commit suicide. That is the ONLY clean way to handle this problem. There is simply no clean way to force another thread to die without its permission. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Matrix multiplication

2011-01-04 Thread Tim Roberts
makes more sense iteratively. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to read ansic file into a pre-defined class?

2011-01-08 Thread Tim Roberts
().split() for j in range(numitems)] ) Then len(classlist) tells you how many classes. len(classlist[0]) tells you how many items in the first class. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Not clear about the dot notation

2011-01-16 Thread Tim Roberts
rl = self.request.get("url") >item.author = users.get_current_user() > item.put() >self.redirect("/newest") > >so his vote.vote is like my item.url ? Exactly. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: UTF-8 question from Dive into Python 3

2011-01-18 Thread Tim Roberts
ity. That doesn't apply to UTF-8. None of the bytes is more "significant" than any other, so by definition it is neither big-endian or little-endian. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Part of RFC 822 ignored by email module

2011-01-21 Thread Tim Roberts
re are several such things) is not all that important. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: files,folders,paths

2011-02-13 Thread Tim Roberts
#$%, then don't use them. You can use forward slashes everywhere in Windows, except when typing commands at the command prompt. ALL of the Windows file system APIs accept forward slashes. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: files,folders,paths

2011-02-13 Thread Tim Roberts
xtra step of separating the directories and the files automatically. Why can't you just iterate through "dirs" creating your subdirectories, and then iterate through "files" doing the copies? Then, when os.walk calls you with the files in the subdirectories, you'll kno

Re: urllib2: post request to textarea

2010-04-09 Thread Tim Roberts
, and my >real problem is something else? It's just a coincidence. The contents of a are transmitted exactly like the contents of an . My guess is that you did the encoding improperly. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: mailbox multipart

2010-04-13 Thread Tim Roberts
roof get the "date", "from" and "to" of of a multipart mail >using python? Perhaps you should post your code. There's no particular reason why you should see this. The mailbox iterator should return the outer multipart container, which has the headers. --

Re: Updated License Term Agreement for VC Redistributable in VS 2008 SP1

2010-04-16 Thread Tim Roberts
-debug runtimes with any applications built with Visual Studio. They are evil, but not arbitrarily malicious. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Updated License Term Agreement for VC Redistributable in VS 2008 SP1

2010-04-18 Thread Tim Roberts
CM wrote: > >On Apr 16, 3:31 am, Tim Roberts wrote: >> >> Microsoft's intent is that you be able to distribute the non-debug runtimes >> with any applications built with Visual Studio.  They are evil, but not >> arbitrarily malicious. > >Just to be clea

Re: Usable street address parser in Python?

2010-04-19 Thread Tim Roberts
be happy. This is a very tricky problem. Consider Salem, Oregon, which puts the direction after the street: 3340 Astoria Way NE Salem, OR 97303 Consider northern Los Angeles County, which use directions both before and after. I used to live at: 44720 N 2nd St E Lancaster,

<    4   5   6   7   8   9   10   >