Re: FYI: Micro Python running on kickstarter pyBoard project, now shipping

2014-11-08 Thread John Pinner
On Thursday, 23 October 2014 22:12:10 UTC+1, sohca...@gmail.com wrote: > On Thursday, October 23, 2014 10:07:26 AM UTC-7, jkn wrote: > > Hi all > > I haven't heard in mentioned here, but since I saw one of the boards > > today thought I'd pass on the news: > > > > The Kickstarter 'MicroPytho

Re: PyEval_EvalCodeEx return value

2011-09-20 Thread John Pinner
On Sep 20, 11:34 am, Mateusz Loskot wrote: > Hi, > > I'm trying to dig out details about what exactly is the return > value the of PyEval_EvalCodeEx function in Python 3.x > The documentation is sparse, unfortunately. > > Perhaps I'm looking at wrong function. > My aim is simple, I need to execute

Re: Syntactic sugar for assignment statements: one value to multiple targets?

2011-08-18 Thread John Pinner
On Aug 3, 2:45 am, gc wrote: > Hi everyone! Longtime lurker, hardly an expert, but I've been using > Python for various projects since 2007 and love it. > > I'm looking for either (A) suggestions on how to do a very common > operation elegantly and Pythonically, or (B) input on whether my > propos

Re: Docstrings and class Attributes

2011-08-10 Thread John Pinner
On Aug 9, 1:36 am, Ben Finney wrote: > Ethan Furman writes: > > So if property docstrings are so hard to get to, what's the point in > > having them? > > Why would you expect there be a special point to them? > > Men, like all primates of any sex, have nipples. > > Properties, like any function i

Re: De-tupleizing a list

2011-04-27 Thread John Pinner
On Apr 26, 4:28 am, Gnarlodious wrote: > I have an SQLite query that returns a list of tuples: > > [('0A',), ('1B',), ('2C',), ('3D',),... > > What is the most Pythonic way to loop through the list returning a > list like this?: > > ['0A', '1B', '2C', '3D',... > > -- Gnarlie If you want to handle

Re: What do I need to know in order to write a web application in python?

2011-03-06 Thread John Pinner
On Mar 5, 7:42 pm, geremy condra wrote: > On Sat, Mar 5, 2011 at 3:49 AM, ErichCart ErichCart > wrote: > > Visual Python seems to be exactly what I want. But it doesn't seem > > very popular. Perhaps it means that there are not many people who will > > be able to help if I have problems with it.

Re: Best way to gain root privileges

2011-02-18 Thread John Pinner
On Feb 17, 3:32 pm, GSO wrote: > > I'm having a awfully hard time figuring out why a home CCTV > > application might need privilege at all.  Are you sure you really need > > privilege?  It sounds to me like there may be some larger design > > issues mandating the need for privilege when it's not r

Re: Which is the best book to learn python

2011-01-25 Thread John Pinner
On Jan 25, 8:56 am, Mark Summerfield wrote: > On Jan 24, 5:09 pm, santosh hs wrote: > > > Hi All, > > i am beginner to python please tell me which is the best available > > reference for beginner to start from novice > > If you want to learn Python 3 and have some prior programming > experience (

Re: getdefaultencoding - how to change this?

2011-01-21 Thread John Pinner
To answer the OP's original question: On Jan 20, 2:31 pm, Helmut Jarausch wrote: > Hi, > I've searched the net but didn't find the information I need. > Using Python-2.7.1, I know, I can't modify defaultencoding at run time. I think you can. There is a function setdefaultencoding in the sys modu

Re: getdefaultencoding - how to change this?

2011-01-21 Thread John Pinner
On Jan 20, 4:46 pm, Robert Kern wrote: > > Instead, you want to use an encoding declaration in each file: > > http://docs.python.org/reference/lexical_analysis.html#encoding-decla... All that this does is tell the interpreter how the source file is encoded, it does not affect default encodings

Re: __pycache__, one more good reason to stck with Python 2?

2011-01-20 Thread John Pinner
Hi You have disturbe my slumber, Steven ;-) On Jan 19, 2:42 pm, Steven D'Aprano wrote: > On Tue, 18 Jan 2011 00:58:14 -0800, jmfauth wrote: > > It is now practically impossible to launch a Python application via a > > .pyc file. > > When has that ever been possible? > > .pyc files are Python byt

Re: how to scrutch a dict()

2010-10-21 Thread John Pinner
On Oct 21, 5:40 am, Paul Rubin wrote: > Phlip writes: > > def _scrunch(**dict): > >     result = {} > > >     for key, value in dict.items(): > >         if value is not None:  result[key] = value > > >     return result > > > That says "throw away every item in a dict if the Value is None". > >

Re: System idle time under Linux

2010-09-30 Thread John Pinner
On Sep 29, 7:36 pm, Hugo Léveillé wrote: > Good point > > One I am looking for, is time since last user mouse or keyboard action. > So I guess I am looking for the exact same thing a screensaver is > looking for The command who -Hu). will give you idle time for each logged-in user ( H - print

Re: Python Macros's Not the Power in OOo they should be ?

2010-09-23 Thread John Pinner
On Sep 23, 10:12 am, Boris Borcic wrote: > Lawrence D'Oliveiro wrote: > > flebber wrote: > > >> Has anyone had much success with python macro's. Or developing powerful > >> macro's in an language? > > > I did an application for my own use recently, involving automatically > > generating invoices i

Re: Using String Methods In Jump Tables

2010-08-24 Thread John Pinner
On Aug 20, 12:27 am, Tim Daneliuk wrote: > Problem: > >   Given tuples in the form (key, string), use 'key' to determine >   what string method to apply to the string: > >     key           operation >     --- > >      l            lower() >      u            upper() >      t  

Re: deprecated string module issue

2010-06-26 Thread John Pinner
On Jun 25, 11:14 pm, Steven D'Aprano wrote: > On Fri, 25 Jun 2010 16:31:17 -0500, GrayShark wrote: > > Why the rudness Terry Jan Reedy? Get up on the wrong side of the bed? Or > > worse luck, no one on the other side to create a wrong side? > > I see only one person being rude here, and that's you

Re: Docstrings considered too complicated

2010-02-27 Thread John Pinner
On Feb 24, 8:23 pm, Andreas Waldenburger wrote: > Hi all, > > a company that works with my company writes a lot of of their code in > Python (lucky jerks). I've seen their code and it basically looks like > this: > > """Function that does stuff""" > def doStuff(): >     while not wise(up): >      

What happened to pyjamas?

2010-02-19 Thread John Pinner
It appears that, in trying to cut down spm, somone chahnged a DNS entry and screwed it up : it shouldbe back before long. John -- -- http://mail.python.org/mailman/listinfo/python-list

Re: [pyconuk] pyweek is happening august 02 - august 09

2007-08-05 Thread John Pinner
Hello All, On 04/08/07, Laura Creighton <[EMAIL PROTECTED]> wrote: > 00:00 UTC 2007-09-02 to 00:00 UTC 2007-09-09 exactly. See > www.pyweek.org > > PyconUK is happening. http://www.pyconuk.org/ 8th and 9th September. > > This means that those of us who generally do not see each other but are > g