Re: Other notes

2004-12-28 Thread Andrew Dalke
you explain why it might be useful? > 14) In one of my last emails of notes, I've tried to explain the Pattern > Matching programming paradigm of Mathematica. Josiah Carlson answered > me: Was there a question in all that? You are proposing Python include a Prolog-style (or CLIPS or Linda or ..) programming idiom, yes? Could you also suggest a case when one would use it? > 15) NetLogo is a kind of logo derived from StarLogo, implemented in > Java. How about the "turtle" standard library? I must say it's getting pretty annoying to say things like "when would this be useful?" and "have you read the documentation?" for your statements. > Maybe this library can also be faster than the Tkinter pixel > plotting and the pixel matrix visualisation). See also matplotlib, chaco, and other libraries that work hard to make this simple. Have you done any research on what Python can do or do you think ... no, sorry, I'm getting snippy. Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Other notes

2004-12-28 Thread Andrew Dalke
t because it requires "primes(10)" to have some meaning. I suppose for x in primes(10) .. 20: could also work though that should in my mind generate primes up to the number 20 and not the 20th prime. Note that primes(10) cannot return the 10th prime as the value 29. Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Other notes

2004-12-29 Thread Andrew Dalke
hat that's already legal syntax >>> class Xyzzy: ... def __init__(self): ... self.op1 = self.op2 = self.y = self ... self.z = "Nothing happens here" ... >>> x = Xyzzy() >>> x .op1. y .op2. z 'Nothing happens here' >>>

Re: wxPython vs. pyQt

2005-03-20 Thread Andrew E
the licence notes at the PyQt website. I guess I meant: "can I write commercial closed-source software *without paying anything for Qt" - to which I sounds like the answer is definitely "No" :) Andrew -- http://mail.python.org/mailman/listinfo/python-list

Re: Suggesting a new feature - "Inverse Generators"

2005-03-25 Thread Andrew Koenig
"Jordan Rastrick" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > def combineIntoRecord(): # This is an acceptor function > optionalline = None # We may not get given a value for this line > accept firstline > accept secondline > if condition(secondline): >

Re: Suggesting a new feature - "Inverse Generators"

2005-03-26 Thread Andrew Koenig
"Jordan Rastrick" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > But I'm not so much interested in alternate solutions to the problem > itself, which is to be honest trivial. I'm intereseted in the > implications of the imaginary solution of the Acceptor function. Of course. But

Re: What's the best GUI toolkit in Python,Tkinter,wxPython,QT,GTK?

2005-03-27 Thread Andrew Dalke
Maurice LING wrote: > That's almost like asking which way of cooking chicken is the best? > steam, fried, stew, roast? BBQ'ed of course. I believe that fits your point. :) Andrew [EMAIL PROTECTED] -- http:/

author index for Python Cookbook 2?

2005-03-28 Thread Andrew Dalke
Is there an author index for the new version of the Python cookbook? As a contributor I got my comp version delivered today and my ego wanted some gratification. I couldn't find my entries. Andrew [EMAIL PROTECTED] --

Re: Max files in unix folder from PIL process

2005-03-28 Thread Andrew Dalke
or unsorted flag makes a difference or use '-1' to see if it's all the stat calls. Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: collaborative text editor

2005-03-28 Thread Andrew Dalke
e of that program? SubEthaEdit. Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Things you shouldn't do

2005-03-29 Thread Andrew Dalke
c - Writing Solid Code. Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Stylistic question about inheritance

