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)
>>>config = configparser.ConfigParser()
>>>confi
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 second-package==0.5.0) (from
>> versions: )
>> No matching
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 = EmailMessage()
mail.set_content(body, cte="quoted-printable")
...
if arg
"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-printable")
>>> ...
>>>
>>> if args.verbose:
>>> print(mail)
>>>
>>>
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:
>> print(mail)
>>
>>which is presumably also correct.
>>
>>T
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. However, when I use the --verbose o
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
>>>body correctly:
>> [...]
>>>So far, so good.
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 arguments, if you have an already-open file you want to read t
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_file() method instead.
>>
>> As you and
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()
>> config.read(config_file)
>> print(config.se
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 print these rows to the terminal using the
>> 'tabu
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 read into a dict. I am doing
>>> something like
>>>
>>> p
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 applications I am using poetry with a pyproject.toml
>> file whic
"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 contains the version information
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
42 matches
Mail list logo