Re: newbie question

2005-12-11 Thread Tim Roberts
quoting: xxx.py file "1 3 5 7" Something like this, maybe: def drawAsciiFile(filename, columns): localdataSet = DataSet.DataSet( filename ) PlotCols = [int(s) for s in columns.split()] ContourPlots( localdataSet, PlotCols ) if __name__ == "__main__": if len(s

Re: How can I load python script into Html ??

2005-12-16 Thread Tim Roberts
rowser >that would execute arbitrary Python code provided by the server would >be an obscene security mistake. Internet Explorer will happily do so, if you have the Python Windows extensions installed, and register the active scripting component that cmes with it. -- - Tim Roberts, [EMAI

Re: CGI module does not parse data

2005-12-18 Thread Tim Roberts
"amfr" <[EMAIL PROTECTED]> wrote: > >Neither work Yes, they do. Post your form HTML and the Python code you're using, and we'll show you what you're doing wrong. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Parsing a date-time string?

2005-12-23 Thread Tim Roberts
t-spec for the milliseconds-part in here. (I'm also not sure about >the validity of the tz part, but ...) Central European Time. GMT +1 hour. Quite valid. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: email package and line ending

2005-12-26 Thread Tim Roberts
: > >this code causes an infinite recursion: > > >>> from email.Header import Header > >>> h = Header('multiline header', 'iso-8859-1', maxlinelen=4) > >>> e.encode() I'm not sure I would call that a bug. I'd call that a us

Re: Windows and python execution

2005-12-26 Thread Tim Roberts
that. What the OP needs is this: assoc .py=Python.File ftype Python.File="c:\Apps\Python24\python.exe" "%1" "%*" assoc .pyw=Python.NoConFile ftype Python.NoConFile="c:\Apps\Python24\pythonw.exe" "%1" "%*" Substitute your own Py

Re: HTMLGen- Table Align property

2005-12-29 Thread Tim Roberts
propterty is available You've got the source. Surely it would have been quicker and easier to just Go Look It Up. That's the beauty of Python. No, it's not there. It's easy enough to add it, or you can wrap the table in or . -- - Tim Roberts, [EMAIL PROTECTED] Providenz

Re: Numeric RandomArray seed problem

2006-01-02 Thread Tim Roberts
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > >I tried calling RandomArray.seed() >by calling RandomArray.get_seed() I get the seed number (x,y). >My problem is that x is always 113611 any advice? What did you expect? -- - Tim Roberts, [EMAIL PROTECTED] P

Re: HELP! on wxPython Error

2006-01-02 Thread Tim Roberts
code, show us the error. Then we can offer advice. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Xah's Edu Corner: the bug-reporting attitude

2006-01-04 Thread Tim Roberts
the rest of us believe him to be a moron. In a sense, I envy him. I hold a number of strong and somewhat controversial opinions that I hesitate to expose in public, for fear of being laughed at and labeled as a nutcase. Xah Lee has absolutely no such fears. -- - Tim Roberts, [EMAIL PROTECTED]

Re: smtplib error('Connection reset by peer')

2006-01-08 Thread Tim Roberts
eset by peer') > >Anyone got a pointer as to what I could do? Replace "localhost" with the name of your usual outgoing mail server. Although there ARE SMTP servers available for Windows XP, is it virtually certain that you aren't running one. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Returning Values from Bash Scripts

2006-01-08 Thread Tim Roberts
ipts. That is, assuming by "values" you mean the stdout from the script. If you really mean the numerical return code, you can use os.system. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: string to datetime parser?

2006-01-10 Thread Tim Roberts
ate in mid-March, or in early October? -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to create a script that list itself ?

2006-01-11 Thread Tim Roberts
out to me that the shortest Python program which produces itself on stdout is: -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: can't solve an exercise-help me with it

2006-01-12 Thread Tim Roberts
. This isn't a free homework service. This is not a hard problem, although that's a terrible series for computing pi. At 100,000 terms, it still only has 5 digits. n = input( "How many terms? " ) sum = 0 sign = 4.0 for i in range(n): sum += sign / (i+i+1) s

Re: python create mail

2006-01-14 Thread Tim Roberts
i.ac.il', 25) reply: '220 mail3.cc.huji.ac.il ESMTP Postfix\r\n' reply: retcode (220); Msg: mail3.cc.huji.ac.il ESMTP Postfix connect: mail3.cc.huji.ac.il ESMTP Postfix (220, 'mail3.cc.huji.ac.il ESMTP Postfix') >>> ^Z C:\Dev> It's possible they simply had a temporary outage, 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?

Re: Just want to walk a single directory

2006-01-15 Thread Tim Roberts
ply by using os.listdir and os.path.isfile? In my brain, os.walk is the solution to RECURSIVE search needs. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: XML Writer in wxPython

2006-01-17 Thread Tim Roberts
t "%s" % first print "%s" % address print "%s" % city print "%s" % state print "%s" % zip print " " print "" for row in addressDatabase: PrintAddress( row.last, row.first, row.address

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
My own name gives me trouble with this. There is disagreement in the curmudgeon world as to whether I should refer to "the 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
s. > >Is there any way 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] Provide

Re: Returning a tuple-struct

2006-01-21 Thread Tim Roberts
>> type(t) >>> str(t) '(2006, 1, 21, 22, 49, 32, 5, 21, 0)' It's a class object. The __repr__ method 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: subprocess module

2006-07-22 Thread Tim Roberts
found was here ; "Use the source, Luke." 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: Need a compelling argument to use Django instead of Rails

2006-07-28 Thread Tim Roberts
keep database sessions open. -- - 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
escape sequences. The vast majority of Usenet participants are now reading these articles through GUI newsreaders or web-based readers which show this as 5 lines of unrecognizable line noise. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

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

2006-08-03 Thread Tim Roberts
rt psycopg db = psycopg.connect( "dbname=template1 user=postgres password=%s" % password ) c = db.cursor() 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-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 GU

Re: More int and float attributes

2006-08-05 Thread Tim Roberts
r system programming tasks, but in most cases, a Python programmer shouldn't need to worry about 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 suspe

Re: do people really complain about significant whitespace?

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

Re: using python at the bash shell?

2006-08-09 Thread Tim Roberts
or bash to process it, regardless 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: Regd:Video Converter Programming

2006-08-11 Thread Tim Roberts
ecompression process to get to a series 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]

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

2006-08-22 Thread Tim Roberts
uld never happen. Python would simply fall off of the list of options, and the job would get done in PHP or Ruby on Rails. I agree with Marc. PLEASE do not create "yet another Python web framework." Let's pick one, and join together 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
ues your message, and sends it to each recipient individually. If your message is being sent to exactly one person, then you CAN look up the MX host and send it directly, but there are more and more cases where that won't work. Many corporate SMTP servers are now rejecting mail that com

Re: How can I correct an error in an old post?

2006-10-05 Thread Tim Roberts
rrored on a web site somewhere, this is a Usenet newsgroup. It is impossible to "close" a thread. The concept simply does not exist. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: hex sending

2006-10-05 Thread Tim Roberts
"hiroc" <[EMAIL PROTECTED]> wrote: >s.send("abc") # send test string > >I need to send hex:"10 06 00 0f 02 bc d1" instead of "abc" > >hoW? One ugly way is s.send( "\x10\x06\x00\x0f\x02\xbc\xd1" ) -- - Tim Roberts, [EMAIL

Re: Is there an alternative to os.walk?

2006-10-07 Thread Tim Roberts
ks for pointing me to the path module, was >interesting. Umm, may I point out that you don't NEED the "os.path.exists" call, because you are already being HANDED a list of all the filenames in that directory? You could "dirtest" with this much faster routinee: def di

Re: How to upgrade python from 2.4.3 to 2.4.4 ?

2006-10-21 Thread Tim Roberts
hat will install all of them. This also makes it trivially easy to install my environment on a different computer. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: print dos format file into unix format

2006-10-21 Thread Tim Roberts
line, Are you running this on Unix or on DOS? On Unix, you can do: for line in open(options.filename).readlines(): print line.rstrip() Perhaps quicker is: sys.stdout.write( open(options.filename).read().replace('\r\n','\n') ) -- Tim Roberts, [EMAIL PROTECTED] Pro

Re: How to upgrade python from 2.4.3 to 2.4.4 ?

2006-10-23 Thread Tim Roberts
Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: >On Sun, 22 Oct 2006 01:55:53 GMT, Tim Roberts <[EMAIL PROTECTED]> declaimed >the following in comp.lang.python: > >> Having learned that lesson the hard way, I now keep a directory with zips >> and tarballs for all of

Re: using mmap on large (> 2 Gig) files

2006-10-25 Thread Tim Roberts
t wouldn't be rocket science to extend Python's mmap to allow that. >There are in any case room for improving Python's mmap object. Here we agree. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get each pixel value from a picture file!

2006-10-25 Thread Tim Roberts
t is rather unlikely that your low-order bit changes will survive the compression process. There is lots and lots of research on this subject. It's called "steganography" and "digital watermarking". Google is your friend. -- Tim Roberts, [EMAIL PROTECTED] Providenza &

Re: The format of filename

2006-10-25 Thread Tim Roberts
ward slashes or back, and have done so clear back to Windows 3.0. However, the Windows command shells do not. That's what you're seeing here. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: urllib2: HTTP Version not supported

2006-11-02 Thread Tim Roberts
; >How do I force urllib2 to use HTTP v1.1? Are you passing httplib.HTTPConnection as the connection handler? If you use httplib.HTTP instead, it should create a 1.0 request. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: is mod_python borked?

2006-11-02 Thread Tim Roberts
OT the only way of using Python to create a web site. CGI by itself is quite practical, unless you are anticipating 100s of hits per minute. Even if it isn't, something like CherryPy used through a proxy gives you the benefit of a long-running process with the convenience of Apache. -- Ti

Re: Awesome Python Information

2006-11-07 Thread Tim Roberts
ngled newsreader". I was evaluating it in 1999 as an alternative to Agent, and it was not new even then. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: how to print pdf with python on a inkjet printer.

2006-11-16 Thread Tim Roberts
or is it that I will have to use the wxpython library asuming that >there is a print dialog which can open up the list of printers? Even if you got the list of printers, what would you do with it? -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: TIming

2006-05-29 Thread Tim Roberts
eed to be prepared to start your app if the time is just PAST 6 PM on June 13. -- - 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 Slac

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

2006-06-03 Thread Tim Roberts
>> >> to print: >> >> 0123456789 > >The reverse isn't true ??? > > print "".join(str(x) for x in range(10)) What he meant it that it is impossible 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
almost every behavior you might want. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: follow-up to FieldStorage

2006-06-07 Thread Tim Roberts
#x27;t find something after another read through. On the other hand, 45 seconds with the source code shows that "class FieldStorage" has member functions called "keys()" and "has_key()". 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: Decimals

2006-06-14 Thread Tim Roberts
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] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

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.

Re: wxPython question

2006-06-17 Thread Tim Roberts
that, in the first example, you are given a wx.MenuItem object to work with, should you need it. The second example hides it. It is rarely necessary to access a wx.MenuItem directly, so this is not usually an issue. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: USB support

2006-06-19 Thread Tim Roberts
ython 2.4, Libusb 0.1.12 and PyUSB 0.3.3 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: Trouble including Python.h

2006-06-23 Thread Tim Roberts
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] 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
1987, but Python's history 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
quot;abcde" 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: languages with full unicode support

