Re: txtorcon 23.5.0

2023-05-19 Thread Benjamin Schollnick
Meejah,

Sorry, but, would you please consider adding a short description to this of 
what txtorcon is.
It’s great that your announcing the update, and highlighting the changes…if I 
used it, I’d be upgrading it.

But I have absolutely no idea why I would want to investigate using it, because 
there is no description of the package.

Well, that’s not 100% true.  From my knowledge of twisted, I know it’s network 
based, and that’s it.  I can’t tell if it’s a server, or client application.

Even just simply adding your 10,000 feet summary:

txtorcon is an implementation of the control-spec 
 for Tor 
 using the Twisted 
 networking library for Python 
.

would have been extremely helpful.

I hope you will take this as the creative criticism that I am offering it as.  

- Benjamin


> On May 18, 2023, at 9:37 PM, mee...@meejah.ca wrote:
> 
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA512
> 
> I'm happy to announce txtorcon 23.5.0 with the following changes:
> 
>  * twisted.web.client.Agent instances now use the same HTTPS policy
>by default as twisted.web.client.Agent.  It is possible to
>override this policy with the tls_context_factory= argument, the
>equivalent to Agent's contextFactory=
>(Thanks to Itamar Turner-Trauring)
>  * Added support + testing for Python 3.11.
>  * No more ipaddress dependency
> 
> You can download the release from PyPI or GitHub (or of
> course "pip install txtorcon"):
> 
>  https://pypi.python.org/pypi/txtorcon/23.5.0
>  https://github.com/meejah/txtorcon/releases/tag/v23.5.0
> 
> Releases are also available from the hidden service:
> 
>  
> http://fjblvrw2jrxnhtg67qpbzi45r7ofojaoo3orzykesly2j3c2m3htapid.onion/txtorcon-23.5.0.tar.gz
>  
> http://fjblvrw2jrxnhtg67qpbzi45r7ofojaoo3orzykesly2j3c2m3htapid.onion/txtorcon-23.5.0.tar.gz.asc
> 
> You can verify the sha256sum of both by running the following 4 lines
> in a shell wherever you have the files downloaded:
> 
> cat < 93fd80a9dd505f698d0864fe93db8b6a9c1144b5feb91530820b70ed8982651c  
> dist/txtorcon-23.5.0.tar.gz
> 987f0a91184f98cc3f0a7eccaa42f5054063744d6ac15e325cfa666403214208  
> dist/txtorcon-23.5.0-py3-none-any.whl
> EOF
> 
> thanks,
> meejah
> -BEGIN PGP SIGNATURE-
> 
> iQFFBAEBCgAvFiEEnVor1WiOy4id680/wmAoAxKAaacFAmRm0DoRHG1lZWphaEBt
> ZWVqYWguY2EACgkQwmAoAxKAaae/+wgAw3gAm65npc7+yMdGFixNmCd+RUXorJq9
> Hy76hK3BWdtNIA6TZF20QFYs3CX5Vepa0vCJOK1N40fYgxoZTb1/828Zp6Zq2+Gn
> piJGvQ0Z1S95ww7lwSV77o67Xf7PozhLR+k7DaOdY8ugvLb/0Rdp15BykF5DWIo8
> PRgqB8uZ418ebmDLLrYtqYTdlcUMxFTji4CHXc4N55/2hVHiFiuFt59os6kJ3iG1
> u90lmQH8vbDyVF7N6tpgEAdWeb7OdgDbtzhVBdBWHrPg+vDO+UL7WZU8ZjDAcdEr
> YzzmK3fIiCH7ngG2E/VIebiJfrjAA9G4eZXltIm7VcWh5css9MXY1Q==
> =TeQp
> -END PGP SIGNATURE-
> -- 
> https://mail.python.org/mailman/listinfo/python-list

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Silly (maybe) question re imported module(s)

2023-05-19 Thread Alan Gauld
On 19/05/2023 07:44, Grizzy Adams via Python-list wrote:

> when typed in console or editor and run with F5 (which saves before it can 
> run) 
> 
> But sometimes saved work (albeit small) when imported does not work any longer

Looks like you are using IDLE? If so, it's possible that in the original
case you had some values set from a previous run that were picked up but
when you reimport later those values are missing. It would help if you
can post any error messages since they should give clues(like name
errors for example).

Also describe how you are "importing" the modules. are you typing

>>> import mymodule

at the interactive prompt or are you using the File->Open menu
to load them into the editor? (It sounds like the latter)

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Silly (maybe) question re imported module(s)

2023-05-19 Thread Barry Scott



