Re: WIN32 - get the GUID of a Network Device

2010-04-26 Thread Tim Roberts
Network >> Interface. I Try >> to change it over the Registry, but maybe there is another way? > > OK; I'm going to hope that Tim Roberts or someone equally > knowledgeable can > kick in here as devices really isn't my area. However this looks l

Re: winreg - access mask

2010-04-30 Thread Tim Roberts
e constants are straight from the Windows API. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Classes: nested functions vs. private methodes

2010-05-06 Thread Tim Roberts
arch order is well-defined, so super() is still meaningful. However, in that case, you are rapidly getting into a design that is too complicated to understand at a glance. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Cross-platform file paths

2010-05-08 Thread Tim Roberts
Windows network protocol to access a Linux file system from another Linux machine. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: win32com sql update problem

2010-05-12 Thread Tim Roberts
'April 2010' AND InvJobCode = '2169'") Well, that's not the EXACT code, because that's clearly not line 64 in the script above. Do you actually have the file path hardcoded, as in your example? Or are you building it up from strings? Does the net share exist a

Re: problems with CSV module

2010-06-05 Thread Tim Roberts
ween formats. It has been my experience that csv.Sniffer is NEVER worth the trouble. You know what the format is. Just embed the dialect yourself. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: why any( ) instead of firsttrue( ) ?

2010-06-09 Thread Tim Roberts
danieldelay wrote: > >Does GVR prefers beauty to power ? Not in the beginning, but in recent years things are tending this way. And, frankly, I don't think that's a Bad Thing at all. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mai

Re: pyreadline: default editable input; please, help.

2010-06-13 Thread Tim Roberts
he low-level operating system interfaces are quite different. raw_input in the Windows implementation bypasses any readline hooks. You'll have to use a different method. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: I strongly dislike Python 3

2010-06-27 Thread Tim Roberts
developers do not have the right to make incompatible changes, ever? -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: PDF Generation With Reportlab

2010-06-30 Thread Tim Roberts
;Normally I would use pagebreak and spacers but I cannot figure out how >to fit this into the table structure. Page breaks and spacers are absolutely the wrong way to handle this. Think about this as a Word document. If you want to exclude the logo, you'd change the top margin to pro

Re: [python] how to ensure item in list or dict bind with "an uuid meaning" integer type ID?

