Re: Proposed new syntax

2017-08-12 Thread Glenn Linderman
On 8/12/2017 9:12 AM, MRAB wrote: On 2017-08-12 09:54, Marko Rauhamaa wrote: Jussi Piitulainen : Rustom Mody writes: [ My conjecture: The word ‘comprehension’ used this way in English is meaningless and is probably an infelicious translation of something which makes sense in German] From a

Re: Python 3.4.7 binaries for windows?

2017-08-10 Thread Glenn Linderman
On 8/9/2017 11:48 PM, Nagy László Zsolt wrote: Hi! On the official python site, it is possible to download python 3.4.4 here: https://www.python.org/downloads/release/python-344/ There are binary installation files for Windows. But Python 3.4.4 is two years old. There is 3.4.7 that was just re

Re: cgiapp versus apache & nginx+fcgiwrap

2017-08-02 Thread Glenn Linderman
On 8/2/2017 1:13 AM, Robin Becker wrote: we always seem to get keys in K even if it is an empty list. Can you treat None and empty list the same? Looking at the envirnment that the cgi script sees I cannot see anything obvious except the expected differences for the two frontend servers.

Re: how to sort a list of tuples with custom function

2017-08-01 Thread Glenn Linderman
On 8/1/2017 2:10 PM, Piet van Oostrum wrote: Ho Yeung Lee writes: def isneighborlocation(lo1, lo2): if abs(lo1[0] - lo2[0]) < 7 and abs(lo1[1] - lo2[1]) < 7: return 1 elif abs(lo1[0] - lo2[0]) == 1 and lo1[1] == lo2[1]: return 1 elif abs(lo1[1] - lo2[1]) == 1

Reading the Windows Location API

2016-10-01 Thread Glenn Linderman
I found some GeoLocation stuff on PyPi, but it seems to be focused on turning an IP address into a (rough) location rather than reading a GPS. Seems like if a GPS is attached, reading it would be the best way to obtain a more accurate location, falling back to approximations if there is no GPS.

Re: EOFError: marshal data too short -- causes?

2016-01-08 Thread Glenn Linderman
On 1/7/2016 7:44 PM, Dennis Lee Bieber wrote: On Thu, 7 Jan 2016 10:55:38 -0800, Glenn Linderman declaimed the following: But all the touched files are .pyc files (and the directories __pycache__ directories). None of the source files were modified. So why would any .pyc files ever be

Re: EOFError: marshal data too short -- causes?

2015-12-30 Thread Glenn Linderman
On 12/29/2015 1:00 PM, Terry Reedy wrote: I updated to 2.7.11, 3.4.4, and 3.5.1 a couple of weeks ago, so the timestamps are all fresh. So I don't know what happened with 3.4.3 timestamps from last April and whether Windows itself touches the files. I just tried importing a few and Python did

Re: EOFError: marshal data too short -- causes?

2015-12-30 Thread Glenn Linderman
On 12/29/2015 5:56 AM, D'Arcy J.M. Cain wrote: On Tue, 29 Dec 2015 00:01:00 -0800 Glenn Linderman wrote: OK, so I actually renamed it instead of zapping it. Them, actually, Really, just zap them. They are object code. Even if you zap a perfectly good .pyc file a perfectly good one wi

Re: EOFError: marshal data too short -- causes?

2015-12-29 Thread Glenn Linderman
On 12/28/2015 11:19 PM, Terry Reedy wrote: On 12/29/2015 1:50 AM, Glenn Linderman wrote: Here's a sanatized stack trace off my web server: File ".../cgihelpers.py", line 10, in import cgitb File ".../py34/lib/python3.4/cgitb.py", line 24, in import insp

EOFError: marshal data too short -- causes?

2015-12-28 Thread Glenn Linderman
Here's a sanatized stack trace off my web server: File ".../cgihelpers.py", line 10, in import cgitb File ".../py34/lib/python3.4/cgitb.py", line 24, in import inspect File ".../py34/lib/python3.4/inspect.py", line 54, in from dis import COMPILER_FLAG_NAMES as _flag_names File

msvcr100.dll missing ... error started after Windows 10 update to 10586.17

2015-12-04 Thread Glenn Linderman
My wife's 64-bit Win8 home machine has 32-bit Python 3.3 installed. Then it upgraded to Win 8.1. Then I upgraded it to Win 10. Then I upgraded it to Threshold 2. It gets regular automatic updates also, like the one last night to build 10586.17. That's the history. When she tried a python scr

Launcher, and ftype Python.File

2015-11-18 Thread Glenn Linderman
Setting up a new machine with Windows 10, I installed Python 3.5.0 and the Launcher. Invoking python files from batch files as foo.py -a -bunch -of -parameters Didn't seem to do _anything_ so I checked: d:\>assoc .py .py=Python.File d:\>ftype Python.File Python.File="C:\Windows\py.exe" "%L" %

