Re: TkInter Scrolled Listbox class?

2024-11-05 Thread Vishal Chandratreya via Python-list
This is what I created ScrollableContainers for. Its usage deviates a bit from standard Tkinter practices in that you add widgets to the frame attribute of a ScrollableFrameTk instance.  [1]twitter.abaf4b19.webp [2]ScrollableContainers pypi.org For your use case, you coul

Re: Printing UTF-8 mail to terminal

2024-11-05 Thread Peter J. Holzer via Python-list
On 2024-11-04 13:02:21 +0100, Loris Bennett via Python-list wrote: > "Loris Bennett" writes: > > "Loris Bennett" writes: > >> Cameron Simpson writes: > >>> On 01Nov2024 10:10, Loris Bennett wrote: > as expected. The non-UTF-8 text occurs when I do > > mail = EmailMessage() > >>>

Two python issues

2024-11-05 Thread Raymond Boute via Python-list
L.S., Python seem to suffer from a few poor design decisions regarding strings and lists that affect the elegance of the language. (a) An error-prone "feature" is returning -1 if a substring is not found by "find", since -1 currently refers to the last item. An example: >>> s = 'qwertyuiop'

Re: Printing UTF-8 mail to terminal

2024-11-05 Thread Cameron Simpson via Python-list
On 04Nov2024 13:02, Loris Bennett wrote: OK, so I can do: ## if args.verbose: for k in mail.keys(): print(f"{k}: {mail.get(k)}") print('') print(mail.get_content()) ##

Re: Two python issues

2024-11-05 Thread Jason Friedman via Python-list
> > (a) An error-prone "feature" is returning -1 if a substring is not found > by "find", since -1 currently refers to the last item. An example: > > >>> s = 'qwertyuiop' > >>> s[s.find('r')] > 'r' > >>> s[s.find('p')] > 'p' > >>> s[s.find('a')] > 'p' > >>> > > If "find" is unsuccessful, an er

Re: Two python issues

2024-11-05 Thread dn via Python-list
On 6/11/24 10:08, Jason Friedman via Python-list wrote: (a) An error-prone "feature" is returning -1 if a substring is not found by "find", since -1 currently refers to the last item. An example: >>> s = 'qwertyuiop' >>> s[s.find('r')] 'r' >>> s[s.find('p')] 'p' >>> s[s.find('a')] 'p'

Re: Two python issues

2024-11-05 Thread Cameron Simpson via Python-list
On 05Nov2024 15:48, Raymond Boute wrote: Python seem to suffer from a few poor design decisions regarding strings and lists that affect the elegance of the language. (a) An error-prone "feature" is returning -1 if a substring is not found by "find", since -1 currently refers to the last item.

Specifying local dependency with Poetry

2024-11-05 Thread Loris Bennett via Python-list
Hi, I have installed a package, 'first-package, built using Poetry and installed it as root in /usr/local. The package is on sys.path so root can successfully import it. I have now developed a second package which depends on 'first-package'. I would have expected that I could specify this depend

Re: Specifying local dependency with Poetry

2024-11-05 Thread Greg Ewing via Python-list
On 6/11/24 4:13 am, Loris Bennett wrote: [tool.poetry.dependencies] python = "^3.6" first-package = "^1.6.0" Could not find a version that satisfies the requirement first-package<2.0.0,>=1.6.0 (from second-package==0.5.0) (from versions: ) No matching distribution found for first-package<2.0