Micropython?

2015-03-13 Thread Paul Rubin
http://www.micropython.org/ Has anyone used this? Know anything about it? I don't remember seeing any mention of it here. I remember there was a stripped down Python some years back that didn't work very well, but I think this is different. I just came across it by accident. Thanks. -- https

Re: generator/coroutine terminology

2015-03-13 Thread Steven D'Aprano
Marko Rauhamaa wrote: > Your 'factory' is a: > > generator > A function which returns an iterator. > https://docs.python.org/3/glossary.html> That glossary entry is misleading, or at least incomplete, and it fails to match the way "generator" is used by actual Python programmers.

Re: Code hosting providers

2015-03-13 Thread Rustom Mody
On Saturday, March 14, 2015 at 9:15:39 AM UTC+5:30, Paul Rubin wrote: > Mario Figueiredo writes: > >>Question: How much money is this group, taken as the whole of the python > >>world, spending on remote hosting per month? > > I'd wager very little, since most options are completely free. > > Oh

Re: Code hosting providers

2015-03-13 Thread Paul Rubin
Mario Figueiredo writes: >>Question: How much money is this group, taken as the whole of the python >>world, spending on remote hosting per month? > I'd wager very little, since most options are completely free. Oh come on, if you count all forms of hosting, some of us are spending a lot (megab

Re: Code hosting providers

2015-03-13 Thread Mario Figueiredo
On Fri, 13 Mar 2015 23:13:17 -0400, Gene Heskett wrote: > >> >> That's taking things too far. And when people speak of hosting your >> own server, they don't necessarily mean hosting in your home computer. >> Speaking for myself, I refuse to collaborate on any project that is >> hosted on some dud

Re: Code hosting providers

2015-03-13 Thread Gene Heskett
On Friday 13 March 2015 20:48:36 Mario Figueiredo wrote: > On Fri, 13 Mar 2015 19:38:09 -0400, Gene Heskett > > wrote: > >Running your own server is a piece of cake, and if I, at 80 yo, can > > do it, I don't see a single reason you can't do likewise. The code > > I write, for what is called a

Re: Odd ValueError using float

2015-03-13 Thread Chris Angelico
On Sat, Mar 14, 2015 at 1:33 PM, Paul Rubin wrote: > emile writes: >> *** NameError: name 'val' is not defined >> (Pdb) l >> 139 try: >> 140 val = round(float(decval),1) >> 141 except: >> 142 import pdb; pdb.set_trace() > > If 'float' or 'round' throw an ex

Re: Code hosting providers

2015-03-13 Thread Paul Rubin
Mario Figueiredo writes: > That's taking things too far. And when people speak of hosting your > own server, they don't necessarily mean hosting in your home computer. > Speaking for myself, I refuse to collaborate on any project that is > hosted on some dude's personal computer. Meh, you don't

Re: Odd ValueError using float

2015-03-13 Thread Paul Rubin
emile writes: > *** NameError: name 'val' is not defined > (Pdb) l > 139 try: > 140 val = round(float(decval),1) > 141 except: > 142 import pdb; pdb.set_trace() If 'float' or 'round' throw an exception, the assignment to 'val' never happens, so 'val' is und

Re: Python 2 to 3 conversion - embrace the pain

2015-03-13 Thread Chris Angelico
On Sat, Mar 14, 2015 at 10:14 AM, Ned Deily wrote: > In article , John Nagle > wrote: >>All the bugs I'm discussing reflect forced package >> changes or upgrades. None were voluntary on my part. > > You would have run into the SSL certificate issue if you upgraded your > Python 2 instance to

Re: The idle gui

2015-03-13 Thread Steven D'Aprano
sohcahto...@gmail.com wrote: > We need more information than just "It doesn't work". You wouldn't go to > a car mechanic and say "It makes a funny noise", would you? No. Actually, most likely yes.It's remarkably hard to describe noises, and often difficult to pin-point where they come from. My

Re: Code hosting providers

