Re: SV: Where's GUI for Python?

2008-03-02 Thread Tim Roberts
to you. wxPython, for instance, has a wonderful set of demos that demonstrate almost every feature of the toolkit. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Delete hidden files on unix

2008-03-04 Thread Tim Roberts
at would not just work. You did try to solve this yourself before sending a message around the world, didn't you? -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Talking to a usb device (serial terminal)

2008-03-04 Thread Tim Roberts
particularly information thats from the >past 8 years. That's because serial ports, and the means of accessing them, haven't changed significantly in the last 8 years. Or the last 38 years, for that matter. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: tcp client socket bind problem

2008-03-11 Thread Tim Roberts
ection is be established using >socket_connect() or socket_listen(). >This function must be used on the socket before socket_connect(). That's all true. So what was your point? How does this help the original poster? -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: mulithreaded server

2008-03-13 Thread Tim Roberts
and you rather rudely ignored, there is no variable called "sSocketlock", because you commented it out. Next, "stdout.release()" will fail. "stdout" does not have a release function. You meant "stdoutlock.release()". Next, you release sSocketlock, but you n

Re: Joseph Weizenbaum

2008-03-14 Thread Tim Roberts
t;>>>> http://www-tech.mit.edu/V128/N12/weizenbaum.html >>>>> >>>> How do you feel about creator of Eliza? >>> >>> What is Eliza? >> >> Does that question interest you? > >Well played, sir. > >Earlier you said wha

Re: placing a Python com object into Excel

2008-03-19 Thread Tim Roberts
? What you see there is the list of registered ActiveX controls. You need to implement a few additional interfaces. I believe IOleInPlaceObject is required to satisfy Excel. http://msdn2.microsoft.com/en-us/library/aa751972.aspx -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide,

Re: parsing json output

2008-03-19 Thread Tim Roberts
n.decode(response.read()) to parse it. Have you read the cjson documentation? -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: parsing json output

2008-03-20 Thread Tim Roberts
hon 2.5. On the other hand, the same >code worked perfectly great on my linux machine with python 2.3.4. >What could the problem be? I'm not sure. It worked correctly on my Windows machine with Python 2.4.4. Are you going through a proxy? Are you able to read other (non-JSON) web pa

Re: os.path.getsize() on Windows

2008-03-20 Thread Tim Roberts
Sean DiZazzo <[EMAIL PROTECTED]> wrote: > >The overall idea is to be able to tell if a file has finished being >placed in a directory without any control over what is putting it >there. There is simply no way to do this on Windows that works in the general case. -- Tim Roberts

Re: Improving datetime

2008-03-20 Thread Tim Roberts
Christian Heimes <[EMAIL PROTECTED]> wrote: > >Yes, it sounds like a good idea. The low hanging fruits (aka easy tasks) >could be implemented for 2.6 and 3.0. The more complex tasks may have to >wait for 2.7 and 3.1 I thought there wasn't going to be a 2.7... -- Tim Ro

Re: Anomaly in time.clock()

2008-03-22 Thread Tim Roberts
count is updated as part of scheduling during timer interrupts. As long as no one disables interrupts for more than about 15ms, it is reliable. However, it's only a 32-bit value, so the number rolls over every 49 days. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- ht

Re: win32gui

2009-01-12 Thread Tim Roberts
gt; >their is function called GetWindowText I tried to use but it doesn't >work in most of the time > >someone know a way to do this? Did you not like the reply I gave you the first time you asked this question? -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Ternary operator and tuple unpacking -- What am I missing ?

2009-01-12 Thread Tim Roberts
>7) >>> c,d = n if n is not None else 0,0 >8) >>> print c,d >9) (22, 11) 0 >10) >>> c,d = n if n is not None else (0,0) >11) >>> print c,d >12) 22 11 As line 10 makes clear, line 7 is interpreted thus: c,d = (n if n is not None else 0) , 0

Re: braces fixed '#{' and '#}'

2009-01-19 Thread Tim Roberts
27;s very dangerous to make a post like this without including the smiley. You're likely to get a mailbox full of "helpful" corrections... ;) -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: USB in python

2009-01-25 Thread Tim Roberts
sing one of the many simple and affordable USB experimenter's kits in the world. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: v = json.loads("{'test':'test'}")

