Re: How can i change an Object type ?

2007-07-03 Thread Tim Roberts
ribute "Smart" is not >available >Error MEssage: >AttributeError: 'instance at 0x30216960>' object has no attribute 'Smart' Smart is part of IITUserPlaylist, not IITPlaylist. You need to call curPlaylist.QueryInterface to get the IITUserPlaylist, but that

Re: glob.glob standardization

2007-06-28 Thread Tim Roberts
ike os.listdir do? Martin gave you the real answer, but you should realize that your analysis of the behavior is faulty. In EACH case, glob.glob has returned all of the names that exactly match your pattern. It's not about absolute or relative. For example, if you do glob.glob( '.

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-28 Thread Tim Roberts
pt last in 1998. The current installer is as painless as most open source installers are. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-22 Thread Tim Roberts
h have our own favorite brand, and nothing you say will convince me to change mine. Editor, that is. I do occasionally change my underwear. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-22 Thread Tim Roberts
Bjorn Borud <[EMAIL PROTECTED]> wrote: > >bah, UNIX is not user hostile; it is just selective about its >friends. Right. My favorite Unix quote is from the same source (Dennis Ritchie): Unix is the answer. You just have to phrase the question very carefully. -- Tim

Re: GUI apps in Windows with native widgets?

2007-06-18 Thread Tim Roberts
e with the Win32 API and MFC, pywin32 includes a relatively thin wrapper around MFC. It's quite possible to write GUI apps using it, and there are several good examples. I'm not sure that I'd prefer it to wxPython, however. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: python i2c ioctl

2007-06-14 Thread Tim Roberts
i2c_fd = i2c_open() if i2c_fd < 0: print "i2c open error" return 1 But, of course, that's not enough either; i2c_fd is a local variable in THIS function as well. You should change ALL of the functions so that they accept an fd as the first parameter, and then pass i2c_fd into the functions here. Alternatively, you could create a wrapper class to hold the fd and make the function methods on that class. >while "azz": >i2c_start () I'm curious. What do you think "while" statement is doing? The answer is that it is an infinite loop; the string "azz" will always be true, so the while statement will always loop. I can't guess what you really wanted here. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Convert to C/C++?

2007-06-14 Thread Tim Roberts
ringFromGUID to make it printable. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Where can I suggest an enchantment for Python Zip lib?

2007-06-14 Thread Tim Roberts
n would be to reduce the priority of your archiving process. Your operating system is far better equipped to share the CPU than you are. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Bytes/File Size Format Function

2007-06-13 Thread Tim Roberts
7;, 'tb','pb', 'eb', 'zb', 'yb'] >[int(log)] >) I have a couple of picky comments. The abbreviation for "bytes" should be "B"; small "b" is bits by convention. All of the prefixes above "k"

Re: updating db with csv

2007-06-12 Thread Tim Roberts
Captain Paralytic <[EMAIL PROTECTED]> wrote: >On 11 Jun, 07:37, Tim Roberts <[EMAIL PROTECTED]> wrote: >| Not in standard SQL. MySQL supports a REPLACE extension that does >| an UPDATE if the key already exists, and an INSERT if it does not. >| There is also an extens

Re: read 9 bytes

2007-06-10 Thread Tim Roberts
stance. >If I do: serialport.read(4) >I would get 8 bytes, No. You would get 4 bytes. Do you see documentation to the contrary? -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: updating db with csv

2007-06-10 Thread Tim Roberts
UPDATE xxx" that might do what you want. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Need help! win32 com_error 'Exception occurred'

2007-06-02 Thread Tim Roberts
R. Seriously, what on earth did you expect this to do? Its whole purpose is send sounds to the sound driver. If there is no sound driver, what was it supposed to do with the audio data? -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Is PEP-8 a Code or More of a Guideline?

2007-05-31 Thread Tim Roberts
y make the parser more complicated, because it could no longer be context-insensitive. For example, if I had identifiers called "mine" and "not mine", how would it parse this: if not mine: -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Is PEP-8 a Code or More of a Guideline?

