Re: Top Programming Languages of 2013

2007-10-07 Thread Tim Roberts
rtainly get a boatload of email every day from people offering to help me deal with it. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Memory Problems in Windows 2003 Server

2007-10-14 Thread Tim Roberts
erver 2003 have been "rebased" in such a way that they chop up the virtual address space more than XP. Even though there is more virtual memory available, it is fragmented. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Error on base64.b64decode() ?!

2007-10-14 Thread Tim Roberts
to be? The base64 algorithm converts 3 incoming bytes to 4 encoded bytes. When you decode base64, the input string MUST be a multiple of 4 bytes. Equal signs are used to pad the strings to 4n bytes. The web site you used might be doing that alignment for you. -- Tim Roberts, [EMAIL PROTECTED] P

Re: int to str in list elements..

2007-10-15 Thread Tim Roberts
string, int found >> I want to change list to a=['1','2','3'] but i don't want to use FOR >> because my list very very big. > >What is your worry: memory or time? The result string will be very >very very big. It's an interesting mental

Re: Simple Text Processing Help

2007-10-17 Thread Tim Roberts
les that will read a Word file a little more directly. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python on Intel A110?

2007-10-24 Thread Tim Roberts
think about this. I don't know what >these processors are compatible with at the binary level. Binary compatibility isn't so important. Python can be built from source. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Windows Installation

2007-10-24 Thread Tim Roberts
he exe in D:\ and did not create a Python25 directory. Where did you get the installer? I've installed Python on Windows many, many times, and have never seen this issue. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: win32com.client documentation?

2007-10-24 Thread Tim Roberts
ation of Excel spreadsheets and >> Word documents, interract with Access data bases, and so forth. >> >You might download and install Mark Hammond's PythonWin. (Ummm, win32com.client is PART of Mark Hammond's PythonWin, now called PyWin32.) -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: win32com.client documentation?

2007-10-24 Thread Tim Roberts
bsolutely invaluable for those occasions. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Windows Installation

2007-10-26 Thread Tim Roberts
rivers if the source code lives in a path with spaces. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Proposal: Decimal literals in Python.

2007-10-28 Thread Tim Roberts
3_oct : constant := 8#27#; x23_dec : constant := 10#23#; x23_hex : constant := 16#17#; The opportunities for obfuscated coding by writing all constants in base 7 boggle the mind. I'm not convinced you need delimiters on both ends; I think 16'fffe_3777 would be just as good. Alth

Re: Proposal: Decimal literals in Python.

2007-10-28 Thread Tim Roberts
t amongst the Brits who cut their teeth on 24 bit ICT/ICL >equipment... As a long-time Control Data employee, I know that 60-bit words and 18-bit addresses meant that I could do octal arithmetic nearly as fast as decimal. On the other hand, Python doesn't run on the 6000s... -- Tim Rober

Re: clear shell screen

2007-10-30 Thread Tim Roberts
ythonwin? If so, then what you are looking at is not a "shell screen" in any way. It's a simulation, and I don't know of any way to clear it. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: why did these companies choose Tcl over Python

2007-10-30 Thread Tim Roberts
lly, I chose Python (and wxPython), and both the client and I are quite happy with the result. (Actually, I did a Tcl binding for them as well, and just writing the text scripts reinforced my dislike for it...) -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: A Python 3000 Question

2007-11-01 Thread Tim Roberts
dent that I wasn't being serious. > >Ooh, now I'm curious. Seriously? You didn't know that $#x in perl returns the length of the array @x, minus 1? -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: why did these companies choose Tcl over Python

2007-11-01 Thread Tim Roberts
ked it enough that they've asked for another. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: os.readlink returning value

2007-11-01 Thread Tim Roberts
be relative if the symbolic link is relative, and absolute if the symbolic link is absolute. ln -s ../../over/there here1 ln -s /home/timr/spot here2 "here1" is a relative link. "here2" is an absolute link. -- 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: [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: python at command prompt

2007-11-03 Thread Tim Roberts
", and that DOES require registering the .py extension and adding .py to the PATHEXT environment variable. A very useful thing to do, by the way. I have many command line tools for which I have forgotten whether they are batch files, small executables, or Python scripts. And that's

Re: python at command prompt

2007-11-05 Thread Tim Roberts
not an expert here ;-) Yes, that's strictly for COM. And the "App Paths" registry key you mentioned is only for Explorer things, like the Start menu's "Run" box. It doesn't apply to the command line. Try typing "wordpad" in a cmd shell, then try it

