Re: help: pandas and 2d table

2024-04-13 Thread Tim Williams via Python-list
On Sat, Apr 13, 2024 at 1:10 PM Mats Wichmann via Python-list < python-list@python.org> wrote: > On 4/13/24 07:00, jak via Python-list wrote: > > doesn't Pandas have a "where" method that can do this kind of thing? Or > doesn't it match what you are looking for? Pretty sure numpy does, but >

Re: help: pandas and 2d table

2024-04-13 Thread Mats Wichmann via Python-list
On 4/13/24 07:00, jak via Python-list wrote: Stefan Ram ha scritto: jak wrote or quoted: Would you show me the path, please?    I was not able to read xls here, so I used csv instead; Warning:    the script will overwrite file "file_20240412201813_tmp_DML.csv"! import pandas as pd with

Re: help: pandas and 2d table

2024-04-13 Thread jak via Python-list
Stefan Ram ha scritto: jak wrote or quoted: Would you show me the path, please? I was not able to read xls here, so I used csv instead; Warning: the script will overwrite file "file_20240412201813_tmp_DML.csv"! import pandas as pd with open( 'file_20240412201813_tmp_DML.csv', 'w' )as

help: pandas and 2d table

2024-04-12 Thread jak via Python-list
Hi everyone. I state that I don't know anything about 'pandas' but I intuited that it could do what I want. I get, through the "read_excel" method, a table similar to this: obj| foo1 foo2 foo3 foo4 foo5 foo6 --- foo1| aa ab zz ad ae af

Re: Help Needed With a Python Gaming Module

2024-04-03 Thread Thomas Passin via Python-list
On 4/3/2024 3:06 PM, WordWeaver Evangelist via Python-list wrote: Hello everyone! It has been a l-o-n-g time -- nine years in fact --since I last participated on this mailing list. [snip] 3. You are very familiar with the Jython 2 environment, which I am told is based on Python 2 and NOT

Help Needed With a Python Gaming Module

2024-04-03 Thread WordWeaver Evangelist via Python-list
that I am 70 years old, I am NOT a programmer, and I do not know any programming languages. Yes, I am a newbie, a noob, a greenhorn. :) So, if anyone here is willing to help me, you are going to need a lot of patience . like ChatGPT :) Following the coding example of another open-source

RE: Can you help me with this memoization simple example?

2024-03-31 Thread AVI GROSS via Python-list
and the memorize function you make gets relatively few requests that are identical, it may not be worthwhile. -Original Message- From: Python-list On Behalf Of MRAB via Python-list Sent: Sunday, March 31, 2024 3:24 PM To: python-list@python.org Subject: Re: Can you help me

Re: Can you help me with this memoization simple example?

2024-03-31 Thread MRAB via Python-list
On 2024-03-31 09:04, marc nicole wrote: Thanks for the first comment which I incorporated but when you say "You can't use a list as a key, but you can use a tuple as a key, provided that the elements of the tuple are also immutable." does it mean  the result of sum of the array is not

Re: Can you help me with this memoization simple example?

2024-03-31 Thread marc nicole via Python-list
Thanks for the first comment which I incorporated but when you say "You can't use a list as a key, but you can use a tuple as a key, provided that the elements of the tuple are also immutable." does it mean the result of sum of the array is not convenient to use as key as I do? Which tuple I

Re: Can you help me with this memoization simple example?

2024-03-30 Thread MRAB via Python-list
On 2024-03-31 00:09, marc nicole via Python-list wrote: I am creating a memoization example with a function that adds up / averages the elements of an array and compares it with the cached ones to retrieve them in case they are already stored. In addition, I want to store only if the result of

Can you help me with this memoization simple example?