2006-06-28 Thread Tim Roberts
pport this) > >As far as i know, here's few 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 & Boek

Re: String Question

2006-06-30 Thread Tim Roberts
post them. That will get an "invalid \x escape". \x must be followed 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: Non-ASCII languages

2006-07-01 Thread Tim Roberts
d early 1970s. GUIs, color, 3D, structured 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: a question about "return"

2006-07-03 Thread Tim Roberts
rpose. Some people include one for completeness -- a coding standard that "all paths must have a return statement", for instance. -- - 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 >>&g

Re: Very practical question

2006-07-05 Thread Tim Roberts
about better ways to do this, but I'd like to point out that this one line is equivalent to: print c.a.a() -- - 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-23 Thread Tim Roberts
pecial characters 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 tha

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

2006-08-23 Thread Tim Roberts
gets added to the SmTP This is how a Bcc: is done. A Bcc: header is never included in an e-mail message. The address gets included in the envelope, but not in the headers or body. -- - 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
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 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
in. Did you get this from a web page? Can you tell 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
if it's using a standard XP interface (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: The lib email parse problem...

2006-08-29 Thread Tim Roberts
s not. A multipart/alternative section is constructed 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: python loops

2006-09-02 Thread Tim Roberts
[EMAIL PROTECTED] wrote: >AlbaClause wrote: > >> for i in range(length): >> print i > >Or usually better: > >for ii in xrange(length): >... xrange used to be better. As I understand it, that's no longer the case. -- - Tim Roberts, [EMAIL PROT