2015-03-13 Thread Mario Figueiredo
On Fri, 13 Mar 2015 19:38:09 -0400, Gene Heskett wrote: > >Running your own server is a piece of cake, and if I, at 80 yo, can do >it, I don't see a single reason you can't do likewise. The code I >write, for what is called a legacy computer, is just one of the things I >share at the link in

Re: regex help

2015-03-13 Thread Steven D'Aprano
Larry Martell wrote: > I need to remove all trailing zeros to the right of the decimal point, > but leave one zero if it's whole number. def strip_zero(s): if '.' not in s: return s s = s.rstrip('0') if s.endswith('.'): s += '0' return s And in use: py> strip_

Re: Pexpect idea - but can I handle curses?

2015-03-13 Thread Skip Montanaro
On Fri, Mar 13, 2015 at 5:47 PM, Christian Gollwitzer wrote: > Why? Do you not have a C compiler? Sure I do, and I'm not afraid to use it. I realize top is just one not-terribly-critical tool, but every divergence between my machines and the "standard" install just makes it that much more diffi

Re: Code hosting providers

2015-03-13 Thread Gene Heskett
On Friday 13 March 2015 17:13:41 Paul Rubin wrote: > Chris Angelico writes: > > In the meantime, I get zero-dollar hosting of my repos, including > > zip download and such ... You're welcome to shun them. There is > > definitely benefit to encouraging a multiplicity of hosting > > services. But

Re: Python 2 to 3 conversion - embrace the pain

2015-03-13 Thread Ned Deily
In article , John Nagle wrote: >All the bugs I'm discussing reflect forced package > changes or upgrades. None were voluntary on my part. You would have run into the SSL certificate issue if you upgraded your Python 2 instance to the current Python 2.7.9. -- Ned Deily, n...@acm.org --

Re: Python 2 to 3 conversion - embrace the pain

2015-03-13 Thread John Nagle
On 3/13/2015 3:27 PM, INADA Naoki wrote: > Hi, John. I'm maintainer of PyMySQL. > > I'm sorry about bug of PyMySQL. But the bug is completely unrelated > to Python 3. > You may encounter the bug on Python 2 too. True. But much of the pain of converting to Python 3 comes from having to switc

Re: Pexpect idea - but can I handle curses?

2015-03-13 Thread Christian Gollwitzer
Am 13.03.15 um 18:25 schrieb Skip Montanaro: > I understand that. Tell that to management though. They were working > on 13.1 for awhile, but seem to be focused on 13.2 now, though not all > our internal software works on that. > > I'll give up on hoping I get access to a more modern top anytime s

Re: Odd ValueError using float

2015-03-13 Thread emile
On 03/13/2015 03:14 PM, Chris Angelico wrote: On Sat, Mar 14, 2015 at 9:10 AM, emile wrote: (Pdb) decval '4' (Pdb) len(decval) 1 (Pdb) int(decval) *** ValueError: invalid literal for int() with base 10: '41.703' (Pdb) Any ideas? What's type(decval) tell you? I suspect you may ha

Re: regex help

2015-03-13 Thread Cameron Simpson
On 13Mar2015 12:05, Larry Martell wrote: I need to remove all trailing zeros to the right of the decimal point, but leave one zero if it's whole number. For example, if I have this: 14S,5.,4.5686274500,3.7272727272727271,3.3947368421052630,5.7307692307692308,5.75471698113207

Re: Python 2 to 3 conversion - embrace the pain

2015-03-13 Thread INADA Naoki
Hi, John. I'm maintainer of PyMySQL. I'm sorry about bug of PyMySQL. But the bug is completely unrelated to Python 3. You may encounter the bug on Python 2 too. I've already made mysqlclient, the fork of MySQLdb supporting Python 3. On Sat, Mar 14, 2015 at 6:08 AM, John Nagle wrote: > I'm

Re: Odd ValueError using float

2015-03-13 Thread Chris Angelico
On Sat, Mar 14, 2015 at 9:10 AM, emile wrote: > (Pdb) decval > '4' > (Pdb) len(decval) > 1 > (Pdb) int(decval) > *** ValueError: invalid literal for int() with base 10: '41.703' > (Pdb) > > > Any ideas? What's type(decval) tell you? I suspect you may have something other than a string

