Re: Process tuple contents on the fly

2013-04-15 Thread Tim Chase
On 2013-04-15 11:25, Gnarlodious wrote: > Say I have a tuple I want to expand assigning to variables: > > tup = *func() > var = tup[0] > lst.append(tup[1]) > > Or could I do it in one line? > > var, lst.append() = *func() > > So I want to append one variable to a list on the fly, is it > possib

Re: Process tuple contents on the fly

2013-04-15 Thread Tim Chase
On 2013-04-15 12:05, Barrett Lewis wrote: > > d = {} > > for key, d[key] in (("this",18), ("that",17), ("other",38)): > > print key > > do_something(d) > > Why not use a dict comprehension? > d = {k:v for k,v in (("this",18), ("that",17), ("other",38))} > > I feel this is more straig

Re: Calling python script in dos and passing arguments

2013-04-16 Thread Tim Roberts
own glob expansion. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Encoding NaN in JSON

2013-04-16 Thread Tim Roberts
s no way to represent NaN in JSON. It's simply not part of the specification. From RFC 4627 section 2.4: Numeric values that cannot be represented as sequences of digits (such as Infinity and NaN) are not permitted. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: equivalent to C pointer

2013-04-18 Thread Tim Chase
On 2013-04-18 18:07, Neil Cerutti wrote: > There's no linking stage in Python. Everything you use must be > defined before you use it. "must be defined", only if you don't want an error. But in python, it isn't even REQUIRED that it be defined: some_undefined_function("args go here") will bom

Re: Encoding NaN in JSON

2013-04-18 Thread Tim Roberts
ng* 'N/A' for every NaN. You understand that this will result in a chunk of text that is not JSON? Other JSON readers won't be able to read it. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: python : how to Opens folder with specified items selected on Windows

2013-04-19 Thread Tim Golden
On 19/04/2013 16:54, iMath wrote: > I want to Opens folder with specified items selected on Windows ,I > looked up the The Windows Shell Reference found a function fit for this job > > SHOpenFolderAndSelectItems > > http://msdn.microsoft.com/en-us/library/windows/desktop/bb762232(v=vs.85).aspx >

Re: unzipping a zipx file

2013-04-19 Thread Tim Chase
On 2013-04-19 16:29, Dave Angel wrote: > > zFile = zipfile.ZipFile(fullPathName,'r') > > The second parameter to ZipFile() probably should be 'rb' not 'r' Just for the record, the zipfile.ZipFile.__init__ maps "r" to open the file with "rb", so that's not the issue. Your suggestion about opening

Re: There must be a better way

2013-04-20 Thread Tim Chase
On 2013-04-21 00:06, Steven D'Aprano wrote: > On Sat, 20 Apr 2013 19:46:07 -0400, Colin J. Williams wrote: > > > Below is part of a script which shows the changes made to permit > > the script to run on either Python 2.7 or Python 3.2. > > > > I was surprised to see that the CSV next method is no

Re: There must be a better way

2013-04-23 Thread Tim Chase
On 2013-04-23 13:36, Neil Cerutti wrote: > On 2013-04-22, Colin J. Williams wrote: > > Since I'm only interested in one or two columns, the simpler > > approach is probably better. > > Here's a sketch of how one of my projects handles that situation. > I think the index variables are invaluable d

Re: There must be a better way (correction)

2013-04-23 Thread Tim Chase
On 2013-04-23 09:30, Tim Chase wrote: > > But a csv.DictReader might still be more efficient. I never > > tested. This is the only place I've used this "optimization". > > It's fast enough. ;) > > I believe the csv module does all the work at c-level,

Re: Confusing Algorithm

2013-04-23 Thread Tim Roberts
you see the picture, you can see that you'd thread from B to D without involving C. I think you'll go A to B to D to F to G -- 4 threads. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get JSON values and how to trace sessions??

2013-04-23 Thread Tim Roberts
okie: header with your first response. You just need to return that in a Cookie: header with every request you make after that. >Are their other ways to keep control over which players sends the gamedata? Not sure what you mean. If the web site requires cookies, this is what you have to do. --

