Re: Please test the ekr-2882-qt-only2 branch

2024-03-25 Thread Thomas Passin
Nav tab is missing on Debian, Python Console tab is missing on Linux Mint. No apparent error messages. On Monday, March 25, 2024 at 9:25:25 AM UTC-4 Thomas Passin wrote: > What is Leo using QScintilla for? > > On Monday, March 25, 2024 at 9:21:00 AM UTC-4 Thomas Passin wrote: >

Re: Please test the ekr-2882-qt-only2 branch

2024-03-25 Thread Thomas Passin
What is Leo using QScintilla for? On Monday, March 25, 2024 at 9:21:00 AM UTC-4 Thomas Passin wrote: > That took care of the problem and the branch of Leo now runs on Ubuntu. > Also, VR3 opens. > > On Monday, March 25, 2024 at 9:05:18 AM UTC-4 Edward K. Ream wrote: > >>

Re: Please test the ekr-2882-qt-only2 branch

2024-03-25 Thread Thomas Passin
That took care of the problem and the branch of Leo now runs on Ubuntu. Also, VR3 opens. On Monday, March 25, 2024 at 9:05:18 AM UTC-4 Edward K. Ream wrote: > On Mon, Mar 25, 2024 at 7:47 AM Thomas Passin wrote: > >> Fails on Ubuntu: >> >> *cannot import name 'Qsci'

Re: Please test the ekr-2882-qt-only2 branch

2024-03-25 Thread Thomas Passin
Fails on Ubuntu: *cannot import name 'Qsci' from 'PyQt6' (/home/tom/.local/lib/python3.10/site-packages/PyQt6/__init__.py)* *** Leo could not be started *** Please verify you've installed the required dependencies: On Monday, March 25, 2024 at 7:37:36 AM UTC-4 Edward K. Ream wrote: > The

Re: About PR #3828: Require Qt6.6+

2024-03-24 Thread Thomas Passin
Every one of my fleet of Linux VMs has finally got PyQt 6.6, so that's favorable. No one can prove that *every* distro will have it - there are just too many variations - but so be it. I don't know about ARM versions and don't have a way to check, but I suppose they are still not a likely

Re: A Script To Insert An Image

2024-03-24 Thread Thomas Passin
h 24, 2024 at 8:24:47 AM UTC-4 Edward K. Ream wrote: > On Sun, Mar 24, 2024 at 7:01 AM Thomas Passin wrote: > >> Settings and headlines are not the same. >> > > At last I understand :-) As Thomas says, the syntax for settings nodes is > different from directives. &g

Re: A Script To Insert An Image

2024-03-24 Thread Thomas Passin
Settings and headlines are not the same. On Sunday, March 24, 2024 at 6:39:03 AM UTC-4 jkn wrote: > Hi Edward > I put the link (to a different part of the documentation) in an earlier > post: > https://leo-editor.github.io/leo-editor/customizing.html#simple-settings-nodes > > The section you

Re: A Script To Insert An Image

2024-03-23 Thread Thomas Passin
>>>>>> >>>>>>> >>>>>>> On Monday, March 11, 2024 at 8:10:03 PM UTC jkn wrote: >>>>>>> >>>>>>>> Has anyone played much with class QClipboard? I did a couple of >>>>>>>> trivial experiments but I m

Re: A Script To Insert An Image