2009-01-25 Thread Tim Roberts
vascript, nor is it a part of Javascript. JSON is a data exchange standard, which happens to be readable to Javascript parsers. A valid JSON expression happens to be a valid Javascript expression, but not vice versa. That's just the way it is. -- Tim Roberts, t...@probo.com Providenza & Boeke

RE: nth root

2009-01-30 Thread Tim Roberts
Unfortunately, unless I'm doing something wrong, this appears to take 20 times as long... :-) What on earth are numpy and psyco? Do I need to watch the Lord of the Rings? Tim Tim wrote: > In PythonWin I'm running a program to find the 13th root (say) of > millions of hundred-digit numbers

RE: nth root

2009-01-30 Thread Tim Roberts
Dan, Thanks - you're probably right - just my intuition said to me that rather than calculating that the 13th root of 4021503534212915433093809093996098953996019232 is 3221.2904208350265 there must be a quicker way of finding out its between 3221 and 3222 but perhaps not. Tim __

Re: nth root

2009-01-31 Thread Tim Roberts
"Tim Roberts" wrote: > >Thanks - you're probably right - just my intuition said to me that rather than >calculating that the 13th root of >4021503534212915433093809093996098953996019232 >is 3221.2904208350265 >there must be a quicker way of find

RE: nth root

2009-01-31 Thread Tim Roberts
Actually, all I'm interested in is whether the 100 digit numbers have an exact integral root, or not. At the moment, because of accuracy concerns, I'm doing something like for root in powersp: nroot = round(bignum**(1.0/root))

RE: nth root

2009-01-31 Thread Tim Roberts
Paul, Yes, very good, on all counts. Many thanks. Tim From: Paul Rubin [mailto:"http://phr.cx"@NOSPAM.invalid] Sent: Sun 01-Feb-09 3:53 PM To: python-list@python.org Subject: Re: nth root "Tim Roberts" writes: > Actually, a

Re: Source code for csv module

2009-02-02 Thread Tim Roberts
and are included in their full, readable source form in every Python installation? \Python25\lib in Windows, /usr/lib/python25 in Linux. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: function scope

2009-02-02 Thread Tim Roberts
been bitten by the shared default parameter noobie trap: >http://www.python.org/doc/faq/general/#why-are-default-values-shared-between-objects Actually, he hasn't. His problem is more fundamental. However, this is still a good thing for you to point out now and then. -- Tim Rob

Re: Find the critical points

2009-02-04 Thread Tim Roberts
>M1=S.Matrix([14,-6],[-6,6]) >M2=S.Matrix([2,-6],[-6,6]) >S.Matrix.berkowitz_minors(M2) >S.Matrix.berkowitz_minors(M1) print S.Matrix.berkowitz_minors(M2) print S.Matrix.berkowitz_minors(M1) -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python binaries with VC++ 8.0?

2009-02-09 Thread Tim Roberts
udes Visual C++ 9.0, and hence msvcrt90.dll. People say "VC8" when they really mean Visual Studio 2008. Visual Studio 98- VC++ 6.0 Visual Studio 2002 - VC++ 7.0 Visual Studio 2003 - VC++ 7.1 Visual Studio 2005 - VC++ 8.0 Visual Studio 2008 - VC++ 9.0 -- Tim

Re: AJAX Post requests

2009-02-09 Thread Tim Roberts
(query.get('data'))", and your blanket "except" would hide the error. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python binaries with VC++ 8.0?

2009-02-11 Thread Tim Roberts
would have said either "Executable operational semantics for Python," or "An executable operational semantic for Python." "A semantics" just doesn't flow. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: illegal list name

2009-02-15 Thread Tim Roberts
the habit of purchasing software when you have no clue what to do with it, my best advice is that you should stop purchasing software. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Found a very nice, small, cross-platform GUI toolkit for Python.

2009-02-18 Thread Tim Roberts
if you are already using SDL and PyGame, this sounds like a great solution. But for someone starting from scratch, it's not yet clear to me that OcempGUI substantially better than wx. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Will multithreading make python less popular?

2009-02-19 Thread Tim Roberts
Paul Rubin <http://phr...@nospam.invalid> wrote: > >C is basically never appropriate. C should be outlawed by Congress >with the ban enforced by roving pie-throwing squads . One of my favorite quotes: The last good thing written in C was Schubert's Ninth Symphony