Re: Weird python behavior

2013-04-25 Thread Tim Roberts
Forafo San wrote: > >OK, lesson learned: Take care not to have module names that conflict with >python's built ins. Sorry for being so obtuse. You don't have to apologize. We've all been bitten by this at least once. -- Tim Roberts, t...@probo.com Providenza &

Re: File Read issue by using module binascii

2013-04-27 Thread Tim Roberts
ord(b)) ) bsstr = ''.join(bsstr) or even: f = open('example.bmp','rb') bsstr = ''.join( bin(ord(b))[2:] for b in f.read() ) -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: how to compare two fields in python

2013-04-30 Thread Tim Chase
On 2013-04-30 10:41, upendra kumar Devisetty wrote: > I have a very basic question in python. I want to go through each > line of the a csv file and compare to see if the first field of > line 1 is same as first field of next line and so on. If it finds a > match then i would like to put that field

Re: to a human - about 2to3

2013-05-01 Thread Tim Golden
On 01/05/2013 15:52, Jennifer Butler wrote: > I will start teaching Python to my pupils shortly. I have been looking > for materials and have gathered a collection of programs. The problem is > they are written in v2 and I have v3 installed in my classroom. I read > about the 2to3 conversion progra

Re: Collision of Two Rect

2013-05-04 Thread Tim Roberts
an angle other than head on, only ONE of the velocities is reversed. When you hit a horizontal paddle, only the Y velocity is negated. The ball continues in the same X direction: \O \ / \/ See? The X velocity continues unchanged until it hits a vertical

Re: how to put form and display its result(data from database) on the same window?