2007-05-29 Thread Tim Roberts
Frank Swarbrick <[EMAIL PROTECTED]> wrote: > >Then you'd really love COBOL! > >:-) > >Frank >COBOL programmer for 10+ years Hey, did you hear about the object-oriented version of COBOL? They call it "ADD ONE TO COBOL". -- Tim Roberts, [EMAIL PROTECTE

Re: 0 == False but [] != False?

2007-05-24 Thread Tim Roberts
a false value in a Boolean context, but they are not all the same. As a general rule, I've found code like "if x == False" to be a bad idea in ANY language. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: too much memory use

2007-05-24 Thread Tim Roberts
RAM +1gb virtual store n hangs >cant think of an effective way to implement tree in memory(i can >compact it on disk by writing just the index no..along with the record >from which tree in memory can be reconstructed, but i have to >implement tree as previous to implement random a

Re: Lists vs tuples (newbie)

2007-05-23 Thread Tim Roberts
Neil Cerutti <[EMAIL PROTECTED]> wrote: > >I use tuples simply because of their mellifluous appellation. +1 QOTW. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: i/o prob revisited

2007-05-21 Thread Tim Roberts
nicode: need string or buffer, file found >Any solutions. I don't see how the error could possibly make it any clearer. "open" expects a file name. "output_file" is not a file NAME. It is a file OBJECT. If you want to reopen that file, then p

Re: Iron Python

2007-05-16 Thread Tim Roberts
IronPython will give me the opportunity to really dig into WPF without having to drink the C# kool-aid. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: High resolution sleep (Linux)

2007-05-05 Thread Tim Roberts
, the timer interrupt would have to fire every 10us. The overhead of handling the timer interrupt and rescheduling that often is quite significant. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Cannot execute Windows commands via Python in 64-bit

2007-05-05 Thread Tim Roberts
ievable but true. Although we were all smart enough to handle the transition from \windows\system in Win16 to \windows\system32 in Win32, Microsoft apparently believes programmers have all grown too stupid to handle the transition to Win64 on our own. Some registry references are also silen

Re: Replacement for HTMLGen?

2007-05-03 Thread Tim Roberts
For me, templating (Cheetah is my favorite, www.cheetahtemplate.org) makes more sense than building the page bit by bit in Python code, and the separation of function and presentation makes things easier to maintain. In my opinion, of course. ;) -- Tim Roberts, [EMAIL PROTECTED] Providenza &a

Re: pack/unpack zero terminated string

2007-05-03 Thread Tim Roberts
ich is that case won't be hard. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: os.path.join

2007-05-03 Thread Tim Roberts
g the >> previous drive letter, if there was one) are thrown away... > >Yes, but that still doesn't answer my question as to why os.path.join >works that way. I understand that that is how it is written, but why? It's behavior is exactly the same as if you did a series of

Re: While we're talking about annoyances

2007-05-01 Thread Tim Roberts
f sequence.sort became much, much worse when a key function was supplied. I've tended to favor the "Schwarzian transform" (decorate-sort-undecorate) because of that. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: I have a chance to do somting diffrent way not Python ?!

2007-04-29 Thread Tim Roberts
e several very good Unix-derived shells available for Windows. UnxUtils includes a bash and a zsh. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Dedicated CPU core for Python?

2007-04-27 Thread Tim Roberts
the resources. Except for specific needs in some drivers, the use of CPU and thread affinity is virtually never a good idea. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple sqlite3 question