2024-03-23 Thread Thomas Passin
gt;> So >>>>>> the script becomes: >>>>>> >>>>>> """Insert RsT code at cursor to display an image. >>>>>> >>>>>> The path to the image file will come from a file dialog. >>>>

Re: A Script To Insert An Image

2024-03-23 Thread Thomas Passin
uot;),], >>>> defaultextension=".*", >>>> multiple=False) >>>> >>>> if PATH: >>>> from os.path import relpath >>>> PATH = PATH.replace('"', '').replace("'", '') >>>> PAT

Re: Leo 6.7.8 released to pypi

2024-03-22 Thread Thomas Passin
I've tried out installing post3 on my fleet of Linux VMs. It succeeded on all of them although for some I had to add the pip install option *--break-system-packages. *After installation, there was a also new "leo" script that launched Leo. So it looks like all Edward's hard work has paid

Re: the name ``wheel''

2024-03-21 Thread Thomas Passin via Python-list
On 3/21/2024 4:19 PM, Grant Edwards via Python-list wrote: On 2024-03-21, MRAB via Python-list wrote: As it's recommended to use the Python Launcher py on Windows, I use that instead: py -m pip install something because it gives better support if you have multiple versions of Python

Re: Small puzzle: where is this focus-to-body action coming from?

2024-03-21 Thread Thomas Passin
On Thursday, March 21, 2024 at 2:02:50 PM UTC-4 jkn wrote: Nevertheless - other @shortcuts I have in myLeoSettings.leo are shown in the log output to 'show-commands' - why not this one? It's in there. My listings for Settings/Show Settings /Show Commands has it: Alt+d

Re: Small puzzle: where is this focus-to-body action coming from?

2024-03-21 Thread Thomas Passin
It's in LeoSettings.leo, in the node @shortcuts Gui operations. On Thursday, March 21, 2024 at 10:33:33 AM UTC-4 jkn wrote: > I keep meaning to look at 'improving' (for my needs) navigation between > Tree and body panes. Whilst taking a look at this again I found a puzzle. > > I have what is (I

Re: Leo 6.7.8.post1 is ready for testing

2024-03-20 Thread Thomas Passin
Aha! I didn't pick up on that because I always start Leo with python3 -m leo.core.runLeo. I do that instead of using a script fromt the Scripts directory because I don't let a new install of Python add those directories to the path. And I do *that* because I used to need the Python 2.7 Script

Re: Leo 6.7.8.post1 is ready for testing

2024-03-19 Thread Thomas Passin
ion is probably minimal since Leo doesn't seem to use packages in the system directories. If you already are using a venv for Leo, then there should be no problem with the install. On Tuesday, March 19, 2024 at 11:12:32 PM UTC-4 Thomas Passin wrote: Installed OK on Ubuntu 22.04, Python 3

Re: Leo 6.7.8.post1 is ready for testing

2024-03-19 Thread Thomas Passin
Installed OK on Ubuntu 22.04, Python 3.10. On Tuesday, March 19, 2024 at 10:31:46 PM UTC-4 Thomas Passin wrote: > python3 -m pip install --user --upgrade leo==6.7.8.post1 succeeded on > Linux Debian, although I had to install *libxcb-cursor0* afterwards, as > we've been seeing on s

Re: Leo 6.7.8.post1 is ready for testing

2024-03-19 Thread Thomas Passin
python3 -m pip install --user --upgrade leo==6.7.8.post1 succeeded on Linux Debian, although I had to install *libxcb-cursor0* afterwards, as we've been seeing on some other distros. After the install: Leo 6.7.8.post1 Python 3.9.2, PyQt version 6.6.2 linux On Tuesday, March 19, 2024 at

Re: ENB: Distribution challenges

2024-03-19 Thread Thomas Passin
On Monday, March 18, 2024 at 5:43:22 PM UTC-4 Edward K. Ream wrote: This Engineering Notebook post briefly summarizes the challenges in distributing Leo on pypi. *I would greatly appreciate help debugging either PR*. My *guess* is that pyproject.toml needs only a tweak, but finding that

Re: Leo 6.7.8 released, but not to PyPi

2024-03-18 Thread Thomas Passin
Then there's the brute force method - get the zip file from github, unzip it, and copy the leo directory into the user's site-packages directory. To be thorough, one should delete the dist-info directory for Leo. I don't know if venv would get this version when setting up a venv, though.

Re: Discuss: Leo 6.7.8 will install only PyQt6

2024-03-17 Thread Thomas Passin
e desired, in general. > > https://pkgs.org/download/libxcb-cursor.so.0()(64bit) > > Hope this helps! > Jake > > On Mar 17, 2024, at 3:45 PM, Viktor Ransmayr wrote: > >  > > Hello Thomas, > > Am So., 17. März 2024 um 15:41 Uhr schrieb Thomas Passin < > tb

Re: Discuss: Leo 6.7.8 will install only PyQt6

2024-03-17 Thread Thomas Passin
Try the other suggested library in the error message: xcb-cursor0 . I went through the same thing about a week ago on a different distro, and using the alternate suggestion solved it. If that doesn't work either, run an internet search for "fedora qt.qpa.plugin: From 6.5.0, xcb-cursor0 or

Re: Configuring an object via a dictionary

2024-03-16 Thread Thomas Passin via Python-list
On 3/16/2024 8:12 AM, Roel Schroeven via Python-list wrote: Barry via Python-list schreef op 16/03/2024 om 9:15: > On 15 Mar 2024, at 19:51, Thomas Passin via Python-list   wrote: > > I've always like writing using the "or" form and have never gotten bit I, on the oth

Re: Configuring an object via a dictionary

2024-03-15 Thread Thomas Passin via Python-list
On 3/15/2024 5:33 PM, Dan Sommers via Python-list wrote: On 2024-03-15 at 15:48:17 -0400, Thomas Passin via Python-list wrote: [...] And I suppose there is always the possibility that sometime in the future an "or" clause like that will be changed to return a Boolean, which one wo

Re: Configuring an object via a dictionary

2024-03-15 Thread Thomas Passin via Python-list
On 3/15/2024 3:09 PM, Grant Edwards via Python-list wrote: On 2024-03-15, Thomas Passin via Python-list wrote: On 3/15/2024 5:30 AM, Loris Bennett via Python-list wrote: Hi, I am initialising an object via the following: def __init__(self, config): self.connection = None

Re: Configuring an object via a dictionary

2024-03-15 Thread Thomas Passin via Python-list
On 3/15/2024 5:30 AM, Loris Bennett via Python-list wrote: Hi, I am initialising an object via the following: def __init__(self, config): self.connection = None self.source_name = config['source_name'] self.server_host = config['server_host']

Re: A Script To Insert An Image

2024-03-11 Thread Thomas Passin
de' undoData = u.beforeChangeNodeContents(p) head, tail = s[:start], s[start:] p.b = head + IMAGE_TEMPLATE + tail c.setChanged() p.setDirty() u.afterChangeNodeContents(p, undoType, undoData) c.redraw() On Saturday, March 9, 2024 at 2:04:19 PM UTC-5 Thomas Passin wrote:

Re: pathlib.Path.is_file vs os.path.isfile difference

2024-03-10 Thread Thomas Passin via Python-list
On 3/10/2024 9:33 AM, Albert-Jan Roskam wrote: On Mar 10, 2024 12:59, Thomas Passin via Python-list wrote: On 3/10/2024 6:17 AM, Barry wrote: > > >> On 8 Mar 2024, at 23:19, Thomas Passin via Python-list wrote: >> >> We just

Re: pathlib.Path.is_file vs os.path.isfile difference

2024-03-10 Thread Thomas Passin via Python-list
On 3/10/2024 6:17 AM, Barry wrote: On 8 Mar 2024, at 23:19, Thomas Passin via Python-list wrote: We just learned a few posts back that it might be specific to Linux; I ran it on Windows. Depending on the exact win32 api used there is a 257 limit on windows. The 257 includes 2

Re: LeoJS - How To Write To File System And Run External Programs

2024-03-09 Thread Thomas Passin
I don't know if you got around to thinking about it yet (you've got so much else going on!), but the command I wrote to run external files is in LeoPyRef and it's called *execute-external-file*. It has some trickiness because it has to run on Linux as well as Windows, and the terminal

Re: ✨LeoJS beta 0.2.12 Released!

2024-03-09 Thread Thomas Passin
A great achievement, Felix! So much work, too! I see this update isn't in the marketplace for vscodium yet. Coming soon, I imagine? It updated successfully in VScode. On Saturday, March 9, 2024 at 9:40:56 PM UTC-5 Félix wrote: > Introducing LeoJS Beta 0.2.12 > Félix here, ecstatic to

Re: A Script To Insert An Image

2024-03-09 Thread Thomas Passin
Yup, Terry Brown has already done most of it for us in the screen_capture plugin. Here's the docstring: """ screen_capture.py = Capture screen shots - single frames are useful. The `Recorder` class can also capture frames continuously but that's not really useful, it doesn't