2024-03-30 Thread marc nicole via Python-list
I am creating a memoization example with a function that adds up / averages the elements of an array and compares it with the cached ones to retrieve them in case they are already stored. In addition, I want to store only if the result of the function differs considerably (passes a threshold e.g.

Re: Can u help me?

2024-03-06 Thread Grant Edwards via Python-list
On 2024-03-06, MRAB via Python-list wrote: > On 2024-03-06 01:44, Ethan Furman via Python-list wrote: >> On 3/5/24 16:49, MRAB via Python-list wrote: >> > On 2024-03-06 00:24, Ethan Furman via Python-list wrote: >> >> On 3/5/24 16:06, Chano Fucks via Python-list wrote: >> >> >> >>>

Re: Can u help me?

2024-03-05 Thread MRAB via Python-list
On 2024-03-06 01:44, Ethan Furman via Python-list wrote: On 3/5/24 16:49, MRAB via Python-list wrote: > On 2024-03-06 00:24, Ethan Furman via Python-list wrote: >> On 3/5/24 16:06, Chano Fucks via Python-list wrote: >> >>> [image: image.png] >> >> The image is of MS-Windows with the

Re: Can u help me?

2024-03-05 Thread Mats Wichmann via Python-list
On 3/5/24 18:44, Ethan Furman via Python-list wrote: On 3/5/24 16:49, MRAB via Python-list wrote: > On 2024-03-06 00:24, Ethan Furman via Python-list wrote: >> On 3/5/24 16:06, Chano Fucks via Python-list wrote: >> >>> [image: image.png] >> >> The image is of MS-Windows with the python

Re: Can u help me?

2024-03-05 Thread Ethan Furman via Python-list
On 3/5/24 16:49, MRAB via Python-list wrote: > On 2024-03-06 00:24, Ethan Furman via Python-list wrote: >> On 3/5/24 16:06, Chano Fucks via Python-list wrote: >> >>> [image: image.png] >> >> The image is of MS-Windows with the python installation window of "Repair Successful". Hopefully

Re: Can u help me?

2024-03-05 Thread MRAB via Python-list
On 2024-03-06 00:24, Ethan Furman via Python-list wrote: On 3/5/24 16:06, Chano Fucks via Python-list wrote: [image: image.png] The image is of MS-Windows with the python installation window of "Repair Successful". Hopefully somebody better at explaining that problem can take it from

Re: Can u help me?

2024-03-05 Thread MRAB via Python-list
On 2024-03-06 00:06, Chano Fucks via Python-list wrote: [image: image.png] This list removes all images. -- https://mail.python.org/mailman/listinfo/python-list

Re: Can u help me?

2024-03-05 Thread Ethan Furman via Python-list
On 3/5/24 16:06, Chano Fucks via Python-list wrote: [image: image.png] The image is of MS-Windows with the python installation window of "Repair Successful". Hopefully somebody better at explaining that problem can take it from here... -- ~Ethan~ --

Can u help me?

2024-03-05 Thread Chano Fucks via Python-list
[image: image.png] -- https://mail.python.org/mailman/listinfo/python-list

Re: Help

2023-11-07 Thread Mike Dewhirst via Python-list
On 7/11/2023 9:02 am, Jason Friedman via Python-list wrote: On Sun, Nov 5, 2023 at 1:23 PM office officce via Python-list < python-list@python.org> wrote: which python version is better to be used and how to make sure it works on my window 10 because i downloaded it and it never worked so I

Re: Help

2023-11-06 Thread Jason Friedman via Python-list
On Sun, Nov 5, 2023 at 1:23 PM office officce via Python-list < python-list@python.org> wrote: > which python version is better to be used and how to make sure it works on > my window 10 because i downloaded it and it never worked so I uninstall to > do that again please can you give me the steps

Help

2023-11-05 Thread office officce via Python-list
which python version is better to be used and how to make sure it works on my window 10 because i downloaded it and it never worked so I uninstall to do that again please can you give me the steps on how it will work perfectly from Kenny -- https://mail.python.org/mailman/listinfo/python-list

Mtg ANN: Using computer vision AI to help protect the worlds rarest dolphin

2023-08-08 Thread dn via Python-list
. Using drone technology and AI to collect and process visual data, the founders took action to collect data to help save the world’s rarest dolphin from extinction and influence future marine conservation efforts. The MAUI63 team uses a customised drone to find and track the movement of dolphins

Re: Help on ImportError('Error: Reinit is forbidden')

2023-05-18 Thread Barry
> wrote: > On 17 May 2023, at 20:35, Jason Qian via Python-list <[2]python-list@python.org> wrote: > >  Hi, > >   I Need some of your help. > > I have the following C code to import *Import python.*   It

Re: Help on ImportError('Error: Reinit is forbidden')

2023-05-18 Thread Jason Qian via Python-list
via Python-list < > python-list@python.org> wrote: > > > >  Hi, > > > > I Need some of your help. > > > > I have the following C code to import *Import python.* It works 99% of > > the time, but sometimes receives "*ImportError

Re: Help on ImportError('Error: Reinit is forbidden')

2023-05-18 Thread Barry
> On 17 May 2023, at 20:35, Jason Qian via Python-list > wrote: > >  Hi, > > I Need some of your help. > > I have the following C code to import *Import python.* It works 99% of > the time, but sometimes receives "*ImportError('Error: Reinit is &g

Help on ImportError('Error: Reinit is forbidden')

2023-05-17 Thread Jason Qian via Python-list
Hi, I Need some of your help. I have the following C code to import *Import python.* It works 99% of the time, but sometimes receives "*ImportError('Error: Reinit is forbidden')*". error. **We run multiple instances of the app parallelly. *** Python version(3.7.0 (v3.7.0:

Re: Help on ctypes.POINTER for Python array

2023-05-11 Thread Jason Qian via Python-list
Awesome, thanks! On Thu, May 11, 2023 at 1:47 PM Eryk Sun wrote: > On 5/11/23, Jason Qian via Python-list wrote: > > > > in the Python, I have a array of string > > var_array=["Opt1=DG","Opt1=DG2"] > > I need to call c library and pass var_array as parameter > > In the argtypes, how do I

Re: Help on ctypes.POINTER for Python array

2023-05-11 Thread Eryk Sun
On 5/11/23, Jason Qian via Python-list wrote: > > in the Python, I have a array of string > var_array=["Opt1=DG","Opt1=DG2"] > I need to call c library and pass var_array as parameter > In the argtypes, how do I set up ctypes.POINTER(???) for var_array? > >

Re: Help on ctypes.POINTER for Python array

2023-05-11 Thread Jim Schwartz
10:00 AM, Jason Qian via Python-list > wrote: > > Hi, > > Need some help, > > in the Python, I have a array of string > > var_array=["Opt1=DG","Opt1=DG2"] > > I need to call c library and pass var_array as parameter > > In the

Help on ctypes.POINTER for Python array

2023-05-11 Thread Jason Qian via Python-list
Hi, Need some help, in the Python, I have a array of string var_array=["Opt1=DG","Opt1=DG2"] I need to call c library and pass var_array as parameter In the argtypes, how do I set up ctypes.POINTER(???) for var_array? func.argtypes=[ctypes.c_void_p,ctypes.c

Re: Need help please

2023-04-10 Thread Thomas Passin
On 4/10/2023 9:59 AM, Jack Gilbert wrote: I D/L 3.11.3, I can see it in CMD running W10 64bit I have IDL on my desktop, HOW do I get 3.11.3 on my desktop? If you mean "How can I create a shortcut to Python 3.11.3 on my desktop that opens an interactive Python session", here is one way:

Re: Need help please

2023-04-10 Thread Sravan Kumar Chitikesi
use where cmd to find out the path of the binary and create a shortcut to that file on desktop Regards, *Sravan Chitikesi* AWS Solutions Architect - Associate On Mon, Apr 10, 2023 at 10:03 AM Jack Gilbert <00jhen...@gmail.com> wrote: > I D/L 3.11.3, I can see it in CMD > > running W10 64bit >

Need help please

2023-04-10 Thread Jack Gilbert
I D/L 3.11.3, I can see it in CMD running W10 64bit I have IDL on my desktop, HOW do I get 3.11.3 on my desktop? Thanks Jack g -- https://mail.python.org/mailman/listinfo/python-list

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-28 Thread Thomas Passin
On 3/28/2023 1:50 PM, a a wrote: On Tuesday, 28 March 2023 at 18:12:40 UTC+2, Thomas Passin wrote: On 3/28/2023 8:47 AM, a a wrote: Ok, I can export bookmarks to html file and open it in Firefox to get a long list of clickable urls but icon of the bookmarked web page is missing. When I open

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-28 Thread a a
On Tuesday, 28 March 2023 at 18:12:40 UTC+2, Thomas Passin wrote: > On 3/28/2023 8:47 AM, a a wrote: > > Ok, I can export bookmarks to html file and open it in Firefox to get > > a long list of clickable urls but icon of the bookmarked web page is > > missing. > > > > When I open Bookmarks as

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-28 Thread Thomas Passin
On 3/28/2023 8:47 AM, a a wrote: Ok, I can export bookmarks to html file and open it in Firefox to get a long list of clickable urls but icon of the bookmarked web page is missing. When I open Bookmarks as right a side-bar I can view and identify an individual Boomarks by icon, so I would like

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-28 Thread a a
On Tuesday, 28 March 2023 at 06:33:44 UTC+2, Thomas Passin wrote: > On 3/27/2023 8:37 PM, a a wrote: > >> To save the tabs, right click any one of them and select the "Select All > >> Tabs" item. They will all highlight. Right click on one of them and > >> select the "Bookmark Tabs" item. A

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-28 Thread a a
On Tuesday, 28 March 2023 at 06:33:44 UTC+2, Thomas Passin wrote: > On 3/27/2023 8:37 PM, a a wrote: > >> To save the tabs, right click any one of them and select the "Select All > >> Tabs" item. They will all highlight. Right click on one of them and > >> select the "Bookmark Tabs" item. A

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-27 Thread Thomas Passin
On 3/27/2023 8:37 PM, a a wrote: I can select All Opened Tabs (as from the given link) and get 1,000+ Opened Tabs ( I am afraid, this is s number of all saved bookmarks in the past) I go to menu, Bookmarks, Manage Boomarks and copy Tabs and

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-27 Thread Thomas Passin
On 3/27/2023 8:37 PM, a a wrote: To save the tabs, right click any one of them and select the "Select All Tabs" item. They will all highlight. Right click on one of them and select the "Bookmark Tabs" item. A dialog box will open with an entry lone for the Name to use (like "Tabset1") and a

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-27 Thread a a
new machine, import them into Firefox > >>> there. They won't open in tabs, but it will be easy to find them and > >>> open them when you want to. You probably will want to copy over your > >>> bookmarks anyway, so this adds little effort. > >>> > >>&

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-27 Thread Thomas Passin
rd of open tabs that you can copy or export. I don't know about this but an internet search should help. Good luck. a nice solution comes from How to Copy URLs of All Open Tabs in Firefox https://www.howtogeek.com/723921/how-to-copy-urls-of-all-open-tabs-in-firefox/ right clicking opened tab,

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-27 Thread Thomas Passin
don't know about this but an internet search should help. Good luck. a nice solution comes from How to Copy URLs of All Open Tabs in Firefox https://www.howtogeek.com/723921/how-to-copy-urls-of-all-open-tabs-in-firefox/ right clicking opened tab, all opened tabs can be selected movin

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-27 Thread a a
; bookmarks anyway, so this adds little effort. > > 3. There may be a specific record of open tabs that you can copy or > export. I don't know about this but an internet search should help. > > Good luck. a nice solution comes from How to Copy URLs of All Open Tabs in Fire

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-27 Thread Thomas Passin
ll be easy to find them and open them when you want to. You probably will want to copy over your bookmarks anyway, so this adds little effort. 3. There may be a specific record of open tabs that you can copy or export. I don't know about this but an internet search should help. Good luck

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-27 Thread a a
On Thursday, 23 March 2023 at 22:15:10 UTC+1, Thomas Passin wrote: > On 3/23/2023 3:38 PM, Mats Wichmann wrote: > > On 3/23/23 09:48, Thomas Passin wrote: > > > >> I didn't realize that Christoph Gohlke is still maintaining this site. > > > > Unless the the last-changed stuff stopped working,

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-23 Thread Thomas Passin
On 3/23/2023 3:38 PM, Mats Wichmann wrote: On 3/23/23 09:48, Thomas Passin wrote: I didn't realize that Christoph Gohlke is still maintaining this site. Unless the the last-changed stuff stopped working, it's in a static state: by Christoph Gohlke. Updated on 26 June 2022 at 07:27 UTC I

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-23 Thread Mats Wichmann
On 3/23/23 09:48, Thomas Passin wrote: I didn't realize that Christoph Gohlke is still maintaining this site. Unless the the last-changed stuff stopped working, it's in a static state: by Christoph Gohlke. Updated on 26 June 2022 at 07:27 UTC --

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-23 Thread Thomas Passin
On 3/18/2023 3:05 PM, Thomas Passin wrote: downloaded and run HWiNFO and AVE not supported, not greened out That's too bad; you may be out of luck. It's possible that someone has compiled the .pyd library in such a way that it does not need the instruction set extensions. I'm sorry but I

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-22 Thread Thomas Passin
the other libraries/programs that need to use it. Thank you Thomas for youre kind help. You are the real Python PRO, you deserve Nobel Prize in Python. :) I operated an old Dell computer with Windows XP preinstalled and upgraded XP to Windows 7 to get some web services to work. Unfortunately I fail

Re: Hello I want help get rid of that message and help install Python properly and thank you

2023-03-22 Thread Igor Korot
Hi, On Wed, Mar 22, 2023 at 11:37 AM Mohammed nour Koujan wrote: > > > -- What message? Please don't post screenshots - copy and paste the errors from your machine... Thank you. > https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-22 Thread a a
;> "After importing the libraries, we now read the .csv file: > >> > >> with open('accl1.csv', 'r') as f: > >> data = list(csv.reader(f, delimiter=',')) #reading csv file > >> > >> > >> Just read about AVE from Wikipedia > >> >

Hello I want help get rid of that message and help install Python properly and thank you

2023-03-22 Thread Mohammed nour Koujan
-- https://mail.python.org/mailman/listinfo/python-list

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-18 Thread Thomas Passin
On 3/17/2023 11:52 AM, a a wrote: On Friday, 17 March 2023 at 16:32:53 UTC+1, a a wrote: On Friday, 17 March 2023 at 16:03:14 UTC+1, Thomas Passin wrote: On 3/16/2023 8:07 PM, a a wrote: Crash report: Problem Caption: Problem Event Name: APPCRASH Application name: python.exe Application

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-18 Thread Thomas Passin
On 3/17/2023 11:32 AM, a a wrote: On Friday, 17 March 2023 at 16:03:14 UTC+1, Thomas Passin wrote: It would be worth trying to downgrade the multiarray version to an earlier one and see if that fixes the problem. Thank you Thomas for your kind reply. I am fully aware to be living on an old

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-18 Thread a a
On Friday, 17 March 2023 at 16:03:14 UTC+1, Thomas Passin wrote: > On 3/16/2023 8:07 PM, a a wrote: > > Crash report: > > > > Problem Caption: > > Problem Event Name: APPCRASH > > Application name: python.exe > > Application version: 3.8.7150.1013 > > Application time signature: 5fe0df5a >

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-18 Thread a a
On Friday, 17 March 2023 at 16:03:14 UTC+1, Thomas Passin wrote: > On 3/16/2023 8:07 PM, a a wrote: > > Crash report: > > > > Problem Caption: > > Problem Event Name: APPCRASH > > Application name: python.exe > > Application version: 3.8.7150.1013 > > Application time signature: 5fe0df5a >

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-18 Thread a a
On Friday, 17 March 2023 at 16:32:53 UTC+1, a a wrote: > On Friday, 17 March 2023 at 16:03:14 UTC+1, Thomas Passin wrote: > > On 3/16/2023 8:07 PM, a a wrote: > > > Crash report: > > > > > > Problem Caption: > > > Problem Event Name: APPCRASH > > > Application name: python.exe > > >

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-17 Thread Thomas Passin
On 3/16/2023 8:07 PM, a a wrote: Crash report: Problem Caption: Problem Event Name: APPCRASH Application name: python.exe Application version: 3.8.7150.1013 Application time signature: 5fe0df5a Error module name: _multiarray_umath.cp38-win32.pyd Version of the module with

Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-17 Thread a a
Crash report: Problem Caption: Problem Event Name: APPCRASH Application name: python.exe Application version: 3.8.7150.1013 Application time signature: 5fe0df5a Error module name:_multiarray_umath.cp38-win32.pyd Version of the module with the error: 0.0.0.0 Time signature

Re: Custom help format for a choice argparse argument

2023-01-30 Thread Peter Otten
;, "--zone", choices=pytz.all_timezones) args = parser.parse_args() print(args) print(f"Specified timezone: {args.zone}") It works, but when I run it with the -h option it dumps all entries in pytz.all_timezones. I would like to modify the help format for just -z|--zone opt

Re: Custom help format for a choice argparse argument

2023-01-27 Thread Thomas Passin
ll_timezones. I have def main(): parser = argparse.ArgumentParser() parser.add_argument("-z", "--zone", choices=pytz.all_timezones) [...] It works, but when I run it with the -h option it dumps all entries in pytz.all_timezones. What happens if you just presupply a

Re: Custom help format for a choice argparse argument

2023-01-27 Thread Ivan "Rambius" Ivanov
gt; > > >def main(): > >parser = argparse.ArgumentParser() > >parser.add_argument("-z", "--zone", choices=pytz.all_timezones) > [...] > > > >It works, but when I run it with the -h option it dumps all entries in > >pytz.all_timezones. &

Re: Custom help format for a choice argparse argument

2023-01-27 Thread Cameron Simpson
t;, choices=pytz.all_timezones) [...] It works, but when I run it with the -h option it dumps all entries in pytz.all_timezones. What happens if you just presupply a `help=` parameter in `add_argument`? Cheers, Cameron Simpson -- https://mail.python.org/mailman/listinfo/python-list

Re: Custom help format for a choice argparse argument

2023-01-27 Thread Ivan "Rambius" Ivanov
> print(“Invalid timezone”,file=sys.stderr) > This is what I use now. I still wonder if I can mold HelpFormatter to do what I want it to do. > … > > > > > From: Python-list on > behalf of Ivan "Rambius" Ivanov > Date: Frida

Re: Custom help format for a choice argparse argument

2023-01-27 Thread Weatherby,Gerard
van "Rambius" Ivanov Date: Friday, January 27, 2023 at 3:33 PM To: Python Subject: Custom help format for a choice argparse argument *** Attention: This is an external email. Use caution responding, opening attachments or clicking on links. *** Hello, I am developing a script that ac

Custom help format for a choice argparse argument

2023-01-27 Thread Ivan "Rambius" Ivanov
rgs() print(args) print(f"Specified timezone: {args.zone}") It works, but when I run it with the -h option it dumps all entries in pytz.all_timezones. I would like to modify the help format for just -z|--zone option. I read the docs about HelpFormatter and argparse.py and I ended up w

Re: [Help Request] Embedding Python in a CPP Application Responsibly & Functionally

2023-01-26 Thread Dieter Maurer
John McCardle wrote at 2023-1-25 22:31 -0500: > ... >1) To get the compiled Python to run independently, I have to hack >LD_LIBRARY_PATH to get it to execute. `LD_LIBRARY_PATH=./Python-3.11.1 >./Python-3.11.1/python` . The need to set `LD_LIBRARY_PATH` usually can be avoided via a link time

