On Tue, 14 Mar 2023 at 15:28, Thomas Passin wrote:
>
> On 3/13/2023 10:34 PM, scruel tao wrote:
> > Interesting, `raise SystemExit` seems to have the same behavior as
> > `sys.exit`:
> >
> > ```shell
> > python -c "raise SystemExit(100)"
> > echo $?
> > <<< 100
> >
> > python -c " import sys; sys
On 3/13/2023 10:34 PM, scruel tao wrote:
Interesting, `raise SystemExit` seems to have the same behavior as `sys.exit`:
```shell
python -c "raise SystemExit(100)"
echo $?
<<< 100
python -c " import sys; sys.exit(100)"
echo $?
<<< 100
OTOH, you don't want to get too tricky:
(on Windows, obvio
On 3/13/2023 11:50 PM, MRAB wrote:
On 2023-03-14 03:29, Thomas Passin wrote:
On 3/13/2023 10:34 PM, scruel tao wrote:
Lars:
I totally understand your reasoning here, but in some way it
follows the unix philosophy: Do only one thing, but do that good.
I understand, python is not strongly typ
On 2023-03-14 03:29, Thomas Passin wrote:
On 3/13/2023 10:34 PM, scruel tao wrote:
Lars:
I totally understand your reasoning here, but in some way it
follows the unix philosophy: Do only one thing, but do that good.
I understand, python is not strongly typed, so `sys.exit` will be
able to ac
On 3/13/2023 10:34 PM, scruel tao wrote:
Lars:
I totally understand your reasoning here, but in some way it
follows the unix philosophy: Do only one thing, but do that good.
I understand, python is not strongly typed, so `sys.exit` will be
able to accept any types parameters rather than just
Lars:
> I totally understand your reasoning here, but in some way it follows the unix
> philosophy: Do only one thing, but do that good.
I understand, python is not strongly typed, so `sys.exit` will be able to
accept any types parameters rather than just integer.
In order to handle such “other”
On 3/13/2023 9:47 PM, Chris Angelico wrote:
On Tue, 14 Mar 2023 at 12:38, Thomas Passin wrote:
On 3/13/2023 9:07 PM, Chris Angelico wrote:
Of course, all this is predicated on you actually putting whitespace
around your equals signs. If you write it all crunched together as
"x=-5", there's no
On Tue, 14 Mar 2023 at 12:38, Thomas Passin wrote:
>
> On 3/13/2023 9:07 PM, Chris Angelico wrote:
> > Of course, all this is predicated on you actually putting whitespace
> > around your equals signs. If you write it all crunched together as
> > "x=-5", there's no extra clues to work with.
> >
>
On 3/13/2023 9:07 PM, Chris Angelico wrote:
Of course, all this is predicated on you actually putting whitespace
around your equals signs. If you write it all crunched together as
"x=-5", there's no extra clues to work with.
Linters and code reviewers can make use of all the available
informatio
Morten,
Suggesting something is UNPYTHONIC is really not an argument I take
seriously.
You wrote VALID code by the rules of the game and it is not a requirement
that it guesses at what you are trying to do and calls you an idiot!
More seriously, python lets you do some completely obscure things
On 2023-03-14 00:28, Gary Herron wrote:
On 3/13/23 2:26 PM, morp...@gmail.com wrote:
Hi.
I was working in Python today, and sat there scratching my head as the
numbers for calculations didn't add up. It went into negative numbers,
when that shouldn't have been possible.
Turns out I had a ver
On Tue, 14 Mar 2023 at 11:37, Gary Herron wrote:
>
>
> On 3/13/23 2:26 PM, morp...@gmail.com wrote:
> > Hi.
> >
> > I was working in Python today, and sat there scratching my head as the
> > numbers for calculations didn't add up. It went into negative numbers,
> > when that shouldn't have been p
On 3/13/23 2:26 PM, morp...@gmail.com wrote:
Hi.
I was working in Python today, and sat there scratching my head as the
numbers for calculations didn't add up. It went into negative numbers,
when that shouldn't have been possible.
Turns out I had a very small typo, I had =- instead of -=.
I
Hi.
I was working in Python today, and sat there scratching my head as the
numbers for calculations didn't add up. It went into negative numbers,
when that shouldn't have been possible.
Turns out I had a very small typo, I had =- instead of -=.
Isn't it unpythonic to be able to make a mistake l
On Monday, 13 March 2023 at 16:12:04 UTC+1, Thomas Passin wrote:
> On 3/13/2023 12:39 AM, a a wrote:
> > But some unknown reasons Matplotlib and numpy crash my Python 3.8 for
> > Windows , 32-bit and no support is offered
> It is possible, using pip, to downgrade versions (e.g., of Matplotlob
>
On Monday, 13 March 2023 at 16:16:28 UTC+1, Thomas Passin wrote:
> On 3/13/2023 12:39 AM, a a wrote:
> > But what I need is analysis of seismograms from 4,000 seismographs world
> > wide to detect P-wave energy distribution underground around the earthquake
> > to verify EQ Domino Effect
> In tha
On 13Mar2023 10:18, scruel tao wrote:
Chris:
but for anything more complicated, just print and then exit.
It's worth noting, by the way, that sys.exit("error message") will
print that to STDERR, not to STDOUT, which mean that the equivalent
is:
Yes, I know, but don’t you think if `sys.exit` c
Hi,
This seems again to be a topic wandering. Was the original question whether
Python could be used for dealing with Seismic data of some unspecified sort
as in PROCESSING it and now we are debating how to clean various aspects of
data and make things like data.frames and extract subsets for anal
On 3/13/2023 11:54 AM, Rich Shepard wrote:> On Mon, 13 Mar 2023, Thomas
Passin wrote:
>
>> No doubt, depending on the data formats used. But it's still going
>> to be a big task.
>
> Thomas,
>
> True, but once you have a dataframe with all the information about
> all the earthquakes you can extra
On Mon, 13 Mar 2023, Thomas Passin wrote:
No doubt, depending on the data formats used. But it's still going to be a
big task.
Thomas,
True, but once you have a dataframe with all the information about all the
earthquakes you can extract data for every analysis you want to do.
If you've not
On 3/13/2023 11:23 AM, Rich Shepard wrote:
On Mon, 13 Mar 2023, Thomas Passin wrote:
But what I need is analysis of seismograms from 4,000 seismographs
world wide to detect P-wave energy distribution underground around
the earthquake to verify EQ Domino Effect
In that case, you will have to
On Mon, 13 Mar 2023, Thomas Passin wrote:
But what I need is analysis of seismograms from 4,000 seismographs world
wide to detect P-wave energy distribution underground around the earthquake
to verify EQ Domino Effect
In that case, you will have to do a great deal of work to get all that
dat
On 3/13/2023 12:39 AM, a a wrote:
But what I need is analysis of seismograms from 4,000 seismographs world wide
to detect P-wave energy distribution underground around the earthquake to
verify EQ Domino Effect
In that case, you will have to do a great deal of work to get all that
data into a
On 3/13/2023 12:39 AM, a a wrote:
But some unknown reasons Matplotlib and numpy crash my Python 3.8 for Windows ,
32-bit and no support is offered
It is possible, using pip, to downgrade versions (e.g., of Matplotlob
and numpy) to see if you can find versions that work. Of course moving
to
On Sunday, 12 March 2023 at 06:17:54 UTC+1, avi.e...@gmail.com wrote:
> I have used GNU Octave as a sort of replacement for MATLAB as a free
> resource. I have no idea if it might meet your needs.
>
> Although Python is a good environment for many things, if you have no
> knowledge of it yet, i
I totally understand your reasoning here, but in some way it follows the unix
philosophy: Do only one thing, but do that good.
And exiting is something different from printing to STDOUT or STDERR. Yes
sometimes you want to print something before exiting. But then you should do
that explicitly
Chris:
> It doesn't actually take a list of arguments; the square brackets
indicate that arg is optional here.
Oh, I see, it seems that I mistunderstood the document.
> but for anything more complicated, just print and then exit.
> It's worth noting, by the way, that sys.exit("error message") wil
On Mon, 13 Mar 2023 at 20:00, scruel tao wrote:
>
> Currently, I use `sys.exit([arg])` for exiting program and it works fine.
> As described in the document:
> > If another type of object is passed, None is equivalent to passing zero,
> > and any other object is printed to stderr and results in a
Currently, I use `sys.exit([arg])` for exiting program and it works fine.
As described in the document:
> If another type of object is passed, None is equivalent to passing zero, and
> any other object is printed to stderr and results in an exit code of 1.
However, if I want to exit the program w
29 matches
Mail list logo