2007-04-25 Thread Tim Roberts
but if you had used "testdata" as the filename, it would have failed. You should use one of these alternatives: conn = sqlite3.connect('.\\optiondata') conn = sqlite3.connect(r'.\optiondata') conn = sqlite3.connect('./optiondata') conn = sqlite3.connect(

Re: python cgi problem with textarea

2007-04-23 Thread Tim Roberts
as long as the textarea input has no spaces. > >it doest work because the "space" character isnt interpreted >correctly, you need to change the space characters too   What??? Did you even read the problem description? -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: CGI Script using Python

2007-04-21 Thread Tim Roberts
download files to the client browser, but the user will have to be involved to tell the browser where to store the incoming file. Doing anything else would be a security hole. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to communicate via USB "port"

2007-04-18 Thread Tim Roberts
he device to send before you can talk to it. On the other hand, as someone else pointed out, many types of USB devices fall into standard device classes, and the operating system supplies drivers for those classes. If your GPS device is in the communication class, you might be able to pretend

Re: Python Feature Request: Allow changing base of member indices to 1

2007-04-16 Thread Tim Roberts
duced in FORTRAN 77. FORTRAN 66 didn't do this. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: way to extract only the message from pop3

2007-04-04 Thread Tim Roberts
ommands fetch the headers. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Math with unicode strings?

2007-04-04 Thread Tim Roberts
I >"cast" the string into an interger? When I see a typo once, I figure it's a typo, but when I see it three times, I figure it is a misunderstanding. The word is "integer", not "interger". -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Fortran vs Python - Newbie Question

2007-03-27 Thread Tim Roberts
avac) is very different from the use of "compiled" in the context of running gcc. Once upon a time, Basic enthusiasts would have used the word "tokenized" to describe .pyc files. A .pyc file is, in fact, interpreted by an intermediate language interpreter. I don't u

Re: fifo queue

2007-03-19 Thread Tim Roberts
"drochom" <[EMAIL PROTECTED]> wrote: > >how would u improve this code? I would add at least one comment... -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Starting Python... some questions

2007-03-12 Thread Tim Roberts
payload = p.chassis_id_tlv > ether = scapy.Ether(dst="01:02:03:04:05:06") > fullpayload = ether + payload > sendp(fullpayload) Now, at the end, add: if __name__=="__main__": main() That should do it. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: how can I find out the value of an environment variable?

2007-03-07 Thread Tim Roberts
ot;, "credits" or "license" for more information. >>> import os >>> os.environ['PATH'] 'C:\\WINDOWS\\system32;c:\\WINDOWS;c:\\WINDOWS\\System32\\Wbem;c:\\bin;e:\\bin' >>> -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: [OT] python notation in new NVIDIA architecture

2007-02-27 Thread Tim Roberts
guage has identifiers >such as __device__, __global__, __shared__, etc. Is it a coincidence? >Probably it is. :) Well, identifiers starting with an underline are reserved for implementation use in ISO standard C++, so the chicken and egg question is an interesting one.. -- Tim Roberts,

Re: Database Programming with Python

2007-02-11 Thread Tim Roberts
s Driver (*.mdb)};DBQ=x.mdb" ) cmd = win32com.client.Dispatch('ADODB.Command') cmd.ActiveConnection = conn cmd.CommandText = "SELECT firstname,lastname FROM users;" rs = cmd.Execute()[0] while not rs.EOF: # Use elements of rs rs.MoveNext() There are samples on

Re: COM makepy util finds multiple versions of my COM object

2007-02-04 Thread Tim Roberts
ating different GUIDs every time you register the thing. If so, you need to unregister the old version before you register a new one. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: win32com.client

2007-02-01 Thread Tim Roberts
>Here is a prove:- >>>> import win32com > >Traceback (most recent call last): > File "", line 1, in >import win32com >ImportError: No module named win32com >>>> > >you try in your computer It works just fine in my computer, because I

Re: python grammar

2007-01-22 Thread Tim Roberts
> >http://docs.python.org/ref/Booleans.html > >In 'expression' rule - what does 'if', 'else' mean? I guess 'if' and >'else' must be keywords, not non-terminals. Yes, those refer to literal keywords. I'd judge both of those as erro

Re: Help with 'popen'

2007-01-22 Thread Tim Roberts
27;] = 'hello' >py> os.popen('echo $asdfasdf').read() >'hello\n' For completeness, let us anticipate the followup question and point out that "permanent" here means "for this process and any processes that it spawns". Once the Python session ends, the "asdfasdf" will be lost. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to read and write huge binary files

2007-01-19 Thread Tim Roberts
"Lad" <[EMAIL PROTECTED]> wrote: > >What is a good way to read binary data from HUGE file and write it >to another file? How huge? I regularly process 100-megabyte MPEG files in Python, both by reading the whole thing in as a string, and by using "mmap" t

Re: Is it possible to fasten the import of cgi?

2007-01-19 Thread Tim Roberts
ice. You either need to switch to a one of the web frameworks (like CherryPy or Django or WebWare or one of the hundreds of others), or move to PHP. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Units of measurement