Re: Which Version of wxPython for Win XP

2009-02-19 Thread Tim Roberts
all) performance advantage in using the Unicode APIs instead of the ANSI APIs. Unless you need your wx programs to run on Windows 98, I recommend you use the Unicode version of wxPython. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: end of print = lower productivity ?

2008-11-26 Thread Tim Roberts
this day, 6 years after XP, I still find myself looking at "driverquery.exe" instead of the "drivers" directory. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: asp versus cgi

2008-11-26 Thread Tim Roberts
eb site, it's sent through a POST request. However, keeping data out of the URL is a big factor. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Confused about class relationships

2008-11-28 Thread Tim Roberts
essed that relationship properly. When I have these kinds of philosophical debates over my own code, I always try to summarize them in the comments inside the module, just so others can get "inside my head" to understand the thinking that led to my design. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: end of print = lower productivity ?

2008-11-30 Thread Tim Roberts
im is the most popular Windows editor (I have to believe that Visual Studio is), but the vim community in Windows is strong, active, and well-populated. I suspect this is especially true in the Python world. Many Python devotees spend time in multiple operating systems, where vim and emacs pro

Re: pretty strange behavior of "strip"

2008-12-08 Thread Tim Roberts
4.html', >'toc.html', '01.html', '05.html', '07.html', '02.html', '08.html'] > >>> test[4] >'toc.html' > >>> test[4].strip('.html') >'oc' > >>> test[2].strip(&

Re: SequenceMatcher bug ?

2008-12-11 Thread Tim Roberts
nceMatcher(None, [4], [5] * 200).ratio() If you print get_matching_blocks(), you'll see that there are none, because the "b" sequence is optimized completely away. The #1528074 calls it "working by designed" and suggests updating the doc. However, I would argue that it's worth checking for this. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: os.environ.get('SSH_ORIGINAL_COMMAND') returns None

2008-12-15 Thread Tim Roberts
one have done such or alike in the past and can help me >with this. >Is there anything I should do in my python file in order to get that >environment variable? The SSH_ORIGINAL_COMMAND variable is set to the command that was passed in on the ssh command line. Since you are not specifying

Re: sys.maxint in Python 2.6.1 (amd64) on Windows XP x64

2008-12-17 Thread Tim Roberts
e, but if you're using ReadFile and WriteFile, it's not a problem. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: strange behavior of math.sqrt() in new 3.0 version

2008-12-27 Thread Tim Roberts
an continues to live on in the hearts and minds of today's programmers. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: math.sqrt() in new 3.0 version : solution in input()

2008-12-27 Thread Tim Roberts
relegated to the domain of beginners and tutorials. Real programs almost never use them. As a result, this change just isn't seen to be all that important. If you can figure out where this could have been written so that you would have seen it, I'm sure a documentation ch

Re: parsing csv files class

2008-12-27 Thread Tim Roberts
li,fi,re): >""" >find and replace a string inside a string, return list >find_and_replace(list,find,replace) >""" >this=[] >for l in li: >#found_index=string.find(l,fi) >this.append(l.replace(fi,re)) >return this def find_and_replace(self,li,fi,re): return [l.replace(fi,re) for l in li] I'm not sure why this is a member of the class; it doesn't use any of the members. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: parsing csv files class

2008-12-30 Thread Tim Roberts
b fallback" I will post it here shortly to >python-list. One common method is like this: try: import pycurl except ImportError: pycurl = None import urllib -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Easy-to-use Python GUI

2008-12-30 Thread Tim Roberts
> >--- > >This is pretty darned easy for me understand and modify either by hand or with >the GUI builder. Well, allow me to point out that the equivalent code in wxPython would not be very much longer than this. It's just spelled differently. Sure, you have a bit of a learning

Re: What is site-packages?

2008-12-30 Thread Tim Roberts
t's where third-party libraries are typically installed to. >> >> Follow the path of the Iguana...http://rebertia.com > >You mean like MoinMoin, Django or Pylons for example? It means any package that should be available to Python programs that is not part of the standard Pytho

Re: Cheetah

2008-12-30 Thread Tim Roberts
re and a semicolon after. Again, show us a complete, runnable example and we can check it out. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: why cannot assign to function call