Re: upgrade 2.4 -> 2.5 HowTo

2006-09-04 Thread Tim Roberts
python2.4/site-packages to > /usr/local/lib/python2.5 ? I've started keeping the tarballs for all of the packages I install in a single directory, along with a shell script to install each of them. It makes upgrading much easier. I do this on both Linux and Windows. -- - Tim Robe

Re: Is it just me, or is Sqlite3 goofy?

2006-09-06 Thread Tim Roberts
ument PostgreSQL, MySQL, Oracle, Apache, Posix, Win32 etc ? Warning: misplaced sarcasm detected -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: ctypes listing dll functions

2006-09-08 Thread Tim Roberts
ters. That is only available with C++, so I'm afraid you are out of luck. You may be able to use SWIG to generate an interface for this; I've had good luck with SWIG. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Get CPU usage of a single process in Windows

2006-09-08 Thread Tim Roberts
-Win32 includes an interface for that (import win32pdh), but I've never used it. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Validation of email

2006-09-12 Thread Tim Roberts
d to require confirmation). Mailman is written in Python. http://www.gnu.org/software/mailman/index.html -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a way to find IP address?

2006-09-15 Thread Tim Roberts
y, but why would you want to? That IP address is not reachable from your server anyway. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a way to find IP address?

2006-09-16 Thread Tim Roberts
;> use it with care) >> >Hello Fredrik, >Thank you for your reply. >How can be HTTP_X_FORWARDED_FOR easily spoofed? I thought that IP >address is not possible change. No, but HTTP headers are just text. A client can put whatever it wants in them. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Is it possible to change a picture resolution with Python?