[Help Request] Embedding Python in a CPP Application Responsibly & Functionally

2023-01-25 Thread John McCardle
Greetings, I'm working on embedding a Python interpreter into a C++ application. My embedding example program is here, largely taken from Python docs: https://gist.github.com/jmccardle/f3f19d3753ae023aa52b927f0d181c43 I'm simply not interested in writing in Lua, so regardless of any

Re: help

2022-12-30 Thread Chris Grace
i have google chrome so i download the > Webdriver Chrome > and i just add it on my c:// driver and when i add some script on my > desktop i try to run it from the terminal and all the time i receive this > error message : maybe you guys can help me with this one? > when i add some ran

help

2022-12-30 Thread Mor yosef
Hello guys, i install python 3.11.1, and i have google chrome so i download the Webdriver Chrome and i just add it on my c:// driver and when i add some script on my desktop i try to run it from the terminal and all the time i receive this error message : maybe you guys can help me with this one

Re: Help Merging Of Separate Python Codes

2022-11-19 Thread dn
tried joining them together, one after the other? Have you looked at the Python docs? eg https://docs.python.org/3/library/csv.html Do you need the help of a professional to write code for you? If you are learning Python, perhaps the Tutor list will be a more appropriate for you... -- Regards

Re: Need help with custom string formatter

