Re: Terminal Emulator (Posting On Python-List Prohibited)

2024-05-19 Thread Skip Montanaro via Python-list
o compile the most recent branches on GitHub (main, 3.12, & 3.13 at the moment). Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: PyCon

2024-05-18 Thread Skip Montanaro via Python-list
> > > I’m at PyCon in Pittsburgh and I’m haven’t an amazing time! > > s/haven’t/having/ > No need to explain/correct. We understand you are excited. Many of us have been in the same state before. ;-) Enjoy, Skip > -- https://mail.python.org/mailman/listinfo/python-list

Re: xkcd.com/353 ( Flying with Python )

2024-03-30 Thread Skip Montanaro via Python-list
e in Python, since decorators technically don't allow the programmer to do something they couldn't before, but are now are used everywhere, a key feature of many applications and modules. Magical-ly, y'rs, Skip > -- https://mail.python.org/mailman/listinfo/python-list

Re: Testing (sorry)

2024-02-19 Thread Skip Montanaro via Python-list
s kinda like greylisting to me. I'm pretty sure that's one of the tool in the mail.python.org chain. Skip > -- https://mail.python.org/mailman/listinfo/python-list

Re: Testing (sorry)

2024-02-18 Thread Skip Montanaro via Python-list
I can't explain the delays, but will note that the gate-news program on the server runs every 5 minutes via cron. There are multiple moving parts in the overall system. You'll probably get a more useful answer from postmas...@python.org. Skip -- https://mail.python.org/mailman/listi

Re: test-ignore

2024-02-15 Thread Skip Montanaro via Python-list
em for me was always Usenet posters who used fake email addresses.) Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: test-ignore

2024-02-15 Thread Skip Montanaro via Python-list
to comp.lang.python traverse the gateway and show up on this list, then alt.test won't help. Skip > -- https://mail.python.org/mailman/listinfo/python-list

Re: Question about garbage collection

2024-01-15 Thread Skip Montanaro via Python-list
thon has normal reference counting, but also has a cyclic garbage collector. Here's plenty of detail about how it works: https://devguide.python.org/internals/garbage-collector/index.html Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3.11.5 Pip Issue

2023-09-14 Thread Skip Montanaro via Python-list
> I downloaded Python 3.11.5, and there was nothing in the “Scripts” file, > and there was no Pip. I would like to know why. > Can't help with the empty/missing Scripts folder. Does running python -m ensurepip get you a working pip? Which you should then run as python -m

Re: What to use instead of nntplib?

2023-05-22 Thread Skip Montanaro
or some other mechanism. > It won't magically be available via pip unless someone steps up to maintain it as a PyPI package Skip > -- https://mail.python.org/mailman/listinfo/python-list

Re: What to use instead of nntplib?

2023-05-15 Thread Skip Montanaro
2 code, then using that from 3.13 onward. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: replacement for nntplib on Python3

2023-04-26 Thread Skip Montanaro
You could create a git repo with just nntplib and generate a package on PyPI, then use that when running a version of Python which lacks nntplib. Skip On Wed, Apr 26, 2023, 8:42 PM Retrograde wrote: > I used to use a script that relied on nntplib, which is currently still > availa

Small lament...

2023-04-03 Thread Skip Montanaro
or "antigravity", but those are now old (both introduced before 2010). When was the last time a clever easter egg was introduced or an April Fool's Day joke played? ¯\_(ツ)_/¯ Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: JOB | Lead Linux Sysadmin (Edinburgh/London)

2023-03-08 Thread Skip Montanaro
There's a link at the bottom of each message to the list info pager. Follow the directions on that page to unsubscribe. Skip On Wed, Mar 8, 2023, 5:38 PM Thomas Gregg wrote: > Is there any way to be removed from this list? > Thank you, Tom > > On Wed, Mar 8, 2023 at 3:51 

Re: JOB | Lead Linux Sysadmin (Edinburgh/London)

2023-03-08 Thread Skip Montanaro
> Hello, I'm working with an employer that is looking to hire someone in > (Edinburgh or London) that can administer on-prem and vmware > platforms. > James, If you haven't already, please post to the Phone Jobs Board: https://www.python.org/jobs/ Skip > -- https:

Re: Python 3.10 Fizzbuzz

