Re: Turning py into an Executable Program for Win?

2008-08-23 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> wrote: >On 24 Aug, 01:28, "W. eWatson" <[EMAIL PROTECTED]> wrote: >> How do I get my py code into some executable form so that Win users who >> don't have python can execute it? > >Py2exe: http://www.py2exe.org/ More generally, http://wiki.pytho

Re: Are dictionaries the same as hashtables?

2008-08-26 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: >Martin Marcher wrote: > >> On 2008-08-26 00:32:20, cnb wrote: >>> Are dictionaries the same as hashtables? . . . >Python does not have a "one key maps

Re: Are dictionaries the same as hashtables?

2008-08-26 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: >Cameron Laird wrote: > >> In article <[EMAIL PROTECTED]>, >> Diez B. Roggisch <[EMAIL PROTECTED]> wrote: >>>Martin Marcher wrote: >>> >>>> On 2008-

Re: Tkinter event loop question

2008-08-27 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Fredrik Lundh <[EMAIL PROTECTED]> wrote: >gordon wrote: > >> is it possible to send a message to the gui instance while the Tk >> event loop is running?I mean after i create a gui object like . .

Re: Wild Card String Comparison

2008-08-28 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, W. eWatson <[EMAIL PROTECTED]> wrote: >Is it possible to do a search for a wild card string in another string. For >example, I'd like to find "v*.dat" in a string called bingo. v must be >matched against only the first character in bingo, and not simply found >som

Re: Python in a Nutshell -- Book vs Web

2008-08-28 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Matimus <[EMAIL PROTECTED]> wrote: >On Aug 28, 3:05 pm, "W. eWatson" <[EMAIL PROTECTED]> wrote: >> I read an Amazon of Python in a Nutshell. The first edition is supposedly >> much like the web site. What web site? The second edition apparently adds >> more to the b

Re: Python in a Nutshell -- Book vs Web

2008-08-29 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Fredrik Lundh <[EMAIL PROTECTED]> wrote: >Cameron Laird wrote: > >> No. No, to an almost libelous extent. > >No matter what you write about, there's always a certain subcategory of >potential readers who insist that collect

Re: Ensure only single application instance.

2008-08-29 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Uberman <[EMAIL PROTECTED]> wrote: >On Fri, Aug 29, 2008 at 6:51 AM, Heston James <[EMAIL PROTECTED]> wrote: >> Good afternoon all. >> >> I have an application/script which is launched by crontab on a regular >> basis. I need an effective and accurate way to ensure

Re: Command lime code

2008-08-29 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Timothy Grant <[EMAIL PROTECTED]> wrote: >On Fri, Aug 29, 2008 at 3:38 PM, <[EMAIL PROTECTED]> wrote: >>>Seriously, did you think we've hacked your computer and are spying on >>>your web browsing? How would we know what web page you have visited? >> >> I was hoping

Re: Multipart - Counting the amount of Values for One key

2008-08-29 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Gabriel Genellina <[EMAIL PROTECTED]> wrote: >En Fri, 29 Aug 2008 14:41:53 -0300, Ron Brennan <[EMAIL PROTECTED]> >escribi�: > >> I am trying to find the amount of values there are pertaining to one key. >> >> For example: >> >> - To find the average of the value

Re: When to use try and except?

2008-08-30 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Carl Banks <[EMAIL PROTECTED]> wrote: . . . >> Basically, there's a general principle (EAFP: Easier to ask >> forgiveness than permission) in Python to just "try" something and >> then catch the

Re: (in memory) database

2008-08-31 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Fredrik Lundh <[EMAIL PROTECTED]> wrote: >mark wrote: . . . >> Unfortunately I have only some knowledge of SQLite which is not an >> option here. > >why is sqlite not an option? it's is bundled

Re: python subprocess know how