2006-09-20 Thread Tim Roberts
to continue to print as 3" x 3", but to have three times as many pixels in each direction? That means you have to increase the number of pixels to 900x900. That's exactly what the code above is doing. The image file will be 9 times larger. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: naming objects from string

2006-09-20 Thread Tim Roberts
ntel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> a='hello' >>> locals()[a] = 1234 >>> hello 1234 >>> -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Is it possible to change a picture resolution with Python?

2006-09-22 Thread Tim Roberts
;very important thing" in this script is the "im.resize", which smoothly stretches the image so that it has 2.5 times as many pixels as before. It is that stretching which allows you to change the DPI in the header, and yet still have it print at the same size. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a regular expression for finding email address ?

2006-09-26 Thread Tim Roberts
lt >found, you can get one. The OP should be aware, however, that a regular expression which matches the complete specification in RFC-822 and RFC-2822 is approximately 7,000 characters long. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: how to print pdf with python on a inkjet printer.

2006-11-17 Thread Tim Roberts
ere is a standard "print" dialog for Windows that shows you the familiar dialog, with the list of printers and all of the options. In wxPython, I believe it is called wx.PrintDialog. In Pywin32, win32print.EnumPrinters can give you the list of available printers. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Is time.time() < time.time() always true?

2006-11-23 Thread Tim Roberts
ur at one time instant Well, as long as we're being pedantic, surely that should read "only one thing can occur at any time instant..." -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: len(var) is [CONSTANT] equal to len(var) == [CONSTANT]?