> On 19 May 2023, at 07:44, Grizzy Adams via Python-list 
>  wrote:
> 
> Morning All
> 
> I'm working through the tutorial and running / saving work that I wish to 
> keep 
> and build on, most times I can save and (re)import later with no difference 
> to 
> when typed in console or editor and run with F5 (which saves before it can 
> run) 
> 
> 
> But sometimes saved work (albeit small) when imported does not work any longer
> 
> I assume I have missed something, any pointers to what/how/why please

reimport is not 100% reliable, in simple cases it will work, but as your
code gets more complex it can break.

I rarely use reimport. Usually just exit python and start again.

If you are working on scripts then just run them from the Terminal
will work well with any need to use reimport.

Barry

> 
> 
> 
> 
> -- 
> https://mail.python.org/mailman/listinfo/python-list
> 

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: txtorcon 23.5.0

2023-05-19 Thread Jack Dangler


On 5/19/23 06:41, Benjamin Schollnick wrote:
Meejah,  > > Sorry, but, would you please consider adding a short description 
to this of what txtorcon is. > It’s great that your announcing the 
update, and highlighting the changes…if I used it, I’d be upgrading it. 
> > But I have absolutely no idea why I would want to investigate using 
it, because there is no description of the package. > > Well, that’s not 
100% true. From my knowledge of twisted, I know it’s network based, and 
that’s it. I can’t tell if it’s a server, or client application. > > 
Even just simply adding your 10,000 feet summary: > > txtorcon is an 
implementation of the control-spec 
 
for Tor  using the Twisted 
 networking library for Python 
. > > would have been extremely helpful. > > I hope 
you will take this as the creative criticism that I am offering it as. > 
> - Benjamin > > >> On May 18, 2023, at 9:37 PM, mee...@meejah.ca 
wrote: >> >>

I'm happy to announce txtorcon 23.5.0 with the following changes:

 * twisted.web.client.Agent instances now use the same HTTPS policy
   by default as twisted.web.client.Agent.  It is possible to
   override this policy with the tls_context_factory= argument, the
   equivalent to Agent's contextFactory=
   (Thanks to Itamar Turner-Trauring)
 * Added support + testing for Python 3.11.
 * No more ipaddress dependency

You can download the release from PyPI or GitHub (or of
course "pip install txtorcon"):

https://pypi.python.org/pypi/txtorcon/23.5.0
https://github.com/meejah/txtorcon/releases/tag/v23.5.0

Releases are also available from the hidden service:

http://fjblvrw2jrxnhtg67qpbzi45r7ofojaoo3orzykesly2j3c2m3htapid.onion/txtorcon-23.5.0.tar.gz
http://fjblvrw2jrxnhtg67qpbzi45r7ofojaoo3orzykesly2j3c2m3htapid.onion/txtorcon-23.5.0.tar.gz.asc

You can verify the sha256sum of both by running the following 4 lines
in a shell wherever you have the files downloaded:

cat <93fd80a9dd505f698d0864fe93db8b6a9c1144b5feb91530820b70ed8982651c 
dist/txtorcon-23.5.0.tar.gz
987f0a91184f98cc3f0a7eccaa42f5054063744d6ac15e325cfa666403214208 
dist/txtorcon-23.5.0-py3-none-any.whl

EOF

thanks,
meejah

--  >> https://mail.python.org/mailman/listinfo/python-list >



*Top-posting? Really?

Actually, a very cursory look through the intarweb would have yielded 
this -


https://txtorcon.readthedocs.io/en/latest/introduction.html

as well as this -

https://github.com/meejah/txtorcon

While there are one or two graphical package managers (yumex and 
yumex-dnf that I know of), have a go at the cli manager(s) that may live 
on your distro and see if you can get pkg info about it. If you're not 
sure which one(s) you have, try these - Yum, Dnf, Rpm,Apt, Apt-Get, Deb, 
pacman, dpkg, and zypper for starters. *dpkg is my go-to pkgmgr of choice...


Also, the names of many linux-centric utility plugins, extensions, and 
other goodies, while seemingly cryptic, are usually a prominent clue as 
to what the package is used for. The world of *NIX has never been for 
the faint of heart, but there are lots of very helping hands in its 
communities... :)


Jack
--
https://mail.python.org/mailman/listinfo/python-list


Re: Silly (maybe) question re imported module(s)

2023-05-19 Thread Grizzy Adams via Python-list
Friday, May 19, 2023  at 12:25, Barry Scott wrote:
Re: Silly (maybe) question re impor (at least in part)

