Re: [Python-ideas] Looking for people interested in a Python register virtual machine project

2021-03-23 Thread Skip Montanaro
odes" with 35% of register-register move > > > instructions? If not, why it would be different and how would you > > > achieve that? > > > > I have clearly not explained myself very well in the "PEP". > > Well, it seems to be written with an idea that a

Re: Code Formatter Questions

2021-03-28 Thread Skip Montanaro
od enough that I wouldn't use a batch formatter to conform to some other conventions, then wind up having a mixed set of conventions after my next edit. I presume vim and all IDEs worth their salt also do a suitable job of formatting code on-the-fly. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: About \033[m

2021-04-04 Thread Skip Montanaro
this, but I think it will work as you expect.) Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Proposal: Disconnect comp.lang.python from python-list

2021-05-06 Thread Skip Montanaro
[email protected]. Posts gated from comp.lang.python to the mailing list only get passed through SpamBayes. All other elements of the tool chain occur ahead of the gateway. If we are using two different definitions of "moderation" I think it is important to be clear what we mean. Skip -- http

Re: Proposal: Disconnect comp.lang.python from python-list

2021-05-06 Thread Skip Montanaro
tween Usenet and mail. It's worth considering for people thinking about whether or not to disconnect the two. (I have no opinion on that subject. Clearly others do.) Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Proposal: Disconnect comp.lang.python from python-list

2021-05-06 Thread Skip Montanaro
to Mailman 3. I'm sure Mark Sapiro and other Mailman maintainers would like to keep moving away from Mailman 2. If the gateway (easier anonymity) and Mailman 3 (maybe better list archives) are of interest to you, you might check in with the Mailman dev list and see what would be involved in portin

Re: Bloody rubbish

2021-05-06 Thread Skip Montanaro
y, we didn't use an assembler either. We just wrote raw opcodes and their arguments on paper. This was in the late 70s.) Skip > -- https://mail.python.org/mailman/listinfo/python-list

Re: imaplib: is this really so unwieldy?

2021-05-25 Thread Skip Montanaro
. Once I made the switch, things came together pretty quickly, due in large part, I think, to its more sane API. YMMV, but you're more than welcome to steal code from Polly. Skip -- https://mail.python.org/mailman/listinfo/python-list

Track 3.9 instead of 3.10?

2021-07-27 Thread Skip Montanaro
sarily minimize conflicts. Is there some way to do this totally within the git infrastructure? Thx, Skip -- https://mail.python.org/mailman/listinfo/python-list

Package conflicts trying to install jpegdupes package

2021-09-27 Thread Skip Montanaro
nly. So, I'm kind of stuck. Maybe I need to install Python 3.3 and try that? Any other ideas? Thx, Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Package conflicts trying to install jpegdupes package

2021-09-27 Thread Skip Montanaro
I've got a straightforward dedupe program, but need something which can compare just the data chunk of JPEGs, ignoring the metadata. This program apparently does that. Is like to avoid reinventing that wheel. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Package conflicts trying to install jpegdupes package

2021-09-27 Thread Skip Montanaro
ror/warning messages, but colorizing might have been suppressed by stderr being fed into a pipe, or by distutils tossing it out. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Package conflicts trying to install jpegdupes package

2021-09-27 Thread Skip Montanaro
Woo hoo! It's installed. The ultimate error was a missing turbojpeg.h file. Thank goodness for the apt-file command. I was able to track that down to the libturbojpeg0-dev package, install that, and after a bit more fussing around now have jpegdupes installed. Thanks for the help, Skip --

Proliferation of Python packaging formats

2021-11-17 Thread Skip Montanaro
Is the proliferation of packaging formats in Python as nutzo as this author believes? https://drewdevault.com/2021/11/16/Python-stop-screwing-distros-over.html Asking because I've never been in the business of releasing "retail" Python applications or packages. Skip -- https://

Re: Sad news: Fredrik Lundh ("Effbot") has passed away