Re: Python thinks file is empty

2007-11-05 Thread Tim Roberts
If you wrote this: f.close (as reformed VB programmers tend to write) it would run without error or warning, but the file would not actually be closed. The data would be hung up the buffer, and the file would be 0 length. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Some "pythonic" suggestions for Python

2007-11-09 Thread Tim Roberts
have already been discovered. It's fine to say "those ideas have been proposed and rejected, see the PEPs", but I hope this group retains the tolerance that I have long admired. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting file timestamp from url

2007-11-17 Thread Tim Roberts
t sending it, but that's all you can find out. Plus, remember that web proxies can interfere with this. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python too complex ?!?!?!

2007-11-19 Thread Tim Roberts
of modules on both Linux and Windows. >> > Try installing anything .NETish on Linux? Unfortunately, depending on your viewpoint, it works just fine, thanks to the hard work that has gone into the Mono project. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Efficient (HUGE) prime modulus

2007-11-19 Thread Tim Roberts
sk today only includes 9 x 10**12 bits. Also consider that, by rough estimate, there are approximately 10**80 atoms in the known universe today... -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Variable-width lookbehind

2007-11-19 Thread Tim Roberts
d PL/I. They are attempting to pack in every feature that has ever been requested by every person in the known universe. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Compile Cheetah Template on Windows

2007-11-25 Thread Tim Roberts
, with tmpl = Template( file='page.tmpl' ) >2. How do I output the HTML to a file? I tried the following: > >FILE = open(filename, "wt") >FILE.writelines(output) >FILE.close() > >I get an error though that states that writelines() requires an >interabl

Re: Compile Cheetah Template on Windows

2007-11-29 Thread Tim Roberts
pend(pocmonitors_cur.fetchone()) >pocmonitors_cur.close() >db.close() What are you trying to do here? If you just want to turn the query results into a list, you can just do: pocmonitors = pocmonitors_cur.fetchall() >output = Template(file='C:\Python25\Lib\site-packages\PSN >\SafetyNet.tmpl', searchList=[nameSpace]) This string also needs to be escaped. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Oh no, my code is being published ... help!

2007-11-29 Thread Tim Roberts
assume that p7zip will be installed in /usr/bin/7za. That's not good. On many of my systems, I install all new packages into /usr/local/bin. Some people use /opt. You should really check the PATH to look for 7za. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: pythonw.exe and python.exe

2007-12-01 Thread Tim Roberts
ad, because that's where window events are delivered. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: python newbie - question about lexical scoping

2007-12-01 Thread Tim Roberts
ibe if models.comment() were a normal function that returns a single object, instead of a class name, as I have assumed. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: how to convert 3 byte to float