2008-12-30 Thread Tim Roberts
and Y are...", and regardless of the substitution of X and Y, the plurality of the subject agrees with the verb. The Morning Star and the Evening Star are bright tonight. Ignoring the fact that we can't see both at the same time, why is the meaning of that unclear? -- Tim Roberts, t..

Re: multiprocessing vs thread performance

2008-12-30 Thread Tim Roberts
mple, thread creation on Windows is not all that expensive. >You should use a pool of threads or processes. Even so, this is good advise. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: why cannot assign to function call

2009-01-01 Thread Tim Roberts
listener can get confused. I'm inclined to disagree, but in contexts where it is important, I always try to say "a and b are bound to the same object". -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Videocapture in python

2009-01-01 Thread Tim Roberts
ctShow filter graph. The graph builder has the ability to deliver events asynchronously, like when the device goes away, but it would not be trivial to incorporate that into the module as written. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: win32gui

2009-01-03 Thread Tim Roberts
7;s the first step. Then, you need to figure out what kind of window it is. If it is a standard edit box, you can use the EM_GETLINE functions. If it's a rich text edit box, you can use the rich text messages. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.6, GUI not working on vista?

2008-10-06 Thread Tim Roberts
d. That depends entirely on your audience. For developers, UAC is provably detrimental to productivity. I have no hesitation recommending its disablement in that case. As a driver developer, I use Device Manager a LOT. It didn't take me long to pull the plug. Now, if you have an office

Re: Upgrading from 2.5 to 2.6

2008-10-12 Thread Tim Roberts
have to download new versions of them. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: strip module bug

2008-10-14 Thread Tim Roberts
"Poppy" <[EMAIL PROTECTED]> wrote: > >Thanks Steven and Tim, I understand the strip module a lot more today. It's NOT a module. It is a method of string objects. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: xor: how come so slow?

2008-10-18 Thread Tim Roberts
this effect. His net takeaway is that most of the things people do to increase randomness actually have exactly the opposite effect. ----- [1] Knuth, Donald. The Art of Computer Programming, Volume 2, Seminumerical Algorithms. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: How is the logical processing being done for strings like 'Dog' and 'Cat'

2008-10-20 Thread Tim Roberts
logical operators. The exact definition of "x and y" is "if x has a false value, return x, otherwise return y". If both sides are booleans, this does exactly what you expect. Similarly, "x or y" is actually done as "if x has a true value, return x, otherwise re

Re: windows / unix path

2008-10-23 Thread Tim Roberts
t going >to interpret '/' as an option. Well, you actually said the same thing as Dennis here, in a slightly different way. The executive summary here is that the Windows APIs all accept either forward or backward slashes just fine. The trouble happens when you start using command l

Re: Urllib vs. FireFox

2008-10-26 Thread Tim Roberts
Lie Ryan <[EMAIL PROTECTED]> wrote: > >Cookies? Yes, please. I'll take two. Chocolate chip. With milk. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: capturing ESC, page up/down in Python

2008-10-26 Thread Tim Roberts
kbhit and getch functions that can do this. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get high precision timer in python?

2008-10-28 Thread Tim Roberts
on Linux, and time.clock() is more precise on Windows. So, use time.clock(). -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: how to use logging module to log an object like print()

2008-10-31 Thread Tim Roberts
age is not needed. This is exactly why logger supports this somewhat unusual feature. Now, one can certainly imagine circumstances where the parameter evaluation is expensive, so Vinay's bypass is still useful in some circumstances. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: py2exe

2008-10-31 Thread Tim Roberts
pywinauto and extra). If you have explicit imports, py2exe can figure those out. You should be able to see that in the "dist" directory. However, wxPython needs some extra modules and DLLs that py2exe is not able to figure out. I believe the wxPython web site talks about this.

Re: Responding to web request with python

2008-11-01 Thread Tim Roberts
arated by a blank line. Perhaps you should try to use a debug proxy to intercept the exact text of the response, just to make sure you're sending what you think you are sending. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: buffer

2008-11-03 Thread Tim Roberts
ript can then generate the NEXT page. The key is that each page stands alone. You don't hold the data in between. You make a new database query each time a new request comes in. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: File names are changed into capital letter in Python CE and WM5