2021-12-12 Thread Skip Montanaro
rs to be the last usable version: https://web.archive.org/web/2020145627/http://effbot.org/ Probably worth a bookmark in your browser. Rest easy /F ... Skip -- https://mail.python.org/mailman/listinfo/python-list

email.message_from_file & quoted printable

2021-12-23 Thread Skip Montanaro
e Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- Am I expecting too much from the email package when munching on crufty 20+yo archived email messages? Thx, Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: email.message_from_file & quoted printable

2021-12-23 Thread Skip Montanaro
> > From the docs: > > get_payload(i=None, decode=False) ... Try decode=True. :dopeslap: Thanks. Never been all that consistent reading documentation. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: email.message_from_file & quoted printable

2021-12-24 Thread Skip Montanaro
Cameron> Try decode=True. Skip> :dopeslap: Thanks. Never been all that consistent reading documentation. The more I think about it, the more I think maybe my lack of documentation reading wasn't all that unreasonable. The content transfer encoding and charset are properties of the m

Re: email.message_from_file & quoted printable

2021-12-25 Thread Skip Montanaro
x27;t occur to me the transformation would occur on the way out. I think another way I might have saved myself was if I was using a modern IDE where I might have gotten some hints hovering over the method call. But, I'm an End user. I'm sure there is some add-on package I could install, but

Gunicorn - HTTP and HTTPS in the same instance?

2022-01-07 Thread Skip Montanaro
s on SSL/TLS chit chat over port 80, not just port 443 (which seems to work okay). Is there some magic incantation to get it to just talk HTTP on port 80, or will I need to spin up two instances? (The non-root config works fine - plain old HTTP over port 8080.) Thx, Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Gunicorn - HTTP and HTTPS in the same instance?

2022-01-08 Thread Skip Montanaro
guess if it has to be, then it has to be. Skip -- https://mail.python.org/mailman/listinfo/python-list

asyncio+tkinter

2022-03-21 Thread Skip Montanaro
a few solutions out in the wild, but this seems like something which might best be addressed in either the asyncio or tkinter documentation, or better yet, implemented in one or the other. Skip Montanaro -- https://mail.python.org/mailman/listinfo/python-list

Re: How to detect an undefined method?

2022-03-27 Thread Skip Montanaro
y examine the rest of your (untested) code to find calls to missing functions or methods. Skip > -- https://mail.python.org/mailman/listinfo/python-list

Set tkinter top-level window to "always on visible workspace"