2007-12-08 Thread Tim Roberts
not that old). I was also wondering about >the reason for this limitation (maybe the design is ~20 years old). The IEEE-754 standard was adopted in 1985. Before that (and after that, too), many people used whatever bit layout they wanted for floating point numbers. -- Tim Roberts, [

Re: Serializing Python compiled code.

2007-12-10 Thread Tim Roberts
. Why not just store the raw code snippets? -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: sqlite weirdness

2007-12-12 Thread Tim Roberts
through that. >I'll have to refactor my code somewhat to force it to use the '-MM- >DD' format. Another possible solution is to use a real database. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Difference between del and remove?

2007-12-13 Thread Tim Roberts
cause the number 2 was not in the list. Dictionaries do not have a "remove" method. You have to use the "del" statement. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Dynamic or not?

2007-12-13 Thread Tim Roberts
e floating point, that's only 2 megabytes. Piece of cake. With 1,000 in each group, it's 8 megabytes. Still no sweat. What are you going to do with these distances? Why do you need them all in memory? -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows XP unicode and escape sequences

2007-12-14 Thread Tim Roberts
he NTVDM (the Virtual DOS Machine). 32-bit console apps (which Python is) simply cannot use ANSI escape sequences. You have to use the Win32 APIs to do color. There are curses-like libraries available for Python. Or: http://www.effbot.org/zone/console-handbook.htm -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Changing argument value

2007-12-15 Thread Tim Roberts
sult anywhere, the [3,4] list now has no names bound to it, and will get cleaned up. fooB(x) Like before, this is passing the two-element [1,2] list into fooB, where it gets bound to "y" inside fooB. Again, it has two names bound to it. Then, when you do y[0] = 3 you are changing

Re: Does fileinput.input() read STDIN all at once?

2007-12-19 Thread Tim Roberts
input.py module, this will eventually call FileInput.next(), which eventually calls FileInput.readline(), which eventually calls stdin.readlines(_bufsize). The default buffer size is 8,192 bytes. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython FileDialog, select folder

2007-12-22 Thread Tim Roberts
-rw-r--r-- 1 pofuk pofuk 105 2007-12-19 21:59 login.py Do you want to KNOW the permissions, or do you really want to get the output of "ls -l"? What you probably want is os.walk. You can call stat or os.path.isdir to get information about the files you discover. -- Tim R

Re: Python DLL in Windows Folder

2007-12-24 Thread Tim Roberts
iew, what disqualifies python24.dll as a "system file"? The fact that it wasn't produced by Microsoft? >Installing application DLLs in the system directory is something that >should only be done for backwards compatiblity. Deployment of Python applications is much easier wh

Re: CGI scripts

2006-04-18 Thread Tim Roberts
cording to the Pipex web page, if you got their low-end 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

Re: removing cgi fieldstorage keys

2006-04-18 Thread Tim Roberts
darned well better figure out where they're coming from! Did you add any 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: Updated PEP 359: The make statement

2006-04-20 Thread Tim Roberts
=) I tried to follow the thread backwards 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
sibility is to parse your .bat files by hand, and make the changes to your os.environ. 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: Speed of shutil.copy vs os.system("copy src dest") in win32

2006-04-27 Thread Tim Roberts
pyfileobj >implementation of hacking through 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

Re: list of functions question

2006-04-27 Thread Tim Roberts
ould have worked: event_list = [f1, f2, etc] As it is, event_list is a list of strings, not a list of functions. 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

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

2006-04-30 Thread Tim Roberts
example code also 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

Re: detect video length in seconds

2006-05-02 Thread Tim Roberts
nd a timestamp, then scan backwards 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.pytho

Re: the print statement

2006-05-06 Thread Tim Roberts
at your VGA font happens to display them as the same glyph. >6) Would it be correct to infer that the print statement is aware of >characters beyond the 128 characters in the ascii character set? Certainly. 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: the print statement

2006-05-08 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

Re: python rounding problem.

2006-05-10 Thread Tim Roberts
"help", "copyright", "credits" or "license" for more information. >>> round(2.99543322,3) 2.9951 >>> print round(2.99543322,3) 2.995 >>> -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: A Unicode problem -HELP

2006-05-16 Thread Tim Roberts
cial code: "\\u0254". However, I don't see what good that would do you. The \u escape is a Python source code thing. >I'm sure this is straightforward but I can't get 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: PEP-xxx: Unification of for statement and list-comp syntax