Re: cmd.exe on WIndows - problem with displaying some Unicode characters

2014-08-04 Thread Glenn Linderman
On 8/4/2014 3:24 AM, Wolfgang Maier wrote: On 08/04/2014 11:53 AM, Glenn Linderman wrote: I've never used the API from Python but random console access is documented at http://msdn.microsoft.com/en-us/library/windows/desktop/ms687404%28v=vs.85%29.aspx Would using the API from P

Re: cmd.exe on WIndows - problem with displaying some Unicode characters

2014-08-04 Thread Glenn Linderman
On 8/4/2014 3:33 AM, Andrew Berg wrote: If you want to save your users the hassle, I would definitely recommend a graphical environment. If I had realized that you intended your application to be widely deployed, I would have simply recommended that from the start. Graphical environments are go

Re: cmd.exe on WIndows - problem with displaying some Unicode characters

2014-08-04 Thread Glenn Linderman
On 8/4/2014 1:39 AM, Terry Reedy wrote: On 8/3/2014 6:52 PM, Wiktor wrote: Hi, as OO programming exercise, I'm trying to port to Python one of my favorite game from early'90 (Atari 65XL/XE) - Kolony (here's video from original version on C64 https://www.youtube.com/watch?v=UFycYOp2cbE, and h

Re: cmd.exe on WIndows - problem with displaying some Unicode characters

2014-08-04 Thread Glenn Linderman
On 8/3/2014 10:06 PM, Andrew Berg wrote: On 2014.08.03 23:14, Glenn Linderman wrote: Having read a bit about ConEmu, it seems that it is a "pretty face" built on top of Windows Console, by screen scraping the real (but hidden) Windows Console, and providing a number of interesti

Re: cmd.exe on WIndows - problem with displaying some Unicode characters

2014-08-03 Thread Glenn Linderman
On 8/3/2014 5:17 PM, Glenn Linderman wrote: On 8/3/2014 4:25 PM, Andrew Berg wrote: On 2014.08.03 18:08, Chris Angelico wrote: The best way to do it is to use the Unicode codepage, but cmd.exe just plain has issues. There are underlying Windows APIs for displaying text that have problems with

Re: cmd.exe on WIndows - problem with displaying some Unicode characters

2014-08-03 Thread Glenn Linderman
On 8/3/2014 4:25 PM, Andrew Berg wrote: On 2014.08.03 18:08, Chris Angelico wrote: The best way to do it is to use the Unicode codepage, but cmd.exe just plain has issues. There are underlying Windows APIs for displaying text that have problems with astral characters (I think that's what it is),

Re: Python 3 is killing Python

2014-08-01 Thread Glenn Linderman
On 7/16/2014 7:27 AM, Frank Millman wrote: I just tried an experiment in my own project. Ned Batchelder, in his Pragmatic Unicode presentation, http://nedbatchelder.com/text/unipain.html, suggests that you always have some unicode characters in your data, just to ensure that they are handled corr

Re: Exploring Python for next desktop GUI Project

2014-07-24 Thread Glenn Linderman
On 7/24/2014 11:15 AM, Chris Angelico wrote: On Fri, Jul 25, 2014 at 4:04 AM, Mark Lawrence wrote: On 24/07/2014 17:18, Chris Angelico wrote: The first one is certainly possible. Pick any of the well-known toolkits (Tkinter, wxwidgets, GTK, etc), and see how it feels. All of them are portable

Re: [ANN] regobj - Pythonic object-based access to the Windows Registry

2009-05-04 Thread Glenn Linderman
On approximately 5/3/2009 7:35 AM, came the following characters from the keyboard of Ryan Kelly: Hi All, I've just released the results of a nice Sunday's coding, inspired by one too many turns at futzing around with the _winreg module. The "regobj" module brings a convenient and clean objec

Re: Tutorial on working with Excel files in Python (without COM and cross platform!) at PyConUS 2009

2009-01-31 Thread Glenn Linderman
On approximately 1/27/2009 5:19 PM, came the following characters from the keyboard of Chris Withers: Hi All, Too many people in the Python community think the only way to work with Excel files in Python is using COM on Windows. To try and correct this, I'm giving a tutorial at this year's PyCo

errno 22 instead of errno 2

2009-01-27 Thread Glenn Linderman
open("c:\abc","rb") This simple one-line script, produces errno 22 on Python 2.6, but errno 2 on Python 2.5.2 Is this an unintentional regression? Or is this an intentional bug fix? The file doesn't exist (errno 2) but I guess on Windows it is also somewhat an invalid file name (errno 22).

Re: length of a tuple or a list containing only one element

2009-01-07 Thread Glenn Linderman
On approximately 11/3/2008 11:55 AM, came the following characters from the keyboard of Tim Chase: For making a literal tuple, parentheses are irrelevant; only the commas matter: I don't think I'd go so far as to say that the parentheses around tuples are *irrelevant*...maybe just relevant in se

Re: Multiple Versions of Python on Windows XP

2008-12-04 Thread Glenn Linderman
On approximately 12/4/2008 5:29 AM, came the following characters from the keyboard of Colin J. Williams: Glenn Linderman wrote: The equivalent of those commands is available via Windows Explorer, Tools / Folder Options, File Types, scroll-scroll-scroll your way to .py, Click Advanced

Re: Multiple Versions of Python on Windows XP

2008-12-03 Thread Glenn Linderman
On approximately 12/3/2008 8:51 AM, came the following characters from the keyboard of Colin J. Williams: Martin v. Löwis wrote: What changes are made to the registry? For a complete list, see Tools/msi/msi.py in the source tree. I have scanned the file: http://svn.python.org/projects/python/

Re: Simple ini Config parser examples needed

2008-12-02 Thread Glenn Linderman
On approximately 12/2/2008 3:22 PM, came the following characters from the keyboard of Chris Rebert: On Tue, Dec 2, 2008 at 2:51 PM, Glenn Linderman <[EMAIL PROTECTED]> wrote: On approximately 12/2/2008 1:31 PM, came the following characters from the keyboard of Chris Rebert:

Re: Simple ini Config parser examples needed

2008-12-02 Thread Glenn Linderman
On approximately 12/2/2008 1:31 PM, came the following characters from the keyboard of Chris Rebert: On Tue, Dec 2, 2008 at 1:18 PM, RON BRENNAN <[EMAIL PROTECTED]> wrote: Hello, I have a very simple ini file that I needs parsed. What is the best way I can parse an ini file that doesn't inc

Re: Multiple Versions of Python on Windows XP

2008-12-02 Thread Glenn Linderman
On approximately 12/1/2008 11:29 PM, came the following characters from the keyboard of Martin v. Löwis: It would be nice if the ftypes were version specific as created by the installer; IIRC, I created the above three from the ftype Python.File as I installed each version. That's a good i

Re: Multiple Versions of Python on Windows XP

2008-12-01 Thread Glenn Linderman
On approximately 12/1/2008 11:05 PM, came the following characters from the keyboard of Martin v. Löwis: Is there some way to specify a default version in such a way that it can be changed as necessary? What do you mean by "default version"? There is the version that is associated with th

Re: what's so difficult about namespace?

2008-11-25 Thread Glenn Linderman
On approximately 11/25/2008 11:01 PM, came the following characters from the keyboard of Gene: On Nov 26, 1:29 am, Xah Lee <[EMAIL PROTECTED]> wrote: comp.lang.lisp,comp.lang.functional,comp.lang.perl.misc,comp.lang.python,co­mp.lang.java.programmer 2008-11-25 Recently, Steve Yegge implemen

Re: Installing python 2.6 on Vista

2008-11-23 Thread Glenn Linderman
On approximately 11/23/2008 9:17 PM, came the following characters from the keyboard of GALLOWAY Stuart J (SVHM): I would strongly recommend that an official PORTABLE python for windows should be a standard distribution so we can bypass all the windows rubbish if we want to. Sorry about th

Re: Installing python 2.6 on Vista

2008-11-23 Thread Glenn Linderman
On approximately 11/23/2008 9:17 PM, came the following characters from the keyboard of GALLOWAY Stuart J (SVHM): I accept that this may be essentially a VISTA problem. So, upgrade to XP, until Microsoft fixes Vista! I've got 3 versions of Python running here on XP! No problems installing!

CherryPy vs Bluehost

2008-11-23 Thread Glenn Linderman
So, I'm locked into a Bluehost contract for a couple years. Was using Perl when I signed up. Only took a few hours to get my site moved from my previous host, also cPanel based... a few tweaks and it was running. They seem to be OK, but their help forums are pretty sparse... no references to

Re: how to detect if a dictionary has been modified ?

2008-11-23 Thread Glenn Linderman
On approximately 11/23/2008 9:50 AM, came the following characters from the keyboard of Arnaud Delobelle: Glenn Linderman <[EMAIL PROTECTED]> writes: On approximately 11/23/2008 1:40 AM, came the following characters from the keyboard of Steven D'Aprano: On Sun, 23 Nov 20

Re: how to detect if a dictionary has been modified ?

2008-11-23 Thread Glenn Linderman
On approximately 11/23/2008 1:40 AM, came the following characters from the keyboard of Steven D'Aprano: On Sun, 23 Nov 2008 01:18:17 -0800, bearophileHUGS wrote Stef Mientki: I would like to detect if a dictionary has been changed. So I would like to have a modified-flag. A soluti

Re: Snippets management

2008-11-05 Thread Glenn Linderman
On approximately 11/5/2008 8:23 PM, came the following characters from the keyboard of r: I don't use one, but why not take a stab at coding one yourself. Use Tkinter to start, its easy. well documented gotta learn GUI somehow Since you are recommending tkinter, maybe you know what is the stat

Re: push-style templating - an xml-like way to process xhtml

2008-11-05 Thread Glenn Linderman
On approximately 11/3/2008 2:51 PM, came the following characters from the keyboard of has: On 3 Nov 2008, at 18:18, Glenn Linderman wrote: On approximately 11/3/2008 12:20 AM, came the following characters from the keyboard of has: On 2 Nov, 14:06, Tino Wildenhain <[EMAIL PROTEC

Re: What's your choice when handle complicated C structures.

2008-11-05 Thread Glenn Linderman
On approximately 11/4/2008 5:31 PM, came the following characters from the keyboard of Marc 'BlackJack' Rintsch: On Tue, 04 Nov 2008 16:52:17 -0800, 一首诗 wrote: Now I'm using the upack function of 'struct' module, but it's really annoying to write fmt strings for complicated structures. What

Re: Structures

2008-11-03 Thread Glenn Linderman
On approximately 11/3/2008 5:28 PM, came the following characters from the keyboard of Aaron Brady: On Nov 3, 5:38 pm, "Paulo J. Matos" <[EMAIL PROTECTED]> wrote: On Mon, Nov 3, 2008 at 10:19 PM, Aaron Brady <[EMAIL PROTECTED]> wrote: On Nov 3, 3:45 pm, Ben Finney <[EMAIL PROTECTED]> wr

Re: Structures

2008-11-03 Thread Glenn Linderman
On approximately 11/3/2008 3:38 PM, came the following characters from the keyboard of Paulo J. Matos: On Mon, Nov 3, 2008 at 10:19 PM, Aaron Brady <[EMAIL PROTECTED]> wrote: On Nov 3, 3:45 pm, Ben Finney <[EMAIL PROTECTED]> wrote: "Paulo J. Matos" <[EMAIL PROTECTED]> writes: O

Re: push-style templating - an xml-like way to process xhtml

2008-11-03 Thread Glenn Linderman
On approximately 11/3/2008 12:20 AM, came the following characters from the keyboard of has: On 2 Nov, 14:06, Tino Wildenhain <[EMAIL PROTECTED]> wrote: An opposite approach to this form of dynamic HTML production is called push-style templating, as coined by Terence Parr: Hm. "$att

Re: Windows DOS box redirection

2008-10-31 Thread Glenn Linderman
On approximately 10/31/2008 9:22 PM, came the following characters from the keyboard of Dennis Lee Bieber: On Fri, 31 Oct 2008 12:14:36 -0700, Glenn Linderman <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: A little bit ago, I wrote: Creating the registry s

Re: Windows DOS box redirection

2008-10-31 Thread Glenn Linderman
A little bit ago, I wrote: Creating the registry setting mentioned in this kb article didn't (immediately) solve the problem. Next time I reboot, I'll try to remember to test this again. It occurred to me to create a new CMD Prompt (yes, it is not a "DOS box" in these versions of Windows) a

Re: Windows DOS box redirection

2008-10-31 Thread Glenn Linderman
On approximately 10/31/2008 5:06 AM, came the following characters from the keyboard of Bill McClain: On 2008-10-31, Glenn Linderman <[EMAIL PROTECTED]> wrote: The problem with stdin/stdout is on Windows 2000 (and maybe the earlier NT?). But not on XP or AFAIK Vista. It only

Re: Code not work - DESPERATE HELP :(

2008-10-30 Thread Glenn Linderman
On approximately 10/30/2008 2:13 PM, came the following characters from the keyboard of Bill McClain: On 2008-10-30, fx5900 <[EMAIL PROTECTED]> wrote: I just went to go and get a coffee when i noticed a email, thought it was just usual spam. Read your message, and it worked. it was becaus

Re: 2.6, 3.0, and truly independent intepreters

2008-10-30 Thread Glenn Linderman
On approximately 10/30/2008 6:26 AM, came the following characters from the keyboard of Jesse Noller: On Wed, Oct 29, 2008 at 8:05 PM, Glenn Linderman <[EMAIL PROTECTED]> wrote: On approximately 10/29/2008 3:45 PM, came the following characters from the keyboard of Patrick Stinson:

Re: 2.6, 3.0, and truly independent intepreters

2008-10-24 Thread Glenn Linderman
On approximately 10/24/2008 1:09 PM, came the following characters from the keyboard of Rhamphoryncus: On Oct 24, 1:02 pm, Glenn Linderman <[EMAIL PROTECTED]> wrote: On approximately 10/24/2008 8:42 AM, came the following characters from the keyboard of Andy O'Meara: Glenn,