2023-02-26 Thread Skip Montanaro
Dang auto-correct... Should read ... double quotes around "strings" and single quotes around 'c'haracters ... On Sun, Feb 26, 2023, 6:28 PM Skip Montanaro wrote: > is there any reason to prefer"over' ? >> > > Not really. As an

Re: Python 3.10 Fizzbuzz

2023-02-26 Thread Skip Montanaro
the repr() code used raw strings where they would simplify the display.) Skip > -- https://mail.python.org/mailman/listinfo/python-list

Re: Is there a more efficient threading lock?

2023-02-26 Thread Skip Montanaro
ode, avoiding the transfer to the top of the virtual machine loop. That would (I think) avoid checks related to GIL release and thread switches. I don't guarantee that's what's going on, and even if I'm correct, I don't think you can rely on it. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Is there a more efficient threading lock?

2023-02-25 Thread Skip Montanaro
best of 5: 98.7 usec per loop I process the output of timeit's help message which looks to be about the same length as a typical email message, certainly the same order of magnitude. Also, note that I call it once in the setup to eliminate the initial training of the ConllExtractor instance. I don't know if ~100us qualifies as long running or not. I'll keep messing with it. Skip -- https://mail.python.org/mailman/listinfo/python-list

Is there a more efficient threading lock?

2023-02-25 Thread Skip Montanaro
nt is consuming huge amounts of CPU. Does threading.Lock.acquire() sleep anywhere? I didn't see anything obvious poking around in the C code which implements this stuff. I'm no expert though, so could easily have missed something. Thx, Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Upgrading Python on Ubuntu 22.04.1 LTS

2023-02-01 Thread Skip Montanaro
ython3.10-venv/now 3.10.7-1+focal1 amd64 [installed,local] Off the top of my head, I can't recall if it's LTS or not. If you want to go beyond 3.10.6, it should be possible. As Grant indicated though, upgrading packages on an Ubuntu system (of any flavor) is the province of the Ubuntu

Re: Android APK

2023-01-25 Thread Skip Montanaro
python-for-android/ I'd be interested to see what else turns up. Skip > -- https://mail.python.org/mailman/listinfo/python-list

Re: argparse — adding a --version flag in the face of positional args

2022-11-28 Thread Skip Montanaro
") args = parser.parse_args(["--help", "--version"]) Which option is processed depends on their order on the command line. I don't believe it's possible to run the script and see them both processed. That's probably a secondary consideration though. My script is working well enough in this regard now. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: argparse — adding a --version flag in the face of positional args

2022-11-27 Thread Skip Montanaro
focused my search for it. Obviously, "--help" is a pretty bad search term. Skip > -- https://mail.python.org/mailman/listinfo/python-list

Re: argparse — adding a --version flag in the face of positional args

2022-11-27 Thread Skip Montanaro
7;t occur to me. I looked briefly at the code for argparse to see how it handled --help. The added argument seemed normal, so gave up, figuring there was some special handling of that option. Skip -- https://mail.python.org/mailman/listinfo/python-list

argparse — adding a --version flag in the face of positional args

2022-11-27 Thread Skip Montanaro
could use something like nargs='*', but that would push off detection of the presence of the positional arg to the application. Shouldn't I be able to tell argparse I'm going to process --verbose, then exit? Thx, Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Ref-strings in logging messages (was: Performance issue with CPython 3.10 + Cython)

2022-10-07 Thread Skip Montanaro
Dang autocorrect. Subject first word was supposed to be "f-strings" not "ref-strings." Sorry about that. S On Fri, Oct 7, 2022, 10:45 AM Skip Montanaro wrote: > > > On Fri, Oct 7, 2022 at 9:42 AM Andreas Ames > wrote: > >> 1. The culprit was me. As laz

Ref-strings in logging messages (was: Performance issue with CPython 3.10 + Cython)

2022-10-07 Thread Skip Montanaro
ere was some discussion about whether and how to efficiently admit f-strings to the logging package. I'm guessing that's not gone anywhere (yet). Skip -- https://mail.python.org/mailman/listinfo/python-list

Python gets a mention on Reddit - in r/tifu

2022-08-07 Thread Skip Montanaro
particularly amused, as my son is in dev ops, writes Python from time-to-time, and my grandson is 13. I could definitely see the pattern in the story transferring over to Chris and Carmine. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Dictionary order?

