There are also the concepts of Cepstrum
(https://en.wikipedia.org/wiki/Cepstrum) and Quefrency, which are derivatives
of Spectrum and Frequency, with which you can even do speaker-recognition, but
also detection of events.
Lars Liedtke
Lead Developer
[Tel.] +49 721 98993-
[Fax] +49 721 98
On 10/25/2024 12:25 PM, marc nicole via Python-list wrote:
Hello Python fellows,
I hope this question is not very far from the main topic of this list, but
I have a hard time finding a way to check whether audio data samples are
containing empty noise or actual significant voice/noise.
I am usi
On 2024-10-25 17:25, marc nicole via Python-list wrote:
Hello Python fellows,
I hope this question is not very far from the main topic of this list, but
I have a hard time finding a way to check whether audio data samples are
containing empty noise or actual significant voice/noise.
I am using
Hello Python fellows,
I hope this question is not very far from the main topic of this list, but
I have a hard time finding a way to check whether audio data samples are
containing empty noise or actual significant voice/noise.
I am using PyAudio to collect the sound through my PC mic as follows:
Thank you for the hint !
On Fri, Oct 04, 2024 at 09:17:19AM GMT, Cameron Simpson wrote:
On 03Oct2024 22:12, Dan Ciprus (dciprus) wrote:
I'd be interested too :-).
Untested sketch:
def make_thread(target, *a, E=None, **kw):
'''
Make a new Event E and Thread T, pass `[E,*a]`
], lip[5]) # 64, 66
# compute the euclidean distance between the horizontal
# lip landmark (x, y)-coordinates
C = dist.euclidean(lip[0], lip[4]) # 61, 65
# compute the lip aspect ratio
mar = (A + B) / (2.0 * C)
# return the lip aspect ratio
return mar
How to define
On 03Oct2024 22:12, Dan Ciprus (dciprus) wrote:
I'd be interested too :-).
Untested sketch:
def make_thread(target, *a, E=None, **kw):
'''
Make a new Event E and Thread T, pass `[E,*a]` as the target
positional arguments.
A shared preexisting Event may be
I'd be interested too :-).
On Thu, Sep 26, 2024 at 03:34:05AM GMT, marc nicole via Python-list wrote:
Could you show a python code example of this?
On Thu, 26 Sept 2024, 03:08 Cameron Simpson, wrote:
On 25Sep2024 22:56, marc nicole wrote:
>How to create a per-thread event in Py
just the design of threads.
On Wed, Sep 25, 2024 at 7:26 PM marc nicole via Python-list
wrote:
>
> Hello guys,
>
> I want to know how to kill a specific running thread (say by its id)
>
> for now I run and kill a thread like the following:
> # start thread
> thread1 = threading
Could you show a python code example of this?
On Thu, 26 Sept 2024, 03:08 Cameron Simpson, wrote:
> On 25Sep2024 22:56, marc nicole wrote:
> >How to create a per-thread event in Python 2.7?
>
> Every time you make a Thread, make an Event. Pass it to the thread
> worker funct
On 25Sep2024 22:56, marc nicole wrote:
How to create a per-thread event in Python 2.7?
Every time you make a Thread, make an Event. Pass it to the thread
worker function and keep it to hand for your use outside the thread.
--
https://mail.python.org/mailman/listinfo/python-list
How to create a per-thread event in Python 2.7?
On Wed, 25 Sept 2024, 22:47 Cameron Simpson via Python-list, <
python-list@python.org> wrote:
> On 25Sep2024 19:24, marc nicole wrote:
> >I want to know how to kill a specific running thread (say by its id)
> >
> >for
On 25Sep2024 19:24, marc nicole wrote:
I want to know how to kill a specific running thread (say by its id)
for now I run and kill a thread like the following:
# start thread
thread1 = threading.Thread(target= self.some_func(), args=( ...,), )
thread1.start()
# kill the thread
event_thread1
Hello guys,
I want to know how to kill a specific running thread (say by its id)
for now I run and kill a thread like the following:
# start thread
thread1 = threading.Thread(target= self.some_func(), args=( ...,), )
thread1.start()
# kill the thread
event_thread1 = threading.Event
On 2024-08-22 01:44:35 +, Kevin M. Wilson via Python-list wrote:
> break (Old_MacDonald:23 | name[indx] == 'd', indx = 4), based on the doc spec
> in python.org (https://docs.python.org/3/library/pdb.html#debugger-commands)
> Cell In[1], line 20
> break (Old_MacDonald:23 | name[indx] == 'd
break (Old_MacDonald:23 | name[indx] == 'd', indx = 4), based on the doc spec
in python.org (https://docs.python.org/3/library/pdb.html#debugger-commands)
Cell In[1], line 20
break (Old_MacDonald:23 | name[indx] == 'd', indx = 4)
^
SyntaxError: invalid syntax
I got one blan
On 6/26/24 09:29, marc nicole wrote:
Browsing the available version of tensorflow for the dates before January
2021 (date when Python 2.7 stopped being supported) I can't find a
tensorflow version for Python 2.7 that works under Windows.
The reference site I use is https://pypi.org/project/tenso
Browsing the available version of tensorflow for the dates before January
2021 (date when Python 2.7 stopped being supported) I can't find a
tensorflow version for Python 2.7 that works under Windows.
The reference site I use is https://pypi.org/project/tensorflow/
Anybody can point out a compati
Manhattan where most of the streets run either in one
direction or the orthogonal direction. How do you get from say East 14th Street
at 1st Avenue to West 28th Street and 11th Avenue? This is a slight imitation
of how to move a robotic arm that can mainly either go one way or another but
not
What are the parameters to account for in this type of algorithm? are there
some checks to perform the arm moves ? for example angle moves or cartesian
moves based on some distance thresholds? Any idea about the
pseudo-algorithm is welcome.
Thanks.
Le dim. 23 juin 2024 à 10:33, Alan Gauld via Tut
,
target_transformer_list, axis_mask_list, times).
src:
http://doc.aldebaran.com/1-14/dev/python/examples/almath/index.html?highlight=offset
This question is specific to NAO environment but in general how to go
about this task? what is a most common algorithm used in this case? Do
I have to also get
an
> overall algorithm, there may be some people could share but they may not
> easily translate into the package of sorts you are using.
>
> But the web site you point us to may well already contain examples of
> doing some aspects that you might learn from.
>
> For me, this is
On Tue, 7 May 2024 at 03:38, Alan Bawden via Python-list
wrote:
> A good error message shouldn't withhold any information that can
> _easily_ be included. Debugging is more art than science, so there is
> no real way to predict what information might prove useful in solving
> the crime. I emphas
local variables etc.) It's tedious and prone to
errors. So, if you really want to do this automatically for every
error that's going to be quite a bit of work.
On Fri, May 3, 2024 at 6:58 PM Johanne Fairchild via Python-list
wrote:
>
> How to discover what values produced an excepti
Thomas Passin writes:
On 5/3/2024 9:56 AM, Johanne Fairchild via Python-list wrote:
> How to discover what values produced an exception? Or perhaps---why
> doesn't the Python traceback show the values involved in the TypeError?
> For instance:
On 2024-05-03 at 10:56:39 -0300,
Johanne Fairchild via Python-list wrote:
> How to discover what values produced an exception? Or perhaps---why
> doesn't the Python traceback show the values involved in the TypeError?
> For inst
Johanne Fairchild wrote at 2024-5-3 10:56 -0300:
>How to discover what values produced an exception? Or perhaps---why
>doesn't the Python traceback show the values involved in the TypeError?
>For instance:
>
>--8<-
On 5/3/2024 9:56 AM, Johanne Fairchild via Python-list wrote:
How to discover what values produced an exception? Or perhaps---why
doesn't the Python traceback show the values involved in the TypeError?
For instance:
--8<>8---
How to discover what values produced an exception? Or perhaps---why
doesn't the Python traceback show the values involved in the TypeError?
For instance:
--8<>8---
>>> (0,0) < 4
Traceback (most recent call last)
On Thu, 11 Apr 2024 05:00:32 +0200 Gisle Vanem via Python-list wrote:
>Pierre Fortin wrote:
>
>> Over the years, I've tried different mechanisms for applying colors until
>> I got my hands on f-stings; then I created a tiny module with all the
>> colors (cR, cG, etc) which made my life so much sim
Pierre Fortin wrote:
Over the years, I've tried different mechanisms for applying colors until
I got my hands on f-stings; then I created a tiny module with all the
colors (cR, cG, etc) which made my life so much simpler (attached).
Attachments are stripped off in this list.
It would be nice t
On 10Apr2024 23:41, Alan Gauld wrote:
Normally, for any kind of fancy terminal work, I'd say use curses.
My problem with curses is that it takes over the whole terminal - you
need to manage everything from that point on. Great if you want it (eg
some full-terminal tool like `top`) but comple
On 4/10/2024 6:41 PM, Alan Gauld via Python-list wrote:
On 10/04/2024 19:50, WordWeaver Evangelist via Python-list wrote:
I have a simple question. I use the following textPrompt in some of my Jython
modules:
'\n[1;33mYour choice is? (A B C D E): ', maxChars=1, autoAccept=False,
forceUpper
7;t want to use the ncurses windowing functions,
here are some notes on how to do that:
https://github.com/GrantEdwards/Python-curses-and-terminfo
That too is C-Python oriented, and I don't really know how to do the
same things using Jython.
--
Grant
--
https://mail.python.org/mailman/listinfo/python-list
On Wed, 10 Apr 2024 at 18:51, WordWeaver Evangelist via Python-list
wrote:
> I have a simple question. I use the following textPrompt in some of my
> Jython modules:
> '\n [1;33mYour choice is? (A B C D E): ', maxChars=1, autoAccept=False,
> forceUppercase=True)
> Is there a way to add an ANS
On Thu, 11 Apr 2024 04:50:49 +1000 WordWeaver Evangelist via Python-list
wrote:
>Hello List,
>
>I have a simple question. I use the following textPrompt in some of my Jython
>modules:
> '\n[1;33mYour choice is? (A B C D E): ', maxChars=1, autoAccept=False,
> forceUppercase=True)
>Is there a way
On 10/04/2024 19:50, WordWeaver Evangelist via Python-list wrote:
> I have a simple question. I use the following textPrompt in some of my Jython
> modules:
> '\n[1;33mYour choice is? (A B C D E): ', maxChars=1, autoAccept=False,
> forceUppercase=True)
> Is there a way to add an ANSI color cod
ode to the end where the conditions are,
so that the color of the user’s input is of a color of my choosing, instead of
just white?
Thank you very much in advance.
Kind regards,
Bill Kochman
Haven't tried using any of theses techniques, but may define input()
color, as well as print():-
to add an ANSI color code to the end where the
> conditions are, so that the color of the user’s input is of a color
> of my choosing, instead of just white?
I'm not sure what is meant by "the end where the conditions are", nor
do I know what "textPrompt" refers to.
A
Hello List,
I have a simple question. I use the following textPrompt in some of my Jython
modules:
'\n[1;33mYour choice is? (A B C D E): ', maxChars=1, autoAccept=False,
forceUppercase=True)
Is there a way to add an ANSI color code to the end where the conditions are,
so that the color of th
appening that this SO question is about.
regards,
Klaas
Previously asked here:
https://stackoverflow.com/questions/78270044/how-to-get-insight-in-the-relations-between-tracebacks-of-exceptions-in-an-excep
--
https://mail.python.org/mailman/listinfo/python-list
On 2024-01-28 18:16, marc nicole via Python-list wrote:
So I am trying to build a binary tree hierarchy given numerical elements
serving for its leaves (last level of the tree to build). From the leaves I
want to randomly create a name for the higher level of the hierarchy and
assign it to the ch
range [0,3].
All is fine until a certain iteration (k=4) returns parent with range [0,8]
which is overlapping to children ranges and therefore cannot be their
parent.
My question is how to evenly partition such arrays in a binary way and
create such binary tree so that to obtain for k=4 the first range
On 1/21/2024 1:25 PM, marc nicole wrote:
It is part of a larger project aiming at processing data according to a
given algorithm
Do you have any comments or any enhancing recommendations on the code?
I'm not knowledgeable enough about either pandas or numpy, I'm afraid,
just very basic usage.
It is part of a larger project aiming at processing data according to a
given algorithm
Do you have any comments or any enhancing recommendations on the code?
Thanks.
Le dim. 21 janv. 2024 à 18:28, Thomas Passin via Python-list <
python-list@python.org> a écrit :
> On 1/21/2024 11:54 AM, marc ni
On 1/21/2024 11:54 AM, marc nicole wrote:
Thanks for the reply,
I think using a Pandas (or a Numpy) approach would optimize the
execution of the program.
Target cells could be up to 10% the size of the dataset, a good example
to start with would have from 10 to 100 values.
Thanks for the r
Thanks for the reply,
I think using a Pandas (or a Numpy) approach would optimize the execution
of the program.
Target cells could be up to 10% the size of the dataset, a good example to
start with would have from 10 to 100 values.
Let me know your thoughts, here's a reproducible example which I
On 1/21/2024 7:37 AM, marc nicole via Python-list wrote:
Hello,
I have an initial dataframe with a random list of target cells (each cell
being identified with a couple (x,y)).
I want to yield four different dataframes each containing the value of one
of the contour (surrounding) cells of each s
Hello,
I have an initial dataframe with a random list of target cells (each cell
being identified with a couple (x,y)).
I want to yield four different dataframes each containing the value of one
of the contour (surrounding) cells of each specified target cell.
the surrounding cells to consider fo
On 11/12/2023 16.16, Chris Green wrote:
Is there a way to abbreviate the following code somehow?
lv = {'dev':'bbb', 'input':'1', 'name':'Leisure volts'}
sv = {'dev':'bbb', 'input':'0', 'name':'Starter volts'}
la = {'dev':'bbb', 'input':'2', 'name':'Leisure Amps'}
sa = {'dev':
Jon Ribbens wrote:
> On 2023-12-11, Chris Green wrote:
> > Chris Green wrote:
> >> Is there a way to abbreviate the following code somehow?
> >>
> >> lv = {'dev':'bbb', 'input':'1', 'name':'Leisure volts'}
> >> sv = {'dev':'bbb', 'input':'0', 'name':'Starter volts'}
> >> la = {'dev'
On 2023-12-11, Chris Green wrote:
> Chris Green wrote:
>> Is there a way to abbreviate the following code somehow?
>>
>> lv = {'dev':'bbb', 'input':'1', 'name':'Leisure volts'}
>> sv = {'dev':'bbb', 'input':'0', 'name':'Starter volts'}
>> la = {'dev':'bbb', 'input':'2', 'name':'Leisu
On 2023-12-11 15:57, Chris Green via Python-list wrote:
Chris Green wrote:
Is there a way to abbreviate the following code somehow?
lv = {'dev':'bbb', 'input':'1', 'name':'Leisure volts'}
sv = {'dev':'bbb', 'input':'0', 'name':'Starter volts'}
la = {'dev':'bbb', 'input':'2', 'name'
On 2023-12-11, Chris Green via Python-list wrote:
> Is there a way to abbreviate the following code somehow?
>
> lv = {'dev':'bbb', 'input':'1', 'name':'Leisure volts'}
> sv = {'dev':'bbb', 'input':'0', 'name':'Starter volts'}
> la = {'dev':'bbb', 'input':'2', 'name':'Leisure Amps'}
>
Chris Green wrote:
> Is there a way to abbreviate the following code somehow?
>
> lv = {'dev':'bbb', 'input':'1', 'name':'Leisure volts'}
> sv = {'dev':'bbb', 'input':'0', 'name':'Starter volts'}
> la = {'dev':'bbb', 'input':'2', 'name':'Leisure Amps'}
> sa = {'dev':'bbb', 'input'
Is there a way to abbreviate the following code somehow?
lv = {'dev':'bbb', 'input':'1', 'name':'Leisure volts'}
sv = {'dev':'bbb', 'input':'0', 'name':'Starter volts'}
la = {'dev':'bbb', 'input':'2', 'name':'Leisure Amps'}
sa = {'dev':'bbb', 'input':'3', 'name':'Starter Amps'}
I have a north viriginia ec2 linux instance and a windows machine at my home,
how do I connec tthem?
import paramiko
import time
def run_scripts():
# Set your local machine's SSH details
local_machine_ip = ' '
username = 'justk'
private_key_path = 'C:/Users/justk/.ssh/kashish'
Chris Green wrote at 2023-10-28 17:08 +0100:
>I am using the python3 smbus module, but it's hard work because of the
>lack of documentation. Web searches confirm that the documentation is
>somewhat thin!
>
>If you do the obvious this is what you get:-
>
>>>> import smbus
>>>> dir (smbus)
>
Dan Purgert wrote:
> On 2023-10-28, Chris Green wrote:
> > I am using the python3 smbus module, but it's hard work because of the
> > lack of documentation. Web searches confirm that the documentation is
> > somewhat thin!
> >
>
> The SMBus spec is available from http://smbus.org (or at least it
Il Sat, 28 Oct 2023 17:08:00 +0100, Chris Green ha scritto:
> I am using the python3 smbus module, but it's hard work because of the
> lack of documentation. Web searches confirm that the documentation is
> somewhat thin!
>
> If you do the obvious this is what you get:-
>
> >>> import smbus
km wrote:
> Il Sat, 28 Oct 2023 17:08:00 +0100, Chris Green ha scritto:
>
> > I am using the python3 smbus module, but it's hard work because of the
> > lack of documentation. Web searches confirm that the documentation is
> > somewhat thin!
> >
> > If you do the obvious this is what you get:-
I am using the python3 smbus module, but it's hard work because of the
lack of documentation. Web searches confirm that the documentation is
somewhat thin!
If you do the obvious this is what you get:-
>>> import smbus
>>> dir (smbus)
['SMBus', '__doc__', '__file__', '__loader__', '__
On Wed, 25 Oct 2023 at 13:02, Mike H via Python-list
wrote:
> Is it possible to use lambda expression instead of defining a `Key` class?
> Something like `sorted(my_list, key = lambda x, y: x+y > y+x)`?
Look up functools.cmp_to_key.
ChrisA
--
https://mail.python.org/mailman/listinfo/python-lis
gt; > '953433230'
> >
> > nums.sort(cmp=lambda a,b: cmp(a+b, b+a), reverse=True)
> >
> > But how to do this in python 3?
> >
> > Thank you
> While cmp_to_key is neat doing it by hand should also be instructive.
> Essentially you move the comp
Jen Kris via Python-list schreef op 2/10/2023 om 17:06:
My previous message just went up -- sorry for the mangled formatting. Here it
is properly formatted:
I want to write a list of 64-bit integers to a binary file. Every example I
have seen in my research converts it to .txt, but I want
My previous message just went up -- sorry for the mangled formatting. Here it
is properly formatted:
I want to write a list of 64-bit integers to a binary file. Every example I
have seen in my research converts it to .txt, but I want it in binary. I wrote
this code, based on some earlier wor
Dieter, thanks for your comment that:
* In your code, `offset` is `0`, `1`, `2`, ...
but it should be `0 *8`, `1 * 8`, `2 * 8`, ...
But you concluded with essentially the same solution proposed by MRAB, so that
would obviate the need to write item by item because it writes the whole buffer
at o
Jen Kris wrote at 2023-10-2 00:04 +0200:
>Iwant to write a list of 64-bit integers to a binary file. Everyexample I
>have seen in my research convertsit to .txt, but I want it in binary. I wrote
>this code,based on some earlier work I have done:
>
>buf= bytes((len(qs_array)) * 8)
>
>for offset
Thanks very much, MRAB. I just tried that and it works. What frustrated me is
that every research example I found writes integers as strings. That works --
sort of -- but it requires re-casting each string to integer when reading the
file. If I'm doing binary work I don't want the extra over
On 2023-10-01 23:04, Jen Kris via Python-list wrote:
>
> Iwant to write a list of 64-bit integers to a binary file.
Everyexample I have seen in my research convertsit to .txt, but I want
it in binary. I wrote this code,based on some earlier work I have done:
>
> buf= bytes((len(qs_array)) * 8)
On 2 Oct 2023, at 16:02, Jen Kris via Python-list
wrote:
Iwant to write a list of 64-bit integers to a binary file. Everyexample
I have seen in my research convertsit to .txt, but I want it in binary.
I wrote this code,based on some earlier work I have done:
buf= b
Iwant to write a list of 64-bit integers to a binary file. Everyexample I have
seen in my research convertsit to .txt, but I want it in binary. I wrote this
code,based on some earlier work I have done:
buf= bytes((len(qs_array)) * 8)
foroffset in range(len(qs_array)):
item_to_write= byt
>
> Jason Friedman wrote at 2023-8-3 21:34 -0600:
> > ...
> >my_frame = inspect.currentframe()
> > ...
> >My question is: let's say I wanted to add a type hint for my_frame.
>
> `my_frame` will be an instance of `Types.FrameType`.
>
Confirmed. Thank you!
--
https://mail.python.org/mailman/listinf
Jason Friedman wrote at 2023-8-3 21:34 -0600:
> ...
>my_frame = inspect.currentframe()
> ...
>My question is: let's say I wanted to add a type hint for my_frame.
`my_frame` will be an instance of `Types.FrameType`.
--
https://mail.python.org/mailman/listinfo/python-list
> My question is: let's say I wanted to add a type hint for my_frame.
> >
> > my_frame: some_class_name = inspect.currentframe()
> >
> > What would I put for some_class_name?
> > "frame" (without quotations) is not recognized,
> > Nor is inspect.frame.
>
> We know Python code is executed in an exec
On 04/08/2023 15.34, Jason Friedman via Python-list wrote:
import inspect
def my_example(arg1, arg2):
print(inspect.stack()[0][3])
my_frame = inspect.currentframe()
args,_,_,values = inspect.getargvalues(my_frame)
args_rendered = [f"{x}: {values[x]}" for x in args]
print(args_rendered)
my_examp
import inspect
def my_example(arg1, arg2):
print(inspect.stack()[0][3])
my_frame = inspect.currentframe()
args,_,_,values = inspect.getargvalues(my_frame)
args_rendered = [f"{x}: {values[x]}" for x in args]
print(args_rendered)
my_example("a", 1)
The above "works" in the sense it prints what I
sonam Kumari via Python-list schreef op 20/06/2023 om 9:49:
>
> I've tried the above code and the bcc address does not receive the message, on the To & CC addresses receive it.
>
> Here are snippets from my code, perhaps something will stand out to you?
>
> to = 'e...@domain.gov'
> cc = 'e..
On Friday, November 30, 2012 at 7:00:27 AM UTC+5:30, ake...@gmail.com wrote:
> On Tuesday, September 30, 2008 8:00:16 AM UTC-8, Bernhard Walle wrote:
> > Hi,
> >
> > * cindy jones [2008-09-30 19:57]:
> > >
> > > Can someone tel me how to add c
Unsubscribe
On Sat, Apr 29, 2023 at 7:05 PM Chris Angelico wrote:
> On Sun, 30 Apr 2023 at 11:58, Chris Green wrote:
> >
> > Chris Angelico wrote:
> > > On Sat, 29 Apr 2023 at 14:27, Kushal Kumaran
> wrote:
> > > >
> > > > On Fri, Apr 28 2023 at 04:55:41 PM, Chris Green wrote:
> > > > > I'm
On Sun, 30 Apr 2023 at 12:02, jak wrote:
>
> Chris Angelico ha scritto:
> > Using mkdirs when you only want to make one is inviting problems of
> > being subtly wrong, where it creates too many levels of directory.
> > Personally, I would just do:
>
>
> Maybe I only say this because it has happene
Stefan Ram ha scritto:
jak writes:
Maybe I only say this because it has happened to me too many times but
before ignoring the error in the 'except' branch, I would make sure that
if the name exists it is a folder and not a file.
If the name exists and it is a file's name, this will be dete
On Sun, 30 Apr 2023 at 11:58, Chris Green wrote:
>
> Chris Angelico wrote:
> > On Sat, 29 Apr 2023 at 14:27, Kushal Kumaran wrote:
> > >
> > > On Fri, Apr 28 2023 at 04:55:41 PM, Chris Green wrote:
> > > > I'm sure I'm missing something obvious here but I can't see an elegant
> > > > way to do
Chris Angelico ha scritto:
Using mkdirs when you only want to make one is inviting problems of
being subtly wrong, where it creates too many levels of directory.
Personally, I would just do:
Maybe I only say this because it has happened to me too many times but
before ignoring the error in the
Kushal Kumaran wrote:
> On Fri, Apr 28 2023 at 04:55:41 PM, Chris Green wrote:
> > I'm sure I'm missing something obvious here but I can't see an elegant
> > way to do this. I want to create a directory, but if it exists it's
> > not an error and the code should just continue.
> >
> > So, I have
Chris Angelico wrote:
> On Sat, 29 Apr 2023 at 14:27, Kushal Kumaran wrote:
> >
> > On Fri, Apr 28 2023 at 04:55:41 PM, Chris Green wrote:
> > > I'm sure I'm missing something obvious here but I can't see an elegant
> > > way to do this. I want to create a directory, but if it exists it's
> > >
On 30/04/23 2:43 am, jak wrote:
Maybe I expressed myself badly but I didn't mean to propose alternatives
to the EAFP way but just to evaluate the possibility that it is not a
folder.
If it's not a folder, you'll find out when the next thing you
try to do to it fails.
You could check for it ear
require a loss of simplicity.
-Original Message-
From: Python-list On
Behalf Of Kushal Kumaran
Sent: Saturday, April 29, 2023 12:19 AM
To: python-list@python.org
Subject: Re: How to 'ignore' an error in Python?
On Fri, Apr 28 2023 at 04:55:41 PM, Chris Green wrote:
>
On Sat, 29 Apr 2023 at 14:27, Kushal Kumaran wrote:
>
> On Fri, Apr 28 2023 at 04:55:41 PM, Chris Green wrote:
> > I'm sure I'm missing something obvious here but I can't see an elegant
> > way to do this. I want to create a directory, but if it exists it's
> > not an error and the code should j
On Fri, Apr 28 2023 at 04:55:41 PM, Chris Green wrote:
> I'm sure I'm missing something obvious here but I can't see an elegant
> way to do this. I want to create a directory, but if it exists it's
> not an error and the code should just continue.
>
> So, I have:-
>
> for dirname in listofdir
On 28Apr2023 10:39, Mats Wichmann wrote:
For this specific case, you can use os.makedirs:
os.makedirs(dirname, exist_ok=True)
I'm not a great fan of makedirs because it will make all the missing
components, not just the final one. So as an example, if you've got a
NAS mounted backup area at
On 28Apr2023 16:55, Chris Green wrote:
for dirname in listofdirs:
try:
os.mkdir(dirname)
except FileExistsError:
# so what can I do here that says 'carry on regardless'
except:
# handle any other error, which is really an error
# I
On 4/28/23 11:05, MRAB wrote:
On 2023-04-28 16:55, Chris Green wrote:
I'm sure I'm missing something obvious here but I can't see an elegant
way to do this. I want to create a directory, but if it exists it's
not an error and the code should just continue.
So, I have:-
for dirname in lis
On 2023-04-28 16:55, Chris Green wrote:
I'm sure I'm missing something obvious here but I can't see an elegant
way to do this. I want to create a directory, but if it exists it's
not an error and the code should just continue.
So, I have:-
for dirname in listofdirs:
try:
On 4/28/23 09:55, Chris Green wrote:
I'm sure I'm missing something obvious here but I can't see an elegant
way to do this. I want to create a directory, but if it exists it's
not an error and the code should just continue.
So, I have:-
for dirname in listofdirs:
try:
I'm sure I'm missing something obvious here but I can't see an elegant
way to do this. I want to create a directory, but if it exists it's
not an error and the code should just continue.
So, I have:-
for dirname in listofdirs:
try:
os.mkdir(dirname)
except FileExi
h 2023 at 22:51:15 UTC+2, Greg Ewing wrote:
> > > >> On 30/03/23 8:39 am, a a wrote:
> > > >>> How to add clickable url links to the following 3D Matplotlib chart
> > > >>> to make it knowledge representation 3D chart, make of 1,000+ open
>
On Thursday, 30 March 2023 at 13:14:33 UTC+2, a a wrote:
> On Thursday, 30 March 2023 at 07:55:13 UTC+2, Christian Gollwitzer wrote:
> > Am 30.03.23 um 01:11 schrieb a a:
> > > On Wednesday, 29 March 2023 at 22:51:15 UTC+2, Greg Ewing wrote:
> > >> On 30/03/23 8:
On Thursday, 30 March 2023 at 07:55:13 UTC+2, Christian Gollwitzer wrote:
> Am 30.03.23 um 01:11 schrieb a a:
> > On Wednesday, 29 March 2023 at 22:51:15 UTC+2, Greg Ewing wrote:
> >> On 30/03/23 8:39 am, a a wrote:
> >>> How to add clickable url links to the fo
Am 30.03.23 um 01:11 schrieb a a:
On Wednesday, 29 March 2023 at 22:51:15 UTC+2, Greg Ewing wrote:
On 30/03/23 8:39 am, a a wrote:
How to add clickable url links to the following 3D Matplotlib chart to make it
knowledge representation 3D chart, make of 1,000+ open Tabs in Firefox ?
It seems
1 - 100 of 2617 matches
Mail list logo