2010-06-30 Thread Tim Roberts
d your join without even breaking a sweat. If you don't like that, there are pure Python SQL engines available that are even simpler. Why reinvent the whell? What you want already exists. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread Tim Roberts
for download. >:(( Also nonsense. Get it from right here: http://www.microsoft.com/express/downloads/ Note the three tabs: VS2010, SQL Server R2, and VS2008. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-08 Thread Tim Roberts
suspect it suffers from the >same problem. No. The multi-thread-aware CRT in Visual C++ (which is the only option since VS2008) puts errno in thread-local storage, so it's shared by all CRTs. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python -- floating point arithmetic

2010-07-09 Thread Tim Roberts
ssembly language (assuming it hasn't changed the rounding mode). -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-10 Thread Tim Roberts
Dave Angel wrote: >Tim Roberts wrote: >> >> No. The multi-thread-aware CRT in Visual C++ (which is the only option >> since VS2008) puts errno in thread-local storage, so it's shared by all >> CRTs. >> >I didn't know specifically that e

Re: 'reload M' doesn't update 'from M inport *'

2010-07-10 Thread Tim Roberts
xxx is essentially the same as: import service xxx = service.xxx At that point, xxx contains a reference to the "service.xxx" object as it is right now. When you do a reload, that imports a new version of "service.xxx", but your global "xxx" object is still bound to the old one. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: MySqlDb any way to see the query string

2010-07-10 Thread Tim Roberts
he actual query string that was transmitted is available in "c._executed". If you need to know the result before you submit it, you can scan the source for the "execute" method and see how they do the quoting. It's not that complicated. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Errno 9] Bad file descriptor

2010-07-12 Thread Tim Roberts
File "C:\tmp\y.py", line 3, in print sys.stdin.readlines() IOError: [Errno 9] Bad file descriptor C:\tmp>python y.py < y.py ['import sys\n', '\n', 'print sys.stdin.readlines()\n'] C:\tmp> -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Check if a command is valid

2010-07-12 Thread Tim Roberts
l macros, however. You might be able to use "type" to do that. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: detect endianness of a binary with python

2010-07-22 Thread Tim Roberts
an entirely Unix-like way of doing things. Don't reinvent the wheel when there's a tool that already does what you want. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Normalizing A Vector

2010-07-31 Thread Tim Roberts
to put this in a function: def Normalize(V): L = math.sqrt( sum(a*a for a in V) ) return (a/L for a in V) Now the temporary goes away at the end of the function. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Microsoft lessening commitment to IronPython and IronRuby

2010-08-09 Thread Tim Roberts
stly an exercise of writing it in C# and then translating. .NET is just too "tuned" for C# and VB. Although IronPython was a good fit, it was just not a great fit. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: mailbox.mbox not locking mbox properly

2010-08-09 Thread Tim Roberts
than the following for the locking to work correctly:- It's not the locking. It's the flush mechanism. The mbox class doesn't know that the ONLY thing you did was an append. You might have modified other messages in the middle. If you want to do an append, you'll need t

Re: Making the case for repeat

2009-06-06 Thread Tim Roberts
ome from people who did not have enough experience to know that what they were doing was impossible... -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: parsing json using simplejson

2009-06-16 Thread Tim Roberts
deostroll wrote: > >I want to be able to parse it into python objects. Any ideas? What did you not like about the very useful replies you have already received? -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get the total size of a local hard disk?

2009-06-16 Thread Tim Roberts
willgun wrote: > >Unfortunately,I'm on win32. >Actually,I prefer a cross-platform method. Why do you need this? This kind of information is not very useful in a cross-platform application. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.or

Re: simple GUI for my application?

2009-06-16 Thread Tim Roberts
unless you write in C#. Otherwise, you end up spending most of your time translating C# concepts into Python. >This can also be done from Cpython using the pywin extensions. Here, you are correct. Pywin32 does include a Python implementation of MFC. -- Tim Roberts, t...@probo.com Providenza &am

Re: question about a command like 'goto ' in Python's bytecode or it's just a compiler optimization?

2009-06-16 Thread Tim Roberts
uot; instructions. If you write a C program with an "if" statement, the resulting assembly program will contain a "goto" (usually called "jump" or "branch"). Don't worry about it. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: File Syncing

2009-06-21 Thread Tim Roberts
master server but i'll check. Thanks He's suggesting that you just PICK one and make that the master server. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Why is it that str.replace doesn't work sometimes?

2009-06-25 Thread Tim Roberts
humn wrote: > >Thank you! Didn't know that it would escape characters with single >quotes. I thought it only did that with double quotes. That's only true in Perl and PHP, but not in Python or C. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://

Re: tokenize module

2009-06-28 Thread Tim Roberts
except that it produces COMMENT tokens for comments and gives type OP for all operators -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Imaging Library download link broken?

2009-06-30 Thread Tim Roberts
ore than 60,000 text messages PER SECOND being sent regarding Jackson. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: tokenize module

2009-06-30 Thread Tim Roberts
bootkey wrote: > >Thanks for the reply. I wonder why the tokenizer classifies all >operators simply as OP, instead of the various operators listed in the >tok_name dictionary. I imagine it's just an exercise left to the reader. It's not that hard of an extensi

Re: Searching equivalent to C++ RAII or deterministic destructors

2009-07-03 Thread Tim Roberts
ace. A local variable is (usually) just a name in the local() namespace. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and webcam capture delay?

2009-07-05 Thread Tim Roberts
dware. If you are targeting Windows, for example, you could write a DirectShow graph to pump into a renderer that transmits out to a network, then another graph to receive from the network and display it. You can manage the network latency by adding a delays in the local graph. -- Tim Roberts, t...@

Re: Python and webcam capture delay?

2009-07-07 Thread Tim Roberts
speed only gets you 1 fps at 640x480 uncompressed, so it's really only useful for the most primitive video conference cams. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: IP Address Function

2009-07-09 Thread Tim Roberts
cess for every request. The Python CGI module doesn't provide a wrapper function because this information is just not useful. Most corporate users sit behind proxies, so everyone at the company appears to come from the same IP. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. --

Re: How to use Python to interface with Web pages?

2009-07-09 Thread Tim Roberts
Peter wrote: > >Any help would be appreciated :-) > >I want to write an auction sniping tool in Python. Please don't. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Examples of Python driven Microsoft UI Automation wanted

2009-07-09 Thread Tim Roberts
html http://mindtrove.info/articles/gui-automation-with-pyaa/ -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: missing 'xor' Boolean operator

2009-07-14 Thread Tim Roberts
existing code from before the conditional operator: xxx = testme and truevalue or falsevalue -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: win32api install problem

2009-07-22 Thread Tim Roberts
t; >Can anyone offer a suggestion? It is very unusual that those three directories should have different creation dates. Normally, all three would have the same date and time, from whenever you ran the installer. I would suggest that you go into Add and Remove Programs, uninstall pywin32, and run the

Re: Using Python to automate builds

2009-08-09 Thread Tim Roberts
imr cd %LAST% build %BLD% endlocal setlocal set LAST=%CD% call %DDK%\bin\setenv %DDK% chk WLH x64 no_oacr @echo on set USERNAME=timr cd %LAST% build %BLD% endlocal -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Pywin32 @ windows 7

2009-08-09 Thread Tim Roberts
dows 7 64-bit for many months. No problems. I have not tried the 64-bit Python and PyWin32 builds yet. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows 7 : any problems installing or running Python ?

2009-08-09 Thread Tim Roberts
er developers have expressed the same opinion. Microsoft might actually have a winner here. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Pygresql, and query meta informations

2009-08-15 Thread Tim Roberts
pg_attribute. pg_class contains information about your tables; when you fetch the class number for your table, you can look up the columns in pg_attribute. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: IOError: [Errno 22] invalid mode ('wb') or filename: in windows xp while making tarfile

2009-08-24 Thread Tim Roberts
me. It's just that simple. >Maybe it's good idea to use raw string for specifing those paths? Doesn't matter. Get rid of the colons, and your file name will work. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: why python got less developers ?

2009-08-27 Thread Tim Roberts
Deep_Feelings wrote: > >python got relatively fewer numbers of developers than other high >level languages like .NET , java .. etc why ? How do you know, and why does it matter? By the way, .NET is not a language. I assume you meant C#. -- Tim Roberts, t...@probo.com Providenza &

Re: why python got less developers ?

2009-08-30 Thread Tim Roberts
Esam Qanadeely wrote: >On Aug 28, 8:27 am, Tim Roberts wrote: >> Deep_Feelings wrote: >> >> >python got relatively fewer numbers of developers than other high >> >level languages like .NET , java .. etc  why ? >> >> How do you know, and why do

Re: Is behavior of += intentional for int?

2009-09-02 Thread Tim Roberts
>This would be pretty disturbing behaviour, and anything but intuitive. Yes, indeed, and it's quite possible to write code like this in Fortran that produces exactly this result -- an integer constant gets modified. This used to get big yucks when we gathered around the keypunch, befor

Re: Support for Windows 7 ?

2009-09-05 Thread Tim Roberts
deeply nested paths on different drives: D: cd "\Ridiculous\Long\Path\Names\For Annoyance" C: cd "\Another\Ridiculous\Long\Path\Name" copy C:one.txt D:two.txt -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: HTTP POST File without cURL

2009-09-11 Thread Tim Roberts
John Giotta wrote: > >Is there a verbose feature for urllib2.urlopen? You have the full source code for the module right in front of you. Bringing up urllib2.py in an editor is quicker than waiting for a newsgroup reply. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc

Re: Simple Text Processing

2009-09-11 Thread Tim Roberts
egular expression matches. When you're good with Python, you start to think of every task in terms of lists and tuples. Stick with it, and you'll start thinking Pythonically in no time. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: how to return value from button clicked by python

2009-09-11 Thread Tim Roberts
ion you need to take when the button is clicked, then you DO that function in the button handler. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple Text Processing

2009-09-13 Thread Tim Roberts
Steven D'Aprano wrote: >On Fri, 11 Sep 2009 21:52:36 -0700, Tim Roberts wrote: > >> Basically, when you're good with Perl, you start to think of every task >> in terms of regular expression matches. When you're good with Python, >> you start to think of

Re: socket.MSG_WAITALL flag broken on Windows XP in Python 2.5.4?

2009-09-15 Thread Tim Roberts
ies (like Pyro) that use it if >it's available in the socket module. > >Does anyone know more about this? MSG_WAITALL is supported, starting with Windows Server 2003. It's a tough situation. Ideally, you'd want socket to remove that symbol on the systems where it'

Re: class initialization problem

2009-09-19 Thread Tim Roberts
t. As it is, you have a somewhat confusing situation. If I do this: x = Face( points ) Now I can refer to x.backface, but there is no x.backface.backface. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: easy question, how to double a variable

2009-09-21 Thread Tim Roberts
we can help you make it work. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Source code for itertools

2010-08-31 Thread Tim Roberts
ironment? Did you take the time to understand what he did? It's not that hard to figure out. He fetched the Python source code, unpacked it, then search for filenames that contained the string "itertools." The equivalent in Windows, after unpacking the source archive, would have b

Re: Errors with PyPdf

2010-09-26 Thread Tim Roberts
ent = "C:/Components-of-Dot-NET.pdf" or content = "C:/Components-of-Dot-NET.pdf" -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: IMAP support

2010-10-03 Thread Tim Roberts
pakalk wrote: > >Can anyone help me find GOOD IMAP library for python? Imaplib is.. >ekhm... nevermind... Is there any good library? What do you expect it to do? Imaplib is designed to help you access IMAP stores, and it does that well enough. But it's not a mail reader. --

Re: del() function - cannot find documentation

2010-10-07 Thread Tim Roberts
imary reason why parentheses should never be used with "del" and "return", as we so commonly see. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Whining about "struct"

2010-10-13 Thread Tim Roberts
dule moved from Python code to C code, and that helpful help string was removed. Is that still gone in Python 3.1? What are the chances of reinstating that helpful chart? -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: imaplib AND date format

2010-10-16 Thread Tim Roberts
A compliant date header looks like this: Date: 20 June 2010 12:34:56 -0700 -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: pythagorean triples exercise

2010-10-23 Thread Tim Roberts
about this right. The simplest (but not most efficient) method is brute force, using three loops, one each for a, b, and c. You can compute the largest "c" you will need by computing the square root of a*a+b*b. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: A good decorator library

2010-10-23 Thread Tim Roberts
through the unjudicious use of decorators. It is not good programming to use a language freature just because it is there. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: easyGUI and py2exe

2010-10-27 Thread Tim Roberts
version number string directly, instead of using __doc__.split. Two, you can reduce your optimization level from 2 to 1. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: execute shell script from python, needs sys.argv

2010-11-06 Thread Tim Roberts
ere, and that it's too early for optimization, but it bothers me to see "cat" as the first thing in a pipeline. You don't actually need two steps here at all: proc1 = subprocess.Popen( ["fastx_trimmer", "-n", "COUNT", "-o", sys.a

Re: udp sockets with python

2010-11-10 Thread Tim Roberts
opriate to use an interpreter. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

<    5   6   7   8   9   10