2022-11-05 Thread MRAB
On 2022-11-05 11:07, Stefan Ram wrote: Robert Latest writes: result += ' ' *( length - len( result )) Nice, I didn't know that one could multiply strings by negative numbers without error. Thanks, but today I thought that maybe there might be a solution for getting a field of a fixed

Re: need help

2022-10-24 Thread Peter J. Holzer
On 2022-10-24 01:02:24 +, rbowman wrote: > On Mon, 24 Oct 2022 10:02:10 +1100, Cameron Simpson wrote: > > I'd say GMail are rudely dropping traffic to port 2525. Maybe try just > > 25, > > the normal SMTP port? > > 2525 is an alternative to 587, the standard TLS port. Port 587 is not the

Re: need help

2022-10-23 Thread Cameron Simpson
On 24Oct2022 01:02, rbowman wrote: On Mon, 24 Oct 2022 10:02:10 +1100, Cameron Simpson wrote: I'd say GMail are rudely dropping traffic to port 2525. Maybe try just 25, the normal SMTP port? 2525 is an alternative to 587, the standard TLS port. Yah. My point was more focussed on GMail's

Re: need help

2022-10-23 Thread rbowman
On Mon, 24 Oct 2022 10:02:10 +1100, Cameron Simpson wrote: > I'd say GMail are rudely dropping traffic to port 2525. Maybe try just > 25, > the normal SMTP port? 2525 is an alternative to 587, the standard TLS port. 25 and 587 work. telnet smtp.gmail.com 587 Trying 2607:f8b0:4023:1004::6d...

