Re: The lib email parse problem...

2006-08-30 Thread Tim Roberts
exactly the same as any other multipart section. It just so happens that it will have exactly two subsections, one text/plain and one text/html. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: unicode table of character implementation in python

2006-08-29 Thread Tim Roberts
me where? -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Firewire comms using Python?

2006-08-29 Thread Tim Roberts
(like DirectShow or WIA), there's a good chance it will drive your 1394 camera as well. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: time.clock() going backwards??

2006-08-27 Thread Tim Roberts
, the operating actually rewrote the cycle counters on the second (and beyond) processors to align them to the first processor, so the delta was usually only a dozen or two cycles. XP does not appear to do that. I think that is a huge mistake, since it renders QueryPerformanceCounter non-monotonic. -- - Tim

Re: What do you want in a new web framework?

2006-08-23 Thread Tim Roberts
in there that make the program say something I can't immediately discern. To be sure, people whose opinions I trust (one of whom is Cliff Wells) have said that Ruby is great, so I suppose I need to look again. I just haven't had the same aha! experience that I had with Python. -- - Tim Roberts, [EMAIL PROTECTED

Re: smtplib needs me to put from/to headers in the message?

2006-08-23 Thread Tim Roberts
, but not in the headers or body. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: What do you want in a new web framework?

2006-08-22 Thread Tim Roberts
to turn it into the One, True, Unquestioned Web Solution. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Unclear on argument passing to sendmail'

2006-08-22 Thread Tim Roberts
and more cases where that won't work. Many corporate SMTP servers are now rejecting mail that comes from DSL and cable modem IP addresses, as an anti-spam measure. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Regd:Video Converter Programming

2006-08-11 Thread Tim Roberts
of bitmaps, then go through the whole AVI compression process to get a movie. If you are on Windows, you almost certainly want to use DirectShow to do this job. There is a DirectShow interface for Python. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org

Re: using python at the bash shell?

2006-08-10 Thread Tim Roberts
of what program launched the script. The same thing works for Python scripts: #! /usr/bin/python -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: do people really complain about significant whitespace?

2006-08-09 Thread Tim Roberts
to the programmer. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: looking for a regular expression

2006-08-05 Thread Tim Roberts
alex23 [EMAIL PROTECTED] wrote: Tim Roberts wrote: What is your signature supposed to be? It looks like you are trying to inject ANSI terminal escape sequences. The vast majority of Usenet participants are now reading these articles through GUI newsreaders or web-based readers which show

Re: More int and float attributes

2006-08-05 Thread Tim Roberts
the internal representation of variables. Look, for example, at the blurred distinction between integers and long integers. I'm not arguing for or against the proposal, but I suspect these properties would be rarely used. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http

Re: exception handling; python program that interacts with postgresql db

2006-08-04 Thread Tim Roberts
() c.execute( drop database mytempdb; ) -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: looking for a regular expression

2006-08-03 Thread Tim Roberts
lines of unrecognizable line noise. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Need a compelling argument to use Django instead of Rails

2006-07-28 Thread Tim Roberts
. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: subprocess module

2006-07-22 Thread Tim Roberts
. The best examples of the use of subprocess are contained in the introductory comments in the module itself. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Very practical question

2006-07-06 Thread Tim Roberts
() -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: languages with full unicode support

2006-07-05 Thread Tim Roberts
Dale King [EMAIL PROTECTED] wrote: Tim Roberts wrote: Xah Lee [EMAIL PROTECTED] wrote: Languages with Full Unicode Support As far as i know, Java and JavaScript are languages with full, complete unicode support. That is, they allow names to be defined using unicode. (the JavaScript engine

Re: a question about return

2006-07-04 Thread Tim Roberts
, for instance. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Non-ASCII languages

2006-07-01 Thread Tim Roberts
progamming, networking, interpreters, Unix; the list goes on and on. It was probably the most exciting time in the history of computers. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: String Question

2006-06-30 Thread Tim Roberts
by exactly two hex digits. You can't build up an escape sequence like this. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: languages with full unicode support

2006-06-28 Thread Tim Roberts
other lang's status: C ? No. This is implementation-defined in C. A compiler is allowed to accept variable names with alphabetic Unicode characters outside of ASCII. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Absolute noob to Linux programming needs language choice help

2006-06-25 Thread Tim Roberts
doesn't begin until the early 1990s, unless you're counting ABC as well. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python in HTML

2006-06-25 Thread Tim Roberts
/script However, it is considered a security risk which is why it is no longer enabled by default. Plus, it will only work on systems that have it installed. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Trouble including Python.h

2006-06-24 Thread Tim Roberts
:51: error: expected declaration specifiers before '__declspec' ../../Python2.4/include/pymem.h:52: error: expected declaration specifiers before '__declspec' __declspec is a Microsoft extension. Are you trying to build the Visual C++ source with gcc? -- - Tim Roberts, [EMAIL PROTECTED

Re: USB support

2006-06-19 Thread Tim Roberts
on an Intel based mac. It is my understanding that OS/X does not support the /proc filesystem. Without /proc, libusb cannot operate. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython question

2006-06-17 Thread Tim Roberts
directly, so this is not usually an issue. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Decimals

2006-06-14 Thread Tim Roberts
++ certainly will not display this with two decimal places, unless you print it out with a %.2f format. DECIMAL is an SQL thing. Unless the language has a native decimal type, it cannot possibly know how to display it in the same format as your SQL. -- - Tim Roberts, [EMAIL PROTECTED

Re: USB support

2006-06-14 Thread Tim Roberts
rodmc [EMAIL PROTECTED] wrote: I need to write a program which can access the USB ports on Mac and Linux, is there a library available for Python? The stable version of Libusb includes a Python binding. The version in development does not yet. -- - Tim Roberts, [EMAIL PROTECTED] Providenza

Re: follow-up to FieldStorage

2006-06-08 Thread Tim Roberts
(). Use the source, Luke. To me, that's one of the big beauties of Python. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Using print instead of file.write(str)

2006-06-03 Thread Tim Roberts
to produce 0123456789 using 10 separate print statements, while it IS possible with 10 separate writes. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: wxpython wxgrid question

2006-06-03 Thread Tim Roberts
you might want. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: TIming

2006-05-31 Thread Tim Roberts
WIdgeteye [EMAIL PROTECTED] wrote: On Tue, 30 May 2006 16:15:44 +1000, John McMonagle wrote: Tim Roberts is right. As you are on linux, I suggest you investigate the at command - very user friendly and not at all complicated. I have been using Slackware for over 10 years I know all about

Re: TIming

2006-05-29 Thread Tim Roberts
on June 13. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: can't figure out error: module has no attribute...

2006-05-25 Thread Tim Roberts
be in a common directory for that project. Modules that are of general interest to you for multiple projects should be in \Python24\Lib\site-packages. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP-xxx: Unification of for statement and list-comp syntax

2006-05-23 Thread Tim Roberts
that the % operator was the fastest way to concatenate strings, because it was implemented in C, whereas the + operator was interpreted. However, as I recall, the difference was hardly measurable, and may not even exist any longer. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http

Re: newbie: windows xp scripting

2006-05-23 Thread Tim Roberts
this with a nested if statement, but it feels like windows should be creating this folder automatically if it doesn't exist. What feels right is rarely a good reference for a command's behavior, especially on Windows. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http

Re: Doubt with wx.CallAfter

2006-05-23 Thread Tim Roberts
synchronous. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: No math module??

2006-05-23 Thread Tim Roberts
a module called math. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: A Unicode problem -HELP

2006-05-17 Thread Tim Roberts
it to work. I think it is working exactly as you want. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: python rounding problem.

2006-05-11 Thread Tim Roberts
round(2.99543322,3) 2.995 -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: the print statement

2006-05-09 Thread Tim Roberts
Dennis Lee Bieber [EMAIL PROTECTED] wrote: On Sun, 07 May 2006 00:09:06 GMT, Tim Roberts [EMAIL PROTECTED] declaimed the following in comp.lang.python: [EMAIL PROTECTED] wrote: 6) Would it be correct to infer that the print statement is aware of characters beyond the 128 characters

Re: the print statement

2006-05-06 Thread Tim Roberts
. It knows about whatever the current character set is. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: detect video length in seconds

2006-05-03 Thread Tim Roberts
from the end of the file until you find a timestamp, and subtract. You can also try to extract the bitrate from an early header and use arithmetic to get a good estimate. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: wxpython - new line in radiobutton's label?

2006-04-30 Thread Tim Roberts
didn't turn up anything. The native Windows radio button cannot do multiline labels. You'll have to do the first line in the radio button, and the second line as a wx.StaticText. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Speed of shutil.copy vs os.system(copy src dest) in win32

2006-04-27 Thread Tim Roberts
the file and writing a new one is significantly faster... any clue as to why this is? I figure I'm missing something here. Does os.system launch a cmd shell every time? Yes. That's in the documentation. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org

Re: list of functions question

2006-04-27 Thread Tim Roberts
. Then, when you want to call it, remember that it has to be treated like a function: for ev in event_list: if ev(t): pass If you REALLY need the list of functions to come from a string, you can also do: event_list = [eval(f) for f in f1 f2 etc.split()] -- - Tim Roberts, [EMAIL PROTECTED

Re: Updated PEP 359: The make statement

2006-04-20 Thread Tim Roberts
and find out what proposed change in the class construct would render make unnecessary, but I couldn't find it. Can you summarize, Steven? -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Activating Batch Files from Python

2006-04-20 Thread Tim Roberts
. Your subprocesses inherit that. .BAT files are easy to parse, especially if they're just a bunch of 'set' statements. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: CGI scripts

2006-04-19 Thread Tim Roberts
hosting package based on Linux, you get PHP4, PHP5, or Perl. No Python. Perhaps you should have checked your requirements before you spent money on a web host. There are many good, inexpensive web hosting companies that do allow Python scripting. -- - Tim Roberts, [EMAIL PROTECTED] Providenza

Re: removing cgi fieldstorage keys

2006-04-19 Thread Tim Roberts
from! Did you add any input hidden fields? Did you add an image map? On the other hand, why do you want to remove them? -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Help for a complete newbie

2006-04-14 Thread Tim Roberts
, 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. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org

Re: CGI module: get form name

2006-04-12 Thread Tim Roberts
). -- - 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-07 Thread Tim Roberts
; 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: Python 2.5 licensing: stop this change

2006-04-03 Thread Tim Roberts
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
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: 1.090516455488E9 / 1000000.000 ???

2006-03-28 Thread Tim Roberts
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
, 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 Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc

Re: (not really) randon ideas

2006-03-27 Thread Tim Roberts
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 hands, probably is probably faster to type. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http

Re: sending emails to a list of recipients

2006-03-27 Thread Tim Roberts
://docs.python.org/lib/node597.html No, you misread the example. It uses that in the headers of the message. That won't work for the second parameter of SMTP.sendmail. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

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

2006-03-27 Thread Tim Roberts
string, but pass the raw list to sendmail: msg['To'] = ', '.join( emails ) s.sendmail( msg['From'], emails, msg.as_string() ) -- - 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
. -- - 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
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

Re: Passing parameters to VB

2006-03-21 Thread Tim Roberts
) 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
? -- - 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-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 toggles his extended characters from quoted-printable

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
-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
: a = ((word 12) 0xf) * 0x11 r = ((word 8) 0xf) * 0x11 g = ((word 4) 0xf) * 0x11 b = ((word 0) 0xf) * 0x11 rgba.extend( [b,g,r,a] ) rgba.tofile(fout) print '*', -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org

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

2006-03-17 Thread Tim Roberts
): 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: Loop Backwards

2006-03-16 Thread Tim Roberts
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
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
. 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: Pythong CGI scrips on Windows Server 2003

2006-03-10 Thread Tim Roberts
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: processing the genetic code with python?

2006-03-09 Thread Tim Roberts
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
. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: cgi problem

2006-03-09 Thread Tim Roberts
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 Location: header still applies. -- - Tim Roberts, [EMAIL PROTECTED] Providenza

Re: newbie question

2006-03-02 Thread Tim Roberts
, in that order, to find an executable. Just add .PY to the end. There is a bug in NT's CMD.EXE that screws up redirection of stdin, but command line arguments and stdout work just fine. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo

Re: how do I factor a number down to one digit?

2006-03-01 Thread Tim Roberts
be 1+2+3 returning a 5. Hmm, in most of the rational mathematical universes I've visited, 1+2+3 returns 6, not 5. On the other hand, numerology doesn't really have much of a place in a rational mathematical universe. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http

Re: spaces at ends of filenames or directory names on Win32

2006-02-26 Thread Tim Roberts
this madness :( Use double-quotes on Windows, not single-quotes. Single-quotes are taken as just another filename character. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: SyntaxError: can't assign to a function call

2006-02-26 Thread Tim Roberts
be helpful in situations like this is to remember that += in Python isn't quite as special as it is in C. So, f() += [4] is the same as f() = f() + [4] and I think you can see why that is a problem. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http

Re: unicode question

2006-02-25 Thread Tim Roberts
and forth 3 times? I didn't check whether this was faster, although I rather suspect it is not: cvt = lambda x: ord(x)0x80 and x or '\\x'+hex(ord(x)) def decode_with_backslashreplace(s): return ''.join(map(cvt,s)) -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http

Re: spaces at ends of filenames or directory names on Win32

2006-02-24 Thread Tim Roberts
2 Dir(s) 50,937,999,360 bytes free C:\tmp\x -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: html parser , unexpected '' char in declaration

2006-02-21 Thread Tim Roberts
could check for it rather easily with a regular expression, or even just ''.find, and then either insert a closing '' or delete everything up to the html before parsing it. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Multiplication optimization

2006-02-20 Thread Tim Roberts
-cycle operation in Intel processors. Even multiple-precision multiplication is very efficient -- probably more so than multiple comparisons and jumps. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: how to write a C-style for loop?

2006-02-15 Thread Tim Roberts
in Python? Do you rework a while loop, or use the range() function? Here's an example: for (int i = 0; i 50; i += 5) How would that go in Python, in the simplest and most efficient way? for i in range(0,50,5): print i -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc

Re: by reference

2006-02-10 Thread Tim Roberts
, with the results you get, and the results you expect. That's usually enough! -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Inserting record with Microsoft Access

2006-02-10 Thread Tim Roberts
the autonumber. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: HTML parsing bug?

2006-02-01 Thread Tim Roberts
, inside a script/script pair. Virtually every page with Javascript does exactly the same thing. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: simple perl program in python gives errors

2006-02-01 Thread Tim Roberts
Dan Lowe [EMAIL PROTECTED] wrote: Not sure if you typo'd that, but that should read: a += 20 * 14 print a Did you try to run that? -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Trouble opening files

2006-01-29 Thread Tim Roberts
if they are the first characters of the filename. #print filename f = file(filename,'\r') #open file for reading Where did you get that? \r is a carriage return. You need a letter r: f = file(filename, 'r') -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org

Re: wxPython layout problem

2006-01-24 Thread Tim Roberts
of structure is needed to make sure that ownership and sizership are handled completely. You might try posting on the wxPython mailing list, http://www.wxpython.org/maillist.php. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: os.unlink() AND win32api.DeleteFile()

2006-01-24 Thread Tim Roberts
ARE special shell folders that do not exist in the file system. Control Panel and My Network Places are two examples. DeleteFile cannot touch those. You must use shell APIs. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Returning a tuple-struct

2006-01-21 Thread Tim Roberts
returns a string that LOOKS the same as a tuple. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: [OT] Nit: please don't user it's unless you can substitute it is without changing your inteded meaning.

2006-01-19 Thread Tim Roberts
' computer, or the Roberts's computer. I guess I'll just have to keep saying that damn computer. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: CGI module callback / upload hook

2006-01-19 Thread Tim Roberts
in calling a function while processing an upload? (e.g. like CGI::upload_hook() in perl) Not in the standard cgi.py, but it's not hard to derive your own. I suspect read_binary is all you would need to override. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http

Re: XML Writer in wxPython

2006-01-17 Thread Tim Roberts
/addresses You can see how an HTML templating aid could help here. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Just want to walk a single directory

2006-01-15 Thread Tim Roberts
[:] = [] for names in thefilenames: permanentFilelist.append(names) Um, excuse me for butting in, but couldn't you accomplish the same thing more simply by using os.listdir and os.path.isfile? In my brain, os.walk is the solution to RECURSIVE search needs. -- - Tim Roberts, [EMAIL

Re: python create mail

2006-01-14 Thread Tim Roberts
, assuming that you aren't sending this from some known spammer IP address. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: XML Writer in wxPython

2006-01-14 Thread Tim Roberts
Marco Meoni [EMAIL PROTECTED] wrote: Have you ever write an XML Writer in wxPython? A Writer that from a GUI can compose XML Files. XML is usually pretty easy to write by hand, just using print statements. Do you alreday have a tree of objects you want to write? -- - Tim Roberts, [EMAIL

<    3   4   5   6   7   8   9   10   >