2008-11-08 Thread Tim Roberts
ormat, this is exactly what you see. On a FAT system, the name "__init__.py" is stored twice: once in a short-name entry called "__INIT__.PY", and again in a long-name entry that has the real name. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Calling Python from Python and .pyc problem

2008-11-08 Thread Tim Roberts
ectly. >However, it runs but never stops. WHAT runs but never stops? The script you attached certainly stops. Post your exact code, and we'll help you identify your infinite loop. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3.0 - is this true?

2008-11-10 Thread Tim Roberts
care, Steven? > >I'm a very caring kind of guy. That's the best answer to that question that I've seen in a long time. I'll remember that one. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Midi manipulation

2008-11-16 Thread Tim Roberts
s in advance. Google is much faster than this newsgroup. Search for "python midi library" and the first page gives you a number of good hits. However, there's a lot to manipulating MIDI. What kinds of things are you hoping to accomplish? MIDI, for example, is not a particularly

Re: Question: what to do, my Python is getting crazy

2008-11-17 Thread Tim Roberts
ied procedure could not be >found. If you feel like it, could you do a search for "pythoncom25.dll" and tell us if more than one was found? >I know Python 2.5 doesn't load DLL's anymore. Where did you read that? It's not true. >Gabriel, you mean, install pyt

Re: Midi manipulation

2008-11-17 Thread Tim Roberts
midi was good for this aim, >am I wrong? No, you are correct. I was misled by your talk about "manipulating MIDI files". What you're talking about is more working with live MIDI. Alia's links should be very useful for you. Especially, I think, this one: http://tu

Re: python script to act as list server

2008-11-17 Thread Tim Roberts
dress. You know, the well-known, well-tested, and reliable Mailman application can do this, and it's written in Python. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Multiple equates

2008-11-19 Thread Tim Roberts
nswer: it does not matter. This is premature optimization. First, make it work. Then, figure out whether it is fast enough. THEN, figure out what's taking the most time. I'd be very, very surprised if this was an important part of your run time. -- Tim Roberts, [EMAIL PROTECTED] Providenza

Re: help with comparison

2008-11-19 Thread Tim Roberts
It's simple character manipulation. So, options.compress will NEVER be 1. If you did "myscript.py -c 1", then options.compress will be "1". That's a string, not a number. If what you really want is "present" vs "not present", then use this:

Re: why cannot assign to function call

2009-02-28 Thread Tim Roberts
>list after func. Any further explanation you care to provide will be >greatly appreciated! Nope. Under pass-by-value semantics, "func" could dance on the list to its heart's content, and "foo" would not be changed. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: i have problem with glob.glob() in remotely directory

2009-02-28 Thread Tim Roberts
the shares that the machine exposes. Second, you STILL have a backslash problem. If that machine has a network share called "files", you could say os.walk( '192.168.0.45\\files' ) or os.walk( r'\\192.168.0.45\files' ) >Thats it is my main problem do i

Re: Indentations and future evolution of languages

2009-03-07 Thread Tim Roberts
er. The more I look around, the more I like Python. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Ban Xah Lee

2009-03-07 Thread Tim Roberts
r vitriol, and being pleasant to the unwashed ignorant masses, but that's what it takes. If you don't CARE whether anyone reads your words, then please feel free to continue with your current behaviors. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail

Re: Python3 on the Web

2009-03-09 Thread Tim Roberts
to handle 100 hits a second, then CGI is not appropriate, but let's be honest: the web sites that most of us produce have to struggle under a devastating load of about 100 hits a day. At that level of load, CGI is perfectly workable, and it's certainly the easiest of the choices for develop

Re: ipython / vs \ in readline on MS Windows (and ipython help grepper)

2009-03-11 Thread Tim Roberts
27;ll have to change it to something like '/'.join. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: ipython / vs \ in readline on MS Windows (and ipython help grepper)

2009-03-15 Thread Tim Roberts
ike a Unix command line, resulting in ls c:windowsystem32qqq.dll -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Get pixel colors from images in Python 3

2009-03-15 Thread Tim Roberts
all of the strange variations on JPEG, PNG, and GIF. You REALLY do not want to try to reimplement all of that. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: How complex is complex?

2009-03-18 Thread Tim Roberts
bearophileh...@lycos.com wrote: > >In Python 3 those lines become shorter: > >for k, v in a.items(): >{k: v+1 for k, v in a.items()} That's a syntax I have not seen in the 2-to-3 difference docs, so I'm not familiar with it. How does that cause "a" to be updat