2008-08-31 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, King <[EMAIL PROTECTED]> wrote: >Hi, > >I am using subprocess module to execute a command and print results >back. > >startupinfo = subprocess.STARTUPINFO() >startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW >my_process = subprocess.Popen(cmnd, startupinfo=star

Re: (in memory) database

2008-08-31 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Paul Boddie <[EMAIL PROTECTED]> wrote: >On 31 Aug, 16:45, [EMAIL PROTECTED] (Cameron Laird) wrote: >> Yes and no. My own experience with Debian packages is that with a >> standard >> apt-get install python2.5 >> an attem

Re: (in memory) database

2008-08-31 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Paul Boddie <[EMAIL PROTECTED]> wrote: >On 31 Aug, 20:05, [EMAIL PROTECTED] (Cameron Laird) wrote: >> >> Let's take a definite example: I have a convenient >> Ubuntu 8.04.1 >> The content of /etc/apt/sources.li

Re: (in memory) database

2008-08-31 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: >On Sun, 31 Aug 2008 18:05:08 +, Cameron Laird <[EMAIL PROTECTED]> wrote: >>In article <[EMAIL PROTECTED]>, >>Paul Boddie <[EMAIL PROTECTED]> wrote: >> [snip

Re: use str as variable name

2008-09-04 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: >Mathieu Prevot a écrit : >> 2008/9/4 Chris Rebert <[EMAIL PROTECTED]>: > >(snip) > >>> You're looking for the setattr() built-in function. In this exact case: >>>setattr(a, arg, new_value) >>> >>> This is probably

CP4E? (was: Help - just a few lines of code needed)

2006-03-07 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> wrote: >There is some fine permutation code in the cookbook. Take a look at >http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/190465 . > >You can easily code something like: . .

Dr. Dobb's Python-URL! - weekly Python news and links (Mar 6)

2006-03-07 Thread Cameron Laird
QOTW: "This PyCon has been better in so many respects than the three that preceded it. ... PyCon will continue to improve." - Steve Holden, chairman of PyCon 2003-2005 http://holdenweb.blogspot.com/ "Design patterns are kind of like sarcasm: hard to use well, not always appropriate, and di

Re: What version of python is running a script

2006-03-07 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Fernando Rodríguez <[EMAIL PROTECTED]> wrote: > >Hi, > >How can my script tell which version of python is running it? . . . $ python Python 2.3.5 (#2, Aug 30 2005, 15:50:26) [GCC 4.0.2 20

Bear not false witness (was: Which GUI toolkit is THE best?)

2006-03-10 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Thomas Guettler <[EMAIL PROTECTED]> wrote: . . . >tkinter (or better TK) has no good table widget. . . . http://tkinter.un

Re: Numbers in python

2006-03-10 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: >> However, I can't seem to get the program to treat the numbers as >> numbers. If I put them in the dictionary as 'THE' = int(0.965) the >> program returns 1.0 > >It certainoly does _not_ return 1.0 - it returns 1. And tha

Re: Tkinter - Drawing rotated text in a widget

2006-03-12 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Eric Apperley <[EMAIL PROTECTED]> wrote: >How do I draw rotated text in a Tkinter widget using the draw.text method? > >Alternatively, if I draw text as normal, how can I then subsequently >rotate it about its start point? > > Not easily. The (base) Tk-ers have w

Re: accessing a USB HID

2006-03-17 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Serge Orlov <[EMAIL PROTECTED]> wrote: >[EMAIL PROTECTED] wrote: . . . >> The obstacle our group currently faces is communicating with a >> microcontroller (ACS USB Servo II) that appears in Wind

Dr. Dobb's Python-URL! - weekly Python news and links (Mar 17)

2006-03-17 Thread Cameron Laird
QOTW: "Generally, you should always go for whatever is clearest/most easily read (not just in Python, but in all languages)." - Timothy Delaney "You will find as your programming experience increases that the different languages you learn are appropriate for different purposes, and have differen

Dr. Dobb's Python-URL! - weekly Python news and links (Mar 17)

2006-03-18 Thread Cameron Laird
QOTW: "Generally, you should always go for whatever is clearest/most easily read (not just in Python, but in all languages)." - Timothy Delaney "You will find as your programming experience increases that the different languages you learn are appropriate for different purposes, and have differen

Remote teamwork anecdotes (was: Where can we find top-notch python developers?)

2006-03-20 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Alex Martelli <[EMAIL PROTECTED]> wrote: . . . >Unfortunately, I entirely understand _why_ most software development >firms prefer face-to-face employees: when I found myself, back when I >was a

Re: instantiate a class with a variable

2006-03-27 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Ben Finney <[EMAIL PROTECTED]> wrote: >"John" <[EMAIL PROTECTED]> writes: >> class foo: >> def method(self): >> pass >> >> x='foo' >> >> Can I use variable x value to create an instance of my class? > >You seem to be asking "is it possible to call an obj

Re: Seems like I want a pre-processor, but...

2006-03-29 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Russell Warren <[EMAIL PROTECTED]> wrote: . . . >Anyway - it worked... you've answered my question perfectly, thanks. I >hadn't considered that the module loading phase could basically used >for

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Apr 4)

2006-04-06 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, gene tani <[EMAIL PROTECTED]> wrote: > >Peter Otten wrote: >> The old Python "To-Do List" now lives principally in a >> SourceForge reincarnation. >> http://sourceforge.net/tracker/?atid=355470&group_id=5470&func=browse >> http://python.source

Farther OT: financial analytics (was: OT: job offering in Milan)

2006-04-07 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Robin Becker <[EMAIL PROTECTED]> wrote: . . . >My math skills are now so degraded I have difficulty reading about conic >programming using Nesterov's barrier functions etc etc.

Python-URL! - weekly Python news and links (Dec 9)

2009-12-09 Thread Cameron Laird
QOTW: "I'm not sure you ever understood what the problem was, or where, but I'm happy you feel like you've solved it." - Marco Mariani http://groups.google.com/group/comp.lang.python/browse_thread/thread/8ec7ad4fcc714538 Python 2.7a1, the first alpha release of the 2.7 series, is availa

Python-URL! - weekly Python news and links (Dec 15)

2009-12-15 Thread Cameron Laird
This installment, like all those for several months, was authored by Gabriel Genellina. We have hopes of correcting the attribution before year's-end. QOTW: "Plus, it's not something that's never foolproof." - Carl Banks, daring negater http://groups.google.com/group/comp.lang.python/msg/e8

Python-URL! - weekly Python news and links (Dec 26)

2009-12-27 Thread Cameron Laird
QOTW: "It took Python to make me realize that programming *could* be fun, or at least not annoying enough to keep me from making a career of programming." - Aahz http://groups.google.com/group/comp.lang.python/msg/65ad4e71c194d97e Thanks to Gabriel Genellina for these references: How t

Python-URL! - weekly Python news and links (Oct 25)

2009-10-25 Thread Cameron Laird
QOTW: "It was intended to be understood, not copied." - Dave Angel comments on a characteristic of didactic examples http://groups.google.com/group/comp.lang.python/msg/61e2d60d08f1c630 Altering the default character encoding (sys.setdefaultencoding) is never a good idea: ^://gr

Python-URL! - weekly Python news and links (Nov 3)

2009-11-03 Thread Cameron Laird
QOTW: "I consider "import *" the first error to be fixed ..." - Robert Kern, author of PyFlakes, a potential replacement for Pylint and Pychecker, on his personal style http://groups.google.com/group/comp.lang.python/msg/5bf77b21b3b0caf2 Python 2.6.4 is out; it fixes some small but impor

Python-URL! - weekly Python news and links (Nov 10)

2009-11-10 Thread Cameron Laird
QOTW: "Don't get me wrong - innovation often comes from scratching ones personal itch. But you seem to be suffering from a rather bad case of neurodermatitis." - Diez B. Roggisch, on ... well, personal style in problem-solving http://groups.google.com/group/comp.lang.python/msg/4cf102bdd3a3267

Python-URL! - weekly Python news and links (Nov 24)

2009-11-24 Thread Cameron Laird
QOTW: "... it's generally accepted that COM sucks rocks through straws, so explore alternatives when they're available ;-)" - Chris Withers http://groups.google.com/group/comp.lang.python/msg/29577c851ceed167 From nothing to a complete working program - Peter Otten on stepwise refine

Python-URL! - weekly Python news and links (Mar 9)

2010-04-21 Thread Cameron Laird
ly echoing Guido's criterion of debuggability in language design http://groups.google.com/group/comp.lang.python/msg/3ebe7a0b78086acf Editor Cameron Laird apologizes for the following three entries, which appeared in the last installment only in an unusably garbled form: There is no module

Python-URL! - weekly Python news and links (Mar 17)

2010-04-21 Thread Cameron Laird
QOTW: "... [T]hat kills yet another usage of C ..." - Maciej Fijalkowski http://morepypy.blogspot.com/2009/11/some-benchmarking.html Making operations in the Fraction class automatically return a subclass instance when called with subclass arguments: http://groups.google.com/grou

Python-URL! - weekly Python news and links (Feb 9)

2010-04-21 Thread Cameron Laird
QOTW: "You see? That's what I like about the Python community: people even apologise for apologising :)" - Tim Golden http://groups.google.com/group/comp.lang.python/msg/858d1c31d0c2adff The third alpha version of Python 2.7 is ready for testing: http://groups.google.com/group/comp

Python-URL! - weekly Python news and links (Apr 21)

2010-04-21 Thread Cameron Laird
QOTW: "There's no RightAnswer(tm), just our best guess as to what is the most useful behavior for the most number of people." - Raymond Hettinger http://groups.google.com/group/comp.lang.python/msg/e7f78ef27811781b First beta version of Python 2.7 is available: http://groups.google.

Python-URL! - weekly Python news and links (May 5)

2010-05-06 Thread Cameron Laird
[Authored by Gabriel Genellina.] QOTW: "Even on alt.haruspicy they cannot do much without a liver now and then..." - Peter Otten http://groups.google.com/group/comp.lang.python/msg/7852938d0b92bd7b Mixing bytes and unicode when writing data in Python 3.x: http://groups.google.com.a

Python-URL! - weekly Python news and links (Jun 6)

2010-06-07 Thread Cameron Laird
QOTW: "... it's just laziness and hubris passed off under the banner of agility." - Clifford Heath, on the fashion of justification of "metaschemas" because those darn data architects are just too slow Efficient way to apply a function to every element in a list, discarding the results:

Python-URL! - weekly Python news and links (Jun 16)

2010-06-16 Thread Cameron Laird
QOTW: "Python advocacy seems to be by example, not cheerleading." - Cameron Simpson http://groups.google.com/group/comp.lang.python/msg/2cc7e643702d0ec8 The first release candidate of Python 2.7 is now available for testing: http://groups.google.com/group/comp.lang.python/t/e3cd74b1

Re: GUIs - A Modest Proposal

2010-06-16 Thread Cameron Laird
On Jun 6, 5:49 pm, Kevin Walzer wrote: . [much wisdom, particularly in regard to Tkinter] . . > > The very diversity of GUI toolkits came into effect because Python is > very easy to extend and integrate with other C/C++ libraries. Writing a > GUI toolkit from scratch is much, muc

Python-URL! - weekly Python news and links (Jun 22)

2010-06-22 Thread Cameron Laird
QOTW: "It's hard to overestimate the variance you'll see when you start asking your users for information." - Cody Powell http://www.codypowell.com/taods/2010/01/production-aint-pretty-a-case-for-excessive-application-logging.html The second Release Candidate of Python 2.7 is available fo

Re: [Diversity] Language note

2009-08-23 Thread Cameron Laird
In article , Rami Chowdhury wrote: > >> Most indian languages have a different >> grammer (compared to English). So i'm curious to see how that would be >> implemented in a parser > >+1 -- I'd be interested in seeing this too, although we have drifted >OT here and perhaps this conversation woul

Re: Python-URL! - weekly Python news and links (Sep 17)

2009-09-24 Thread Cameron Laird
In article , Gabriel Genellina wrote (but I edited): . . . >More ways to define an empty function that you ever imagined: >http://groups.google.com/group/comp.lang.python/t/c9f494b6745c7d74/

<    2   3   4   5   6   7