2022-08-01 Thread Skip Montanaro
order was unspecified. That would give the implementer (likely Tim Peters much of the time) the freedom to do whatever worked best for performance or simplicity of implementation. Skip > -- https://mail.python.org/mailman/listinfo/python-list

Re: Resolving Weekday Schedules to Dates

2022-07-21 Thread Skip Montanaro
> Do you know of a library that resolves schedules like every Wednesday > at 3:00pm to absolute time, that is return the datetime of the next > occurrence? Take a look at the `rrule` module in the `dateutil` package: https://dateutil.readthedocs.io/en/stable/rrule.html Skip

Now for something completely different...

2022-05-22 Thread Skip Montanaro
y want the graphics to be terribly Python-centric. Consequently, "import this" is probably not going to work. I have decided to go ahead and use my first name in lower case Courier as the core piece of the downtube graphic: skip That's not too informative (other than its relationship to

Re: Do projects exist to audit PyPI-hosted packages?

2022-05-06 Thread Skip Montanaro
ke pynput. Something with application to a much wider community, like numpy, returns a bunch more: https://www.libhunt.com/r/numpy Skip -- https://mail.python.org/mailman/listinfo/python-list

Do projects exist to audit PyPI-hosted packages?

2022-05-06 Thread Skip Montanaro
packages. With that many hosted packages, it is almost certainly a haven for some undetected vulnerabilities. Knowing which packages have been audited — at least in a cursory fashion — could be used as a further criterion to use when deciding which packages to consider using on a project. So,

Re: Receive a signal when waking or suspending?

2022-04-25 Thread Skip Montanaro
ve been resting for a long enough period of time to allow me to subject my wrists to further agony <https://github.com/smontanaro/python-bits/blob/master/src/watch.py> with the keyboard and mouse. Skip (*) man systemd-sleep contains this admonition: Note that scripts or binaries dropped in /

Re: Receive a signal when waking or suspending?

2022-04-23 Thread Skip Montanaro
> I don't know in Python, but maybe you can create a script that writes > on a named pipe and read it from Python? > https://askubuntu.com/questions/226278/run-script-on-wakeup Thanks, that gives me something to munch on. -- https://mail.python.org/mailman/listinfo/python-list

Receive a signal when waking or suspending?

2022-04-23 Thread Skip Montanaro
my eye on a new MacBook one of these days). I suppose bonus points for something which works on Windows, but that's not a platform I actually care about. Thx, 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

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: 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-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
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-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

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: 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

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: 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

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: 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

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-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

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: 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

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: 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 --

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
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

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

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

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

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: 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: 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
st@python.org. 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: 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: 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: [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: [Python-ideas] Looking for people interested in a Python register virtual machine project

2021-03-22 Thread Skip Montanaro
y pointers > (with extra dereferencing, but that's a detail). It's unclear why you > try to ignore them ("cell" registers), putting ahead "locals" and > "stack" registers. The actual register instructions implementation would > just treat any frame slot as a register with continuous numbering, > allowing to access all of locals, cells, and stack locs in the same > way. In that regard, trying to rearrange 3 groups at this stage seems > like rather unneeded implementation complexity with no clear motivation. I haven't even looked at LOAD_DEREF or STORE_DEREF yet. I think that extra dereferencing will be more than a simple detail though. That makes the semantics of cell/free slots different than locals/registers slots (more like globals). If true, then my reordering of the frame data is worthwhile, I think. Skip -- https://mail.python.org/mailman/listinfo/python-list

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

2021-03-22 Thread Skip Montanaro
> Yeah, that is old writing, so is probably less clear (no pun intended) > than it should be. In frame_dealloc, Py_CLEAR is called for > stack/register slots instead of just Py_XDECREF. Might not be > necessary. Also, the intent is not to change any semantics here. The implementation of RETURN_VAL

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

2021-03-22 Thread Skip Montanaro
ess clear (no pun intended) than it should be. In frame_dealloc, Py_CLEAR is called for stack/register slots instead of just Py_XDECREF. Might not be necessary. Skip -- https://mail.python.org/mailman/listinfo/python-list

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

2021-03-20 Thread Skip Montanaro
Yes, I remember Parrot. As I understand it their original goal was a language-agnostic virtual machine, which might have complicated things. I will do a bit of reading and add some text to the "PEP." Skip On Sat, Mar 20, 2021, 11:36 AM David Mertz wrote: > The Parrot project was

Looking for people interested in a Python register virtual machine project

2021-03-20 Thread Skip Montanaro
hon's internals. Questions/comments/pull requests welcome. Skip Montanaro -- https://mail.python.org/mailman/listinfo/python-list

Re: .title() - annoying mistake

2021-03-19 Thread Skip Montanaro
> > That's annoying. You have to roll your own solution! > Certainly seems like a known issue: https://bugs.python.org/issue12737 That issue was opened in 2011. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: [Python-Dev] Re: Python 0.9.1

2021-02-16 Thread Skip Montanaro
2, 2, 2, 2, 2, 2, 2, 2] The tests don't pass though. 1 * 1 raises an integer overflow exception: >>> 1 * 1 Unhandled exception: run-time error: integer overflow Stack backtrace (innermost last): File "", line 1 I'll let someone figure that out. :-) At any rate, the git repo has been updated. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: [Python-Dev] Re: Python 0.9.1