2022-03-27 Thread Skip Montanaro
d any examples in the library doc or on the wider net which demonstrate control of this particular window manager interaction. (I don't care about Windows or Mac, at least for the time being.) Thx, Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Set tkinter top-level window to "always on visible workspace"

2022-03-27 Thread Skip Montanaro
> So you might tell your window manager to keep that window on the main workspace. Thanks. I'd forgotten about the possibility of doing this sort of thing in the window manager config. That would certainly be fine in this case. (It's been ages since I messed with this sort of

Re: Set tkinter top-level window to "always on visible workspace"

2022-03-28 Thread Skip Montanaro
recall what window manager(s) I used at the time (probably twm or fvwm). Now I use fvwm4 and can't find squat online about configuration files. I do have a ~/.config/xfce4/xfwm4/ directory, but it is completely empty. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Set tkinter top-level window to "always on visible workspace"

2022-03-28 Thread Skip Montanaro
4-linux-gnu/xfce4/xfconf/xfconfd ... I kind of assume xfce4 is the session manager sort of thing, while xfwm4 is the actual window manager. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Set tkinter top-level window to "always on visible workspace"

2022-03-28 Thread Skip Montanaro
g to get the outermost window (not sure what's going on), but I will keep messing around. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Set tkinter top-level window to "always on visible workspace"

2022-03-29 Thread Skip Montanaro
t; as the target window did the trick. Thanks, Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: asyncio+tkinter

2022-03-31 Thread Skip Montanaro
r mouse/kbd watching So, Tk+asyncio turns out to be fairly easy to do, at least for simple stuff. Skip -- https://mail.python.org/mailman/listinfo/python-list

Converting PyMember_Get usage to PyMember_GetOne - no docs?

2016-10-01 Thread Skip Montanaro
e. In Python 3, PyMember_Get() is gone. This is all well and good, but I can't find documentation for either function, or seemingly examples of code which converted from one to the other. Any pointers? Thx, Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Lawrence D'Oliveiro

2016-10-02 Thread Skip Montanaro
s filter. I'm sure I have a few more of these messages held. I will continue to train on these messages to try and get it to suppress them better. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Lawrence D'Oliveiro

2016-10-02 Thread Skip Montanaro
If you have one or more of these messages saved, please forward it along to me (in its entirety, headers and all). Attaching it as a compressed tar file will help sneak it past other spam filters. Thanks, Skip On Sun, Oct 2, 2016 at 8:00 AM, Skip Montanaro wrote: > > On Sun, Oct 2, 201

Re: Italian libel spam

2016-10-02 Thread Skip Montanaro
http://www.spambayes.org/ You might find the Background link particularly interesting. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: print to previous line in console

2016-10-03 Thread Skip Montanaro
> When we are printing to the console, is there a way to display to the > previous line in the console. Check out the curses module: https://docs.python.org/3.6/library/curses.html Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: print to previous line in console

2016-10-03 Thread Skip Montanaro
On Mon, Oct 3, 2016 at 10:23 AM, udhay prakash pethakamsetty wrote: > Hi skip, > > I am unable to even install that curses package > > > C:\>pip install curses > Collecting curses > Could not find a version that satisfies the requirement curses (from > versions

repr/str diff between Python 2 and 3

2016-10-11 Thread Skip Montanaro
tion of plenty of other changes, but not this particular one. Thx, Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: repr/str diff between Python 2 and 3

2016-10-11 Thread Skip Montanaro
> https://docs.python.org/3/whatsnew/3.1.html > > It's the third hit when searching for 'float'. Assuming I understand what it's saying. ;) Thanks. Is that the "David Gay's algorithm"? That seems to apply only to repr(), while the cha

Re: repr/str diff between Python 2 and 3

2016-10-11 Thread Skip Montanaro
but I would prefer not to if I can avoid it. I could also propose a change to the writerow method, but - even if accepted - it wouldn't change earlier 3.x behavior. Skip > -- > \ “[Entrenched media corporations will] maintain the status quo, | > `\ or die trying. Eithe

Re: repr/str diff between Python 2 and 3

2016-10-12 Thread Skip Montanaro
Thanks everyone. I'm not going to try to be too cute, and will just change my test case. I'm leaving Python 2 behind in this particular case for now anyway. I can always return to the issue if I decide I need Python 2.7 support at some point in the future. Skip -- https://mail.python.o

Re: Without compilation, how to find bugs?

2016-10-13 Thread Skip Montanaro
/pep-0484/ http://mypy-lang.org/ https://github.com/python/typeshed Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Without compilation, how to find bugs?

2016-10-13 Thread Skip Montanaro
s of error detection and reporting with the compiler, there is no particular reason it must be there. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Namespace for timeit

2016-10-14 Thread Skip Montanaro
ith globals=locals() in your case. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: New to python

2016-10-17 Thread Skip Montanaro
ombing the entire list. Skip -- https://mail.python.org/mailman/listinfo/python-list

Lua tutorial help for Python programmer?

2016-11-07 Thread Skip Montanaro
", "c": "hello"} Skimming the Lua reference manual, I didn't see anything like dict() and zip(). I suspect I'm thinking like a Python programmer when I shouldn't be. Is there a Lua idiom which tackles this problem in a straightforward manner, short of a num

Re: Lua tutorial help for Python programmer?

2016-11-08 Thread Skip Montanaro
was interested in Lua from a Python perspective. I know that I see people bring incorrect (suboptimal?) idioms from other languages when starting with Python. I was hoping that some Python people who have a foot in the Lua world could help me avoid that mistake. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: is modulefinder.ModuleFinder working at all?

2016-11-09 Thread Skip Montanaro
-m modulefinder -m /path/to/os.py This is from Python 2.7, YMMV slightly in Py3. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Python rules!

2016-11-09 Thread Skip Montanaro
> Too bad that the indentation is still not actually significant. One little > undetectable mistake with the braces and the meaning of the code is totally > changed. Maybe an Emacs mode which can toggle between "Java view/mode" (normal) and "Python view/mode" (Rustom's Twitter example) would be us

Re: Python rules!

2016-11-09 Thread Skip Montanaro
On Wed, Nov 9, 2016 at 7:53 PM, Chris Angelico wrote: > It's called Jython. :) Well, sure, but that didn't look enough like Python, so no chance that I would mistake it for Jython. I suspect that whoever worked out that arrangement of semicolons and braces had some help from her

Re: Python rules!

2016-11-10 Thread Skip Montanaro
Alister> i think whoever did that WAS a tool Perhaps, but maybe she is a Python programmer forced to write Java (not Jython). If so, props to her for making the best of a bad situation. :-) Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Numpy slow at vector cross product?

2016-11-21 Thread Skip Montanaro
ith shapes (1,2) (5,) Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Numpy slow at vector cross product?

2016-11-22 Thread Skip Montanaro
n't pass all of numpy's cross product unit tests. Fix that and submit a patch to the numpy maintainers. I suspect it would be accepted. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: python 2.7.12 on Linux behaving differently than on Windows

2016-12-05 Thread Skip Montanaro
g monitor, I can attest to the relatively large number of questions received there asking about removing Python "because I don't use it for anything." :-) This started happening about the time the long defunct Compaq started to write admin tools for Windows in Python. Skip -- https://mail.python.org/mailman/listinfo/python-list

"Best" websocket implementation for Python 2.x?

2016-12-07 Thread Skip Montanaro
ns as to which version is "best?" I leave it to you to decide what "best" means to you. Having never used websockets before, I'm not sure what criteria to use. Thx, Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: "Best" websocket implementation for Python 2.x?

2016-12-07 Thread Skip Montanaro
PyPI came back. A bit more sleuthing suggests that the websocket-client package on PyPI is Ohtani's package, and is more up-to-date than the copyright notices would suggest. The package was updated a few days ago on GitHub. Taking the path of least resistance (no changes necessary to the code), I

Re: python 2.7.12 on Linux behaving differently than on Windows

2016-12-07 Thread Skip Montanaro
or networked file systems. Those were the good old days. :-) Some things are better just left alone. File globbing is probably one of those things. There's no right answer, and the people in the two camps will never come to a compromise. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Get min and max dates

2016-12-08 Thread Skip Montanaro
anipulation and date arithmetic. It's a *whole lot better*. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: MacOSX SpeechRecognition installation problems

2016-12-08 Thread Skip Montanaro
Sorry, I haven't been following this thread carefully. Michael's use of "sudo" caught my eye though. I know virtualenv might be "special", but shouldn't this work? pip install --user virtualenv It will wind up in $HOME/.local/lib/python2.7/site-packages (or sim

Re: CLP stats: last 500 posts

2016-12-10 Thread Skip Montanaro
ince then, and no messages on the postmaster list discussing them. I just skimmed the archives for November and December but saw no examples. Generally, when Ralf or Mark delete spams, then manually rewrite the Subject: and From: headers and zero out the message body. I saw nothing lik

OT - "Soft" ESC key on the new MacBook Pro

2016-12-13 Thread Skip Montanaro
sing around in the din of holiday shopping isn't the same as an extended test drive in my usual environment. So, for those of you who've tried it, does the lack of a physical ESC key create problems? Thx, Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: OT - "Soft" ESC key on the new MacBook Pro

2016-12-14 Thread Skip Montanaro
as does the Apple keyboard attached to my wife's iMac (which I sometimes use). I'm specifically interested in how the lack of a physical ESC key affects people who do are used to the real deal. If nobody has any experience because the Touch-Bar-equipped MBPs are too new, that's fine.

Re: OT - "Soft" ESC key on the new MacBook Pro

2016-12-14 Thread Skip Montanaro
On Wed, Dec 14, 2016 at 11:40 AM, Peter Pearson wrote: > Train your fingers to use C-[. As I recall, the location of the Ctrl key was one of the differences between Sun and PC101 keyboards. Doesn't matter so much now, as Sun has gone the way of the dodo, but it moved around more for me than ESC o

Re: OT - "Soft" ESC key on the new MacBook Pro

2016-12-18 Thread Skip Montanaro
binary input on a PDP-11 in one engineering class in grad school at Iowa. Hand assembling your program isn't terrific fun. With this polar vortex going on, I'm not sure when I'll have the cojones to brave the weather for an otherwise unnecessary trip to the Apple Store. Skip -- htt

US/Eastern offset

2016-12-22 Thread Skip Montanaro
with those extra four minutes? Here is one such timestamp I logged in my app: 2016-12-22T20:35:05-04:56 WTF? Has my brain turned to mush, and the people in New York now move so fast that they are four minutes closer to their London counterparts than they used to be? Thx, Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: dateutil timezone question

2016-12-23 Thread Skip Montanaro
04-27T00:00:00')) You can then compare it with other tz-containing datetime objects. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: US/Eastern offset

2016-12-23 Thread Skip Montanaro
e now is datetime.datetime.now() and eastern_tz is pytz.timezone("America/Eastern"). So, my problem has (again) been solved. A colleague here has suggested arrow <https://pypi.python.org/pypi/arrow/0.10.0> as an alternative to datetime+pytz, which I will look into during the slow pe

Re: dateutil timezone question

2016-12-23 Thread Skip Montanaro
:04:51.295127-06:00 Different timezones, but the same time. >>> print utcnow - chicago.normalize(utcnow) 0:00:00 Skip -- https://mail.python.org/mailman/listinfo/python-list

encoding="utf8" ignored when parsing XML

2016-12-27 Thread Skip Montanaro
t the code, and tracked the encoding I specified all the way down to the creation of the expat parser. What am I missing? Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: encoding="utf8" ignored when parsing XML

2016-12-27 Thread Skip Montanaro
ssary. It would seem that since the file contents are text, just in a non-ASCII encoding, that specifying the encoding when opening the file should do the trick. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: The hardest problem in computer science...

2017-01-06 Thread Skip Montanaro
"VT52 special graphics characters", anyone? Credit where credit is due. Who hasn't borked their output and wound up with their VT(52|100) in graphics mode? :-) https://en.wikipedia.org/wiki/VT52 Skip -- https://mail.python.org/mailman/listinfo/python-list

timers in threaded application

2017-01-12 Thread Skip Montanaro
with this package's event loop. What options do I have? I'm certainly willing to switch to another websocket client library if that will make all my problems go away. This is my first ws experience though, and I inherited some code which used websocket-client, so just went with wha

Re: timers in threaded application

2017-01-13 Thread Skip Montanaro
. > Ooh, hadn't considered that. That would seem to do the trick. I assume the function to be executed will be run in the timer's thread, so will have to suitably lock any shared data. Thx, Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Is it possible to get the Physical memory address of a variable in python?

2017-01-23 Thread Skip Montanaro
5346364) '0xc0d777bc' There. *Now* you have an address. Hack to your heart's content. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Is it possible to get the Physical memory address of a variable in python?

2017-01-23 Thread Skip Montanaro
On Mon, Jan 23, 2017 at 2:17 PM, Chris Angelico wrote: >> There. *Now* you have an address. Hack to your heart's content. > > No, you now have a hexadecimal representation of an integer. You missed my attempt at levity, I think. S -- https://mail.python.org/mailman/listinfo/python-list

Re: How coding in Python is bad for you

2017-01-24 Thread Skip Montanaro
I have nothing to add to the discussion other than too note that Gmail marks many of the messages as spam. :-) Skip -- https://mail.python.org/mailman/listinfo/python-list