2006-11-23 Thread Tim Roberts
? It has been my experience that virtually every use of the "is" operator (except "is None") is wrong. Now, I fully understand that there are perfectly valid uses for "is", and the standard library contains a few, but for the non-guru casual Python programmer, I

Re: splitting a long string into a list

2006-11-27 Thread Tim Roberts
irth Defects; Toxic ChemicalsAntibiotics, >AnimalsAgricultural Subsidies, Global TradeAgricultural >SubsidiesBiodiversityCitizen ActivismCommunity... What do you want out of this? It looks like there are several levels crammed together here. At first blush, it looks like topics separat

Re: Python Question About Compiling.

2006-11-30 Thread Tim Roberts
s like a compiled program. py2exe is one example. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: v2.3, 2.4, and 2.5's GUI is slow for me

2006-12-02 Thread Tim Roberts
nd the world, and much longer before people actually download the message to their local reader, then an equal amount of time for replies to get back to you. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Video feature

2006-12-02 Thread Tim Roberts
something that will do most of the job, probably in PHP. Is your website already using Python? -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Video feature

2006-12-04 Thread Tim Roberts
as part of a web site. Google is your friend. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Video stream server

2006-12-04 Thread Tim Roberts
age. Then you can use your Python web site to create the appropriate HTML. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: [Python] SMTP server based on Python?

2006-12-06 Thread Tim Roberts
ust passes it to sendmail. Ummm, I'm rather confused as to why you don't just have sendmail do this. After all, that is its primary function: to run as a daemon, listening on port 25, and delivering incoming messages to local mailboxes. -- Tim Roberts, [EMAIL PROTECTED] Providenza & B

Re: Why does wx.Window.CaptureMouse() send EVT_PAINT

2006-12-09 Thread Tim Roberts
sure, but I doubt that it is CaptureMouse doing it, and I know the SetCapture API (which it eventually calls) does not. Is it possible that your clicking caused some part of the app to become unhidden, or caused some button to change state? -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boek

Re: wx.Font.GetPointSize returning bogus value?

2006-12-09 Thread Tim Roberts
font depending on your operating system and locale. 74 (0x4A) indicates a vector TrueType font of the "script" family, which is bizarre. May I suggest that you set your own default font before beginning? -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: possible php convert

2006-12-11 Thread Tim Roberts
but it also gives you some great real-world examples of virtually every function. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to do a Http HEAD requests

2006-12-11 Thread Tim Roberts
Soni Bergraj <[EMAIL PROTECTED]> wrote: > >I was just wondering if there is a more convenient way of doing a Http >HEAD requests then the socket module? > >Any ideas? The standard "httplib" module can do that in a half-dozen lines of code. -- Tim Robert

Re: Over my head with descriptors

2006-12-15 Thread Tim Roberts
choices=C_CHOICES) > homezip = Q_Zip("Your zip code?", "homezip", required=True, ) > happy = Q_Bool("Are you happy?", "happy", default=False) > birthday = Q_Date("Your Birthday:", "birthda

Re: Need Simple Way To Determine If File Is Executable

2006-12-15 Thread Tim Roberts
because this is a sort >of fluid thing in Windows (as you point out). This will tell you that "x.exe" is executable, even if "x.exe" contains nothing but zeros. On the other hand, I'm not convinced that any other solution is better. -- Tim Roberts, [EMAIL PROTECTED] Provi

Re: Need Simple Way To Determine If File Is Executable

2006-12-17 Thread Tim Roberts
"Gabriel Genellina" <[EMAIL PROTECTED]> wrote: >On 16 dic, 04:47, Tim Roberts <[EMAIL PROTECTED]> wrote: >> > os.stat(selected)[ST_MODE] & (S_IXUSR|S_IXGRP|S_IXOTH > >>This will tell you that "x.exe" is executable, even if "x.exe&qu

Re: Why there isn't a sort method for array ?

2006-12-17 Thread Tim Roberts
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > >It seems that an array acts like an list very much, except it doesn't >have a method sort. What do you mean by "array"? There is no such beast in the Python language. Do you mean the library module &q

<    1   2   3   4   5   6   7   8   9   10   >