2007-01-19 Thread Tim Roberts
peed of light actually was in furlongs per fortnight. Now I need to figure out how to work that into a cocktail party conversation. "Hey, the deficit isn't the only thing that is approaching 1.8 trillion..." -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Maths error

2007-01-14 Thread Tim Roberts
utation twice, once to compute the minimum, once to compute the maximum. When you're done, you can be confident that the true answer lies within the interval. For people just getting into it, it can be shocking to realize just how wide the interval can become after some computations. -- Tim R

Re: how to clean sys.path

2007-01-12 Thread Tim Roberts
ngs\User\My Documents\My Python files\wxDemos'. And AnalogClock.py >does work when residing in that directory. wxDemos contains the demos. The "wx" module lives in site-packages\wx-2.8-msw-ansi. Did you leave that in? -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: how to clean sys.path

2007-01-10 Thread Tim Roberts
n by "used during a lot of trials and errors"? sys.path is recreated from scratch every time Python starts. It doesn't accumulate over time, other than from new packages that you install. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Module to read svg

2007-01-09 Thread Tim Roberts
rocessing needs, that might be sufficient. > >I don't think it quite fits what the OP is asking for. SVG defines some non-XML >structure for some of its contents. For example: > > Why is that non-XML? -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: cache line length of a machine

2007-01-04 Thread Tim Roberts
he size and speed using WMI (assuming you are using Windows). For more detailed, you will have to call into a C routine, and maybe even resort to looking up the cpuid info. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I add users using Python scripts on a Linux machine

2007-01-03 Thread Tim Roberts
that is setuid root that calls your script for you. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: A question about unicode() function

2006-12-31 Thread Tim Roberts
= unicode(content,"gbk") >print content >content.close() Once you fix the lambda, as Felipe described, there's another issue here. You are telling the unicode function that the string you're passing it is an 8-bit string encoded as gbk. How do you know that? In your s

Re: Easiest way to print from XP/DOS.

2006-12-31 Thread Tim Roberts
results. Is it a USB printer? Remember that "prn" and "lpt1" refer to the first parallel port, not necessarily the first printer. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Easiest way to print from XP/DOS.

2006-12-30 Thread Tim Roberts
n" will not go anywhere. Typing to "prn" is a dreadful way to do printing on Windows. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: INSERT statements not INSERTING when using mysql from python

2006-12-30 Thread Tim Roberts
icality, I try never to use them, because they might not be available in my next database. After all, you should have a pretty good idea at any given time whether your database and table already exist. I do occasionally allow myself a "DROP TABLE IF NOT EXISTS", which then allows th

Re: DOS, UNIX and tabs

2006-12-29 Thread Tim Roberts
"Ben" <[EMAIL PROTECTED]> wrote: > >Great - that worked.Thanks! >Is that a general method in linux you can always use to redirect >standard output to a file? Works in Windows, too. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.py

Re: File write() problem

2006-12-29 Thread Tim Roberts
erPassword: print "Server warning: No password has been set" pwd1 = getpass("New Password: ") pwd2 = getpass("Confirm Password: ") while pwd1 != pwd2: print "Passwords did not match" pwd1 = getpass("New Password: ") pwd2 = getpass("Confirm Password: ") open(FN, 'w').write(pwd2+'\n') serverPassword = open(FN, 'r').readline() -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Help with small program

2006-12-29 Thread Tim Roberts
will be suboptimal. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Need Simple Way To Determine If File Is Executable

2006-12-21 Thread Tim Roberts
a Windows system, using stat, the definition is "has an extension that is in PATHEXT". Nothing more, nothing less. In both cases, the contents of the file are irrelevant. Now, when you, as a human being, try answer the question "is this file executable", you would use more s

Re: def index(self):

2006-12-19 Thread Tim Roberts
tarted >with, there are a few gotchas. You're above snippet should be: > >class HelloWorld(object): > def index(self): > return "Hello World" > index.exposed = True Many people find it more readable to write that as: class HelloWorld(object): @

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

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: 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: 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: 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: 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: 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: 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: [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: 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: 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 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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 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: 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-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: 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: 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: 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: 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: 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: 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-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: 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

<    2   3   4   5   6   7   8   9   10   >