Re: need help

2022-10-23 Thread Cameron Simpson
Please try to choose more descriptive subject lines (eg "problem with sock.connect" or similar). That you want help is almost implicit, and what the whole list is for. Anyway, to your problem: On 23Oct2022 10:19, Shuaib Akhtar wrote: How to fix Traceback (most recent call last)

need help

2022-10-23 Thread Shuaib Akhtar
How to fix Traceback (most recent call last):   File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2288.0_x64__qbz5n2kfra8p0\lib\socket.py", line 833, in create_connection     sock.connect(sa) TimeoutError: [WinError 10060] A connection attempt

Re: Need help with custom string formatter

2022-10-22 Thread Robert Latest via Python-list
Cameron Simpson wrote: > Stefan's code implements it's own format_field and falls back to the > original format_field(). That's standard subclassing practice, and worth > doing reflexively more of the time - it avoids _knowing_ that > format_field() just calls format(). > > So I'd take Stefan's

Re: Need help with custom string formatter

2022-10-21 Thread Cameron Simpson
On 21Oct2022 16:55, Stefan Ram wrote: I was not aware of "isdigit". There's also "isdecimal" and "isnumeric". They all have subtly different meanings :-) Cheers, Cameron Simpson -- https://mail.python.org/mailman/listinfo/python-list