>
>
>> On 19 May 2023, at 07:44, Grizzy Adams via Python-list 
>>  wrote:
>> 
>> Morning All
>> 
>> I'm working through the tutorial and running / saving work that I wish to 
>> keep 
>> and build on, most times I can save and (re)import later with no difference 
>> to 
>> when typed in console or editor and run with F5 (which saves before it can 
>> run) 
>> 
>> But sometimes saved work (albeit small) when imported does not work any 
>> longer
 
>> I assume I have missed something, any pointers to what/how/why please

>reimport is not 100% reliable, in simple cases it will work, but as your
>code gets more complex it can break.

at the moment my code is very minimal, one saved piece is a nice one-liner that 
I kept because I wanted to remember syntax and how easy/elegant "some" things 
are in python, but if I import it it fails

>I rarely use reimport. Usually just exit python and start again.

I may have confused this I use import to get my saved work, the "re" was to 
shoe it had been saved by the editor

>If you are working on scripts then just run them from the Terminal
>will work well with any need to use reimport.

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: txtorcon 23.5.0

2023-05-19 Thread Benjamin Schollnick

> *Top-posting? Really?

In that case, yes, because the conversion did not depend on what was originally 
said.  Unlike this conversation.

> Actually, a very cursory look through the intarweb would have yielded this -

And that’s the point, if you want to me to consider your package, I should have 
some idea that it’s worth me investing more time into seeing if it can help me. 
 As I mentioned simply stating that it was a “Tor Control management API” would 
have been enough for me to say “That’s not helpful to me”.  On the other hand 
if it said “Django management API/Tool”, I would have gone to the git 
repository and investigated.

Effectively, posting a release notification is an advertisement for the 
package, as well as a notice saying “Here’s some updates”.

When done correctly, it can bring more people to use your package / software…

> While there are one or two graphical package managers (yumex and yumex-dnf 
> that I know of), have a go at the cli manager(s) that may live on your distro 
> and see if you can get pkg info about it. If you're not sure which one(s) you 
> have, try these - Yum, Dnf, Rpm,Apt, Apt-Get, Deb, pacman, dpkg, and zypper 
> for starters. *dpkg is my go-to pkgmgr of choice...
> 
> Also, the names of many linux-centric utility plugins, extensions, and other 
> goodies, while seemingly cryptic, are usually a prominent clue as to what the 
> package is used for. The world of *NIX has never been for the faint of heart, 
> but there are lots of very helping hands in its communities... :)

This has nothing to do with package managers, this has to do with “Why should I 
use this package” or “Should I use this package / software”.  If the release 
notes are being send to people that don’t already have the package then it’s 
worth the couple of sentences or a short paragraph to allow someone that is 
unfamiliar with the package to be able to see if they should investigate the 
package.

Cryptic names maybe cute, but if they are not descriptive, then they are not 
really that helpful other than being unique.

- Benjamin

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tkinter (related)~

2023-05-19 Thread Jack Dangler



On 5/18/23 21:11, Grant Edwards wrote:

On 2023-05-19, Cameron Simpson  wrote:

On 18May2023 12:06, Jack Dangler  wrote:

I thought the OP of the tkinter thread currently running may have
needed to install the tkinter package (since I had the same missing
component error message), so I tried to install the package on to my
Ubu laptop -

pip install tkinter
Defaulting to user installation because normal site-packages is not
writeable
ERROR: Could not find a version that satisfies the requirement tkinter
(from versions: none)
ERROR: No matching distribution found for tkinter

Is there an alternate path to installing this?

Usually tkinter ships with Python because it is part of the stdlib.

On some platforms eg Ubuntu Linux the stdlib doesn't come in completely
unless you ask - a lot of stdlib packages are apt things you need to ask
for. On my Ubunut here tkinter comes from python3-tk. So:

  $ sudo apt-get install python3-tk

And in general, on Linux systems, you'll be better off in the long run
if you use the distro's package manager to install Python packages
instead of using pip. If there is no distro package, you're usually
also better off using 'pip install --user' so that pip isn't messing
about with directories that are normally managed by the distro's
package manager.

When I do have to resort to using pip in install something, I always
do a --dry-run first and make a note of any dependancies that pip is
going to try to install -- so I can install those using the package
manager if possible.

--
Grant


Grant

Great suggestion! I didn't know that --dry-run was available... I'll 
have to look at that arg...


Jack

--
https://mail.python.org/mailman/listinfo/python-list


Re: txtorcon 23.5.0

2023-05-19 Thread Jack Dangler


On 5/19/23 08:42, Benjamin Schollnick wrote:



*Top-posting? Really?


In that case, yes, because the conversion did not depend on what was 
originally said.  Unlike this conversation.


Actually, a very cursory look through the intarweb would have yielded 
this -