2021-02-16 Thread Skip Montanaro
nto correct format. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: [Python-Dev] Re: Python 0.9.1

2021-02-16 Thread Skip Montanaro
> > Wow. Was white-space not significant in this release of Python? I see the >> lack of indentation in the first Python programs. >> > > Indentation most certainly was significant from day 0. I suspect what > happened is that these files got busted somehow by the extrac

Python 0.9.1

2021-02-16 Thread Skip Montanaro
h the original files, a small README file and a compile.patch file between the original code and the runnable code. It was a pleasant diversion for a couple hours. I was tired of shovelling snow anyway... Thank you, Hiromi. Skip * Hiromi is bcc'd on this note in case he cares to comment. I didn't want to publish his email beyond the bounds of the webmaster alias without his permission. -- https://mail.python.org/mailman/listinfo/python-list

Re: UTF-16 or something else?

2021-02-09 Thread Skip Montanaro
dump would l.o.o.k. > .l.i.k.e. .t.h.i.s. > Ah, right. Been a long, long while (well before Unicode was a thing) since I needed to use od(1) and don't remember dealing with UTF-16 before. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: UTF-16 or something else?

2021-02-09 Thread Skip Montanaro
g files > Excellent, thanks. That worked like a charm. Knowing what its called also allowed me to look up more info. Skip -- https://mail.python.org/mailman/listinfo/python-list

UTF-16 or something else?

2021-02-09 Thread Skip Montanaro
know I can simply edit out those bytes and probably be good-to-go, but I'd prefer not to. What should I be passing for the encoding? Skip, who thought everybody had effectively settled on utf-8 at this point, but apparently not... -- https://mail.python.org/mailman/listinfo/python-list

Log exception so traceback contains timestamp and level?

2021-02-06 Thread Skip Montanaro
That seems easier than the "right" way. That seems harder than it ought to be. Hopefully I'm just missing something simple. Skip -- https://mail.python.org/mailman/listinfo/python-list

Best practice for handling exceptions raised at lower levels?

2021-02-01 Thread Skip Montanaro
#x27;s just to deal with exceptions raised by internal data structures. Skip [1] https://github.com/smontanaro/polly [2] https://xkcd.com/936/ [3] https://mail.python.org/pipermail/python-list/2014-August/827854.html [4] https://tools.ietf.org/html/rfc3501 [5] https://pypi.org/project/IMAPClient/ -- https://mail.python.org/mailman/listinfo/python-list

Re: IDE tools to debug in Python?

2021-01-28 Thread Skip Montanaro
b for financial stuff, and still mostly use it for that, but it's another viable option. Skip > -- https://mail.python.org/mailman/listinfo/python-list

Re: How do you debug in Python? Coming from a Matlab and R user. I'm already aware of pdb.

2021-01-26 Thread Skip Montanaro
and many people like IDEs, but I've not generally found them all that useful. I'm stuck in the 90s I guess. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: why sqrt is not a built-in function?

2021-01-14 Thread Skip Montanaro
should have never considered it, I think you might want to study the output of import this Think on the second and last lines in particular. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Python3 change logs