Re: Need help with custom string formatter

2022-10-21 Thread Cameron Simpson
On 21Oct2022 16:55, Stefan Ram wrote: Robert Latest writes: return super().format_field( value, format_string ) Why do you prefer super().format_field() over plain format()? The doc says: "format_field() simply calls format()." So I figured I might do the same. I am not aware of any

Re: Need help with custom string formatter

2022-10-21 Thread Robert Latest via Python-list
Stefan Ram wrote: [the solution] thanks, right on the spot. I had already figured out that format_field() is the one method I need, and thanks for the str.translate method. I knew that raking seven RE's across the same string HAD to be stupid. Have a nice weekend! --

Need help with custom string formatter

2022-10-21 Thread Robert Latest via Python-list
Hi all, I would like to modify the standard str.format() in a way that when the input field is of type str, there is some character replacement, and the string gets padded or truncated to the given field width. Basically like this: fmt = MagicString('<{s:6}>') print(fmt.format(s='Äußerst'))

Re: Need help with custom string formatter

2022-10-21 Thread Robert Latest via Python-list
Hi Stefan, I have now implemented a version of this, works nicely. I have a few minor questions / remarks: > result += ' ' *( length - len( result )) Nice, I didn't know that one could multiply strings by negative numbers without error. > def __init__( self ): >