2005-12-11 Thread Tim Roberts
the previous one a lot. You may be quite right in your *guess* >that he doesn't need that, but there isn't enough information present in >his request for either of us to know. You are correct. Once you pointed it out, I now see what you were suggesting. -- - Tim Roberts, [EMAIL

Re: newbie question

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

RE: How To Read Excel Files In Python?

2005-12-13 Thread Tim Golden
[Anand] > Can I get some help on how to read the excel files using python? > from win32com.client import Dispatch > xlApp = Dispatch("Excel.Application") > xlWb = xlApp.Workbooks.Open("Read.xls") > xlSht = xlWb.WorkSheets(1) > But sadly, I am unable to proceed further about how > to read the ce

Re: Comparing dictionaries, is this valid Python?

2005-12-13 Thread Tim Peters
[François Pinard] ... > Would someone know where I could find a confirmation that comparing > dictionaries with `==' has the meaning one would expect (even this is > debatable!), that is, same set of keys, and for each key, same values? Yes, look here : it has the meaning you expect, provided tha

Re: Why and how "there is only one way to do something"?

2005-12-15 Thread Tim Peters
not be obvious at first unless you're Dutch. > And are you going to spend the rest of your life arguing trivial semantics? A more interesting question is how many will spend the rest of their lives responding ;-) perfect-dutchness-is-a-journey-not-a-destination-ly y'rs - tim -- http://mail.python.org/mailman/listinfo/python-list

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

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

Re: Python IDE (was: PythonWin troubleshooting)

2005-12-16 Thread Tim Arnold
t; it for anyone who might be interested. > Here's a plug for SPE, since I haven't heard anyone extolling its virtues. I use it every day and love it. --Tim -- http://mail.python.org/mailman/listinfo/python-list

Re: Parser or regex ?

2005-12-16 Thread Tim Arnold
y :-) > pyparsing is great, easy to configure and very powerful--I think it looks like a great tool for your inputs. http://pyparsing.sourceforge.net/ --Tim -- http://mail.python.org/mailman/listinfo/python-list

Re: Next floating point number

2005-12-17 Thread Tim Peters
[Steven D'Aprano] > I'm looking for some way to get the next floating point number after any > particular float. ... > According to the IEEE standard, there should be a routine like next(x,y) > which returns the next float starting from x in the direction of y. > > Unless I have missed something, P

Re: doctest fails to NORMALIZE_WHITESPACE ?

2005-12-17 Thread Tim Peters
[David MacKay] > Hello, I'm a python-list newbie. I've got a question about doctest; perhaps > a bug report. As things will turn out, it's just a question. That's common for newbies :-) > I really like doctest, but sometimes doctest gives a failure when the output > looks absolutely fine to me -

Re: doctest fails to NORMALIZE_WHITESPACE ?

2005-12-17 Thread Tim Peters
[David MacKay, having fun with doctest] ... > I've got a follow-up question motivated by my ugly backslash continuations. [Tim] >> When Python doesn't "look clean", it's not Python -- and backslash >> continuation & semicolons often look like dir

Re: Next floating point number

2005-12-18 Thread Tim Peters
[Bengt Richter] > I wonder if frexp is always available, Yes, `frexp` is a standard C89 libm function. Python's `math` doesn't contain any platform-specific functions. ... > The math module could also expose an efficient multiply by a power > of two using FSCALE if the pentium FPU is there. `l

Re: Next floating point number

2005-12-18 Thread Tim Peters
[Steven D'Aprano] > ... > Will Python always use 64-bit floats? A CPython "float" is whatever the platform C compiler means by "double". The C standard doesn't define the size of a double, so neither does Python define the size of a float. That said, I don't know of any Python platform to date w

Re: CGI module does not parse data

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

Re: numarray :: multiplying all the elements in 1d array

2005-12-21 Thread Tim Hochberg
egular python you can also do: > > from operator import mul > reduce(mul,a) > > This work even when 'a' is a plain python list. Actually, they'll both work with a plain python list. Multiply.reduce is much faster (see below) when operating on arrays, but somewha

Re: Guido at Google

2005-12-22 Thread Tim Peters
[EMAIL PROTECTED] > ... > What about the copyright in CPython ? Can I someone take the codebase > and make modifications then call it Sneak ? Of course they _could_ do that, and even without making modifications beyond the name change. If you want to know whether it's legal, that's a different q

Re: Guido at Google

2005-12-22 Thread Tim Peters
[Greg Stein] >>> Guido would acknowledge a query, but never announce it. That's not his >>> style. He's been very low-key about it, but did make an informal announcement on the PSF-Members mailing list. >>> This should have a positive impact on Python. His job description has a >>> *very* signifi

Re: Parsing a date-time string?

2005-12-23 Thread Tim Roberts
"Tim N. van der Leeuw" <[EMAIL PROTECTED]> wrote: > >I want to parse strings containing date-time, which look like the >following: > > "Mon Dec 19 11:06:12:333 CET 2005" > >That's a problem for strptime it seems, b/c I cannot find any >forma

Re: How to get started in GUI Programming?

2005-12-23 Thread Tim Peters
I'd love to proven wrong, though. at-my-age-you-need-all-the-evacuation-routes-you-can-get-ly y'rs - tim -- http://mail.python.org/mailman/listinfo/python-list

Re: sorting with expensive compares?

2005-12-23 Thread Tim Peters
[Steven D'Aprano] > ... > As others have pointed out, Python's sort never compares the same objects > more than once. Others have pointed it out, and it's getting repeated now, but it's not true. Since I wrote Python's sorting implementation, it's conceivable that I'm not just making this up ;-)

Re: python coding contest

2005-12-25 Thread Tim Hochberg
e length of names does not count, unless the code depends on it. Probably too hard. > > Some harmonization procedure might be applied to every solution > before counting lines, in order to avoid spectacular cryptic stuff. I thought the metric was characters, not lines. At least that's

Re: How to signal "not implemented yet"?

2005-12-25 Thread Tim Peters
[Roy Smith] > Is there some standard way to signal "not implemented yet" in > unfinished code? raise NotImplementedError That's a builtin exception. ... -- http://mail.python.org/mailman/listinfo/python-list

Re: python coding contest

2005-12-25 Thread Tim Hochberg
future events. But I'm not >>>>aware of any algorithm that is capable of creating a ranking upon them. >>> >>> >>>What is your algorithm for determining "shortest" program? Are you >>>counting tokens, lines or characters? Does whitespace count? >>> >>> >> >>If whitespace and var names count, these things are going to be ugly :) > > > Yes, but the question is, is two lines and 347 characters ugly enough to > win? > No. I have 8 lines and 175 chars at present. And, I expect that's gonna get beaten. -tim -- http://mail.python.org/mailman/listinfo/python-list

Re: python coding contest

2005-12-25 Thread Tim Hochberg
that if be illegal, but if it's legal I'll have to do it). -tim -- http://mail.python.org/mailman/listinfo/python-list

Re: python coding contest

2005-12-25 Thread Tim Hochberg
I'm down to below 160 characters at this point. And 9 lines, so 22 of those characters are leading white space or returns :( I'd really like to get down to 150, but I'm having a hard time figuring where I can do any more compaction. -tim -- http://mail.python.org/mailman/listinfo/python-list

Re: python coding contest

2005-12-25 Thread Tim Peters
Over at http://spoj.sphere.pl/problems/SIZECON/ the task is to come up with the shortest program that solves a different problem. There's a twist in this one: Score equals to size of source code of your program except symbols with ASCII code <= 32. So blanks, newlines and tabs aren

Re: python coding contest

2005-12-26 Thread Tim Hochberg
little left to trim at this point, so I don't know that I'll be able to knock it down any further using my current approach. And since I don't have any other approaches in the wings, I may be about washed up. -tim -- http://mail.python.org/mailman/listinfo/python-list

Re: build curiosities of svn head (on WinXP)

2005-12-26 Thread Tim Peters
[David Murmann] ... >> second, the build order in "pcbuild.sln" for elementtree seems to be >> wrong, nant tried to build elementtree before pythoncore (which failed). >> i fixed this by building elementtree separately. [Steve Holden] > Yes, the elementtree module is a new arrival for 3.5, so the

Re: python coding contest

2005-12-26 Thread Tim Hochberg
to either accept or reject pending submissions." (Emphasis mine) So, it's possible, even probable, that the file test.py either won't be available or won't be helpful. -tim -- http://mail.python.org/mailman/listinfo/python-list

Re: python coding contest

2005-12-26 Thread Tim Hochberg
Steven D'Aprano wrote: > On Mon, 26 Dec 2005 13:33:42 -0700, Tim Hochberg wrote: > > >>Claudio Grondi wrote: > > >>>I am currently at 39 bytes following the requirements and the principle >>>given above (my module passes the test). Anyone able to

Re: python coding contest

2005-12-26 Thread Tim Hochberg
Tim Hochberg wrote: [CHOP] > > import test;seven_seg=test.test_vectors.get > > This works if you run test. It fails if you try to run it standalone > since the import order is wrong. [CHOP] Or maybe not. An earlier version did, but this one seems OK. -tim -- http://mail.pyt

Re: email package and line ending

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

Re: Windows and python execution

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

Re: python coding contest

2005-12-27 Thread Tim Hochberg
solutions with the same length. I played with long integers for a bit, and I can see how one could use a single long integer, but no idea how one would use three. -tim -- http://mail.python.org/mailman/listinfo/python-list

Re: python coding contest

2005-12-27 Thread Tim Hochberg
Shane Hathaway wrote: > Tim Hochberg wrote: > >>Paul McGuire wrote: >> >> >>>"Shane Hathaway" <[EMAIL PROTECTED]> wrote in message >>>news:[EMAIL PROTECTED] >>> >>> >>> >>>>I'm down to 133 chara

Re: python coding contest

2005-12-27 Thread Tim Hochberg
cipe involving shifts and &s. -tim -- http://mail.python.org/mailman/listinfo/python-list

Re: python coding contest

2005-12-27 Thread Tim Hochberg
rge integers. :-) I see now how three large integers could be useful, but the best I could do with that is 136 characters on 1-line. Yesterday that would have been great, but it's not so hot today. > > Also, here's another cheat version. (No, 7seg.com does not exist.) >

Re: python coding contest

2005-12-27 Thread Tim Hochberg
Jean-Paul Calderone wrote: > On Tue, 27 Dec 2005 14:02:57 -0700, Tim Hochberg <[EMAIL PROTECTED]> wrote: > >>Shane Hathaway wrote: >> >>>Paul McGuire wrote: >>> >>> >>>Also, here's another cheat version. (No, 7seg.com does n

Re: python coding contest

2005-12-27 Thread Tim Hochberg
ng and trailing whitespace the unfolded version would be the much shorter of the two, but ya gotta play with the rules as they is. -tim -- http://mail.python.org/mailman/listinfo/python-list

Re: query on python list

2005-12-27 Thread Tim Hochberg
k or maybe: for item in list: if key == item: Found = True break else: Found = False but a better way would be: Found = (key in list) -tim > > thanks in advance > yogi > -- http://mail.python.org/mailman/listinfo/python-list

Re: python coding contest

2005-12-28 Thread Tim Hochberg
dd 4 characters. I asked, 2.4 is OK. Drat: I had a 128 char solution I was keeping in reserve. Now it's back to the drawing board -tim -- http://mail.python.org/mailman/listinfo/python-list

Re: python coding contest

2005-12-28 Thread Tim Hochberg
Marius Gedminas wrote: > Jean-Paul Calderone wrote: > >>On Tue, 27 Dec 2005 14:02:57 -0700, Tim Hochberg <[EMAIL PROTECTED]> wrote: >> >>>Shane Hathaway wrote: >>> >>>>Paul McGuire wrote: >>>> >>>> >>>>Also

Re: python coding contest

2005-12-28 Thread Tim Peters
[Bengt Richter] > ... > [23:28] C:\pywk\clp\seven\pycontest_01>wc -lc seven_seg.py > 2136 seven_seg.py > > 2 lines, 136 chars including unix-style lineseps (is that cheating on > windows?) Na. Most native Windows apps (including native Windows Python) don't care whether \n or

Re: using NamedTemporaryFile on windows

2005-12-29 Thread Tim Peters
[Peter Hansen] >>> What I don't understand is why you _can't_ reopen the NamedTemporaryFile >>> under Windows when you can reopen the file created by mkstemp (and the >>> files created by TemporaryFile are created by mkstemp in the first place). [Lee Harr] >> Are you saying you tried it and you ac

Re: HTMLGen- Table Align property

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

RE: WMI - invalid syntax error?

2005-12-30 Thread Tim Golden
[py] > import wmi > # the ip of my own local desktop > machine = "1.2.3.4" > try: > w = wmi.WMI(machine) # also tried, wmi.WMI(computer=machine) > except Exception, e: > print "ERROR:", e . . > c:>python > >>> from MyScript import * > >>> ERROR: -0x7ffbfe1c - Invalid syntax . . > here's t

RE: WMI - invalid syntax error?

2005-12-30 Thread Tim Golden
[py] | Tim Golden wrote: | > Could you just post (or send by private email if you prefer) | > the exact script you're running? If you want to send it | > privately, please us mail timgolden.me.uk. | | I am truly unsure what the problem could be, and the fact that the | error says &

Re: python coding contest

2005-12-30 Thread Tim Hochberg
hopefully this won't get too munged. It's all clear now, right? Two hints: 6,0,3->row, 2,1,4->column and the 6 and 1 have to be where they are to exploit the property that the top row only ever has a center character in it. That way things can be encoded in 7-bits and fit in

Re: python coding contest

2005-12-30 Thread Tim Hochberg
loop strategy? It's not clear, but there are three characters that are superfulous in the current incarnation of that. Hmmm.. -tim -- http://mail.python.org/mailman/listinfo/python-list

Re: csrss.exe & Numeric

2005-12-30 Thread Tim Peters
[jelle] > I have a function that uses the Numeric module. When I launch the > function csrss.exe consumes 60 / 70 % cpu power rather than having > python / Numeric run at full speed. Has anyone encountered this problem > before? It seriously messes up my Numeric performance. > > I'm running 2.4.2 o

Re: Numeric RandomArray seed problem

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

Re: HELP! on wxPython Error

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

RE: Work with Windows workgroups under Python?

2006-01-03 Thread Tim Golden
x27;t seem to meet your need, perhaps you might then come back and ask something more specific. Hopefully helpfully Tim Golden This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs

RE: WMI - invalid syntax error?

2006-01-03 Thread Tim Golden
[py] | Sent: 30 December 2005 16:15 | To: python-list@python.org | Subject: Re: WMI - invalid syntax error? | | py wrote: | >Something must be happening somewhere causing it | > to get fouled up. I'm gonna try on a different PC. | | I tried on another PC, same problem. | | Also, I added "reload

Re: Calling GPL code from a Python application

2006-01-03 Thread Tim Churches
ir system. Provided that the end results of this compilation are not then distributed to anyone else, then the GPL is not violated, not in letter nor in spirit. It-pays-to-actually-read-the-GPL-before-you-distribute-your-code-under-it-ly yours, Tim C -- http://mail.python.org/mailman/listinfo/python-list

Re: Re: Calling GPL code from a Python application

2006-01-03 Thread Tim Churches
actly? I mean, where is dynamic linking mentioned, or even implied? I can see where it says "derived from", but not where it says "dependent on at run-time". Tim C -- http://mail.python.org/mailman/listinfo/python-list

Re: Re: Calling GPL code from a Python application

2006-01-03 Thread Tim Churches
, and paid him real money for his opinion, which I have paraphrased previously (in Feb 2005, search Google Groups). Tim C -- http://mail.python.org/mailman/listinfo/python-list

Re: Re: Calling GPL code from a Python application

2006-01-03 Thread Tim Churches
"Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted." Tim C -- http://mail.python.org/mailman/listinfo/python-list

RE: WMI - invalid syntax error?

2006-01-03 Thread Tim Golden
[py] | I may end up looking into some other way of getting the list of | processesthis is real screwy. Just in case you hadn't found it under your own steam, this link may help: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/442477 TJG

Re: Calling GPL code from a Python application

2006-01-04 Thread Tim Churches
Steven D'Aprano wrote: > On Wed, 04 Jan 2006 14:57:58 +1100, Tim Churches wrote: > > >>Steven D'Aprano <[EMAIL PROTECTED]> wrote: >> >>>In particular: >>> >>>http://www.gnu.org/licenses/gpl-faq.html >>> >>>[quot

Re: Calling GPL code from a Python application

2006-01-04 Thread Tim Churches
their code under the GPL may not share that view. In fact, they may be very pleased if their software is actually being used by third parties through a Web server. Tim C -- http://mail.python.org/mailman/listinfo/python-list

Re: Re: Calling GPL code from a Python application

2006-01-04 Thread Tim Churches
Steven D'Aprano <[EMAIL PROTECTED]> wrote: > > On Wed, 04 Jan 2006 21:53:32 +1100, Tim Churches wrote: > > >> Secondly, perhaps you should consider that dynamically linking to a > >> work is creating a derivative work, which most certainly falls under >

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

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

Re: Occasional OSError: [Errno 13] Permission denied on Windows

2006-01-05 Thread Tim Peters
[Alec Wysoker] > Using Python 2.3.5 on Windows XP, I occasionally get OSError: [Errno > 13] Permission denied when calling os.remove(). This can occur with a > file that is not used by any other process on the machine, How do you know that? > and is created by the python.exe invocation that is t

Re: Marshaling unicode WDDX

2006-01-05 Thread Tim Arnold
"isthar" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi ! > i am trying to serialise object which contains some unicode objects > but looks like there is no way to do it. > hi, I'm sure you'll get better answers for the unicode part of your problem (I'd start with a look at th

Re: Does Python allow access to some of the implementation details?

2006-01-06 Thread Tim Peters
[Claudio Grondi] > Let's consider a test source code given at the very end of this posting. > > The question is if Python allows somehow access to the bytes of the > representation of a long integer or integer in computers memory? CPython does not expose its internal representation of longs at the

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

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

Re: Returning Values from Bash Scripts

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

Re: What is the slickest way to transpose a square list of lists (tuple of tuples)?

2006-01-08 Thread Tim Hochberg
hat you're trying to do as I'm not completely convinced I understand your description. However, if my guess is correct: transposed = zip(*listoflists) is probably hard to beat. -tim -- http://mail.python.org/mailman/listinfo/python-list

RE: Determination of disk types

2006-01-09 Thread Tim Golden
[Mondal] | Is there a way to determine which drive letter is a FDD, a local disk, | a CD-ROM/COMBO Drive, or a mapped network drive? | | I wrote a script to identify all the drive letters on my Windows XP | system. Now I want to determine their type, too. Initial quick reposnse: look at WMI. Som

Re: Newline at EOF Removal

2006-01-09 Thread Tim Peters
[Bengt Richter] > ... > [1] BTW, I didn't see the 't' mode in > http://docs.python.org/lib/built-in-funcs.html > description of open/file, but I have a nagging doubt about saying it's not > valid. > Where did you see it? 't' is a Windows-specific extension to standard C's file modes. Python pas

Re: testing units in a specific order?

2006-01-09 Thread Tim Peters
[Antoon Pardon] > I have used unit tests now for a number of project. One thing > that I dislike is it that the order in which the tests are done > bears no relationship to the order they appear in the source. > > This makes using unit tests somewhat cumbersome. Is there some > way to forc

Re: string to datetime parser?

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

Re: Do you have real-world use cases for map's None fill-in feature?

2006-01-10 Thread Tim Peters
[Raymond Hettinger] > ... > I scanned the docs for Haskell, SML, and Perl and found that the norm > for map() and zip() is to truncate to the shortest input or raise an > exception for unequal input lengths. > ... > Also, I'm curious as to whether someone has seen a zip fill-in feature > employed t

Re: testing units in a specific order?

2006-01-10 Thread Tim Peters
[Antoon Pardon] > Well maybe unit tests shouldn't care (Thats what I think you meant), Yup! > I care. Some methods are vital for the functionality of other methods. > So it the test for the first method fails it is very likely a number of > other methods will fail too. However I'm not interrested

RE: Change Gateway Programmatically

2006-01-11 Thread Tim Golden
[Godwin Burby] | Subject: Re: Change Gateway Programmatically | | Well netsh turned out to be the perfect solution for my problem(even | though doing it in python would have given me some kicks). Just in case you fancied an alternative approach, you can do this with WMI. (untested, because I don

Re: flatten a level one list

2006-01-11 Thread Tim Hochberg
that's quite fast using Psyco, but only average without it. def flatten6(): n = min(len(xdata), len(ydata)) result = [None] * (2*n) for i in xrange(n): result[2*i] = xdata[i] result[2*i+1] = ydata[i] -tim > > Here are some more timings of D

Re: How to create a script that list itself ?

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

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

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

Re: New Python.org website ?

2006-01-12 Thread Tim Parkin
using css for layout and trying to follow w3c guidelines (e.g. the relative font sizing thing)... However our aim is to make the site readable in all browsers in the majority of normal configurations. Thanks for the feedback.. Tim Parkin -- http://mail.python.org/mailman/listinfo/python-list

Re: New Python.org website ?

2006-01-12 Thread Tim Parkin
ngly assumed was already iso8859-1 Tim -- http://mail.python.org/mailman/listinfo/python-list

Re: New Python.org website ?

2006-01-12 Thread Tim Parkin
st, >>> >>>Fuzzyman >>>http://www.voidspace.org.uk/python/index.shtml >>>(and yes I do get referrals from these links...) >>> >> >>Please note that one major rationale behind the new design is precisely >>becuase relatively few peopl

<    25   26   27   28   29   30   31   32   33   34   >