2020-12-15 Thread Skip Montanaro
Dang... I'm having very incomplete thoughts. Apologies for the multiple replies when one would have sufficed. https://docs.python.org/3/whatsnew/3.9.html Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Python3 change logs

2020-12-15 Thread Skip Montanaro
Also, check www.python.org for "What's New" pages. I believe one is generated for every release. It will be less detailed than change logs in GitHub, but more reader friendly. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Python3 change logs

2020-12-15 Thread Skip Montanaro
Change logs are kept as part of the source, I believe. Try browsing the cpython GitHub repo: https://github.com/python/cpython Skip On Tue, Dec 15, 2020, 10:05 AM Rich Shepard wrote: > I've upgraded from Python-3.7.x to Python-3.9.x and want to learn about > differences (if any)

Re: How to run Jupyter notebook in command line and get full error message?

2020-11-29 Thread Skip Montanaro
so, you might want to provide some more details about your problem. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Cannot marshal objects

2020-11-27 Thread Skip Montanaro
mlrpc.client.Marshaller.dispatch[decimal.Decimal] = dump_decimal I used the "ex:" prefix based on this document: http://ws.apache.org/xmlrpc/types.html YMMV. The tag name understood by the Unmarshaller class doesn't include that prefix. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Cannot marshal objects

2020-11-27 Thread Skip Montanaro
gt;> d = decimal.Decimal(3.5) >>> pickle.dumps(d) b'\x80\x04\x95!\x00\x00\x00\x00\x00\x00\x00\x8c\x07decimal\x94\x8c\x07Decimal\x94\x93\x94\x8c\x033.5\x94\x85\x94R\x94.' That's meant more for serialization of data objects. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: constant folding - why not more

2020-11-10 Thread Skip Montanaro
Code generators might conceivably generate constant comparisons, but they might be able to easily do constant folding of comparisons themselves. Two, given that this sort of construct will almost never be found in the wild, folding constant comparisons in the compiler would increase the maintenance bu

Re: Help

2020-11-03 Thread Skip Montanaro
> > When I run this, my answer is 8 but it should be 336 can some help ._. > Looks like you are returning from inside the loop. Skip > -- https://mail.python.org/mailman/listinfo/python-list

Re: Artie 3000 the coding robot

2020-09-17 Thread Skip Montanaro
n the computer and send command > packets to the robot... Thanks Dennis. My initial thought was that it probably used the turtle module, but I didn't see it mentioned anywhere. Seems the "value add" is just the communication module. I guess I'll pass. Skip -- https://mail.python.org/mailman/listinfo/python-list

Artie 3000 the coding robot

2020-09-16 Thread Skip Montanaro
ets stuck. Here's the manufacturer's page <https://www.educationalinsights.com/artie-3000-8482-the-coding-robot> for the tool/toy. Any feedback appreciated... Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Pandas split Date in day month year and hour

2020-08-19 Thread Skip Montanaro
but if your datetime column is filled with datetime types, you should be able to append columns to your DataFrame which correspond to individual components of the datetime instances. Don't be looking outside of Pandas to Python's time or datetime module. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Syntax question

2020-08-16 Thread Skip Montanaro
syntax was developed with the MyPy folks (http://mypy-lang.org/), but I'm not sure what other tools currently make use of it. Any pointers? Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Explicit is better than Implicit

2020-08-06 Thread Skip Montanaro
wikipedia.org/wiki/311_(band)>" to the integer 311 on which my Python backend obligingly barfed. I eventually had to put in data type checks for all fields in my back end (my front end already had that sort of input validation) as I could no longer assume a sentient front end was handing i

Explicit is better than Implicit

2020-08-06 Thread Skip Montanaro
Hmmm... Rename genes, fix Excel, or dump Excel in favor of Python? I know what my choice would have been. :-) https://www.theverge.com/2020/8/6/21355674/human-genes-rename-microsoft-excel-misreading-dates Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Strings: double versus single quotes

2020-05-23 Thread Skip Montanaro
that it has something to do with Emacs's Python mode behavior. Emacs wouldn't know what to do with spaces in the string, but knows where to put string literals within the open parens. I'm pretty sure I was doing this before triple quoted strings existed. Thankfully, I don't need to mess around with SQL anymore. :-) Skip > -- https://mail.python.org/mailman/listinfo/python-list

  1   2   3   4   5   6   7   8   9   10   >