Re: Fwd: Can you help me with this Python question?

2022-10-13 Thread Axy via Python-list
Well, although I never used pandas and never will, if that's about artworks, that's mine. Obviously, you need to iterate columns and sum values returned by the snippet you provided. A quick search tells us to use colums property. So, it might look like this: na_sum =

Fwd: Can you help me with this Python question?

2022-10-13 Thread Sarah Wallace
For a python class I am taking.. In this challenge, you'll be working with a DataFrame that contains data about artworks, and it contains many missing values. Your task is to create a variable called na_sum that contains the total number of missing values in the DataFrame. When that's completed,

Re: Help, PyCharm fails to recognize my tab setting...See attached picture of the code.

2022-10-11 Thread dn
On 11/10/2022 10.48, Kevin M. Wilson via Python-list wrote: C:\Users\kevin\PycharmProjects\Myfuturevalue\venv\Scripts\python.exe C:\Users\kevin\PycharmProjects\Myfuturevalue\FutureValueCal.py   File "C:\Users\kevin\PycharmProjects\Myfuturevalue\FutureValueCal.py", line 31    elif (years >

Help, PyCharm fails to recognize my tab setting...See attached picture of the code.

2022-10-10 Thread Kevin M. Wilson via Python-list
C:\Users\kevin\PycharmProjects\Myfuturevalue\venv\Scripts\python.exe C:\Users\kevin\PycharmProjects\Myfuturevalue\FutureValueCal.py   File "C:\Users\kevin\PycharmProjects\Myfuturevalue\FutureValueCal.py", line 31    elif (years > 50.0) or (years < 1.0) :    ^IndentationError: expected an

Re: Need help in blockchain coding.

2022-06-11 Thread Mats Wichmann
On 6/11/22 15:29, dn wrote: > On 12/06/2022 02.51, Ayesha Tassaduq wrote: >> I am a beginner in python I want to transfer generated hash to a local >> database. I try it with socket programming but I fail. can anyone please >> help me ow I can do this? > > Whe

Re: Need help in blockchain coding.

2022-06-11 Thread dn
On 12/06/2022 02.51, Ayesha Tassaduq wrote: > I am a beginner in python I want to transfer generated hash to a local > database. I try it with socket programming but I fail. can anyone please help > me ow I can do this? Where is the database? Where is the socket? What are the (fu

Need help in blockchain coding.

2022-06-11 Thread Ayesha Tassaduq
I am a beginner in python I want to transfer generated hash to a local database. I try it with socket programming but I fail. can anyone please help me ow I can do this? class Block: def __init__( self, previous_block_hash, transaction_list ): self.previous_block_hash

Re: Help with Python/Eyed3 MusicCDIdFrame method

2022-06-06 Thread Dennis Lee Bieber
""" eyed3.id3. would appear to be specific to non-MP3 data files. So... I'd try the interactive environment and check each layer... dir(myID3) (based upon the error, there will not be a "id3" key; so try dir(myID3.)

Re: Help with Python/Eyed3 MusicCDIdFrame method

2022-06-06 Thread Dave
get the following error: >> File "/Documents/Python/Test1/main.py", line 94, in >> myCDID = myID3.id3.frames.MusicCDIdFrame(id=b'MCDI', toc=b'') >> AttributeError: 'Mp3AudioFile' object has no attribute 'id3' >> Any help or suggestion greatly appreciated.

Re: Help with Python/Eyed3 MusicCDIdFrame method

2022-06-06 Thread MRAB
myID3.id3.frames.MusicCDIdFrame(id=b'MCDI', toc=b'') When I run this, I get the following error: File "/Documents/Python/Test1/main.py", line 94, in myCDID = myID3.id3.frames.MusicCDIdFrame(id=b'MCDI', toc=b'') AttributeError: 'Mp3AudioFile' object has no attribute 'id3' Any help o

Help with Python/Eyed3 MusicCDIdFrame method

2022-06-06 Thread Dave
') When I run this, I get the following error: File "/Documents/Python/Test1/main.py", line 94, in myCDID = myID3.id3.frames.MusicCDIdFrame(id=b'MCDI', toc=b'') AttributeError: 'Mp3AudioFile' object has no attribute 'id3' Any help or suggestion greatly appreciated. All the

Re: help, please, with 3.10.4 install

2022-05-30 Thread Dennis Lee Bieber
soft Windows [Version 10.0.19044.1706] (c) Microsoft Corporation. All rights reserved. C:\Users\Wulfraed>python Python ActivePython 3.8.2 (ActiveState Software Inc.) based on on win32 Type "help", "copyright", "credits" or "license" for more information. >

Re: help, please, with 3.10.4 install

2022-05-30 Thread Mats Wichmann
On 5/28/22 20:11, Jack Gilbert wrote: > I downloaded 3.10.4 on a 64 bit , 8.1 > also, the same line: Python 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, > 23:13:41) [MSC v.1929 64 bit (AMD64)] on win32 in CMD prompt > > for the life of me I can't figure out how to launch python?? Sounds like

Re: help, please, with 3.10.4 install

2022-05-29 Thread dn
On 29/05/2022 14.11, Jack Gilbert wrote: > I downloaded 3.10.4 on a 64 bit , 8.1 > I can see IDLE shell 3.10.1, I see Python 3.10.4 (tags/v3.10.4:9d38120, Mar > 23 2022, 23:13:41) [MSC v.1929 64 bit (AMD64)] on win32 > > also, the same line: Python 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, >

help, please, with 3.10.4 install

2022-05-29 Thread Jack Gilbert
I downloaded 3.10.4 on a 64 bit , 8.1 I can see IDLE shell 3.10.1, I see Python 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 23:13:41) [MSC v.1929 64 bit (AMD64)] on win32 also, the same line: Python 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 23:13:41) [MSC v.1929 64 bit (AMD64)] on win32 in CMD

  1   2   3   4   5   6   7   8   9   10   >