Re: The idle gui

2015-03-13 Thread Mark Lawrence
On 13/03/2015 20:58, lmzent...@gmail.com wrote: My python program was running for over six weeks. Then the idle gui stopped opening. I have reinstalled several times but it doesn't work. Any idea? Would you please read http://www.catb.org/esr/faqs/smart-questions.html and possibly http://ssc

Odd ValueError using float

2015-03-13 Thread emile
On an older WinXP SP2 box with python2.6 that's been running this process fine for years, this week we're seeing: > c:\python26\lib\site-packages\fenx\sql_interface.py(144)normalized() -> return val (Pdb) val *** NameError: name 'val' is not defined (Pdb) l 139 try: 140 val =

Re: The idle gui

2015-03-13 Thread sohcahtoa82
On Friday, March 13, 2015 at 1:58:44 PM UTC-7, lmze...@gmail.com wrote: > My python program was running for over six weeks. Then the idle gui stopped > opening. I have reinstalled several times but it doesn't work. Any idea? Not trying to be rude here, but do you really think we'll be able to hel

Re: Code hosting providers

2015-03-13 Thread Paul Rubin
Ben Finney writes: > Also worth watching is Kallithea, a new federated code hosting service ... > Good hunting in finding a free-software code hosting provider for your > projects! Should also put in a mention for Savannah (savannah.gnu.org for GNU projects and savannah.nongnu.org for non-GNU fre

Re: Code hosting providers

2015-03-13 Thread Paul Rubin
Chris Angelico writes: > In the meantime, I get zero-dollar hosting of my repos, including zip > download and such ... You're welcome to shun them. There is > definitely benefit to encouraging a multiplicity of hosting > services. But I'm not bothered by the GitHub non-free-ness, because I > take

Python 2 to 3 conversion - embrace the pain

2015-03-13 Thread John Nagle
I'm approaching the end of converting a large system from Python 2 to Python 3. Here's why you don't want to do this. The language changes aren't that bad, and they're known and documented. It's the package changes that are the problem. Discovering and fixing all the new bugs takes a while.

The idle gui

2015-03-13 Thread lmzentman
My python program was running for over six weeks. Then the idle gui stopped opening. I have reinstalled several times but it doesn't work. Any idea? -- https://mail.python.org/mailman/listinfo/python-list

Re: Google Code Shutting Down

2015-03-13 Thread Josh English
Thanks for the discussion. I found my original concern was supposedly about sourceforge. PyPi, according to a post over on pypubsub-dev that pip installs had anecdotal problems with sourcforge-hosted projects. I guess I wanted some more anecdotes and opinions before I tried moving anything. I

Re: regex help

2015-03-13 Thread Larry Martell
On Fri, Mar 13, 2015 at 1:29 PM, MRAB wrote: > On 2015-03-13 16:05, Larry Martell wrote: >> >> I need to remove all trailing zeros to the right of the decimal point, >> but leave one zero if it's whole number. For example, if I have this: >> >> >> 14S,5.,4.5686274500,3.72727272

Re: regex help

2015-03-13 Thread Tim Chase
On 2015-03-13 12:05, Larry Martell wrote: > I need to remove all trailing zeros to the right of the decimal > point, but leave one zero if it's whole number. > > But I can't figure out how to get the 5. to be 5.0. > I've been messing with the negative lookbehind, but I haven't fou

Re: regex help

2015-03-13 Thread MRAB
On 2015-03-13 16:05, Larry Martell wrote: I need to remove all trailing zeros to the right of the decimal point, but leave one zero if it's whole number. For example, if I have this: 14S,5.,4.5686274500,3.7272727272727271,3.3947368421052630,5.7307692307692308,5.75471698113207

Re: Pexpect idea - but can I handle curses?

2015-03-13 Thread Skip Montanaro
On Fri, Mar 13, 2015 at 12:03 PM, Thomas 'PointedEars' Lahn wrote: > “o” is not an option, it is an interaktive keystroke command in (my) top(1). "o" is also an unrecognized keystroke. > OpenSUSE 12.2 has reached its end-of-life on 2014-01-27. I understand that. Tell that to management though.

Re: regex help

2015-03-13 Thread Thomas 'PointedEars' Lahn
Larry Martell wrote: > I need to remove all trailing zeros to the right of the decimal point, > but leave one zero if it's whole number. For example, if I have this: > > 14S,5.,4.5686274500,3.7272727272727271,3.3947368421052630,5.7307692307692308,5.7547169811320753,4.94230769

Re: Pexpect idea - but can I handle curses?

2015-03-13 Thread Thomas 'PointedEars' Lahn
Skip Montanaro wrote: > Thomas 'PointedEars' Lahn […] wrote: >> Yes, it (top(1) from procps-ng 3.3.9) does. Either run >> >> top -u '!root' >> >> or type “o” (for case-insensitive filter), then e.g. “!USER=root” to show >> processes started by all users except “root”. RTFM. > > Neither works

Re: KB 2670838 - The EVIL UPDATE

2015-03-13 Thread David H. Lipman
From: "Skybuck Flying" KB 2670838 - The EVIL UPDATE < snip > GOODBYE, FAILURE TO DO SO PUTS YOUR SYSTEMS AT RISK ! Bye, Skybuck. I hope you like the taste of shoe leather. KB2670838 ==> 2013 ! It was not a part of the March '15 Patch tuesday release. -- Dave Multi-AV Scanning

Re: Pexpect idea - but can I handle curses?

2015-03-13 Thread Skip Montanaro
On Fri, Mar 13, 2015 at 10:54 AM, Thomas 'PointedEars' Lahn < pointede...@web.de> wrote: > Yes, it (top(1) from procps-ng 3.3.9) does. Either run > > top -u '!root' > > or type “o” (for case-insensitive filter), then e.g. “!USER=root” to show > processes started by all users except “root”. RTF

regex help

2015-03-13 Thread Larry Martell
I need to remove all trailing zeros to the right of the decimal point, but leave one zero if it's whole number. For example, if I have this: 14S,5.,4.5686274500,3.7272727272727271,3.3947368421052630,5.7307692307692308,5.7547169811320753,4.9423076923076925,5.7884615384615383,5.1

Re: Pexpect idea - but can I handle curses?

2015-03-13 Thread Thomas 'PointedEars' Lahn
Skip Montanaro wrote: > I have this tweak I'd like to make to the top command (Linux only is > fine). Most of the time I want to see just one user or all users. Every > now and again though, I'd like to see all users except another. Top > doesn't support this functionality, Yes, it (top(1) from

Pexpect idea - but can I handle curses?

2015-03-13 Thread Skip Montanaro
I have this tweak I'd like to make to the top command (Linux only is fine). Most of the time I want to see just one user or all users. Every now and again though, I'd like to see all users except another. Top doesn't support this functionality, but I thought something like "-u -root" would be a ha

Re: Django-DMARC making it easier to manage DMARC reports - Beta 0.1.3 on PyPI

2015-03-13 Thread Chris Angelico
On Mon, Mar 9, 2015 at 9:16 PM, Alan Hicks wrote: > With defending reputations as important as receiving email I'm pleased to > announce another beta of django-dmarc 0.1.3 is released to PyPI. > https://pypi.python.org/pypi/django-dmarc > > The Django DMARC project aims to help with implementing D

Re: Code hosting providers

2015-03-13 Thread Chris Angelico
On Fri, Mar 13, 2015 at 7:59 PM, Steven D'Aprano wrote: > If you had said, "Sometimes it's worth using a non-federated service, and > risking vendor lock-in, because the extra features they provide are just > that good" then I'd accept that. That makes sense. I don't like it, but > that's the busi

Re: generator/coroutine terminology

2015-03-13 Thread Chris Angelico
On Fri, Mar 13, 2015 at 8:12 PM, Rustom Mody wrote: > On Friday, March 13, 2015 at 1:53:50 PM UTC+5:30, Chris Angelico wrote: >> On Fri, Mar 13, 2015 at 4:28 PM, Rustom Mody wrote: >> > And even there I would expect generators to close with StopIteration >> > Whereas I would expect coroutines to

Re: Code hosting providers (was: Google Code Shutting Down)

2015-03-13 Thread Mario Figueiredo
On Fri, 13 Mar 2015 12:37:30 +1100, Ben Finney wrote: > >Any service which doesn't run their service on free software is one to >avoid http://mako.cc/writing/hill-free_tools.html>; free software >projects need free tools to remain that way. > > >GitLab https://about.gitlab.com/> is a good option:

Re: generator/coroutine terminology

2015-03-13 Thread Marko Rauhamaa
Rustom Mody : > Nice demo of the same confusing terminology we are talking about. Why don't you just stick with the terminology of the language specification? I think your students are going to be more confused if you try to come up with something better. > When I say "expect generators to close

Re: generator/coroutine terminology

2015-03-13 Thread Rustom Mody
On Friday, March 13, 2015 at 1:53:50 PM UTC+5:30, Chris Angelico wrote: > On Fri, Mar 13, 2015 at 4:28 PM, Rustom Mody wrote: > > And even there I would expect generators to close with StopIteration > > Whereas I would expect coroutines to close (on close method) with > > GeneratorExit > > [Ive n

Re: Code hosting providers

2015-03-13 Thread Steven D'Aprano
Chris Angelico wrote: > It's worth noting, by the way, that sometimes it's worth using a > non-federated service. I host most of my projects on GitHub, because > the git repo is the part that's most important to me. I don't heavily > use the bug tracker attached to any of those projects, nor the >

Re: Google Code Shutting Down

2015-03-13 Thread Steven D'Aprano
Ian Kelly wrote: > On Thu, Mar 12, 2015 at 4:26 PM, Josh English > wrote: >> I've been hosting Python projects on Google Code, and they're shutting >> down. >> >> Damn. >> >> What is the recommended replacement for Code Hosting that works reliably >> with PyPi and pip? > > Google has been migrat

Re: Python3 "pickle" vs. stdin/stdout - unable to get clean byte streams in Python 3

2015-03-13 Thread Steven D'Aprano
John Nagle wrote: >I'm starting to think that the "cpickle" module, which Python 3 > uses by default, has a problem. After the program has been > running for a while, I start seeing errors such as > > File "C:\projects\sitetruth\InfoSiteRating.py", line 200, in scansite > if len(self.ba

Re: Code hosting providers

2015-03-13 Thread Chris Angelico
On Fri, Mar 13, 2015 at 4:17 PM, Paul Rubin wrote: > Thanks for that informative post: I've been uncomfortable with the reach > of Github and you've done a good job explaining the reasons. > > I personally use self-hosted git repositories on cheap VPS servers which > is easy to do, but doesn't sup

Re: My emails are getting bounced?

2015-03-13 Thread Tim Golden
On 12/03/2015 22:03, Zachary Ware wrote: > On Thu, Mar 12, 2015 at 4:56 PM, Ryan Gonzalez wrote: >> I'm posting this here because I have no clue who the heck the mailing list >> manager is. >> >> I got this message: >> >> Your membership in the mailing list Python-ideas has been disabled due >> to

Re: generator/coroutine terminology

2015-03-13 Thread Chris Angelico
On Fri, Mar 13, 2015 at 4:28 PM, Rustom Mody wrote: > And even there I would expect generators to close with StopIteration > Whereas I would expect coroutines to close (on close method) with > GeneratorExit > [Ive not thought all this through properly so may be off the mark] I expect both of the

Re: My emails are getting bounced?

2015-03-13 Thread Zachary Ware
On Thu, Mar 12, 2015 at 4:56 PM, Ryan Gonzalez wrote: > I'm posting this here because I have no clue who the heck the mailing list > manager is. > > I got this message: > > Your membership in the mailing list Python-ideas has been disabled due > to excessive bounces The last bounce received from y