Re: Best way to check if there is internet?

2022-02-08 Thread Abdur-Rahmaan Janhangeer
Thanks everybody for the answers. It was very enlightening. Here's my solution: # using rich console def ensure_internet(): console = Console() domains = [ 'https://google.com', 'https://yahoo.com', 'https://bing.com', 'https://www.ecosia.org', 'https://www.wikipedia.org' ] results = [] with conso

Re: Can't get iterator in the C API

2022-02-08 Thread MRAB
On 2022-02-09 01:12, Jen Kris via Python-list wrote: I am using the Python C API to load the Gutenberg corpus from the nltk library and iterate through the sentences.  The Python code I am trying to replicate is: from nltk.corpus import gutenberg for i, fileid in enumerate(gutenberg.fileids()):

Re: Kind Remainder: How do Practitioners Approach towards Requirements Engineering?

2022-02-08 Thread Avi Gross via Python-list
Is there any way to get this mesage to stop showing up in my mailbox in what seems to be a shotgun approach asking everybody everywhere they can think of to participate in something very amorphous and at the same time having NOTHING particular to do with Python? I consider things like this SPAM

Re: Correct way to setup a package with both compiled C code and Python code?

2022-02-08 Thread Christian Gollwitzer
Am 08.02.22 um 18:57 schrieb Dieter Maurer: Christian Gollwitzer wrote at 2022-2-7 20:33 +0100: we've developed a Python pacakge which consists of both a compiled extension module and some helper functions in Python. Is there a tutorial on how to package such an extension? Look at "https://pac

Can't get iterator in the C API

2022-02-08 Thread Jen Kris via Python-list
I am using the Python C API to load the Gutenberg corpus from the nltk library and iterate through the sentences.  The Python code I am trying to replicate is: from nltk.corpus import gutenberg for i, fileid in enumerate(gutenberg.fileids()):     sentences = gutenberg.sents(fileid)     et

Re: How do you log in your projects?

2022-02-08 Thread Barry
> On 8 Feb 2022, at 14:15, Lars Liedtke wrote: > > Hello, > > inspired by this thread > https://mail.python.org/pipermail/python-list/2022-February/905167.html I > finally came around to send in this question. > > I know how to use python logging generally. Being on the DevOps-Side of > t

Re: How do you log in your projects?

2022-02-08 Thread Marco Sulla
These are a lot of questions. I hope we're not off topic. I don't know if mine are best practices. I can tell what I try to do. On Tue, 8 Feb 2022 at 15:15, Lars Liedtke wrote: > - On a line per line basis? on a function/method basis? I usually log the start and end of functions. I could also lo

Re: Correct way to setup a package with both compiled C code and Python code?

2022-02-08 Thread Dieter Maurer
Christian Gollwitzer wrote at 2022-2-7 20:33 +0100: >we've developed a Python pacakge which consists of both a compiled >extension module and some helper functions in Python. Is there a >tutorial on how to package such an extension? Look at "https://package.python.org";, especially "https://packa

Re: SQLAlchemy: When to initialise a session

2022-02-08 Thread Loris Bennett
"Loris Bennett" writes: > Hi, > > I am writing a fairly simple command-line application which will just > add or delete an entry in a database and then generate a corresponding > email. > > I am using SQLAlchemy to wrap a class around a database and have > > class DatebaseWrapper(): > """

SQLAlchemy: When to initialise a session

2022-02-08 Thread Loris Bennett
Hi, I am writing a fairly simple command-line application which will just add or delete an entry in a database and then generate a corresponding email. I am using SQLAlchemy to wrap a class around a database and have class DatebaseWrapper(): """Encapsulation of the database""" def

How do you log in your projects?

2022-02-08 Thread Lars Liedtke
Hello, inspired by this thread https://mail.python.org/pipermail/python-list/2022-February/905167.html I finally came around to send in this question. I know how to use python logging generally. Being on the DevOps-Side of things at the moment, I naturally began liking to run tools, which no

Kind Remainder: How do Practitioners Approach towards Requirements Engineering?

2022-02-08 Thread ETEM ÇETİN TOPTANİ
Dear Sir or Madam, We prepared a short survey to understand practitioners’ perspectives towards the requirements engineering. Our survey basically aims to clarify on many aspects of the requirements engineering applied in industry, including (i) requirements gathering and specifications, (ii) req

Re: Openning Python program

2022-02-08 Thread Cecil Westerhof via Python-list
Chris Angelico writes: > On Tue, 8 Feb 2022 at 06:51, Cecil Westerhof via Python-list > wrote: >> >> Chris Angelico writes: >> >> >> > How difficult would it be to get people to read those lines, though? >> >> >> >> That does remind me about a system administrator who wanted to make a >> >> poi

Re: Best way to check if there is internet?

2022-02-08 Thread Alan Bawden
And I missed one that was just published last month: https://datatracker.ietf.org/doc/html/rfc9171 Unlike RFC 5050, this version of the protocol actually claims to be a "Proposed Standard". -- Alan Bawden -- https://mail.python.org/mailman/listinfo/python-list

Re: Best way to check if there is internet?

2022-02-08 Thread Alan Bawden
Greg Ewing writes: On 8/02/22 8:51 am, Chris Angelico wrote: > Some day, we'll have people on Mars. They won't have TCP connections - > at least, not unless servers start supporting connection timeouts > measured in minutes or hours - but it wouldn't surprise me if some > sort of c

Re: Logging user activity

2022-02-08 Thread Jack Dangler
On 2/7/22 5:09 PM, Peter J. Holzer wrote: On 2022-02-06 23:30:41 -0800, blessy carol wrote: I have this task where I have to create log files to record user activity whenever they make an entry or view something. Also, I have to create Database log file whenever someone accessed or manipulated