Strategies when hunting for dictionary corruption

2017-02-06 Thread Skip Montanaro
to watch some memory locations, but it's not clear what exactly I should watch or how/when to move my watchpoint(s) around. Should I not be thinking in terms of watchpoints? Is there a better way to approach this problem? (I also have valgrind at my disposal, but am not very skilled in its

Futurize maps StringIO.StringIO to io.StringIO

2018-03-07 Thread Skip Montanaro
the latter accepts just about anything you through at it, is a bit surprising. Perhaps there is no true corresponding class in the io module? Skip -- https://mail.python.org/mailman/listinfo/python-list

Unnoticed traceback in a thread

2018-03-08 Thread Skip Montanaro
demise of the daemon thread can take down the entire program? (Sometimes it's good that it doesn't crash. Other times it would at least be handy if it did.) Thx, Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Futurize maps StringIO.StringIO to io.StringIO

2018-03-08 Thread Skip Montanaro
Thanks. In one instance I used six.StringIO, which seems to work. The question I had was more why futurize makes a transformation which is an obvious semantic change. Skip On Thu, Mar 8, 2018, 7:55 PM Mark Lawrence wrote: > On 08/03/18 02:34, Skip Montanaro wrote: > > I had som

Re: Unnoticed traceback in a thread

2018-03-11 Thread Skip Montanaro
should "my_thread_function" fails ... > > start_new_thread(wrapped_thread_function, ...) > > Similar, should you use the "Thread" class (instead of "start_new_thread"). Thanks, that looks like an excellent suggestion. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Enumerating all 3-tuples

