Left Right writes:
>> I am not entirely convinced by NB2. I am, in fact, a sort of sysadmin
>> person and most of my programs write to a log file. The programs are
>> also moderately complex, so a single program might access a database,
>> query an LDAP server, send email etc., so potentially q
to stderr? Quite apart
from that, I find having a log file a useful for debugging when I am
developing.
Cheers,
Loris
> On Mon, Nov 11, 2024 at 4:00 PM Loris Bennett via Python-list
> wrote:
>>
>> Hi,
>>
>> I have the following in my program:
>>
Chris Angelico writes:
> On Tue, 12 Nov 2024 at 01:59, Loris Bennett via Python-list
> wrote:
>> 2. In terms of generating a helpful error message, how should one
>>distinguish between the config file not existing and the log file not
>>existing?
>
>
Cameron Simpson writes:
> On 11Nov2024 18:24, dieter.mau...@online.de wrote:
>>Loris Bennett wrote at 2024-11-11 15:05 +0100:
>>>I have the following in my program:
>>>try:
>>>logging.config.fileConfig(args.config_file)
>>&
Chris Angelico writes:
> On Tue, 12 Nov 2024 at 01:59, Loris Bennett via Python-list
> wrote:
>> 2. In terms of generating a helpful error message, how should one
>>distinguish between the config file not existing and the log file not
>>existing?
>
>
Dear Jeff,
writes:
> Dear Python Users Group,
>
>
>
> I am currently learning Python. I am blind and use the JAWS screen reader to
> assist me. I am trying to use Python's IDLE editor but find it quite
> challenging. When I move my cursor to a line of code, it reads out the
> letters or words
Hi,
I have the following in my program:
try:
logging.config.fileConfig(args.config_file)
config = configparser.ConfigParser()
config.read(args.config_file)
if args.verbose:
print(f"Configuration file: {args.config_file}")
except FileNotFoundErro
Greg Ewing writes:
> 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
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
"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 = EmailMes
"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()
>>> mail.set_content(body, cte="quoted-pri
Inada Naoki writes:
> 2024年11月2日(土) 0:36 Loris Bennett via Python-list :
>
>> Left Right writes:
>>
>> > There's quite a lot of misuse of terminology around terminal / console
>> > / shell. Please, correct me if I'm wrong, but it looks like you ar
Cameron Simpson writes:
> On 01Nov2024 10:10, Loris Bennett wrote:
>>as expected. The non-UTF-8 text occurs when I do
>>
>> mail = EmailMessage()
>> mail.set_content(body, cte="quoted-printable")
>> ...
>>
>> if args.verbose:
&g
Cameron Simpson writes:
> On 31Oct2024 16:33, Loris Bennett wrote:
>>I have a command-line program which creates an email containing German
>>umlauts. On receiving the mail, my mail client displays the subject and
>>body correctly:
> [...]
>>So far, so good. How
splayed.
I'm not using MS Windows. I am using a Gnome terminal on Debian 12
locally and connecting via SSH to a AlmaLinux 8 server, where I start a
tmux session.
> On Thu, Oct 31, 2024 at 5:19 PM Loris Bennett via Python-list
> wrote:
>>
>> Hi,
>>
>> I have a command-l
"Loris Bennett" writes:
> Cameron Simpson writes:
>
>> On 31Oct2024 16:33, Loris Bennett wrote:
>>>I have a command-line program which creates an email containing German
>>>umlauts. On receiving the mail, my mail client displays the subject and
>&g
Hi,
I have a command-line program which creates an email containing German
umlauts. On receiving the mail, my mail client displays the subject and
body correctly:
Subject: Übung
Sehr geehrter Herr Dr. Bennett,
Dies ist eine Übung.
So far, so good. However, when I use the --verbose opti
Jon Ribbens writes:
> On 2024-10-30, Loris Bennett wrote:
>> Jon Ribbens writes:
>>> On 2024-10-30, Loris Bennett wrote:
>>>> Jon Ribbens writes:
>>>>> As per the docs you link to, the read() method only takes filename(s)
>>>>> as
Hi,
I am using Poetry and have the following in my pyproj.toml
[tool.poetry.scripts]
frobnicate = "frobnicator.cli:frobnicate"
The CLI provides an option '--flavour' and I would like to add further
endpoints for specific values of 'flavour'. I tried adding
frobnicate_foo = "frobnicator.
Jon Ribbens writes:
> On 2024-10-30, Loris Bennett wrote:
>> Jon Ribbens writes:
>>> As per the docs you link to, the read() method only takes filename(s)
>>> as arguments, if you have an already-open file you want to read then
>>> you should use the read
Jon Ribbens writes:
> On 2024-10-29, Loris Bennett wrote:
>> Hi,
>>
>> With Python 3.9.18, if I do
>>
>> try:
>> with open(args.config_file, 'r') as config_file:
>> config = configparser.ConfigParser()
>&
Hi,
With Python 3.9.18, if I do
try:
with open(args.config_file, 'r') as config_file:
config = configparser.ConfigParser()
config.read(config_file)
print(config.sections())
i.e try to read the configuration with the variable defined via 'with
... a
Hi,
Apologies if the following description is to brief - I can expand if no
one knows what I'm on about, but maybe a short description is enough.
I am developing a command line application using Typer. Most commands
need to do something in a database and also do LDAP stuff. Currently
each comma
r...@zedat.fu-berlin.de (Stefan Ram) writes:
> Me (indented by 2) and the chatbot (flush left). Lines lengths > 72!
Is there a name for this kind of indentation, i.e. the stuff you are
writing not being flush left? It is sort of contrary to
what I think of as "normal" indentation. You seem to
"Michael F. Stemper" writes:
> On 25/03/2024 01.56, Loris Bennett wrote:
>> Grant Edwards writes:
>>
>>> On 2024-03-22, Loris Bennett via Python-list wrote:
>>>
>>>> Yes, I was mistakenly thinking that the popping the element would
>
Grant Edwards writes:
> On 2024-03-22, Loris Bennett via Python-list wrote:
>
>> Yes, I was mistakenly thinking that the popping the element would
>> leave me with the dict minus the popped key-value pair.
>
> It does.
Indeed, but I was thinking in the context of
writes:
> Loris wrote:
>
> "Yes, I was mistakenly thinking that the popping the element would leave
> me with the dict minus the popped key-value pair. Seem like there is no
> such function."
>
> Others have tried to explain and pointed out you can del and then use the
> changed dict.
>
> But co
Mark Bourne writes:
> Loris Bennett wrote:
>> Hi,
>> I am using SQLAlchemy to extract some rows from a table of 'events'.
>> From the call to the DB I get a list of objects of the type
>>sqlalchemy.orm.state.InstanceState
>> I would like to
Hi,
I am using SQLAlchemy to extract some rows from a table of 'events'.
>From the call to the DB I get a list of objects of the type
sqlalchemy.orm.state.InstanceState
I would like to print these rows to the terminal using the 'tabulate'
package, the documentation for which says
The module
Tobiah writes:
> I should mention that I wanted to answer your question,
> but I wouldn't actually do this. I'd rather opt for
> your self.config = config solution. The config options
> should have their own namespace.
>
> I don't mind at all referencing foo.config['option'],
> or you could mak
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']
self.server_port = config['server_port']
self.user_base = config['u
Hi,
I am using Typer to create a command-line program with multiple levels
of subcommands, so a typical call might look like
mytool --config-file=~/test/mytool.conf serviceXYZ list people
In the top-level mytool.main, I evaluate the option '--config-file' and
read the config file to initialize
DL Neil writes:
> On 11/25/2023 3:31 AM, Loris Bennett via Python-list wrote:
>> Hi,
>> I want to print some records from a database table where one of the
>> fields contains a JSON string which is read into a dict. I am doing
>> something like
>>
duncan smith writes:
> On 24/11/2023 16:35, duncan smith wrote:
>> On 24/11/2023 14:31, Loris Bennett wrote:
>>> Hi,
>>>
>>> I want to print some records from a database table where one of the
>>> fields contains a JSON string which is rea
Hi,
I want to print some records from a database table where one of the
fields contains a JSON string which is read into a dict. I am doing
something like
print(f"{id} {d['foo']} {d['bar']}")
However, the dict does not always have the same keys, so d['foo'] or
d['bar'] may be undefined. I ca
n-a-flush-and-commit-baec6c2410a9
>
>
> HTH
Yes, thank you, it does. I hadn't been aware of 'flush'.
> Jacob Kruger
> +2782 413 4791
> "Resistance is futile!...Acceptance is versatile..."
>
>
> On 2023/11/10 11:15, Loris Bennett via Python-list wrot
Hi,
In my MariaDB database I have a table 'people' with 'uid' as the primary
key and a table 'groups' with 'gid' as the primary key. I have a third
table 'memberships' with 'uid' and 'gid' being the primary key and the
constraint that values for 'uid' and 'gid' exist in the tables 'people'
and 'g
"Loris Bennett" writes:
> "Loris Bennett" writes:
>
>> Hi,
>>
>> I have two applications. One uses the system version of Python, which
>> is 3.6.8, whereas the other uses Python 3.10.8 installed in a non-system
>> path. For both appl
"Loris Bennett" writes:
> Hi,
>
> I have two applications. One uses the system version of Python, which
> is 3.6.8, whereas the other uses Python 3.10.8 installed in a non-system
> path. For both applications I am using poetry with a pyproject.toml
> file which cont
Hi,
I have two applications. One uses the system version of Python, which
is 3.6.8, whereas the other uses Python 3.10.8 installed in a non-system
path. For both applications I am using poetry with a pyproject.toml
file which contains the version information and __init__.py at the root
which con
Hi,
I use poetry to develop system software packages as a normal user. To
install the packages I use, again as a normal user
export PYTHONUSERBASE=/some/path
pip3 install --user somepackage.whl
and add /some/path to
/usr/lib64/python3.6/site-packages/zedat.pth
This works well enough,
Hi,
Does anyone know how I can display the CPU instruction sets which were
used when TensorFlow was compiled?
I initially compiled TF on a machine with a CPU which supports
AVX512_VNNI. I subsequently recompiled on a second machine without
AVX512_VNNI, but when I run a test program on the second
Hi,
Having solved my problem regarding setting up 'logger' such that it is
accessible throughout my program (thanks to the help on this list), I
now have problem related to a slightly similar issue.
My reading suggests that setting up a module with a Config class which
can be imported by any part
"Loris Bennett" writes:
> dn writes:
>
>> On 01/04/2023 02.01, Loris Bennett wrote:
>>> Hi,
>>> In my top level program file, main.py, I have
>>>def main_function():
>>>parser = argparse.ArgumentParser(description=&qu
dn writes:
> On 01/04/2023 02.01, Loris Bennett wrote:
>> Hi,
>> In my top level program file, main.py, I have
>>def main_function():
>>parser = argparse.ArgumentParser(description="my prog")
>>...
>>
Peter Otten <__pete...@web.de> writes:
> On 31/03/2023 15:01, Loris Bennett wrote:
[snip (53 lines)]
> Your problem has nothing to do with logging -- it's about visibility
> ("scope") of names:
>
>>>> def use_name():
> print(name)
&
Hi,
In my top level program file, main.py, I have
def main_function():
parser = argparse.ArgumentParser(description="my prog")
...
args = parser.parse_args()
config = configparser.ConfigParser()
if args.config_file is None:
config_file = DEFAULT_CONFI
windhorn writes:
> I have an older laptop I use for programming, particularly Python and
> Octave, running a variety of Debian Linux, and I am curious if there
> is a "standard" place in the file system to store this type of program
> file. OK, I know they should go in a repository and be managed
Cameron Simpson writes:
> On 28Mar2023 08:05, Dennis Lee Bieber wrote:
>> So far, you seem to be the only person who has ever asked for
>> asingle
>>entity incorporating an EPOCH (datetime.datetime) + a DURATION
>>(datetime.timedelta).
>
> But not the only person to want one. I've got a
Thomas Passin writes:
> On 3/27/2023 11:34 AM, rbowman wrote:
>> On Mon, 27 Mar 2023 15:00:52 +0200, Loris Bennett wrote:
>>
>>>I need to deal with what I call a 'period', which is a span of time
>>>limited by two dates, start and end. The p
Dennis Lee Bieber writes:
> On Tue, 28 Mar 2023 08:14:55 +0200, "Loris Bennett"
> declaimed the following:
>
>>
>>No, it doesn't. I already know about timedelta. I must have explained
>>the issue badly, because everyone seems to be fixating on the
&
r...@zedat.fu-berlin.de (Stefan Ram) writes:
> r...@zedat.fu-berlin.de (Stefan Ram) writes:
>>d = datetime_diff.days
>>h, rem = divmod( datetime_diff.seconds, 3600 )
>>m, s = divmod( rem, 60 )
>>print( f'{d:02}-{h:02}:{m:02}:{s:02}' )
>
> If the default formatting is acceptable to you, you can a
Hi,
I have been around long enough to know that, due to time-zones, daylight
saving and whatnot, time-related stuff is complicated. So even if I
think something connected with time should exist, there may well be a
very good reason why it does not.
My problem:
I need to deal with what I call
Simon Ward writes:
> On Thu, Mar 16, 2023 at 07:45:18AM +1300, dn via Python-list wrote:
>> There is a PyPi library called pluggy (not used it). I've used
>> informal approaches using an ABC as a framework/reminder (see
>> @George's response).
>
> typing.Protocol is also useful here as the plugin
Hi,
I have written a program which, as part of the non-core functionality,
contains a module to generate email. This is currently very specific
to my organisation, so the main program contains
import myorg.mailer
This module is specific to my organisation in that it can ask an
internal serv
Anssi Saari writes:
> "Loris Bennett" writes:
>
>> I am aware that an individual user could use (mini)conda to install a
>> more recent version of Python in his/her home directory, but I am
>> interested in how root would install such a program.
>
> Ro
versions to do the right thing.
Cheers,
Loris
> From: Python-list
> on behalf of Loris Bennett
> Date: Tuesday, March 14, 2023 at 12:27 PM
> To: python-list@python.org
> Subject: Distributing program for Linux
> *** Attention: This is an external email. Use caution responding,
Hi,
If I write a system program which has Python >= 3.y as a dependency,
what are the options for someone whose Linux distribution provides
Python 3.x, where x < y?
I am aware that an individual user could use (mini)conda to install a
more recent version of Python in his/her home directory, but I
Hen Hanna writes:
> in a LaTeX file, after the (1st) \end{document} line,
> i can put any random Junk i want(afterwards) until the end of the
> file.
>
>
> Is there a similar Method for a.py file ?
>
> Since i know of no such trick, i sometimes put this (be
Mats Wichmann writes:
> On 11/27/22 16:40, Skip Montanaro wrote:
>> I have a script to which I'd like to add a --version flag. It should print
>> the version number then exit, much in the same way --help prints the help
>> text then exits. I haven't been able to figure that out. I always get a
>>
Thomas Passin writes:
> On 11/24/2022 9:06 AM, Loris Bennett wrote:
>> Thomas Passin writes:
>>
>>> On 11/23/2022 11:00 AM, Loris Bennett wrote:
>>>> Hi,
>>>> I am using pandas to parse a file with the following structure:
>>>> Nam
Thomas Passin writes:
> On 11/23/2022 11:00 AM, Loris Bennett wrote:
>> Hi,
>> I am using pandas to parse a file with the following structure:
>> Name filesettype KB quota limit
>> in_doubtgrace |files quotalimit in_
Hi,
I am using pandas to parse a file with the following structure:
Name filesettype KB quota limit in_doubt
grace |files quotalimit in_doubtgrace
shortname sharedhome USR14097664 524288000 545259520 0
none | 107110
Hi Conrado,
"\"Jorge Conrado Conforte\"" writes:
> Hi,
>
>
>
>
> I installed GDAL using the pip command and conda. But, I did:
>
> import gdal and I had:
Depending on your GDAL version, you might find you have to do
from osgeo import gdal
See
https://gdal.org/api/python_bindings.html#
Hi,
Say I have two modules: main application and a utility.
With poetry I can add the utility as local dependency to the main
application thus:
poetry add ../utilities/mailer/dist/my_mailer-0.1.0-py3-none-any.whl
This then generates the following in the pyproj.toml of the main
application:
Antoon Pardon writes:
> Op 4/08/2022 om 13:51 schreef Loris Bennett:
>> Hi,
>>
>> I am constructing a list of dictionaries via the following list
>> comprehension:
>>
>>data = [get_job_efficiency_dict(job_id) for job_id in job_ids]
>>
>&g
Hi,
I am constructing a list of dictionaries via the following list
comprehension:
data = [get_job_efficiency_dict(job_id) for job_id in job_ids]
However,
get_job_efficiency_dict(job_id)
uses 'subprocess.Popen' to run an external program and this can fail.
In this case, the dict should jus
r...@zedat.fu-berlin.de (Stefan Ram) writes:
> "Loris Bennett" writes:
>>data = [get_job_efficiency_dict(job_id) for job_id in job_ids]
> ...
>>filtered_data = list(filter(None, data))
>
> You could have "get_job_efficiency_dict" return an iterable
Hi,
I want to plot some data which are collected over time. I either want
to specify start and/or end times for the plot, or specify last week, month
or year. So the usage would look like:
plot_data [[--start START --end END] | --last LAST ]
I know about argsparse's mutually exclusive group,
r...@zedat.fu-berlin.de (Stefan Ram) writes:
> "Loris Bennett" writes:
>>However, in the development environment, if I run
>> python stoat/main.py hpc user --help
>>then is
>> stoat/hpc/main.py
>>being found via
>> import hpc.main
>>becau
Hi Stefan,
r...@zedat.fu-berlin.de (Stefan Ram) writes:
> "Loris Bennett" writes:
>>Why is the module 'hpc' not found by the poetry script?
>
> I have tried to execute the following sequence of shell
> commands to understand your problem. Here they
r...@zedat.fu-berlin.de (Stefan Ram) writes:
> "Loris Bennett" writes:
>>However, this raises the question of why it worked in the first place
>>in the poetry shell.
>
> It might have had a different or extended sys.path.
In the poetry shell sys.path has this
"Loris Bennett" writes:
> Hi,
>
> The following is a little bit involved, but I hope can make the problem clear.
>
> Using poetry I have written a dummy application which just uses to typer
> to illustrate a possible interface design. The directory structure is a
Hi,
The following is a little bit involved, but I hope can make the problem clear.
Using poetry I have written a dummy application which just uses to typer
to illustrate a possible interface design. The directory structure is a
follows:
$ tree -P *.py
.
|-- dist
|-- stoat
| |-- hpc
Lars Liedtke writes:
> Ansible has got a shell module, so you could run custom commands on all
> hosts. But it gets more difficult in parsing the output afterwards.
If you just want to copy files, pdsh[1] or clush[2] might be enough.
Cheers,
Loris
Footnotes:
[1] https://github.com/chaos/pdsh
Chris Angelico writes:
> On Wed, 18 May 2022 at 04:05, Loris Bennett
> wrote:
>>
>> [snip (26 lines)]
>>
>> > I think you had a problem before that. Debian testing is not an
>> > operating system you should be using if you have a fairly good
>
o1bigtenor writes:
> Greetings
>
> I was having space issues in my /usr directory so I deleted some
> programs thinking that the space taken was more an issue than having
> older versions of the program.
>
> So one of the programs I deleted (using rm -r) was python3.9.
Deleting anything from /us
[snip (26 lines)]
> I think you had a problem before that. Debian testing is not an
> operating system you should be using if you have a fairly good
> understanding of how Debian (or Linux in general) works.
Should be
I think you had a problem before that. Debian testing is not an
operatin
r...@zedat.fu-berlin.de (Stefan Ram) writes:
> "Loris Bennett" writes:
>>My question: What is the analogue to initialising an object via the
>>constructor for a module?
>
> If you need a class, you can write a class.
>
> When one imports a modu
Julio Di Egidio writes:
> On Friday, 29 April 2022 at 09:50:08 UTC+2, Loris Bennett wrote:
>> Hi,
>>
>> If I do
>>
>> import re
>> pattern =
>> re.compile(r'(?P\d*)(-?)(?P\d\d):(?P\d\d):(?P\d\d)')
>> s = '104-02:47:06&
"Loris Bennett" writes:
> r...@zedat.fu-berlin.de (Stefan Ram) writes:
>
>> "Loris Bennett" writes:
>>>I thought that 'days' would default to '0'.
>>
>> It will get the value '0' if (?P\d*) does
>>
r...@zedat.fu-berlin.de (Stefan Ram) writes:
> "Loris Bennett" writes:
>>I thought that 'days' would default to '0'.
>
> It will get the value '0' if (?P\d*) does
> /not/ participate in the match.
>
> In your case, it /d
Hi,
If I do
import re
pattern =
re.compile(r'(?P\d*)(-?)(?P\d\d):(?P\d\d):(?P\d\d)')
s = '104-02:47:06'
match = pattern.search(s)
match_dict = match.groupdict('0')
I get
match_dict
{'days': '104', 'hours': '02', 'minutes': '47', 'seconds': '06'}
However, if the string has no in
Hi,
I have a command-line script in Python to get the correct salutation for
a user name in either English or German from a 'salutation server':
$ get_salutation alice
Dear Professor Müller
$ get_salutation alice -l de
Sehr geehrte Frau Professorin Müller
The hostname, port, user and pas
"Loris Bennett" writes:
> Hi,
>
> I am using matplotlib to create scatterplot where the colour depends on
> the y-value. Additionally I want to project the y-values onto a rotated
> histogram along the right side of the scatterplot.
>
> My problem is that with my
Hi,
I am using matplotlib to create scatterplot where the colour depends on
the y-value. Additionally I want to project the y-values onto a rotated
histogram along the right side of the scatterplot.
My problem is that with my current code, the colours used for the
histogram are normalised to th
Dennis Lee Bieber writes:
> On Tue, 19 Apr 2022 15:51:09 +0200, "Loris Bennett"
> declaimed the following:
>
>>If I am merely trying to represent part a very large number of seconds
>>as a number of years, 365 days per year does not seem that controversial
>
Random832 writes:
> On Tue, Apr 19, 2022, at 07:11, Loris Bennett wrote:
>> I now realise that timedelta is not really what I need. I am
>> interested solely in pure periods, i.e. numbers of seconds, that I
>> can convert back and forth from a format such as
>
> A t
Jon Ribbens writes:
> On 2022-04-19, Loris Bennett wrote:
>> If I am merely trying to represent part a very large number of seconds
>> as a number of years, 365 days per year does not seem that controversial
>> to me. Obviously there are issues if you expect all periods of
Jon Ribbens writes:
> On 2022-04-19, Loris Bennett wrote:
>> I now realise that timedelta is not really what I need. I am interested
>> solely in pure periods, i.e. numbers of seconds,
>
> That's exactly what timedelta is.
>
>> that I can convert back and for
Jon Ribbens writes:
> On 2022-04-19, Loris Bennett wrote:
>> Jon Ribbens writes:
>>> On 2022-04-19, Loris Bennett wrote:
>>>> I now realise that timedelta is not really what I need. I am interested
>>>> solely in pure periods, i.e. numbers of seconds
"Peter J. Holzer" writes:
> On 2022-04-16 20:35:22 -, Jon Ribbens via Python-list wrote:
>> On 2022-04-16, Peter J. Holzer wrote:
>> > On 2022-04-16 14:22:04 -, Jon Ribbens via Python-list wrote:
>> >> ... although now having looked into the new 'zoneinfo' module slightly,
>> >> it reall
"Loris Bennett" writes:
> Hi,
>
> With Python 3.9.2 I get
>
> $ import datetime
> $ s = "1-00:01:01"
> $ t = datetime.datetime.strptime(s, "%d-%H:%M:%S")
> $ d = datetime.timedelta(days=t.day, hours=t.hour, minutes=t.minute,
> se
Hi,
With Python 3.9.2 I get
$ import datetime
$ s = "1-00:01:01"
$ t = datetime.datetime.strptime(s, "%d-%H:%M:%S")
$ d = datetime.timedelta(days=t.day, hours=t.hour, minutes=t.minute,
seconds=t.second)
$ d.days
1
$ d.seconds
61
$ d.minutes
AttributeError: 'datetime.timedelta
Marco Sulla writes:
> On Fri, 11 Mar 2022 at 19:10, Michael Torrie wrote:
>> Both Debian stable and Ubuntu LTS state they have a five year support
>> life cycle.
>
> Yes, but it seems that official security support in Debian ends after
> three years:
>
> "Debian LTS is not handled by the Debian
Dieter Maurer writes:
> Loris Bennett wrote at 2022-3-10 13:16 +0100:
>>I have a command which produces output like the
>>following:
>>
>> Job ID: 9431211
>> Cluster: curta
>> User/Group: build/staff
>> State: COMPLETED (exit code 0)
>> Nod
Marco Sulla writes:
> On Thu, 10 Mar 2022 at 04:50, Michael Torrie wrote:
>>
>> On 3/9/22 13:05, Marco Sulla wrote:
>> > So my laziness pays. I use only LTS distros, and I update only when
>> > there are security updates.
>> > PS: any suggestions for a new LTS distro? My Lubuntu is reaching its
Hi,
I have a command which produces output like the
following:
Job ID: 9431211
Cluster: curta
User/Group: build/staff
State: COMPLETED (exit code 0)
Nodes: 1
Cores per node: 8
CPU Utilized: 01:30:53
CPU Efficiency: 83.63% of 01:48:40 core-walltime
Job Wall-clock time: 00:13:35
Dennis Lee Bieber writes:
> On Tue, 01 Mar 2022 08:35:05 +0100, Loris Bennett
> declaimed the following:
>
>>Thanks for the various suggestions. The data I need to store is just a
>>dict with maybe 3 or 4 keys and short string values probably of less
>>than 32 char
Robert Latest writes:
> Loris Bennett wrote:
>> Thanks for the various suggestions. The data I need to store is just a
>> dict with maybe 3 or 4 keys and short string values probably of less
>> than 32 characters each per event. The traffic on the DB is going to be
>&g
1 - 100 of 167 matches
Mail list logo