Re: Does the Python community really follow the philospy of "Community Matters?"

2009-02-02 Thread Craig Allen
I think what you have found is a remarkable characteristic of this language. Somehow, perhaps something to do with guido or python itself, python has a very strong non-dogmatic streak. It's a relief really. If I were to pose a "is python or its community really xyz?" I would wonder about the "on

Re: Threading and tkinter

2009-02-20 Thread Craig Allen
> The statement > >     x=x+1 > > (which, by the way, should stylistically be written > >     x = x + 1 > yes I was wondering what "x=x+1" meant until you translated it... oh, "x = x + 1" of course! I thought to myself. Oh wait no I'm sarcastic. -- http://mail.python.org/mailman/listinfo/python-

Re: Emacs vs. Eclipse vs. Vim

2008-12-01 Thread Craig Allen
I would never tell someone what editor to use in the same way I wouldn't tell someone what religion to believe in. Which is to say, I would tell my kids or other trusting soul... I used emacs for years, I was eventually convinced to start using nedit, which is quite nice. For an IDE, which I need

Re: HELP!...Google SketchUp needs a Python API

2008-12-02 Thread Craig Allen
> Just remember thought that if you threat Python like a > hammer, suddenly everything will look like a bail. > don't you mean if you use Python like a pitchfork? -- http://mail.python.org/mailman/listinfo/python-list

Re: Confused about class relationships

2008-12-02 Thread Craig Allen
what you have is a totally acceptable factory system. Not sure why you are using a generator, but that's another matter. I agree with the previous replies regarding inheritance... this is not a case for inheritance. You could, however, have Bar be a borg with the Bar factory built in as a class

Re: How to modify a program while it's running?

2008-12-16 Thread Craig Allen
On Dec 16, 10:25 am, Joe Strout wrote: > Here's my situation: I'm making an AIM bot, but the AIM server will > get annoyed if you log in too frequently (and then lock you out for a > while). So my usual build-a-little, test-a-little methodology doesn't > work too well. > > So I'd like to restruct

Re: Python is slow

2008-12-16 Thread Craig Allen
On Dec 14, 6:38 pm, cm_gui wrote: > hahaha, do you know how much money they are spending on hardware to > make > youtube.com fast??? > > > By the way... I know of a very slow Python site called YouTube.com. In > > fact, it is so slow that nobody ever uses it. less than they'd spend to implement i

Re: I always wonder ...

2008-12-24 Thread Craig Allen
this is one of the most subtle trolls I've ever read. you sir, are a master! On Dec 22, 7:53 am, s...@pobox.com wrote: > ... shouldn't people who spend all their time trolling be doing something > else: studying, working, writing patches which solve the problems they > perceive to exist in the t

Re: Python 2.6, GUI not working on vista?

2008-10-09 Thread Craig Allen
as a 20 year observer of microsoft, I have to say this is not amazing at all... and I do not mean that as a random put down of Microsoft. Microsoft often develops things in response to demand... but they don't always fit in their system well, and thus are not really used in the spirit of the demand

Re: IDE Question

2008-10-15 Thread Craig Allen
it's commercial, but I like WingIDE enough to recommend... I run it on Linux and Mac and it works well. -craig On Oct 15, 7:19 am, "Steve Phillips" <[EMAIL PROTECTED]> wrote: > Hi All, > I am just wondering what seems to be the most popular IDE. The reason > I ask is I am currently at war with m

Re: dictionary

2008-10-24 Thread Craig Allen
when I was a baby programmer even vendors didn't have documentation to throw out... we just viewed the dissassembeled opcodes to find out how things worked... we never did find out much but I could make the speak click, and we were happy with it. -- http://mail.python.org/mailman/listinfo/python-li

Re: How to examine the inheritance of a class?

2008-10-24 Thread Craig Allen
> > Developer. NOT User. I go around and around on this issue, and have ended up considering anyone using my code a user, and if it's a library or class system, likely that user is a programmer. I don't really think there is a strong distinction... more and more users can do sophisticated configu

Re: How to examine the inheritance of a class?

2008-10-24 Thread Craig Allen
> Thank you, Chris. Class.__bases__ is exactly what I wanted to see. > And I thought I had tried isinstance(), and found it lacking -- but I > just tried it again, and it does what I hoped it would do. While isinstance is no doubt the proper way to access this information, you may have run into

Re: Structures

2008-11-03 Thread Craig Allen
> > Care to say more about what they are, not what they're like? > I'm not the OP and I may be biased by C++, I can imagine the complaints when I say, classes are just structures with function members for working on the structure. -- http://mail.python.org/mailman/listinfo/python-list

Re: PYTHON WORKING WITH PERL ??

2008-11-03 Thread Craig Allen
> article:http://www.linuxjournal.com/article/3882 interesting read, thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: PYTHON WORKING WITH PERL ??

2008-11-03 Thread Craig Allen
> article:http://www.linuxjournal.com/article/3882 even if it is by Eric Raymond -- http://mail.python.org/mailman/listinfo/python-list

Re: Finding the instance reference of an object

2008-11-04 Thread Craig Allen
> > If the assert statement fails (and it does), then no copy was made and > Python is not call-by-value. > > So Python is not call-by-value, and it's not call-by-reference, so ... > either Python doesn't exist, or it uses a different calling convention. > coming from C/C++ Python seemed to me cal

Re: Finding the instance reference of an object

2008-11-04 Thread Craig Allen
On Nov 4, 11:06 am, Joe Strout <[EMAIL PROTECTED]> wrote: > On Nov 4, 2008, at 7:42 AM, Craig Allen wrote: > > > coming from C/C++ Python seemed to me call by reference, for the > > pragmatic reason you said, modificaitons to function arguments do > > affect th

Re: Finding the instance reference of an object

2008-11-12 Thread Craig Allen
> arguably even older than that to Lisp. > Firstly, thanks to those that have responded to my part in this debate, I have found it very informative and interesting as I have the entire thread. However, with regard to comments that I led myself astray, I want to reiterate the one thing I find det

Re: duck-type-checking?

2008-11-13 Thread Craig Allen
> This is better achived, not by littering the functional code unit with > numerous assertions that obscure the normal function of the code, but > rather by employing comprehensive unit tests *separate from* the code > unit. that doesn't seem to work too well when shipping a library for someone el

Re: duck-type-checking?

2008-11-13 Thread Craig Allen
> since both are equally informative when it comes to tracing the faulty > assignment. > steve, they are not equally informative, the assertion is designed to fire earlier in the process, and therefore before much mischief and corruption can be done compared to later, when you happen to hit the m

Re: Official definition of call-by-value (Re: Finding the instance reference...)

2008-11-17 Thread Craig Allen
> >> * Do all objects have values? (Ignore the Python > >> docs if necessary.) > > > If one allows null values, I am current thinking yes. > > I don't see a difference between a "null value" > and not having a value. > I think the difference is concrete... an uninitialized variable in C has no va

Re: Finding the instance reference of an object

2008-11-19 Thread Craig Allen
I've just come to the conclusion it's not possible to call functions in python, to do so is undefined and indeterminate, like dividing by zero. Henceforth no calling functions for me as clearly it's the devil's playground. -- http://mail.python.org/mailman/listinfo/python-list

Re: Opening for Python Programmer at Newport Beach

2009-03-03 Thread Craig Allen
On Mar 3, 10:17 am, Cool Dude wrote: > Hello , > This is Aniket from Techclique, a New Jersey based software > development and IT consulting firm providing top quality technical and > software professionals on a permanent and contractual basis to > Government and commercial customer including fort

Re: Why is lambda allowed as a key in a dict?

2009-03-10 Thread Craig Allen
> I think the point is that function objects compare by object identity, > so the two lambdas you use above are not equal even though they have the > same code. it raises an interesting question about why doesn't it. I can think of practical answers to that, obviously, but in principle, if a fun

Re: Is python worth learning as a second language?

2009-03-10 Thread Craig Allen
On Mar 9, 12:43 am, ZikO wrote: > Hi > > I hope I won't sound trivial with asking my question. > > I am a C++ programmer and I am thinking of learning something else > because I know second language might be very helpful somehow. I have > heard a few positive things about Python but I have never w

Re: Ban Xah Lee

2009-03-11 Thread Craig Allen
> There you go: a 30-second psychological diagnosis by an > electrical engineer based entirely on Usenet postings.  It > doesn't get much more worthless than that... > > -- > Grant rolf but interesting post nonetheless. I have been really somewhat fascinated by AS since I heard of it about a dec

Re: Why is lambda allowed as a key in a dict?

2009-03-11 Thread Craig Allen
On Mar 10, 1:39 pm, Paul Rubin <http://phr...@nospam.invalid> wrote: > Craig Allen writes: > > it raises an interesting question about why doesn't it.  I can think > > of practical answers to that, obviously, but in principle, if a > > function compiles to

packaging

2009-03-17 Thread Craig Allen
we have software we are putting into package form. So far, all the code was in local py files and we imported between the modules as you'd think. Now with the package ("ourpackage") we are addressing how import affects the importing module. if "ourpackage" __init__.py itself does regular imports

Re: packaging

2009-03-18 Thread Craig Allen
> andrew thanks andrew, good advice, I should probably use that throughout our code. btw, hope the world is treating you well, long time no see... -craig -- http://mail.python.org/mailman/listinfo/python-list

Re: Beazley on Generators

2009-04-01 Thread Craig Allen
this is great, thanks... we have used generators to create something akin to a cooperative tasking environment... not to implement multitasking, but to be able to control low level data processing scripts. These scripts, written as generators, yield control to a control loop which then can pause,

singletons

2008-07-16 Thread Craig Allen
Hey, forgive me for just diving in, but I have a question I was thinking of asking on another list but it really is a general question so let me ask it here. It's about how to approach making singletons. Background: I've been programming in python seriously for about a year now, maybe a little lon

Re: singletons

2008-07-16 Thread Craig Allen
al is still that tl = TehLibrary() would always return the same object. -craig On Jul 16, 2:00 pm, castironpi <[EMAIL PROTECTED]> wrote: > On Jul 16, 5:20 pm, Craig Allen <[EMAIL PROTECTED]> wrote: > > > > > Hey, forgive me for just diving in, but I have a question I was &g

Re: singletons

2008-07-17 Thread Craig Allen
On Jul 16, 7:01 pm, Lawrence D'Oliveiro <[EMAIL PROTECTED] central.gen.new_zealand> wrote: > In message > <[EMAIL PROTECTED]>, Craig > > Allen wrote: > > ... the ideal is still that > > > tl = TehLibrary() would always return t

Re: singletons

2008-07-17 Thread Craig Allen
On Jul 17, 2:15 am, Uwe Schmitt <[EMAIL PROTECTED]> wrote: > On 17 Jul., 00:20, Craig Allen <[EMAIL PROTECTED]> wrote: > > > > > I have several classes in our system which need to act like > > singletons, they are libraries of data classifications, and other

Re: singletons

2008-07-18 Thread Craig Allen
On Jul 17, 9:04 pm, Paddy <[EMAIL PROTECTED]> wrote: > On Jul 16, 11:20 pm, Craig Allen <[EMAIL PROTECTED]> wrote: > > > Hey, forgive me for just diving in, but I have a question I was > > thinking of asking on another list but it really is a general question > >

Re: Python Written in C?

2008-07-21 Thread Craig Allen
it's clear to me that the perfect language should exist a priori, coming to being causa sui. Having to actually implement a language is disgusting and unnatural. -- http://mail.python.org/mailman/listinfo/python-list

when does the GIL really block?

2008-07-31 Thread Craig Allen
I have followed the GIL debate in python for some time. I don't want to get into the regular debate about if it should be gotten rid of (though I am curious about the status of that for Python 3)... personally I think I can do multi-threaded programming well, but I also see the benefits of a multi

Re: when does the GIL really block?

2008-08-01 Thread Craig Allen
On Aug 1, 12:06 pm, Rhamphoryncus <[EMAIL PROTECTED]> wrote: > On Jul 31, 7:27 pm, Craig Allen <[EMAIL PROTECTED]> wrote: > > > > > I have followed the GIL debate in python for some time. I don't want > > to get into the regular debate about if it should

Re: when does the GIL really block?

2008-08-04 Thread Craig Allen
On Aug 1, 2:28 pm, John Krukoff <[EMAIL PROTECTED]> wrote: > On Thu, 2008-07-31 at 18:27 -0700, Craig Allen wrote: > > I have followed the GIL debate in python for some time. I don't want > > to get into the regular debate about if it should be gotten rid of > >

Re: Is my thinking Pythonic?

2008-08-21 Thread Craig Allen
generally, I name the members in the Class definition and set them to None there... class Car: speed = None brand = None def __init__(): self.speed = defaultspeed #alternately, and more commonly, get this speed as a initializer argument self.brand = defaultbrand That solves

Re: When to use try and except?

2008-08-29 Thread Craig Allen
On Aug 29, 7:23 am, cnb <[EMAIL PROTECTED]> wrote: > If I get zero division error it is obv a poor solution to do try and > except since it can be solved with an if-clause. > > However if a program runs out of memory I should just let it crash > right? Because if not then I'd have to write exceptio

Re: How to record audio from Python on Mac?

2008-09-09 Thread Craig Allen
I want to do this as well, and also some other audio processing via python. I have not tried yet, but much of my research points to pyaudio, PortAudio bindings for python, which is supposed to be multi- platform including Mac OS X, but as I say, I've not tried it yet. Related to this are some exa

Re: Adding environment variables to bash.

2008-09-11 Thread Craig Allen
On Sep 11, 10:25 am, nntpman68 <[EMAIL PROTECTED]> wrote: > >> doesn't exactly work for Python scripts, though: > > >> $ cat env.py > >> #!/usr/bin/env python > >> import os > >> os.environ["TEST"] = "hello" > > >> $ . ./env.py && env | grep TEST > >> import: unable to open X server `'. > >> bash:

Re: What do you call a class not intended to be instantiated

2008-09-22 Thread Craig Allen
> Snce when are "users" ever involved > in programming problems or programming > languages ? > since the begining, the first users are programmers, users of your libraries. -- http://mail.python.org/mailman/listinfo/python-list

Re: Not fully OO ?

2008-09-22 Thread Craig Allen
It is clear to me that Python is a multiparadigmed object oriented language. It is clearly possible to write procedural code... that is, Python does not force object oriented syntax or concepts on you and insist you define everything in such a structure. Is the OO it allows full OO, I think so, an

Re: Not fully OO ?

2008-09-23 Thread Craig Allen
> if they want to, but it is *fully* OO in that it includes everything > required to do OO. But maybe the original blogger meant by "fully OO" > what I mean by "Pure OO"? it seems to me this is what was meant... pure OO, AND forced to use it. My personal feeling is that python is multiparadigmed

Re: What do you call a class not intended to be instantiated

2008-09-23 Thread Craig Allen
> > > Usegrammers? > usegrammers are just those that use grammars, but misspell it. -- http://mail.python.org/mailman/listinfo/python-list

Re: Why are "broken iterators" broken?

2008-09-23 Thread Craig Allen
I'm interested what others think of this because at first I couldn't get it... I have an object which can iterate over its parts... and at first I thought, what? I'm supposed to create a new object every time the user needs to iterate the contents? In the end I interpreted that statement as if "un

Re: Python style: exceptions vs. sys.exit()

2008-09-23 Thread Craig Allen
> The > question is: should the library function be able to just dump to > sys.exit() with a message about the error (like "couldn't open this > file"), or should the exception propagate to the calling program which > handles the issue? > my view is that the exceptions are there precisely to tell

Re: Python style: exceptions vs. sys.exit()

2008-09-24 Thread Craig Allen
> Why, yes, I am wearing my BOFH hat. How could you tell? > > -- > Tim Rowe evil, but I think you may be a BSEFH, not a BOFH. -- http://mail.python.org/mailman/listinfo/python-list