Re: A Script To Insert An Image

2024-03-09 Thread Thomas Passin
I seem to remember that somewhere in the code base, Leo code to capture the screen has already been worked out. If that's the case we're in clover. On Saturday, March 9, 2024 at 3:09:24 PM UTC-5 jkn wrote: > The way I have been using the Obsidian feature is to paste image bytes > (eg. from a

Re: A Script To Insert An Image

2024-03-09 Thread Thomas Passin
Shouldn't be hard. What would be on the clipboard? Image bytes? Or an image filename? I often select an image in a file manager window, copy it to an "images" subdirectory of the current outline, then write the embedding code into and "images" child node. That would be easy to write a

A Script To Insert An Image

2024-03-09 Thread Thomas Passin
We can't directly insert an image into a standard Leo node because they are text-only. I find this very annoying sometimes, especially when I am writing a note and want to include an image. But we can do the next best thing - insert an ReStructuredText (RsT) instruction to display an image

Re: pathlib.Path.is_file vs os.path.isfile difference

2024-03-08 Thread Thomas Passin via Python-list
On 3/8/2024 5:14 PM, Albert-Jan Roskam wrote: On Mar 8, 2024 19:35, Thomas Passin via Python-list wrote: On 3/8/2024 1:03 PM, Albert-Jan Roskam via Python-list wrote: > Hi, > I was replacing some os.path stuff with Pathlib and I discovered this: >

Re: pathlib.Path.is_file vs os.path.isfile difference

2024-03-08 Thread Thomas Passin via Python-list
On 3/8/2024 2:21 PM, Grant Edwards via Python-list wrote: On 2024-03-08, Thomas Passin via Python-list wrote: On 3/8/2024 1:03 PM, Albert-Jan Roskam via Python-list wrote: Hi, I was replacing some os.path stuff with Pathlib and I discovered this: Path(256 * "x"

Re: pathlib.Path.is_file vs os.path.isfile difference

2024-03-08 Thread Thomas Passin via Python-list
On 3/8/2024 1:03 PM, Albert-Jan Roskam via Python-list wrote: Hi, I was replacing some os.path stuff with Pathlib and I discovered this: Path(256 * "x").is_file() # OSError os.path.isfile(256 * "x") # bool Is this intended? Does pathlib try to resemble os.path as closely as

Re: Variable scope inside and outside functions - global statement being overridden by assignation unless preceded by reference

2024-03-06 Thread Thomas Passin via Python-list
On 3/6/2024 7:55 AM, Jacob Kruger via Python-list wrote: Ok, simpler version - all the code in a simpler test file, and working with two separate variables to explain exactly what am talking about: # start code from datetime import datetime, timezone, timedelta from copy import copy #

Re: Variable scope inside and outside functions - global statement being overridden by assignation unless preceded by reference

2024-03-06 Thread Thomas Passin via Python-list
On 3/6/2024 5:59 AM, Alan Gauld via Python-list wrote: On 05/03/2024 22:46, Grant Edwards via Python-list wrote: Unfortunately (presumably thanks to SEO) the enshittification of Google has reached the point where searching for info on things like Python name scope, the first page of links are

Re: FYI: Simplified installation instructions

2024-03-03 Thread Thomas Passin
can have one button for each script. I've developed this way of generating Sphinx documentation over many years and iterations and it's the one I like best so far. Give it try and see it it works for you! On Sunday, March 3, 2024 at 4:23:36 PM UTC-5 Thomas Passin wrote: > I don't know ab

Re: FYI: Simplified installation instructions

2024-03-03 Thread Thomas Passin
I don't know about a "gentle" introduction, but VR3 has an extensive docstring you can read by means of the Plugins menu. I use Sphinx a lot, and normally I don't even create a Sphinx configuration file. I find I can do enough configuration for my needs with command-line parameters, which I

Re: .csv Importer Is Specialized For MindManager Export Files

2024-03-02 Thread Thomas Passin
-5 Edward K. Ream wrote: > On Fri, Mar 1, 2024 at 8:33 PM Thomas Passin wrote: > >> The process for importing any file delegates .csv files to files exported >> the MindJet's MindManager program. Using it to import ordinary tabular .csv >> data produces unusable result

.csv Importer Is Specialized For MindManager Export Files

2024-03-01 Thread Thomas Passin
The process for importing any file delegates .csv files to files exported the MindJet's MindManager program. Using it to import ordinary tabular .csv data produces unusable results on the samples I tried today. I Most .csv files contain tabular data and, in my view, should be imported as text

Re: Discuss: Leo 6.7.8 will install only PyQt6

2024-03-01 Thread Thomas Passin
On Friday, March 1, 2024 at 5:33:34 AM UTC-5 Edward K. Ream wrote: My question wasn't clear. I meant to ask whether potential errors concerning the missing xcb-cursor0 or libxcb-cursor0 libraries are a show stopper. Imo, most linux users will know to run sudo apt install, so the missing

Re: Discuss: Leo 6.7.8 will install only PyQt6

2024-02-29 Thread Thomas Passin
was basically Red Hat, but I don't think that's quite true any more. Maybe someone else reading this will know more? On Thursday, February 29, 2024 at 10:55:55 AM UTC-5 Edward K. Ream wrote: > On Thu, Feb 29, 2024 at 9:46 AM Thomas Passin wrote: > >> So far all the distros I have checked do

Re: Discuss: Leo 6.7.8 will install only PyQt6

2024-02-29 Thread Thomas Passin
So far all the distros I have checked do now support pyqt6: Ubuntu/XUbuntu Debian OpenSuSE Fedora Manjaro Mint These are all the distros I've got VMs for. On Thursday, February 29, 2024 at 10:32:12 AM UTC-5 Edward K. Ream wrote: > On Thu, Feb 29, 2024 at 9:25 AM Edward K. Ream wrote: > > >

Heads Up - Malicious Git Forks

2024-02-29 Thread Thomas Passin
See This Slashdot story - GitHub Besieged By Millions of Malicious Repositories In Ongoing Attack -- You received this message

Re: Discuss: Leo 6.7.8 will install only PyQt6

2024-02-29 Thread Thomas Passin
I think that whether we can require pyqt6 should depend on whether it can be installed on a particular flavor of Linux. That didn't used to be the case, but it may be now. It is available on Ubuntu/XUbuntu, and probably on most Ubuntu-derived distros. *However,* Leo won't run after

Re: Problem resizing a window and button placement

2024-02-26 Thread Thomas Passin via Python-list
On 2/26/2024 6:02 AM, Steve GS via Python-list wrote: Although your code produces the value of Ww outside the function, I do not see how I can use the value of Ww unless I close the program. The configuration event hasn't fired at the time you include the print statement in the handler's def

Re: Problem resizing a window and button placement

2024-02-25 Thread Thomas Passin via Python-list
On 2/25/2024 4:19 PM, Steve GS via Python-list wrote: SOLUTION FOUND! The fix was to write the code that uses the width value and to place it into the function itself. Kluge? Maybe but it works. Right, just what I wrote earlier: "have the function that responds to the resize event perform

Re: Problem resizing a window and button placement

2024-02-24 Thread Thomas Passin via Python-list
On 2/24/2024 9:51 PM, Steve GS via Python-list wrote: First of all, please make sure that the formatting is readable and especially the indentation. This is Python, after all. Do not use tabs; use 3 or 4 spaces instead of each tab. import tkinter as tk #global Ww Neither global helps def

Re: Problem resizing a window and button placement

2024-02-24 Thread Thomas Passin via Python-list
On 2/24/2024 3:20 AM, Steve GS via Python-list wrote: Yes, I ran that elegantly simple code. The print statement reports the X, Y, Height and Width values. However, I do not see how to capture the width value. I experimented with the code Vwidth = rootV.winfo_width() and it also reports the

Re: Testing (sorry)

2024-02-19 Thread Thomas Passin via Python-list
On 2/19/2024 11:55 AM, Skip Montanaro wrote: Here is a typical bounce message that I get: mailto:python-list@python.org>>: host mail.python.org [188.166.95.178] said: 450-4.3.2      Service currently unavailable 450 4.3.2 Some time after I get

Re: Testing (sorry)

2024-02-19 Thread Thomas Passin via Python-list
On 2/19/2024 9:17 AM, Grant Edwards via Python-list wrote: On 2024-02-19, Thomas Passin wrote: About 24 hours later, all of my posts (and the confirmation e-mails) all showed up in a burst at the same time on two different unrelated e-mail accounts. I still have no clue what was going

Re: Testing (sorry)

2024-02-18 Thread Thomas Passin via Python-list
On 2/18/2024 6:09 PM, Grant Edwards via Python-list wrote: On 2024-02-18, Peter J. Holzer via Python-list wrote: [Replying to the list *and* Grant] On 2024-02-17 19:38:04 -0500, Grant Edwards via Python-list wrote: Today I noticed that nothing I've posted to python-list in past 3 weeks has

Re: Leo's PyPi page will remain

2024-02-16 Thread Thomas Passin
On WIndows, installing pyqtx does not require a separate installation of Qt - apparently all the binaries needed are packaged with pyqyx. From your error message, on the Mac it seems that you need to install Qt itself, apart from any Python installation. If Qt has already been installed,

Interesting Post On Retiring An API

2024-02-16 Thread Thomas Passin
>From The Old New Thing - If you’re just going to sit there doing nothing, at least do nothing correctly -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this

Re: Leo's PyPi page will remain

2024-02-11 Thread Thomas Passin
I don't know for sure about the Mac (why it would be different, I mean), but you want to install "pyqt6", not "qt". You should also install "PyQt6-WebEngine", for the ViewRendered3 plugin to work completely. I don't know if that has finally gotten into the requirements list or not. On

Re: PR 3774 completes the 6.7.8 code base

2024-02-05 Thread Thomas Passin
On my Manjaro VM only three were skipped - one importer, one speller, one in leoAst. 928 passed, 3 skipped in 11.53s I wonder if something isn't installed on the XUBuntu VM, like a language or something else outside of Leo itself. On Monday, February 5, 2024 at 1:09:34 PM UTC-5 Thomas Passin

Re: PR 3774 completes the 6.7.8 code base

2024-02-05 Thread Thomas Passin
OK, doing it that way on XUbuntu gave no errors but many more skipped tests than on Windows (Windows skipped two importer tests): 905 passed, 26 skipped in 8.59s On Sunday, February 4, 2024 at 6:21:18 PM UTC-5 Edward K. Ream wrote: > On Saturday, February 3, 2024 at 9:00:57 AM UTC-6 Thomas

Re: PR 3774 completes the 6.7.8 code base

2024-02-04 Thread Thomas Passin
On Linux/Manjaro there is the same warning, but it only skipped 3 tests instead of 26. It too a few seconds longer than on XUbuntu. On Sunday, February 4, 2024 at 2:41:44 PM UTC-5 Thomas Passin wrote: > For the recent merge in devel, 08fcbac60bc296b2e636c3467daf29022b03231b, > there is

Re: PR 3774 completes the 6.7.8 code base

2024-02-04 Thread Thomas Passin
=== Interesting how much faster the tests run in Linux than Windows. On Sunday, February 4, 2024 at 3:38:37 AM UTC-5 Edward K. Ream wrote: > On Sat, Feb 3, 2024 at 9:01 AM Thomas Passin wrote: > >> On Windows 10, Python 3.12 - > > leo\plugins\leo_babel\tests\lib_test.py:118 >> C:\Tom\gi

Re: Extract lines from file, add to new files

2024-02-03 Thread Thomas Passin via Python-list
On 2/3/2024 5:02 PM, dn via Python-list wrote: Every trainer, in any field, has to deal with these problems - all the time, and over-and-over. On 4/02/24 06:58, Thomas Passin via Python-list wrote: In my view this whole thread became murky and complicated because the OP did not write down

Leo Command To Convert To Title Case

2024-02-03 Thread Thomas Passin
Converting to Title Case means to make the first letter of every word in a string capitalized, and all the other letters made lowercase. It can be handy if you copy an all-capital string from somewhere else but you don't like all-caps and want to convert it to title case. I couldn't find a

Re: Extract lines from file, add to new files

2024-02-03 Thread Thomas Passin via Python-list
Of Thomas Passin via Python-list Sent: Wednesday, January 31, 2024 7:25 AM To: python-list@python.org Subject: Re: Extract lines from file, add to new files On 1/30/2024 11:25 PM, avi.e.gr...@gmail.com wrote: Thomas, on some points we may see it differently. I'm mostly going by what the OP

Re: PR 3774 completes the 6.7.8 code base

2024-02-03 Thread Thomas Passin
== FAILED leo/unittests/core/test_leoTokens.py::TestTokenBasedOrange::test_blank_lines_after_function_3 - AssertionError: "\\\n[122 chars]omment 1.\n# Trailing comment 2.\n ... = 1 failed, 904 passed, 26 skipped, 1 warning in 9.32s ====

Re: PR 3774 completes the 6.7.8 code base

2024-02-03 Thread Thomas Passin
On Windows 10, Python 3.12 - warnings summary leo\plugins\leo_babel\tests\lib_test.py:118 C:\Tom\git\leo-editor\leo\plugins\leo_babel\tests\lib_test.py:118: PytestCollectionWarning: cannot collect test class 'TestCmdr' because it has a

Re: Extract lines from file, add to new files

2024-01-31 Thread Thomas Passin via Python-list
On 1/31/2024 9:05 AM, Rich Shepard via Python-list wrote: On Tue, 30 Jan 2024, Thomas Passin via Python-list wrote: If I had a script that's been working for 30 years, I'd probably just use Python to do the personalizing and let the rest of the bash script do the rest, like it always has

Re: Extract lines from file, add to new files

2024-01-31 Thread Thomas Passin via Python-list
be heavily used, sure, you could tweak and optimize. As it is, Rich is getting a chance to improve his python skills no matter which way he goes. -Original Message- From: Python-list On Behalf Of Thomas Passin via Python-list Sent: Tuesday, January 30, 2024 10:37 PM To: python-list@python.org

Re: Extract lines from file, add to new files

2024-01-30 Thread Thomas Passin via Python-list
On 1/30/2024 12:21 PM, Rich Shepard via Python-list wrote: On Tue, 30 Jan 2024, Thomas Passin via Python-list wrote: Fine, my toy example will still be applicable. But, you know, you haven't told us enough to give you help. Do you want to replace text from values in a file? That's been covered

Re: Extract lines from file, add to new files

2024-01-30 Thread Thomas Passin via Python-list
On 1/30/2024 8:37 AM, Rich Shepard via Python-list wrote: On Mon, 29 Jan 2024, Thomas Passin via Python-list wrote: If you aren't going to use one or another existing template system, perhaps the easiest is to use unique strings in the message file. For example: Dear __##so-and-so

Re: Extract lines from file, add to new files

2024-01-29 Thread Thomas Passin via Python-list
On 1/29/2024 11:15 AM, Rich Shepard via Python-list wrote: For my use 1) the salutation and email address (always with an '@') are sequential and 2) I'm developing the script to extract both from the same file. I've looked at my Python books "Python Crash Course," "Effective Python," and

