.
Barry
--
https://mail.python.org/mailman/listinfo/python-list
t; ...
> ... def __len__(self):
> ... return 10
> >>> s = Squares()
> >>> s[9]
> 81
>
> All 10 squares are generated on-the-fly (though all int objects already
> exist due to the small int caching on CPython).
>
> --
> https://mail.
1.2, -40.0, 0.4, -5.5, -1.5, -20.0, 0.9,
> -3.5, -1.9, -15.0, -13.0, 1.3, -1.3, -3.6, -1.0, -1.1]
> azlist = [float(i) for i in azlist]
> closestaz = min(azlist, key=lambda x: abs(x - azdegpattrev))
> existattn = azattndic[closestaz]
> siglevfromexist = 34.8 + existattn
al
> daily time seriee for several years. Please can someone help me. I would
> like to plot on X axis only the values o the year.
>
> Thanks,
>
> Conrado
> --
> https://mail.python.org/mailman/listinfo/python-list
>
--
Paul Barry, t: @barrypj <https://twitter.com/bar
th Java, so we try to work around Python2.x.
> --
> https://mail.python.org/mailman/listinfo/python-list
>
--
Paul Barry, t: @barrypj <https://twitter.com/barrypj> - w:
http://paulbarry.itcarlow.ie - e: [email protected]
Lecturer, Computer Networking: Institute of Technology, Carlow, Ireland.
--
https://mail.python.org/mailman/listinfo/python-list
ct):
> a = ''
> b = ''
> def __init__(self):
> a= 'aa'
> b= 'ab'
>
> class ClassB(object):
> def __init__(self):
> self.c = 'ba'
> self.d = 'bb'
>
> def main():
> obja = ClassA
> objb = ClassB
>
> sets = set(obja, objb)
> contracts[1] = sets
>
> print('Sets ', contracts)
>
> # with the logic like ( not working too)
> if obja.a = 'aa':
> contracts[1].obja.a = 'ABC'
>
>
> if __name__ == '__main__':
> main()
>
>
> ### code end
>
> appreciate your guidance
> --
> https://mail.python.org/mailman/listinfo/python-list
>
--
Paul Barry, t: @barrypj <https://twitter.com/barrypj> - w:
http://paulbarry.itcarlow.ie - e: [email protected]
Lecturer, Computer Networking: Institute of Technology, Carlow, Ireland.
--
https://mail.python.org/mailman/listinfo/python-list
Life is too short... 😉
On 15 Jun 2017 08:17, "Steven D'Aprano" wrote:
Now that Java 8 includes a Javascript interpreter (Nashorn) as part of
the JDK, and since Javascript is The Future™, does Python need a
Javascript interpreter in the standard library?
If Python came with a Javascript interpre
rry Reedy
> escreveu:
>
> > https://thenewstack.io/instagram-makes-smooth-move-python-3/
> > --
> > Terry Jan Reedy
> >
> > --
> > https://mail.python.org/mailman/listinfo/python-list
> >
> --
> https://mail.python.org/mailman/listinfo/python-list
>
help
> --
> https://mail.python.org/mailman/listinfo/python-list
>
--
Paul Barry, t: @barrypj <https://twitter.com/barrypj> - w:
http://paulbarry.itcarlow.ie - e: [email protected]
Lecturer, Computer Networking: Institute of Technology, Carlow, Ireland.
--
https://mail.python.org/mailman/listinfo/python-list
google.com/file/d/0B1D4AyluMGU0enoxbElGTV94Q0E/view?usp=drive_web>
> here it is thanks for quick reply
>
> On Sat, Jun 24, 2017 at 3:14 PM, Paul Barry
> wrote:
>
>> Any chance you could post one line of data so we can see what we have to
>> work with?
>>
>>
Forgot to include this reply to the list (as others may want to comment).
-- Forwarded message --
From: Paul Barry
Date: 24 June 2017 at 12:21
Subject: Re: Unable to convert pandas object to string
To: Bhaskar Dhariyal
Note that .info(), according to its docs, gives you a
projects/py-decorators-tutorial
> >
> > "No Results found."
> >
> > --
> > To email me, substitute nowhere->runbox, invalid->com.
> > --
> > https://mail.python.org/mailman/listinfo/python-list
> >
> --
> https://mail
2017 at 07:11, Bhaskar Dhariyal
wrote:
> Hi!
>
> I have 2 dataframe i.e. df1['first_name'] and df2['last_name']. I want to
> make it as df['name']. How to do it using pandas dataframe.
>
> first_name
> --
> bhaskar
>
ooks/03.07-Merge-and-Join.ipynb
- this should take about 20 minutes to read, and may be of use to you.
Paul.
On 28 June 2017 at 12:19, Bhaskar Dhariyal
wrote:
> On Wednesday, 28 June 2017 14:43:48 UTC+5:30, Paul Barry wrote:
> > This should do it:
> >
> > >>> impo
On Wed, Jun 28, 2017 at 5:17 PM, Paul Barry
> wrote:
>
>> On the line that's failing, your code is this:
>>
>> combinedX=combinedX+dframe['tf']
>>
>> which uses combinedX on both sides of the assignment statement - note
>> that Python is r
Maybe look at using .concat instead of +
See:
http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/03.06-Concat-And-Append.ipynb
On 28 June 2017 at 13:02, Paul Barry wrote:
>
> Maybe try your code on a sub-set of your data - perhaps 1000 lines of
an anyone suggest me how should i proceed.?
>
> What have you tried?
>
> Why do you need regular expression?
>
> >>> s = 'first-324-True-rms-kjhg-Meterc639.html'
>
> >>> s[-4:]
> 'html'
>
> Regards
> Johann
> --
> Because
local alias to a specific attribute within that
> module.
>
FYI python idea are discussed on https://discussion.fedoraproject.org/ these
days.
You will get a lot of feedback there.
Barry
--
https://mail.python.org/mailman3//lists/python-list.python.org
On Thursday, April 5, 2012 11:28:01 PM UTC-5, rusi wrote:
> On Apr 5, 4:06 pm, Duncan Booth wrote:
> > Steven D'Aprano wrote:
> > > JSON expects double-quote marks, not single:
> > > v = json.loads("{'test':'test'}") fails
> > > v = json.loads('{"test":"test"}') succeeds
> >
> > You mea
I thought that the point of the else clause is that it is reached only
if there is no exception in the try clause.
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 16, 10:54 am, Steve Ferg
wrote:
> This is a question for the language mavens that I know hang out here.
> It is not Python related, except that recent comparisons of Python to
> Google's new Go language brought it to mind.
>
> NOTE that this is *not* a suggestion to change Python. I like P
> On 7 Jun 2023, at 16:39, Florian Guilbault via Python-list
> wrote:
>
> Dear Python Technical Team,
>
> I hope this email finds you well. I am reaching out to you today to seek
> assistance with an issue I am facing regarding the installation of 'pip'
> despite my numerous attempts to reso
esponsible with dealing in a application-domain specific with
with that situation.
In other cases I have API that returns a default list, often [].
It all depends on the design needs.
Barry
--
https://mail.python.org/mailman/listinfo/python-list
s a better place to ask, please advise.
Where do you get your python from?
You may find that the organisation that packages python that you use has such a
list.
Barry
>
> Thanks.
>
> --
> Bob Kline
> https://www.rksystems.com
> mailto:[email protected]
output the errors in a machine readable format to allow editors to
auto fix.
I am learning rust and it is very good at suggesting fixes.
There is a command to apply fixes automatically, cargo fix.
Barry
--
https://mail.python.org/mailman/listinfo/python-list
gs
to translate.
This is covered in the docs at
https://docs.python.org/3/library/gettext.html#localizing-your-module
Barry
--
https://mail.python.org/mailman/listinfo/python-list
E
> On 3 Sep 2023, at 22:49, Chris Green via Python-list
> wrote:
>
> Mostly I am managing to get things to work as I want but better
> documentation of gpiod would be a great help.
Ask the author? https://github.com/aswild/python-gpiod
Maybe read the source code for hints?
the value is stored in a 64 bit int for unix and
windows.
There is a comment that it covers the range of +-232 years.
Barry
> --
> https://mail.python.org/mailman/listinfo/python-list
>
--
https://mail.python.org/mailman/listinfo/python-list
version of python changes.
It is not a bug in python.
Barry
--
https://mail.python.org/mailman/listinfo/python-list
th a default value of False.
I would use a class variable not an instance variable.
class OnlyOne:
sole_instance = None
def __init__(self):
assert OnlyOne.sole_instance is None
OnlyOne.sole_instance = self
Barry
--
https://mail.python.org/mailman/listinfo/python-list
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
ing_problem
It is common to simulate hardware that does not exist yet and run software in
the simulated environment.
Barry
--
https://mail.python.org/mailman/listinfo/python-list
erstand how xor can be short circuited.
For AND or OR only looking at the first arg works.
But that does not work for xor right?
Barry
--
https://mail.python.org/mailman/listinfo/python-list
today.
Also the people that know flet are on discord. You may find someone here.
Barry
>
> --
>
> Jacob Kruger
> +2782 413 4791
> "Resistance is futile!...Acceptance is versatile..."
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
--
https://mail.python.org/mailman/listinfo/python-list
> On 13 Nov 2023, at 17:48, Dom Grigonis wrote:
>
> Short circuiting happens, when:
> xor([True, True, False, False], n=1)
> At index 1 it is clear that the answer is false.
Can you share an example with 4 values that is true?
And explain why it is xor.
Barry
--
https://
angegebene
> Datei nicht finden."
>
> Without the "env" in the shebang line and only without it everything
> works as expected - but that's contrary to the documentation, isn't it?
This suggests a typo in the shebang line. Is there a space between env and
python?
Barry
>
> Thank you for information,
> Sibylle
> --
> https://mail.python.org/mailman/listinfo/python-list
>
--
https://mail.python.org/mailman/listinfo/python-list
> On 22 Dec 2023, at 14:29, Sibylle Koczian wrote:
>
> #!/usr/bin/env/python
That was what i thought you had and it will not work.
The BOM suggestion is worth trying.
Barry
--
https://mail.python.org/mailman/listinfo/python-list
> On 22 Dec 2023, at 14:58, Christian Buhtz via Python-list
> wrote:
>
> On Windows 11 it usually is the "Terminal" which is different from cmd.exe.
In terminal app you can run cmd.exe or powershell, so it is basically the same.
Barry
--
https://mail.python.org/m
> On 23 Dec 2023, at 00:15, Thomas Passin via Python-list
> wrote:
>
> In neither case is the shebang line used.
As i understand it, not in front of my windows box to check.
The handler for .py file extension is set to be the py.exe
It is py.exe that understands shebang l
> On 24 Dec 2023, at 00:58, Left Right via Python-list
> wrote:
>
> I'm trying to understand the contents of Wheel files
There are lots of packaging experts that hang out on
https://discuss.python.org/ you are likely to get a response there if not here
replies.
thob.exe in the venv bin folder.
Barry
--
https://mail.python.org/mailman/listinfo/python-list
ften use a wrapper class in place of a simple str.
If you have a class SqlString then your type becomes list[SqlString].
You may find that SqlString gains interesting methods over time.
Barry
--
https://mail.python.org/mailman/listinfo/python-list
thon 3.12. I suspect Windows, because a
> change in the way Python 3.12 uses shebang lines should be visible in the
> documentation.
See my earlier reply with info on ftype etc output.
What do you see on your windows 10 vs windows 11?
Barry
--
https://mail.python.org/mailman/listinfo/python-list
t and the circumstances.
When this has been seen in the past it has been promptly fixed by the
maintainer.
Barry
--
https://mail.python.org/mailman/listinfo/python-list
works well and robustly.
Barry
--
https://mail.python.org/mailman/listinfo/python-list
c.get_objects() then summerize
the number of each type. Part 2 is to print the delta after an interval of a
2nd summary.
Leaks of objects show up as the count of a type increasing every time you
sample.
Barry
--
https://mail.python.org/mailman/listinfo/python-list
e python and python3 aliases.
Barry
--
https://mail.python.org/mailman/listinfo/python-list
> On 24 Feb 2024, at 04:36, Steve GS via Python-list
> wrote:
>
> How do I extract the values
> from args?
You can look up the args in documentation.
You can run the example code MRAB provided and see what is printed to learn
what is in the args.
Barry
--
https://
and 255 for the path part that will use
1 for the leading \. Getting an error for a name that is 255 is not surprising.
Other api allow for 65535 limit, not sure on its additional limits.
Barry
--
https://mail.python.org/mailman/listinfo/python-list
> On 10 Mar 2024, at 14:49, Thomas Passin via Python-list
> wrote:
>
> That and there's a registry setting:
>
> https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation
>
Yep that and rules about size of parts of the path.
Barry
-
> On 15 Mar 2024, at 19:51, Thomas Passin via Python-list
> wrote:
>
> I've always like writing using the "or" form and have never gotten bit
I, on the other hand, had to fix a production problem that using “or”
introducted.
I avoid this idiom because it fa
ckage.
Fedora leaves all the batteries intact and rhel I assume.
Barry
--
https://mail.python.org/mailman/listinfo/python-list
e it separately, which is inline with Fedora’s
policy of not vendoring code into a package.
Barry
--
https://mail.python.org/mailman/listinfo/python-list
You should considered also announcing on https://discuss.python.org/ which is a
lot more active then this list.
Barry
> On 25 Mar 2024, at 04:13, Erik Max Francis via Python-list
> wrote:
>
> I'm pleased to announce the release of EmPy 4.1.
>
> The 4._x_ series is
nality only available on Windows?
Python limited API works on linux, but you do not link against the .so on linux
I recall.
You will have missed that libpython3.so is a symlink to libpython3.11.so.10.
Windows build practices do not translate one-to-one to linux, or macOS.
Barry
--
https:/
ller and that error leads to people discussing why it
happens it looks like.
Barry
--
https://mail.python.org/mailman/listinfo/python-list
> On 1 Apr 2024, at 15:52, Jacob Kruger via Python-list
> wrote:
>
> Found many, many mentions of errors, with some of the same keywords, but, no
> resolutions that match my exact issue at all.
Try asking the pyinstaller developers. I think there is a mailing list.
Barr
work.
It is on https://sourceforge.net/projects/cxx/
Barry
--
https://mail.python.org/mailman/listinfo/python-list
all-users and you should be able to
uninstall as any user.
But this will require admin privs for both install and uninstall. As assume you
can find out how to bet the admin priv required for your automation.
Barry
>
> Also, with the approach of using msiexec.exe to uninstall different
ython and pip and enabled by the distros.
There are ways to turn off the blocking, but it’s strongly discouraged
by the distros.
Barry
--
https://mail.python.org/mailman/listinfo/python-list
a tmp file.
Close the tmp file.
Then use os.rename(tmpfile, productionfile).
This is guaranteed that any process that reads the file will only see all the
old file contents or all the new file contents, never a mix of both.
Barry
--
https://mail.python.org/mailman/listinfo/python-list
ut or stderr.
I recall that does not always work for app code that expects the macOS options
that are passed in when launching from GUI.
Barry
--
https://mail.python.org/mailman/listinfo/python-list
Hi there,
How can I do this in a one liner:
maxCountPerPhraseWordLength = {}
for i in range(1,MAX_PHRASES_LENGTH+1):
maxCountPerPhraseWordLength[i] = 0
Thanks!
--
http://mail.python.org/mailman/listinfo/python-list
e by any chance some bug preventing me to see them?
We need more information to be able to comment.
What version of python do you see this working for?
What version of python are you see it change?
Can you show an example function that demonstrates the issue please.
Barry
>
> Thanks
>
> M
ustem?
You cannot write to the /usr file system. Is that what your tests do?
If so that needs changing.
Barry
--
https://mail.python.org/mailman/listinfo/python-list
nux does this.
You might find https://devblogs.microsoft.com/commandline/ has interesting
articles about this.
They also have implemented utf-8 as code page 65001.
Barry
--
https://mail.python.org/mailman/listinfo/python-list
olour output and cursor movement all work.
Barry
--
https://mail.python.org/mailman/listinfo/python-list
was not compatible with Python 3.13.
That makes sense.
>
> Thanks in advance for helping out.
No problem.
Barry
> --
> https://mail.python.org/mailman/listinfo/python-list
>
--
https://mail.python.org/mailman/listinfo/python-list
ivalent of class
> attributes at a single point which are then available to all commands?
I do not know typer. But the general solution is to create an instance of your
class
and tell typer to call member function of the instance.
app = Application()
…
typer.set_callback(app.my_handler)
Barry
&
> On 30 Sep 2024, at 06:52, Abdur-Rahmaan Janhangeer via Python-list
> wrote:
>
>
> import polars as pl
> pl.read_json("file.json")
>
>
This is not going to work unless the computer has a lot more the 60GiB of RAM.
As later suggested a streaming pars
would run a long running program as a systemd
service and let it put logs into the journal. I wonder if that was what was
being hinted at?
Barry
--
https://mail.python.org/mailman/listinfo/python-list
libpython3.13.so.1.0 => /lib64/libpython3.13.so.1.0 (0xb7ea)
libc.so.6 => /lib64/libc.so.6 (0xb7cd)
libm.so.6 => /lib64/libm.so.6 (0xb7c2)
/lib/ld-linux-aarch64.so.1 (0xb84d)
Barry
--
https://mail.python.org/mailman/listinfo/python-list
Good day,"
I purchased a book for my son and followed the directions to a T. (Coding Games
in Python)
Whenever I got to the point of of moving the "hello" file over to pgzrun is
where my trouble began.
Its not finding a path because I'm getting this "pgzrun is not recognized as an
internal or e
s as an idea on https://discuss.python.org/
to get the attention of the core devs.
Barry
>
>
> Regards,
> DG
> --
> https://mail.python.org/mailman/listinfo/python-list
>
--
https://mail.python.org/mailman/listinfo/python-list
man can read it.
For example:
import json
config = {
'key2': 42,
'key1': 'value 1',
}
print(json.dumps(config, indent=4, separators=(', ', ': '), sort_keys=True))
% python $T/a.py
{
"key1": "value 1",
"key2": 42
}
Barry
--
https://mail.python.org/mailman/listinfo/python-list
'b': v5
'd': v6
}
}
Personally I would not use .ini style these days as the format does not include
type of the data.
Also I would not use the ast.literal_eval as it makes debugging errors in the
data harder.
Barry
--
https://mail.python.org/mailman/listinfo/python-list
ot;real" DirEntry.
Barry
--
https://mail.python.org/mailman/listinfo/python-list
major=3, minor=10, micro=11, releaselevel='final',
serial=0)
K:\shebang>assoc .py
.py=Python.File
K:\shebang>ftype Python.File
Python.File="C:\WINDOWS\py.exe" "%L" %*
Windows 11 output
: 11:52:10.36 K:\shebang
: \\BARNSTONE\barry> py -0
-V:3.12 *
for-windows
To create a py.ini does require a user to understand what %localappdata% means.
Some windows users, reasonable, do not use the CLI and know about that syntax
for environment variables.
Barry
--
https://mail.python.org/mailman/listinfo/python-list
11.
If so what is its contents?
I've tried with and without a py.ini and cannot duplicate what you see.
Barry
--
https://mail.python.org/mailman/listinfo/python-list
Python ideas are discussed here these days: https://discuss.python.org/
Suggest you raise this there in the Ideas category.
Barry
> On 24 Jan 2024, at 17:11, Kerrick Staley via Python-list
> wrote:
>
> I think we should define a unittest.mock.NAN constant that can
without the -lpython and it should
just work.
Barry
>
> Le ven. 29 mars 2024 à 10:10, Barry a écrit :
>>
>>
>>
>>> On 28 Mar 2024, at 16:13, Olivier B. via Python-list
>>> wrote:
>>>
>>> But on Linux, it seems that linking to
ages in try using
that.
Barry
--
https://mail.python.org/mailman/listinfo/python-list
> On 13 Jun 2024, at 11:01, Yair Eshel via Python-list
> wrote:
>
> I read this is a good place to give some suggestions for features in
> python.
Best place these days is to raise an idea on https://discuss.python.org/
Beware that this idea has come up in the past and was r
month of which less than 200 are spam.
A few years ago the spam count was greater than a 1,000 a month.
I have been using spambayes for a very long time, 20 years I guess at this
point and bayesian categorisation has stood the test of time for me.
For me the spammers have not won, I have the tec
d.
In this case the OP is on an RPi.
Barry
--
https://mail.python.org/mailman/listinfo/python-list
> On 7 Jul 2024, at 23:21, Barry via Python-list wrote:
>
>
>
>> On 7 Jul 2024, at 22:09, Tomas Ukkonen via Python-list
>> wrote:
>>
>>Py_Initialize();
>
> You also need to tell python to init threading.
I'm in front of my dev machine
> On 9 Jul 2024, at 06:13, אורי via Python-list <[email protected]>
> wrote:
>
> I tried to subscribe to Python-ideas
These days ideas are discussed on https://discuss.python.org/
It is rare to see an idea on the mailing list.
Barry
--
https://mail.python.or
ase advise,
Please duplicate the problem and if after doing that you have not fixed
the problem post details here.
Barry
> Schimon
> --
> https://mail.python.org/mailman/listinfo/python-list
>
--
https://mail.python.org/mailman/listinfo/python-list
ad this is
> significant faster even than fork.
using processes means you are more robust and can survive a process crash.
using async, assuming you do enough I/O, will out perform threads.
Barry
--
https://mail.python.org/mailman/listinfo/python-list
> On 6 Aug 2024, at 02:49, Piper McCorkle via Python-list
> wrote:
>
> $ /tmp/sources/Python-3.12.4/configure --enable-shared --with-system-expat
> --enable-optimizations --prefix=
I assume that you must provide a value for --prefix. The linux default would be
--pre
\Python\__pycache__\MetalMummysMods_Ehlers-DanlosMod.cpython-37.pyc'.
> Element ID: (No Element)
> Element Name: (No Element)
These are app specific errors. The most likely source of help will be to ask
Zerbu,
who I assume is the author and maintainer.
Barry
> ---
>
>
&g
no such original-message
> has appeared in the thread.
I see 11 messages and none from Stefan. Maybe replies to off list emails?
Barry
--
https://mail.python.org/mailman/listinfo/python-list
> On 2 Sep 2024, at 15:00, marc nicole via Python-list
> wrote:
>
> I am using Python 2.7 on Windows 10
Why? Install Python 3.12 and it will be easier to get help and support.
If you have legacy that still needs porting then you can install 3.12 along side
the unsupported 3
:
cd .app/Contents
then have a look around.
Beware that you cannot use print to stdout for a .app as its stdin/stdout do
not go anywhere useful.
What I do is use code like this in the main function:
sys.stdout = open( '/home/barry/debug.log', 'w', 1 )
sys.stderr = s
ing wrong with functions in a
> module.
Python is great in allowing you to pick your style.
A few lines in a module, a couple of functions or use classes.
But once your code gets big the disciple of using classes helps
maintenance. Code with lots of globals is problematic.
Barry
--
https://mail.python.org/mailman/listinfo/python-list
601 - 696 of 696 matches
Mail list logo