2005-03-31 Thread Andrew Koenig
Suppose I want to define a class hierarchy that represents expressions, for use in a compiler or something similar. We might imagine various kinds of expressions, classified by their top-level operator (if any). So, an expression might be a primary (which, in turn, might be a variable or a con

Re: Stylistic question about inheritance

2005-03-31 Thread Andrew Koenig
"Carl Banks" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Well, Python seems to get along fine without the ability to do > isinstance(foo,file_like_object); probably better off in the end for > it. So I'd say you should generally not do it. Inheritence is for > when different c

Re: Stylistic question about inheritance

2005-03-31 Thread Andrew Koenig
""Martin v. Löwis"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > You would normally try to avoid type queries, and rely on virtual > methods instead, if possible. Of course. > It seems likely for the application > that code can be shared across different subclasses, for example

Re: Stylistic question about inheritance

2005-03-31 Thread Andrew Koenig
"Lonnie Princehouse" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > If you try this sort of inheritance, I'd recommend writing down the > formal grammar before you start writing classes. Don't try to define > the grammar through the inheritance hierarchy; it's too easy to > accide

Re: instance name

2005-04-02 Thread Andrew Koenig
"max(01)*" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > is there a way to define a class method which prints the instance name? The term "the instance name" is misleading, because it assumes, without saying so explicitly, that every instance has a unique name. In fact, there i

Re: How to merge two binary files into one?

2005-04-04 Thread Andrew Dalke
ile(n, 'rb') shutil.copyfileobj(fin, fout, 65536) fin.close() fout.close() Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

oracle interface

2005-04-05 Thread Andrew Dalke
have rather little MS Windows experience. There hasn't been much discussion about either option on c.l.py so I'ld be grateful for feedback. Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Counting iterations

2005-04-09 Thread Andrew Dalke
find % python /usr/local/lib/python2.3/timeit.py -s \ 'pets = ["cat", "dog", "bird"]' \ 'num_pets=0' \ 'for pet in pets:' \ ' num_pets += 1' \ ' s="pet#" + pet' 10 loops, best of 3: 4.62 usec per loop So re

Re: Counting iterations

2005-04-11 Thread Andrew Dalke
Derek Basch wrote: > Interesting stuff Andrew. I do generally avoid string concantination > for the reason listed in the Python Performance Tips but your analysis > kinda puts that in question. Thanks. It was interesting for me to. I hadn't looked at the implementation for strin

module to parse "pseudo natural" language?

2005-04-17 Thread Andrew E
;""encapsulate a single instruction to buy, sell, etc""" def __init__( self, instrument, size, price, ... ): ... This doesn't work yet, but I know with time I'll get there. Question is - is there a module out there that will already handle this approach? Thanks for any suggestions :) Andrew -- http://mail.python.org/mailman/listinfo/python-list

Re: sscanf needed

2005-04-17 Thread Andrew E
Uwe Mayer wrote: > Hi, > > I've got a ISO 8601 formatted date-time string which I need to read into a > datetime object. > Is there a shorter way than using regular expressions? Is there a sscanf > function as in C? in addition to the other comments... I like re, because it gives me the most con

Wrapping C++ Class Heirachy in Python

2005-04-18 Thread Andrew Wilkinson
about creating types for this. I've found the tp_base and tp_bases elements and I've set them to the base type object (and a tuple containing the base type object) before I call PyType_Ready but in Python the base class isn't recognised. Is there anything obvious I'm missing? Tha

Re: Wrapping C++ Class Heirachy in Python

2005-04-19 Thread Andrew Wilkinson
ome documentation so I wouldn't have to cut my source down to an example suitable for a usenet post.   > Otherwise, I'd have to recommend Objects/unicodeobject.c in the Python > source as a reference for how to do this. Thanks! I was trying to think of a built in object hierarchy in P

Re: Enumerating formatting strings

2005-04-20 Thread Andrew Dalke
hrough a simple pipeline, like %(doc.text|reformat(68)|indent(4))s Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Progress Bar with urllib2

2005-04-26 Thread Andrew Godwin
ng here? It might even be I'm calling urllib2 the wrong way (does it download when you read() or when you create the Request?) All help is appreciated, I'm sort of stuck here. Andrew Godwin -- http://mail.python.org/mailman/listinfo/python-list

lists in cx_Oracle

2005-04-30 Thread Andrew Dalke
d a new string to executed but it wasn't pretty and I needed to explain to my client about SQL injection; wanted to use repr(a_tuple) which was *almost* correct. How do I do what I want to do? Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: PyMyth: Global variables are evil... WRONG!

2013-11-13 Thread Andrew Cooper
PI exactly 3, for the ease of other calculations when building a sorting machine? Does usenet start delivering these posts in the past/future? I suspect real python programmers will be able to feel quite smug when they can change the value of math.pi to suit the situation. ~Andrew -- https://mail.python.org/mailman/listinfo/python-list

Re: grammar (was Re: Automation)

2013-11-16 Thread Andrew Berg
On 2013.11.16 11:02, Paul Smith wrote: > The one that really irks me is people using "loose" when they mean > "lose". These words are not related, and they don't sound the same. > Plus this mistake is very common; I typically see it at least once a > day. Don't be surprised if such people pronounc

Re: grammar (was Re: Automation)

2013-11-16 Thread Andrew Berg
On 2013.11.16 22:16, Chris Angelico wrote: > I decided a while ago that my life would be alot better[1] For those who haven't yet seen it: http://hyperboleandahalf.blogspot.com/2010/04/alot-is-better-than-you-at-everything.html -- CPython 3.3.2 | Windows NT 6.2.9200 / FreeBSD 10.0 -- https://ma

Re: How can I get the variable to subtract the input please?

2013-11-18 Thread Andrew Berg
On 2013.11.18 17:56, Ed Taylor wrote: > This will be very simple to most of you I guess but it's killing me! > > print ("Please type in your age") > age = input () > leave = 16 > print ("You have" + leave - age + "years left at school") > > I want to have an input where the users age is inserted

Re: [Python-ideas] Unicode stdin/stdout

2013-11-18 Thread Andrew Barnert
From: "[email protected]" > On Mon, Nov 18, 2013, at 7:33, Robin Becker wrote: >> UTF-8 stuff > > This doesn't really solve the issue I was referring to, which is that > windows _console_ (i.e. not redirected file or pipe) I/O can only > support unicode via wide character (UTF-16) I/O wit

Re: Python application for rpm creation

2013-11-25 Thread Andrew Heagle
che search on my Ubuntu desktop results with a project, Spectacle, coincidentally written in Python. (I haven't really looked into it): http://meego.gitorious.org/meego-developer-tools/spectacle When you have your spec files made, I'd recommend using this service to build yo

Re: Getting the Appdata Directory with Python and PEP?

2013-11-25 Thread Andrew Berg
On 2013.11.25 14:48, Eamonn Rea wrote: > I've heard that there is a library that allows you to get the appdata > directory for a given OS, but I'd like to do it myself, as a learning > experience. > > Is there a built in way to get a users Appdata Directory? For example on OS X > it's in '~/Lib

Re: So, what's the real story on Python 2 vs Python 3?

2013-12-26 Thread Andrew Berg
On 2013.12.26 23:04, Travis McGee wrote: > The Python.org site says that the future is Python 3, yet whenever I try > something new in Python, such as Tkinter which I am learning now, > everything seems to default to Python 2. By this I mean that, whenever I > find that I need to install another

Re: Python 2.x and 3.x usage survey

2013-12-30 Thread Andrew Berg
On 2013.12.30 15:56, Dan Stromberg wrote: > I keep hearing naysayers, nay saying about Python 3.x. > > Here's a 9 question, multiple choice survey I put together about > Python 2.x use vs Python 3.x use. > > I'd be very pleased if you could take 5 or 10 minutes to fill it out. > > Here's the URL

Re: [python-committers] [RELEASED] Python 3.3.4 release candidate 1

2014-01-29 Thread Andrew Svetlov
BA5FfkwF > rLUAnRg0RpL/b6apv+Dt2/sgnUd3hTPA > =Z4Ss > -END PGP SIGNATURE- > ___ > python-committers mailing list > [email protected] > https://mail.python.org/mailman/listinfo/python-committers -- Thanks, Andrew Svetlov -- https://mail.python.org/mailman/listinfo/python-list

Re: Try-except-finally paradox

2014-01-29 Thread Andrew Berg
On 2014.01.29 23:56, Jessica Ross wrote: > I found something like this in a StackOverflow discussion. def paradox(): > ... try: > ... raise Exception("Exception raised during try") > ... except: > ... print "Except after try" > ... return True > ...

Re: An Educational Software Platform written in Python

2015-11-30 Thread Andrew Farrell
I would look first at the open source software released by EdX: https://open.edx.org/ On Sat, Nov 28, 2015 at 10:39 AM, Marko Rauhamaa wrote: > Cai Gengyang : > > > Can I create something like this entirely in Python, > > Absolutely. It will only take ten to one hundred years for one person to >

Re: need some basic help

2015-12-24 Thread Andrew Farrell
This code snippet is a method on a class. What is a method? This chapter of the book Think Python does a good job of explaining it. Without understanding this foundation, it isn't possible to really answer your question, so definit

Re: Need help on a project To :"Create a class called BankAccount with the following parameters "

2016-01-13 Thread Andrew Ongko
from who knows how many OPs.begging to have > > their source code delivered. > > I've also held this (and one other) email address for moderation. > > TJG > > -- > https://mail.python.org/mailman/listinfo/python-list This thread is so annoying, don't you guys think? At least if it is a homework, one should try to do their best by themselves. While this one, after getting tons of hints, or even the answers itself, is still asking for help. I wonder what is the meaning behind. Cheers, Andrew -- https://mail.python.org/mailman/listinfo/python-list

Re: problem

2016-01-14 Thread Andrew Ongko
k you. Hi there, Try opening the file in Python IDLE, and run it there. Or, open a command line in the directory that contains your file, and type python filename.py At least, this way, the cmd doesn't close by itself. Cheers, Andrew -- https://mail.python.org/mailman/listinfo/python-list

HELP

2016-02-24 Thread Reeves, Andrew
our end is failing. What can I do or you do or someone do to get this issue fixed for me??? Please see attached photo Andrew Reeves, OIT Service Desk 740-593-1222 -- https://mail.python.org/mailman/listinfo/python-list

Re: Nested List question

2016-02-24 Thread Andrew Farrell
you can indeed have a nested list. One way you could do that looks like donor = [ 'George', 'Soros', [ #<- 2nd element of outermost list '99 First Street', [ #<- 1st element of middling list '33 Broadway Av

Re: Pyhon 2.x or 3.x, which is faster?

2016-03-07 Thread Andrew Jaffe
nch '2.7' 64-bit CPython on Li... latest in branch '3.5' 64-bit CPython on Li... latest I understand that the first two are the released 2.7 and 3.5 versions; is the third the most recent 3.x build? Andrew -- https://mail.python.org/mailman/listinfo/python-list

Re: Question

2016-03-07 Thread Andrew Farrell
I'm going to echo Chris Angelo's suggestion #2 to use a python distribution. This page has the links to download Anaconda. It is free and if you need to download libraries which require compiled external code like numpy you can just run `conda install numpy`. O

Re: Remote Rsponse Socket Connection

2016-03-11 Thread Andrew Berg
On 2016.03.11 07:17, Joaquin Alzola wrote: > HI Guys > > I received this from a socket connection. This is the received data: > > Adding more info --> the response is a mixture of hex numbers + ascii > > From python function --> data = s.recv(2048) > > b'\x01\x00\x00D\x00\x00\x01\x18\x00\x00\x0

Comparisons and sorting of a numeric class....

2015-01-06 Thread Andrew Robinson
Hi, I'm building a custom numeric class that works with values that have uncertainty and am wanting to make it as compatible with floating point objects as possible -- so as to be usable in legacy code with minimal rewites; but but I am having trouble understanding how to handle magnitude comp

Re: Comparisons and sorting of a numeric class....

2015-01-06 Thread Andrew Robinson
So, I'm not sure I can subclass boolean either because that too is a built in class ... but I'm not sure how else to make an object that acts as boolean False, but can be differentiated from false by the 'is' operator. It's frustrating -- what good is subclassing, if one cant subclass all the

Re: Comparisons and sorting of a numeric class....

2015-01-06 Thread Andrew Robinson
On 01/06/2015 06:02 AM, Dave Angel wrote: On 01/06/2015 08:30 AM, Andrew Robinson wrote: So, I'm not sure I can subclass boolean either because that too is a built in class ... but I'm not sure how else to make an object that acts as boolean False, but can be differentiated fro

Re: Comparisons and sorting of a numeric class....

2015-01-06 Thread Andrew Robinson
On 01/06/2015 05:35 AM, Chris Angelico wrote: On Wed, Jan 7, 2015 at 12:30 AM, Andrew Robinson wrote: Why this is so important to Guido, I don't know ... but it's making it VERY difficult to add named aliases of False which will still be detected as False and type-checkable as a bo

Re: Comparisons and sorting of a numeric class....

2015-01-06 Thread Andrew Robinson
On 01/06/2015 06:34 PM, Terry Reedy wrote: On 1/6/2015 9:01 PM, Andrew Robinson wrote: [snip] There are very few (about 4) builtin classes that cannot be subclassed. bool is one of those few, float is not. Go ahead and subclass it. >>> class F(float): pass >>> F

Re: Comparisons and sorting of a numeric class....

2015-01-06 Thread Andrew Robinson
On 01/06/2015 06:31 PM, Chris Angelico wrote: The type check issue is mostly about compatability in the first place ; eg: users typecheck either unintentionally -- (novices syndrome) -- or because they need all the capabilities of a given type, and the only simple way to find out if they are a

I must be missing something obvious in installing Python 3.4.2...

2015-01-12 Thread Andrew Koenig
Downloaded and installed 64-bit Python 3.4 and pywin32-219. Both installed smoothly on my 64-bit Win7 machine. I added C:\Python34 to the search path. If I launch a Windows command window and run python -m ensurepip I get the following: Ignoring indexes: https://pypi.python.org/simple/

Re: I must be missing something obvious in installing Python 3.4.2...

2015-01-12 Thread Andrew Koenig
python --version reports 3.4.2, which is what I expected. I see no PYTHONPATH variable, or any environment variable with a name beginning PY (either upper or lower case). -- https://mail.python.org/mailman/listinfo/python-list

Re: I must be missing something obvious in installing Python 3.4.2...

2015-01-12 Thread Andrew Koenig
It runs and creates a classes.txt file with 803 lines. The first few: -> '$cpfile12' -> '$crfile12' -> '$cxfile12' -> '*' -> '.$cp' -> '.$cr' -> '.$cx' -> '.386' -> '.3ds' A few lines in the middle that might be relevant: -> '.py' -> '.pyc' -> '.pyo' -> '.pys' -> '.pyw' And the la

Re: Comparisons and sorting of a numeric class....

2015-01-12 Thread Andrew Robinson
On 01/07/2015 04:04 PM, Ethan Furman wrote: On 01/06/2015 07:37 PM, Andrew Robinson wrote: Explain; How does mere subclassing of bool break the contract that bool has? eg: What method or data would the superclass have that my subclass would not? bool's contract is that there are onl

Re: I must be missing something obvious in installing Python 3.4.2...

2015-01-12 Thread Andrew Koenig
Not sure that would be a good idea: There are 22 such keys, as opposed to only two keys with Windows ID strings that don't end in nulls. I found this article: http://www.swarley.me.uk/blog/2014/04/23/python-pip-and-windows-registry-corruption/ with the comment "If you are happy to completely rem

Re: I must be missing something obvious in installing Python 3.4.2...

2015-01-12 Thread Andrew Koenig
Fixed it! The aforementioned article is correct. I downloaded the RegDelNull program mentioned in the article (http://technet.microsoft.com/en-us/sysinternals/bb897448.aspx) and ran it on hkcr, hkcu, hklm, hku, and hkcc (short for HKEY_CLASSES_ROOT, HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE, HKEY_

Re: Comparisons and sorting of a numeric class....

2015-01-12 Thread Andrew Robinson
On 01/12/2015 02:35 PM, Chris Angelico wrote: On Tue, Jan 13, 2015 at 9:27 AM, Andrew Robinson wrote: Huh? I'm not adding any values when I merely subclass bool ; and even if the subclass could be instantiated -- that's doesn't mean a new value or instance of the base class (b

Re: Comparisons and sorting of a numeric class....

2015-01-12 Thread Andrew Robinson
w.youtube.com/watch?v=D0yYwBzKAyY Uh, no, -- your assertion excludes nothing you've been telling me is not a bool by contract -- so it doesn't 'define' anything precisely because it's by definition inaccurate. it's simply an invariant form of spam with three ter

Re: Comparisons and sorting of a numeric class....

2015-01-13 Thread Andrew Robinson
On 01/12/2015 09:32 PM, Steven D'Aprano wrote: On Mon, 12 Jan 2015 17:59:42 -0800, Andrew Robinson wrote: [...] What I am wanting to know is WHY did Guido think it so important to do that ? Why was he so focused on a strict inability to have any instances of a bool subclass at all --

Re: Comparisons and sorting of a numeric class....

2015-01-14 Thread Andrew Robinson
And most of this thread has been nothing more than me asking "why" did Guido say to do that -- and people avoiding answering the question. Wait, are you actually asking why bool is a doubleton? If nobody has answered that, I think probably nobody understood you were asking it, because it shoul

Re: Comparisons and sorting of a numeric class....

2015-01-15 Thread Andrew Robinson
On 01/15/2015 12:41 AM, Steven D'Aprano wrote: On Wed, 14 Jan 2015 23:23:54 -0800, Andrew Robinson wrote: [...] A subclass is generally backward compatible in any event -- as it is built upon a class, so that one can almost always revert to the base class's meaning when desi

Re: How to "wow" someone new to Python

2015-01-16 Thread Andrew Berg
On 2015.01.16 09:03, Chris Angelico wrote: > Scenario: You're introducing someone to Python for the first time. > S/he may have some previous programming experience, or may be new to > the whole idea of giving a computer instructions. You have a couple of > minutes to show off how awesome Python is

Re: Comparisons and sorting of a numeric class....

2015-01-23 Thread Andrew Robinson
On 01/15/2015 09:05 AM, Ian Kelly wrote: On Thu, Jan 15, 2015 at 12:23 AM, Andrew Robinson wrote: Can you name any other language that *does* allow subclassing of booleans or creation of new boolean values? Yes. Several off the top of my head -- and I have mentioned these before. They

Fwd: Re: Comparisons and sorting of a numeric class....

2015-01-26 Thread Andrew Robinson
Original Message Subject:Re: Comparisons and sorting of a numeric class Date: Mon, 26 Jan 2015 05:38:22 -0800 From: Andrew Robinson To: Steven D'Aprano On 01/24/2015 12:27 AM, Steven D'Aprano wrote: Andrew Robinson wrote: But let me exp

Re: Fwd: Re: Comparisons and sorting of a numeric class....

2015-01-26 Thread Andrew Robinson
edy act that goes on here. I seriously doubt I will ever read them all... On 01/26/2015 08:31 AM, Mark Lawrence wrote: On 26/01/2015 13:38, Andrew Robinson wrote: *plonk* Ah well, now that I have actually bothered to read your three replies, I suppose the most surprising part of your e

Re: Comparisons and sorting of a numeric class....

2015-01-26 Thread Andrew Robinson
09:54 AM, Rob Gaddi wrote: On Wed, 14 Jan 2015 23:23:54 -0800 Andrew Robinson wrote: Boolean algebra has two values: true and false, or 1 and 0, or humpty and dumpty, or whatever you like to call them. You're speaking to an Electrical engineer. I know there are 10 kinds of people, those

Re: Fwd: Re: Comparisons and sorting of a numeric class....

2015-01-27 Thread Andrew Robinson
On 01/26/2015 02:22 PM, Ian Kelly wrote: On Jan 26, 2015 6:42 AM, "Andrew Robinson" <mailto:[email protected]>> wrote: > ... If you're going to descend into insults and name-calling, then I'm not going to waste any more of my time on this thread.

Re: Fwd: Re: Comparisons and sorting of a numeric class....

2015-01-29 Thread Andrew Robinson
On 01/27/2015 02:04 AM, Gregory Ewing wrote: Andrew Robinson wrote: The spelling caveat is great -- and in Python the object named in bool's honor is spelled bool (lowercase too). ;) That doesn't change the fact that the man was called George Boole (not Charles!). If you're

State of the Geek Survey - Win a $50 Amazon Gift Card!

2015-02-11 Thread Andrew Solomon
Hello Python Developers, Complete our survey on the future of languages for the chance to win a $50 Amazon Gift Card https://geekuni.com/survey.html Thanks! Andrew p.s. The data (minus emails) will be publicly available. -- https://mail.python.org/mailman/listinfo/python-list

Re: Concatenate list values

2015-02-23 Thread Andrew Berg
On 2015.02.23 09:58, loial wrote: > Is there a quick way to concatenate all the values in a list into a string, > except the first value? > > I want this to work with variable length lists. > > All values in list will be strings. > > Any help appreciated > The tutorial covers strings and lists

Re: How security holes happen

2014-03-04 Thread Andrew Cooper
What, and rely on someone else's low level C? > Why is C the lowest denominator? Even with correctly written C and assembly, how can you be sure that your processor is executing the SYSRET instruction safely? (CVE-2012-0217 for anyone interested) ~Andrew -- https://mail.python.org/mailman/listinfo/python-list

Re: Error when installing matplotlib-1.3. on Windows

2014-03-17 Thread Andrew Williams
Note that I have Portable Python, installed on USB flash drive. When I tried run matplotlib installer, I got error:'Cannot install': "Python version 2.7 required, which was not found in the registry" - Original Message - From: MRAB Sent: 03/17/14 03:55 AM To: [email protected] Subj

Re: threading

2014-04-09 Thread Andrew Berg
On 2014.04.09 18:53, Roy Smith wrote: > It's even more ambiguous in Spanish. Esta lloviendo. Not only do you > get to intuit the referrent, you get to intuit the pronoun too :-) And in this particular instance, you have to figure out that 'está' (verb) was meant instead of 'esta' (adjective). :

Re: Martijn Faassen: The Call of Python 2.8

2014-04-15 Thread Andrew Berg
On 2014.04.15 16:02, Terry Reedy wrote: > https://python3wos.appspot.com/ There seems to be a difference of opinion between this page and the Twisted devs on what the "Python 2 only" classifier for PyPI means. -- CPython 3.4.0 | Windows NT 6.2.9200 / FreeBSD 10.0 -- https://mail.python.org/mail

Re: Martijn Faassen: The Call of Python 2.8

2014-04-15 Thread Andrew Berg
On 2014.04.15 17:18, Ned Batchelder wrote: > Yeah, that's the wrong way to do it, and they shouldn't have done that. > "python" needs to mean Python 2.x for a long time. Or maybe explicit is better than implicit: # python zsh: command not found: python # which python2.7 /usr/local/bin/python2.7

Re: Martijn Faassen: The Call of Python 2.8

2014-04-16 Thread Andrew Berg
On 2014.04.15 20:21, Steven D'Aprano wrote: > On Tue, 15 Apr 2014 17:32:57 -0500, Andrew Berg wrote: > >> On 2014.04.15 17:18, Ned Batchelder wrote: >>> Yeah, that's the wrong way to do it, and they shouldn't have done that. >>> "python"

Re: Martijn Faassen: The Call of Python 2.8

2014-04-16 Thread Andrew Berg
On 2014.04.16 03:02, Chris Angelico wrote: > Hmm, interesting. That's not the case for me: > > rosuav@sikorsky:~$ which which > /usr/bin/which That's because bash either does not have a builtin which or it is not enabled by default. I switched to zsh a while ago. I do still, of course, have a sys

Re: Why Python 3?

2014-04-18 Thread Andrew Berg
On 2014.04.18 22:28, Anthony Papillion wrote: > What is the general feel of /this/ community? I'm about to start a > large scale Python project. Should it be done in 2 or 3? What are the > benefits, aside from the 'it's the future' argument? Python 3 is not the future; it is the present. If you're

Re: Why Python 3?

2014-04-19 Thread Andrew Berg
On 2014.04.19 07:58, Ian Foote wrote: > Django has been there since 1.5. My company has been using python3 in > production since 1.6 was released. There have been a few other third > party libraries we've wanted to use but can't, but we've been able to > work around that. I guess I'm a bit behind t

Re: Strange syntax error, occurs only when script is executed directly

2014-04-22 Thread Andrew Cooper
a space. I have recently had to check this point. All current kernel implementations I cared to check would strip whitespace around the interpreter, although Solaris was not one such implementation. ~Andrew -- https://mail.python.org/mailman/listinfo/python-list

Re: Strange syntax error, occurs only when script is executed directly [solved]

2014-04-22 Thread Andrew Cooper
"The interpreter must be a valid pathname for an executable which is not itself a script." This is (presumably) to avoid recursive walks of the filesystem trying to locate a valid interpreter to splat over the virtual address space of the currently executing process. ~Andrew -- https://mail.python.org/mailman/listinfo/python-list

Re: Strange syntax error, occurs only when script is executed directly [solved]

2014-04-22 Thread Andrew Cooper
"The interpreter must be a valid pathname for an executable which is not itself a script." This is (presumably) to avoid recursive walks of the filesystem trying to locate a valid interpreter to splat over the virtual address space of the currently executing process. ~Andrew -- https://mail.python.org/mailman/listinfo/python-list

Help with changes in traceback stack from Python 2.7 to Python 3.x

2014-04-25 Thread Andrew Konstantaras
ction and other functions in the standard modules, but I can't seem to find anything that will provide this information. Can anyone point me in the direction to find this information? Any help is appreciated. ---Andrew -- https://mail.python.org/mailman/listinfo/python-list

Re: Help with changes in traceback stack from Python 2.7 to Python 3.x

2014-04-27 Thread Andrew Konstantaras
oes anyone have any insight where/how I can find the variables associated with the arguments in dctA = makeDict(strA, intA) from within the function def makeDict(*args): #need to find the variable names "strA" and "intA" in this context ---Andrew 

Re: Help with changes in traceback stack from Python 2.7 to Python 3.x

2014-04-27 Thread Andrew Konstantaras
Apr 27, 2014, at 01:18 PM, Chris Angelico wrote: On Mon, Apr 28, 2014 at 4:56 AM, Andrew Konstantaras wrote: > Thanks for the response and I can certainly see that this old code can be > improved, but I respectfully disagree on the utility of this function

Re: Help with changes in traceback stack from Python 2.7 to Python 3.x

2014-04-28 Thread Andrew Konstantaras
On Apr 28, 2014, at 12:36 PM, Ned Batchelder wrote: On 4/27/14 5:51 PM, Andrew Konstantaras wrote: > I guess I am missing something big as I am looking for a shorthand way > of doing the following: > > dctA = dict(x=x, y=y, ... n=n) > Yes,

Real-world use of concurrent.futures

2014-05-08 Thread Andrew McLean
ruggling to see how to do this elegantly without a lot of messy code just there to do "bookkeeping". This can't be an uncommon scenario. Am I missing something, or is this just not a job suitable for futures? Regards, Andrew -- https://mail.python.org/mailman/listinfo/python-list

Re: Real-world use of concurrent.futures

2014-05-08 Thread Andrew McLean
On 08/05/2014 20:06, Chris Angelico wrote: > On Fri, May 9, 2014 at 4:55 AM, Andrew McLean wrote: >> Because of latency in the DNS lookup this could >> benefit from multithreading. > Before you go too far down roads that are starting to look > problematic: A DNS lookup is a

Re: Real-world use of concurrent.futures

2014-05-08 Thread Andrew McLean
; futures.update(pool.submit(f, x) for x in islice(it, len(done))) > yield from done > Thank you, that's very neat. It's just the sort of thing I was looking for. Nice use of itertools.islice and "yield from". I'll try this out in the next few days and report back. - Andrew -- https://mail.python.org/mailman/listinfo/python-list

Re: Real-world use of concurrent.futures

2014-05-13 Thread Andrew McLean
On 08/05/2014 21:44, Ian Kelly wrote: > On May 8, 2014 12:57 PM, "Andrew McLean" <mailto:[email protected]>> wrote: > > So far so good. However, I thought this would be an opportunity to > > explore concurrent.futures and to see whether it offered any b

Re: Python alternative to Google Groups

2014-05-28 Thread Andrew Berg
On 2014.05.28 16:54, Steven Clift wrote: > If you are looking for an open source alternative between Google > Groups and Mailman, I wanted to share: > > http://groupserver.org > > It has recent release and new design. > > Key is the assumption that any user can publish/reply via email or the

Re: How to check client shutdown?

2013-08-27 Thread Andrew Berg
On 2013.08.27 12:44, Paul Pittlerson wrote: > Security issue!? Do you mean someone could enter devious python h4xx into the > chat or something? I had no idea using pickle was so dangerous, but I don't > know any other method of transmitting data in python :( JSON, XML, or any other format that d

Re: Beginner's guide to Python

2013-09-04 Thread Andrew Berg
On 2013.09.04 22:39, Dennis Lee Bieber wrote: > On Wed, 04 Sep 2013 07:26:47 +0200, Steve Hayes > declaimed the following: > >>Can anyone recommend a web site that gives a good beginner's guide to Python? >> >>One that tells one, especially -- >> >>-- what kind of projects Python is good for >

Bundle pip with Python for Windows users

2013-09-05 Thread Andrew Pennebaker
In the future, could Python for Windows come with pip? It would simplify package installation for users and developers, often a quite involved and tricky process. http://www.pip-installer.org/en/latest/ -- https://mail.python.org/mailman/listinfo/python-list

Re: Re-raising a RuntimeError - good practice?

2013-10-23 Thread Andrew Berg
On 2013.10.23 22:23, Victor Hooi wrote: > For example: > > def run_all(self): > self.logger.debug('Running loading job for %s' % self.friendly_name) > try: > self.export_to_csv() > self.gzip_csv_file() > self.upload_to_foo() > sel

Re: Re-raising a RuntimeError - good practice?

2013-10-24 Thread Andrew Berg
On 2013.10.24 20:09, Victor Hooi wrote: > Also, @Andrew Berg - you mentioned I'm just swallowing the original exception > and re-raising a new RuntimeError - I'm guessing this is a bad practice, > right? If I use just "raise" > > except Exc

Re: Show off your Python chops and compete with others

2013-11-06 Thread Andrew Cooper
er of spaces for indentation in Python?" I presume the question should be more along the lines of "What does PEP8 say?", because all answers are correct. "String literals are written with what?" The answer is not "ALl of these answers are correct" So two of of 7 qu

<    3   4   5   6   7   8   9   10   11   12   >