Re:  LeoInteg 1.0.19 Released

2024-01-22 Thread Thomas Passin
After updating, and installing websockets, the new version opened OK in vsc. One thing I noticed is that LeoInteg uses the name "Leo" in the bar displaying its name, and LeoJS uses "LeoJS". This makes it a little unclear whether the "Leo" panel is another instance of LeoJS, or whether it's

Re: LeoInteg using Leo's Null GUI ?

2024-01-22 Thread Thomas Passin
On Monday, January 22, 2024 at 5:09:27 PM UTC-5 Edward K. Ream wrote: On Mon, Jan 22, 2024 at 3:10 PM Thomas Passin wrote: Didn't we decide not to support Jupyter notebooks any more? If so, nbformat can probably be omitted in the future. Good catch. Hehe, VR3 still has some references

Re: LeoInteg using Leo's Null GUI ?

2024-01-22 Thread Thomas Passin
On Monday, January 22, 2024 at 3:49:42 PM UTC-5 Edward K. Ream wrote: setup.py specifies requirements in the section called << define install_requires >>. This section lists the following dependencies: install_requires = [ # Other entries omitted 'nbformat', # for Jupyter

Re: How to replace a cell value with each of its contour cells and yield the corresponding datasets seperately in a list according to a Pandas-way?

2024-01-21 Thread Thomas Passin via Python-list
. Someone else will probably pitch in. Thanks. Le dim. 21 janv. 2024 à 18:28, Thomas Passin via Python-list mailto:python-list@python.org>> a écrit : On 1/21/2024 11:54 AM, marc nicole wrote: > Thanks for the reply, > > I think using a Pandas (or a Numpy)

Re: How to replace a cell value with each of its contour cells and yield the corresponding datasets seperately in a list according to a Pandas-way?

2024-01-21 Thread Thomas Passin via Python-list
t_contours(target_cells)     print(contour_cells)     target_cells_with_contour = apply_contours(target_cells, contour_cells)     datasets = create_possible_datasets(zipf_dataset, target_cells_with_contour)     print(datasets) main() Le dim. 21 janv. 2024 à 16:33, Thomas Passin via Python-list mai

Re: How to replace a cell value with each of its contour cells and yield the corresponding datasets seperately in a list according to a Pandas-way?

2024-01-21 Thread Thomas Passin via Python-list
On 1/21/2024 7:37 AM, marc nicole via Python-list wrote: Hello, I have an initial dataframe with a random list of target cells (each cell being identified with a couple (x,y)). I want to yield four different dataframes each containing the value of one of the contour (surrounding) cells of each

Re: Discuss: Release Leo only via GitHub?

2024-01-20 Thread Thomas Passin
downloaded and unpacked the Leo distro. On Saturday, January 20, 2024 at 5:14:11 PM UTC-5 Edward K. Ream wrote: > On Sat, Jan 20, 2024 at 3:23 PM Thomas Passin wrote: > >> I think that would be all right, although sometimes I have trouble >> finding the release files when I

Re: Discuss: Release Leo only via GitHub?

2024-01-20 Thread Thomas Passin
I think that would be all right, although sometimes I have trouble finding the release files when I want to get an app from GitHub. My main concern would be how to make it painless for a new user to get the dependencies installed. On Saturday, January 20, 2024 at 2:14:18 PM UTC-5 Edward K.

Re: Leo 6.7.7 released

2024-01-20 Thread Thomas Passin
All right, now the pip distro reports Leo 6.7.7. BTW, pip won't upgrade an existing package to one of the same release. There's probably some better way, but I handled it by deleting 6.7.7 and its install directory from Python's site-packages directory (the one in the user's location if

Re: Leo 6.7.7 released

2024-01-18 Thread Thomas Passin
After upgrading from PyPi, my copy claims it is Leo 6.7.8. Otherwise it seems normal but I've only had it open a few minutes. On Thursday, January 18, 2024 at 2:12:51 PM UTC-5 Edward K. Ream wrote: > Leo https://leo-editor.github.io/leo-editor/ 6.7.7 is now available on > GitHub

Re: Question about garbage collection

2024-01-16 Thread Thomas Passin via Python-list
On 1/16/2024 4:17 AM, Barry wrote: On 16 Jan 2024, at 03:49, Thomas Passin via Python-list wrote: This kind of thing can happen with PyQt, also. There are ways to minimize it but I don't know if you can ever be sure all Qt C++ objects will get deleted. It depends on the type of object

Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

2024-01-15 Thread Thomas Passin via Python-list
On 1/15/2024 7:24 PM, Thomas Passin wrote: On 1/15/2024 6:27 PM, Greg Ewing via Python-list wrote: On 16/01/24 11:55 am, Mats Wichmann wrote: Windows natively has something called python.exe and python3.exe which is interfering here I'm wondering whether py.exe should be taught to recognise

Re: Question about garbage collection

2024-01-15 Thread Thomas Passin via Python-list
On 1/15/2024 9:47 PM, Akkana Peck via Python-list wrote: I wrote: Also be warned that some modules (particularly if they're based on libraries not written in Python) might not garbage collect, so you may need to use other methods of cleaning up after those objects. Chris Angelico writes:

Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

2024-01-15 Thread Thomas Passin via Python-list
On 1/15/2024 6:27 PM, Greg Ewing via Python-list wrote: On 16/01/24 11:55 am, Mats Wichmann wrote: Windows natively has something called python.exe and python3.exe which is interfering here I'm wondering whether py.exe should be taught to recognise these stubs and ignore them. This sounds

Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

2024-01-15 Thread Thomas Passin via Python-list
On 1/15/2024 1:26 PM, Mats Wichmann via Python-list wrote: On 1/15/24 09:44, Sibylle Koczian via Python-list wrote: First and foremost I want to understand why I'm seeing this: - Python scripts with "/usr/bin/env python3" as shebang line work as expected on a computer with Windows 10 and

Re: LLMs as Collaborators

2024-01-14 Thread Thomas Passin
Thanks, I didn't know about polars! On Sunday, January 14, 2024 at 11:37:13 PM UTC-5 iamap...@gmail.com wrote: > Jon Udell continues to learn how to make use of LLMs - >> 7 Guiding Principles for Working with LLMs >> >> >

Re: LLMs as Collaborators

2024-01-14 Thread Thomas Passin
Jon Udell continues to learn how to make use of LLMs - 7 Guiding Principles for Working with LLMs <https://thenewstack.io/7-guiding-principles-for-working-with-llms/> It's starting to look useful ... On Tuesday, November 7, 2023 at 12:15:31 AM UTC-5 Thomas Passin wrote: > Here'

Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

2024-01-14 Thread Thomas Passin via Python-list
On 1/14/2024 8:54 AM, Thomas Passin via Python-list wrote: On 1/14/2024 7:48 AM, Sibylle Koczian via Python-list wrote: Am 09.01.2024 um 12:36 schrieb Barry Scott via Python-list: On 7 Jan 2024, at 15:09, Sibylle Koczian via Python-list wrote: Oh, and the two Windows and Python versions

Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

2024-01-14 Thread Thomas Passin via Python-list
On 1/14/2024 7:48 AM, Sibylle Koczian via Python-list wrote: Am 09.01.2024 um 12:36 schrieb Barry Scott via Python-list: On 7 Jan 2024, at 15:09, Sibylle Koczian via Python-list wrote: Oh, and the two Windows and Python versions are on two different computers. Will remove the "/env"

Re: Extract lines from file, add to new files

2024-01-11 Thread Thomas Passin via Python-list
On 1/11/2024 1:27 PM, MRAB via Python-list wrote: On 2024-01-11 18:08, Rich Shepard via Python-list wrote: It's been several years since I've needed to write a python script so I'm asking for advice to get me started with a brief script to separate names and email addresses in one file into two

Re: Discuss: what should path expressions contain?

2024-01-10 Thread Thomas Passin
I just did some testing on Windows, and with an @file node Leo acts as if the os.path functions expanduser() and expandvars() are applied, as well as the abspath() that would be expected (and probably realpath() but I didn't check that). This means that you can set an environmental variable,

Re: Discuss: what should path expressions contain?

2024-01-10 Thread Thomas Passin
Edward made some changes during this thread, IIRC. On Wednesday, January 10, 2024 at 5:21:22 AM UTC-5 Edward K. Ream wrote: > On Tue, Jan 9, 2024 at 1:14 PM jkn wrote: > >> did the work that got done here ever get documented? >> > > Luke, use the find command! > > Searching LeoDocs.leo for

Re: ENB: About leoTokens.py

2024-01-06 Thread Thomas Passin
On Saturday, January 6, 2024 at 7:31:52 AM UTC-5 Edward K. Ream wrote: I could not have refactored the code without Leo. It would be interesting to read more about this. Other IDEs claim to support refactoring. How did Leo make it possible in a way that others would not have? -- You

Re: Using my routines as functions AND methods

2024-01-04 Thread Thomas Passin via Python-list
On 1/3/2024 8:00 PM, Alan Gauld via Python-list wrote: On 03/01/2024 22:47, Guenther Sohler via Python-list wrote: Hi, In my cpython i have written quite some functions to modify "objects". and their python syntax is e.g.\ translate(obj, vec). e.g whereas obj is ALWAYS first argument.

Re: Using my routines as functions AND methods

2024-01-03 Thread Thomas Passin via Python-list
On 1/3/2024 11:17 PM, Thomas Passin wrote: On 1/3/2024 8:00 PM, Alan Gauld via Python-list wrote: On 03/01/2024 22:47, Guenther Sohler via Python-list wrote: Hi, In my cpython i have written quite some functions to modify "objects". and their python syntax is e.g.\ translate(obj,

Re: LeoJS - How To Write To File System And Run External Programs

2024-01-03 Thread Thomas Passin
Yay! On Wednesday, January 3, 2024 at 7:12:26 PM UTC-5 Félix wrote: > I'm going to take a coding break by doing a tutorial exactly about that! > > On Wednesday, January 3, 2024 at 4:56:12 PM UTC-5 tbp1...@gmail.com wrote: > >> Now That leoJS is getting into pretty good shape - and Felix must

Re: Issue #3710: EKR's last lecture

2024-01-03 Thread Thomas Passin
he advantage of novice's mind is that we can start > without the heaviness and even ignore the one related with popularity of > fashion (like the one in Rust these days). > > [1] https://cinemaphile.com/watch?v=Rg3r3gG4nQo > [1a] https://plutojl.org/ > > Cheers, > > Offray

<    1   2   3   4   5   6   7   8   9   10   >