2018-03-12 Thread Skip Montanaro
>>> 4 (0, 0, 1) >>> 9 (0, 0, 1) >>> 18 (0, 0, 2) >>> 32 (0, 0, 2) > > I spy duplicates. I didn't realize we'd started playing "I Spy <https://books.google.com/books/about/I_Spy.html?id=oxEQGwAACAAJ&source=kp_cover> ." ​ ​ Skip -- https://mail.python.org/mailman/listinfo/python-list

logging.FileHandler diff Py2 v Py3

2018-04-03 Thread Skip Montanaro
t;/dev/stderr") Python 3.6.4: >>> import logging >>> logging.FileHandler("/dev/stderr") Traceback (most recent call last): File "", line 1, in File "/home/skip/miniconda3/envs/python3/lib/python3.6/logging/__init__.py", line 1030, in __init

Re: logging.FileHandler diff Py2 v Py3

2018-04-03 Thread Skip Montanaro
lower level i/o. I'll poke around a little and maybe open a bug report if I can't find any explanation for the change in behavior. Skip > -- https://mail.python.org/mailman/listinfo/python-list

Re: logging.FileHandler diff Py2 v Py3

2018-04-05 Thread Skip Montanaro
> I'll poke around a little and maybe open a bug report if I can't find any > explanation for the change in behavior. Turns out to be a known problem with a bit of history: https://bugs.python.org/issue27805 Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Filtering computer.lang.python

