On 12/11/2024 08:52, Loris Bennett via Python-list wrote:
Cameron Simpson writes:
Generally you should put a try/except around the smallest possible
piece of code.
That is excellent advice.
Best wishes
Rob Cliffe
So:
config = configparser.ConfigParser()
try
call_tracing()| enables explicit recursion of the
tracing function.
Is there any reason it doesn't support
sys.call_tracing(/func/, /args/, kargs)
to call
func(*args, **kargs)
?
Best wishes
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
#x27;Flag2': 2, 'Flag3: 4, '
'__init__' :
__init__})
This is not my area of expertise, but there is a misplaced quote before
'__init__'
that should be after
'Flags3
Correct this, and your example runs without error.
Best wishes
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
On 25/05/2025 00:18, Mats Wichmann wrote:
On 5/23/25 16:05, Rob Cliffe via Python-list wrote:
On 23/05/2025 18:55, Mats Wichmann wrote:
On 5/22/25 21:04, Rob Cliffe via Python-list wrote:
It occurs to me that it might be useful if Python provided a
function to search for a file with a
ing like
C:\Python311\Lib\os.py
This idea was partly inspired by Michael Stemper asking about best
practice for placing, and finding, a configuration file.
Thoughts?
Best wishes
Rob Cliffe
--
https://mail.python.org/mailman3//lists/python-list.python.org
isn't). Alternatively look at the PATH envronment variable, which
contains a list of directories separated by semicolons and which you can
access as os.environ['PATH'] .
Best wishes,
Rob Cliffe
--
https://mail.python.org/mailman3//lists/python-list.python.org
On 23/05/2025 18:55, Mats Wichmann wrote:
On 5/22/25 21:04, Rob Cliffe via Python-list wrote:
It occurs to me that it might be useful if Python provided a function
to search for a file with a given name in various directories (much
as the import.import_lib function searches for a module in
ill only be imported once).
Best wishes,
Rob Cliffe
--
https://mail.python.org/mailman3//lists/python-list.python.org
1001 - 1008 of 1008 matches
Mail list logo