2006-05-23 Thread Tim Roberts
, there's really no difference between the first two, and this would work just as well: s = """foo""" + '''bar''' The third line only works for string constants, not for string variables. IMHO, it would be the preferred method

Re: newbie: windows xp scripting

2006-05-23 Thread Tim Roberts
:\DIR2 That will create DIR2 if it does not already exist. >I could fix 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

Re: Doubt with wx.CallAfter

2006-05-23 Thread Tim Roberts
eLoadMovie and the another one belongs to the handler for the >second event? No. wxCallAfter basically posts another message to the message queue, which will be handled after all the existing messages have been dispatched. Windows message handling is quite 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
However, that doesn't answer the question, because even Python 1.5 should have a module called "math". -- - 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
ndard library. Modules that are part of a single project should 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: Python DLL in Windows Folder

2007-12-26 Thread Tim Roberts
one CRT DLL and freeing in another can cause problems, but in Python, I don't think that can happen. Proper Python add-ins call Python APIs to create and destroy objects, so only the Python runtime will manage the memory. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to detect when a user switches between windows (in WinXP)?

2007-12-26 Thread Tim Roberts
wide. However, that requires injecting the hook DLL into every process with a Windows, and you certainly don't want to do that in Python. Write a minimal C DLL to be the hook, and have it send messages to your Python process. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: getting n items at a time from a generator

2007-12-28 Thread Tim Roberts
d as well. Would this be an appropriate construct to add to itertools? -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Choosing a new language

2007-12-31 Thread Tim Roberts
code reads like English prose. It's certainly possible to code "write-only" sequences by abusing comprehensions and generators, but obfuscations like that are the exception rather than the rule. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Choosing a new language

2008-01-02 Thread Tim Roberts
test. Bull crap. You don't HEAR about them because of that same security clearance issue, but some of the most complicated and certainly some of the LARGEST computing systems in the world come out of the DoD. You don't create reliable large systems using a corral full of bright-eyed col

Re: Choosing a new language

2008-01-02 Thread Tim Roberts
en a very, very distant point of view with narrowly >squinted eyes. Do you really think so? It seems clear to me that the syntax of PHP was heavily influenced by Perl. PHP lacks the @array and %hash weirdnesses, but most PHP code will work just fine as Perl. -- Tim Roberts, [EMAIL PROTECTED] Pro

Re: Python setup not working on Windows XP

2008-01-07 Thread Tim Roberts
r for .py files? Did you create a PythonHandler referring to hello.py? -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Tracking colors

2008-01-09 Thread Tim Roberts
tly from frame to frame. You'll have to look for a range. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: FindWindowById returns None..... ?

2008-01-11 Thread Tim Roberts
t. Your description isn't specific enough; there are several ways to do it, some right, some wrong... -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Image/Video Processing in Python

2008-01-11 Thread Tim Roberts
re talking about raw number crunching. This is exactly the kind of case where you should write some C or C++ code and call it from Python. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: ISO Python example projects (like in Perl Cookbook)

2008-01-11 Thread Tim Roberts
"Delaney, Timothy (Tim)" <[EMAIL PROTECTED]> wrote: > >You know you've been working at a large company for too long when you >see that subject and think "ISO-certified Python?" That's exactly what I thought, too. After reading the post I assume he a

Re: paging in python shell

2008-01-13 Thread Tim Roberts
t;more"? The Python shell does that for the "help" command, but maybe you could post a more precise example of what you want. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN:proxysocket(socks4,socks5)v0.1

2008-01-17 Thread Tim Roberts
variables do, what the states mean, etc. It's easy to do; you just start the text with # signs. # This function allows you to ... # These variables define the connection state as the connection is # made. They're great. You should try them. -- Tim Roberts, [EMAIL PROTECTED] Pr

Re: I don't understand what is happening in this threading code

2008-01-21 Thread Tim Roberts
Oct 18 2006, 08:34:43) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> id(True) 504958236 >>> a = True >>> id(a) 504958236 >>> id(False) 504958224 >>&g

Re: py2exe and modules question

2008-01-21 Thread Tim Roberts
eter DLL, and any DLLs they might need, and shove them in a single file (.zip, in the py2exe case). The parts get extracted for execution. The distribution will still contain the .pyc files, and there are tools that can decompile a .pyc without much trouble. -- Tim Roberts, [EMAIL PROTECTED]

Re: translating Python to Assembler

2008-01-24 Thread Tim Roberts
he intermediate language created by the Python "compiler". -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: sudoku solver in Python ...

2008-01-24 Thread Tim Roberts
llection of interesting public domain Python scripts for numerical analysis and linear programming problems and puzzles. http://www.ics.uci.edu/~eppstein/ -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Telnet Program

2008-01-30 Thread Tim Roberts
net session, the user is going to press CR when its through with a line. Thus, I would think he needs either \r\r or \n\n. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Telnet Program

2008-01-30 Thread Tim Roberts
hould be getting back a 'OK' or 'ERROR'. But I >am not seeing it. I feel like I am missing something. Not sure what >would be the or is it the telnet application itself. Are you talking to a modem here? Are you sure you don't need +++ to get its attention before sending AT commands? -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: psycopg2

2008-02-02 Thread Tim Roberts
.execute("SELECT * FROM names WHERE name=%s", ('S',) ) Note that the extra comma is required in Python to make a one-element tuple. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Error on Python

2008-02-09 Thread Tim Roberts
) > >The error is coming from this line; >sock.bind ((MCAST_ADDR, MCAST_PORT)) > >Can anyone please help me solve this problem? Where did you get the multicast module? Are you trying to do TCP multicast? What is the address you are trying to use? -- Tim Roberts, [EMAIL PROTECTED]

Re: mmap and shared memory

2008-02-11 Thread Tim Roberts
g around python's mmap module, but I >can't figure how to use it without files. So, let it use a temporary file. What's the harm? An anonymous mmap region is still mapped to the swap file. Might as well give it a name. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boe

Re: Understanding While Loop Execution

2008-02-18 Thread Tim Roberts
sub,sub,sub] > >>> full >[[1, 2, 3], [1, 2, 3], [1, 2, 3]] > >>> sub[0] = 123 > >>> full >[[123, 2, 3], [123, 2, 3], [123, 2, 3]] And: >>> full[0][2] = 99 >>> sub [123, 2, 99] >>> full [[123, 2, 99], [123, 2, 99], [123, 2, 99]] -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: syntax error in python

2008-02-20 Thread Tim Roberts
> if (os.path.isfile('c:\\src\\kasjdfl.txt')) >SyntaxError: invalid syntax > >any idea what is incorrect in my syntax You know that this is not C, and that the parentheses are not needed in the "if" statement? In my opinion, they interfere with readability. -

Re: Is there a sort-of "clear" function in Pythonwin now?

2008-02-20 Thread Tim Roberts
es. The same kind of issue occurs with mod_python and the multitude Python web frameworks, and many of them detect changed files and automatically restart. If you really need a clean environment, then you need a new interpreter. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. --

Re: Return value of an assignment statement?

2008-02-23 Thread Tim Roberts
"credits" or "license" for more information. >>> L = [1,2,3] >>> id(L) 10351000 >>> L += [4] >>> id(L) 10351000 >>> -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: rstrip error python2.4.3 not in 2.5.1?

2008-02-29 Thread Tim Roberts
_extract_bookmarks_from_url_history >timestamp = datetime.datetime.strptime(month_string, '%b ‘ >%y') >AttributeError: type object 'datetime.datetime' has no attribute >'strptime' I suppose it is cruel of me, but I find it hilarious that you looked at t

Re: pySQLite Insert speed

2008-02-29 Thread Tim Roberts
gt;(B) > pf= '?, ?, ?, ?' >sqlxb= 'INSERT INTO DTABLE2 VALUES ( %s ) ' % pf >curs.execute( sqlxb, values ) > >Any intution on why (A) is slower? I think you misunderstood. (B) is *ALWAYS* the proper way of doing parameterized SQL queries. Unconditiona

Re: Getting a free TCP port & blocking it

2008-02-29 Thread Tim Roberts
he port >3). Free the port before external program execution. What's the point? Why can't the actual user of the port create the port, and then notify the other side of the port number? And why don't you just specify a port number of 0 and let the system assign you a free po

Re: Import, how to change sys.path on Windows, and module naming?

2008-03-02 Thread Tim Roberts
it were a directory. It's a very handy feature for distributing premade packages. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: RELEASED Python 2.6a1 and 3.0a3

2008-03-02 Thread Tim Roberts
I know. Why? > >"The master said so" isn't an entirely satisfying answer. Nevertheless, it IS the answer for many questions in the Python world. That's the advantage of being Benevolent Dictator For Life. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

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