2018-04-11 Thread Skip Montanaro
t, but you could maybe use SpamBayes to write your own spam filter for comp.lang.python. The gate_news program on mail.python.org does just that, using the training database I maintain. If anyone is interested, contact me. I can help set you up with the gate_news code. Skip -- https://mail.python.org/mailman/listinfo/python-list

The basics of the logging module mystify me

2018-04-18 Thread Skip Montanaro
n stderr when the level has clearly been set to logging.INFO? There is an active stream handler as demonstrated by the successful log.warn(...) call. I really don't like the logging module, but it looks like I'm stuck with it. Why aren't simple/obvious things either simple or obvious? Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: The basics of the logging module mystify me

2018-04-20 Thread Skip Montanaro
a moment. I have played with Eliot (https://eliot.readthedocs.io/) a bit. Even if it doesn't suit you, I think it's a worthwhile read to consider other ways to think about logging. Skip -- https://mail.python.org/mailman/listinfo/python-list

detect laptop open/close from within Python?

2018-04-26 Thread Skip Montanaro
or a Tk event I can respond to? Thx, Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: detect laptop open/close from within Python?

2018-04-26 Thread Skip Montanaro
update continuously, not just on state changes. Maybe /proc/acpi/wakeup will be of some use. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: detect laptop open/close from within Python?

2018-04-26 Thread Skip Montanaro
heck it more frequently than I check for human input, but that will likely be good enough for my needs. Thanks again for the pointer. Skip -- https://mail.python.org/mailman/listinfo/python-list

Tk covering the entire screen

2018-05-04 Thread Skip Montanaro
tions. Any ideas? Thx, Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Tk covering the entire screen

2018-05-04 Thread Skip Montanaro
I forgot to mention that when running on Linux (displaying back on Windows), the Python 3 version (3.6.4, Tk 8.6) does cover all three screens. The Windows Python 2.7.14 version with Tk 8.5 has problems. -- https://mail.python.org/mailman/listinfo/python-list

Re: Tk covering the entire screen

2018-05-06 Thread Skip Montanaro
> Try to upgrade to 2.7.15. It should be shipped with Tk 8.6. Thanks. I'm using an internal (to work) Anaconda distro at work. Hopefully it will update soon. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Tk covering the entire screen

2018-05-07 Thread Skip Montanaro
On Sun, May 6, 2018 at 6:47 PM Skip Montanaro wrote: > > Try to upgrade to 2.7.15. It should be shipped with Tk 8.6. > > Thanks. I'm using an internal (to work) Anaconda distro at work. Hopefully > it will update soon. > ​I got everything up-to-date, but still the cover

Re: Leading 0's syntax error in datetime.date module (Python 3.6)

2018-05-10 Thread Skip Montanaro
of the old syntax: https://www.python.org/dev/peps/pep-3127/#removal-of-old-octal-syntax Which is what bit you. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Leading 0's syntax error in datetime.date module (Python 3.6)

2018-05-10 Thread Skip Montanaro
roblem with C's octal number notation. People coming from C, C++ or Java to Python at that time would certainly have understood that syntax. It's only in the past 15 years or so that we've seen tons of people coming to Python as a first language for whom leading zero notation would

Re: Leading 0's syntax error in datetime.date module (Python 3.6)

2018-05-10 Thread Skip Montanaro
s a reason I never used PHP... Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Leading 0's syntax error in datetime.date module (Python 3.6)

2018-05-10 Thread Skip Montanaro
in each group. Binary consumes too much space and no "chunkiness." Octal was "just right." Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Leading 0's syntax error in datetime.date module (Python 3.6)

2018-05-11 Thread Skip Montanaro
capital "oh" are visually so similar. Not much to be done about that at this point. Just avoid upper case for all three prefixes. Skip -- https://mail.python.org/mailman/listinfo/python-list

What's the rationale for b"..." in this example?

2018-05-15 Thread Skip Montanaro
;s because I didn't tell it explicitly how to decode the bytes object, as when I do, I get the expected result: >>> str(bytes("abc", encoding="utf-8"), encoding="utf-8") 'abc' Coming from a still largely Python 2 perspective, did all attempts to apply default encodings disappear in Python 3? Skip -- https://mail.python.org/mailman/listinfo/python-list

<    7   8   9   10   11   12   13   14   15   16   >