And that’s the point, if you want to me to consider your package, I 
should have some idea that it’s worth me investing more time into 
seeing if it can help me.  As I mentioned simply stating that it was a 
“Tor Control management API” would have been enough for me to say 
“That’s not helpful to me”.  On the other hand if it said “Django 
management API/Tool”, I would have gone to the git repository and 
investigated.


Effectively, posting a release notification is an *advertisement for 
the package*, as well as a notice saying “*Here’s some updates”.*

*
*
When done correctly, it can bring more people to use your package / 
software…


While there are one or two graphical package managers (yumex and 
yumex-dnf that I know of), have a go at the cli manager(s) that may 
live on your distro and see if you can get pkg info about it. If 
you're not sure which one(s) you have, try these - Yum, Dnf, Rpm,Apt, 
Apt-Get, Deb, pacman, dpkg, and zypper for starters. *dpkg is my 
go-to pkgmgr of choice...


Also, the names of many linux-centric utility plugins, extensions, 
and other goodies, while seemingly cryptic, are usually a prominent 
clue as to what the package is used for. The world of *NIX has never 
been for the faint of heart, but there are lots of very helping hands 
in its communities... :)


This has nothing to do with package managers, this has to do with “Why 
should I use this package” or “Should I use this package / software”. 
 If the release notes are being send to people that don’t already have 
the package then it’s worth the couple of sentences or a short 
paragraph to allow someone that is unfamiliar with the package to be 
able to see if they should investigate the package.


Cryptic names maybe cute, but if they are not descriptive, then they 
are not really that helpful other than being unique.


- Benjamin

Yeah - um - I get the impression that there is so much going on that 
either I'm not qualified to respond to it, or I'd have to charge by the 
hour to unravel it, I'm just gonna leave this right here...

--
https://mail.python.org/mailman/listinfo/python-list


Re: Silly (maybe) question re imported module(s)

2023-05-19 Thread Alan Gauld
On 19/05/2023 13:36, Grizzy Adams wrote:

>> Looks like you are using IDLE? 
> 
> Yes
> 
> 
> From consol
> 
 import cube
 cubes
> Traceback (most recent call last):
>   File "", line 1, in 
> cubes
> NameError: name 'cubes' is not defined

You imported cube but tried to use cubes. I'm guessing
cubes is defined inside cube so you would need

cube.cubes

> File->Open mymodule.module into the editor, then F5 to run all is well
> 

>  RESTART: D:\Shades\Tools\Python\Temp\cube.py 
 cubes
> [0, 1, 8, 27, 64, 125, 216, 343, 512, 729]


cubes looks like it should be a function but in that case there
should be parens after it. So I'm not sure how that is working!

I'd expect that you need to do:

import cube
cube.cubes()

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


-- 
https://mail.python.org/mailman/listinfo/python-list


Re: What to use instead of nntplib?

2023-05-19 Thread Retrograde


> > Yes, me for one, a good newsreader is really a wonderful way to manage
> > technical 'lists' like this one.
> 
> IMO, there's nothing better. Newsreaders were designed from the
> beginning to deal with the sort of traffic and usage patterns seen in
> mailing lists. Using an MUA (even combined with something like
> procmail) and folders/labels is just a pale imitation of a good
> newsreader.
> 
> > Usenet news is still very much alive though a minority interest now
> > I suspect.
> 
> This list's decision to stop accepting postings via news.gmane.io is
> what prompted me to write my own "inews" application in Python that
> uses SMTP for some groups and NNTP for others when I "post" via slrn.
> 
> I probably use NNTP more to access mailing lists via gmane than I use
> it for accessing the "real" Usenet groups.
> 
> NNTP is not just for Usenet...


I asked this question in February and got the same response.  But on
news.software.readers 16 May, Ted Heise posted a useful perl script.
I'm starting to think I'll move to Perl for Usenet posting; I have yet
to find a Python solution easy enough for this non-technical user.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Silly (maybe) question re imported module(s)

2023-05-19 Thread Alan Gauld
On 19/05/2023 19:46, Grizzy Adams wrote:

> Tried that
>  RESTART: D:\Shades\Tools\Python\Temp\cube.py 
 cubes()
> Traceback (most recent call last):
>   File "", line 1, in 
> cubes()
> TypeError: 'list' object is not callable

Ah, now I understand. cubes is a literal list defined in the module.


> But that was spot on, thanks 
> 
 import cube
 cube.cubes
> [0, 1, 8, 27, 64, 125, 216, 343, 512, 729]

Glad to help.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


-- 
https://mail.python.org/mailman/listinfo/python-list