Re: Does Python have certificate?

2009-03-25 Thread Tim Roberts
one who can write a hello world in python and hands >> me $25000 in cash. >>... > >I'll trade you for a Steve Holden Information Technology certification ... Darn you, you made coffee shoot out of my nose. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Problems with background processes on Windows

2009-03-27 Thread Tim Roberts
>doesn't notice this. If you trace through this: python -m trace --trace communicate.py you'll see that it hangs in subprocess in the stdout_thread waiting for stdout to close. I'm not sure I expect this to work as you expect. When you open a null device, it's just an

Re: Unladen-Swallow: A faster python

2009-03-27 Thread Tim Roberts
successfully implemented in a JIT compiled VM in a performant way, but it has issues running C extension modules. I'll be curious to see where this project goes. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: New Python Runtime

2009-03-29 Thread Tim Roberts
ll this make Vista run faster? Is that a joke? Or did you mean to say "...make Python run faster?" -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating huge data in very less time.

2009-04-01 Thread Tim Roberts
arse file support was not added to NTFS until Windows 2000, exactly as he said. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple CGI request and Python reply

2009-04-09 Thread Tim Roberts
x27;t actually have to use FieldStorage. You can just say this: import cgi q = cgi.parse() which returns the parameters as a simple dictionary. >Maybe making a request is not the quickest route to do what I want. Ideas? There are few other mechanisms available in Javascript to do this. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: video capture in Python ?

2009-04-12 Thread Tim Roberts
sions of the other >parts you need, >so a lot trial and error I expect. What packages have you tried? Video capture is not a trivial task. There is a lot to do, although most of it is boilerplate that you will reuse from app to app. -- Tim Roberts, t...@probo.com Providenza & Boekelh

Re: ctypes - random access to address space

2009-04-14 Thread Tim Roberts
hics to point out that this is a dangerous design for a driver. It represents a serious security exposure. Having said that, however, it is a design that is commonly used for prototyping. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Interrupt Python C API

2009-04-14 Thread Tim Roberts
t;there any chance to break out this PyRun_String-function? How would you know that it was an infinite loop, rather than just a long-running script? Alan Turing taught us that you can't tell whether an arbitrary script will terminate. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, In

Re: polar plots, clockwise, north

2009-04-16 Thread Tim Roberts
plotlib.pyplot.polar( rotate, r, **kwargs ) else: return matplotlib.pyplot.polar( d90 - theta, r, **kwargs ) -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python interpreter speed

2009-04-20 Thread Tim Roberts
compiled, exactly like Java. There is also IronPython, which is Python for the .NET framework. It compiles to a different intermediate language, which is also compiled at execution time to machine code. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: generating random tuples in python

2009-04-20 Thread Tim Roberts
umbers strictly between 0 and 1 (inclusive)? In doing so, you will be making the numbers non-random. Statistically speaking, a sufficiently long series of random numbers will often have short sequences that are very close to each other. -- Tim Roberts, t...@probo.com Providenza & Boekelhe

Re: http web fetch question

2009-04-24 Thread Tim Roberts
every hour for >10 hours straight... Really? s = sched.scheduler( time.time, time.sleep ) for hour in range(10): s.enter( 3600 * hour, 1, fetch_website, () ) s.run() >and why this is different than using something like time.sleep(). It's not different. sched.sche

Re: question about class vs class at

2009-04-26 Thread Tim Roberts
the output of the __repr__ function of the class. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Convert variable directly into a string (no ASCII)

2009-05-02 Thread Tim Roberts
.pack( 'BBB', a, b, c ) If you need them as 16-bit ints, you can use H instead of B. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: ISO exemplary Python scripts

2009-05-08 Thread Tim Roberts
installed with your interpreter is one of the best repositories. It contains hundreds of working, well-tested scripts, most of which have the ability to run by themselves. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: ISO exemplary Python scripts

2009-05-10 Thread Tim Roberts
the "Python way of thinking". Command-line argument processing is not a particularly unique task, so the same techniques that work for parsing things from files, or for handling arguments in a list, work equally well for handling arguments, especially with the help of getopt and optparse. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

<    2   3   4   5   6   7   8   9   10   >