Help me in setting the path in python program.
I am using Google co lab. Guide me how to set the path. # Error: SwissEph file 'se13681s.se1' not found in PATH '/usr/share/ephe/' is coming, how to overcome this problem. pip install pyswisseph import swisseph as swe swe.set_ephe_path ('/usr/share/ephe') # set path to ephemeris files jd = swe.julday(2008,3,21) swe.calc_ut(jd, swe.AST_OFFSET+13681[0][0] -- https://mail.python.org/mailman/listinfo/python-list
Re: ctypes on Windows question: How to access an array of uint32_t exported from a DLL?
On 6/6/21, pjfarl...@earthlink.net wrote: > > On a Windows 10 platform (python 3.8.9 and 3.9.5), how do I use ctypes to > access an array of uint32_t's exported from a DLL? > ... > __declspec(dllexport) extern uint32_t array_name[128]; A ctypes data type has an in_dll() method [1] that returns an instance of the type that references data in a shared library (DLL). It takes a CDLL instance for the shared library and the exported symbol name. For example: data = (ctypes.c_uint32 * 128).in_dll(library, "array_name") --- [1] https://docs.python.org/3/library/ctypes.html#ctypes._CData.in_dll -- https://mail.python.org/mailman/listinfo/python-list
Re: How to debug python + curses? [was: RE: Applying winpdb_reborn]
On 6/2/21 7:24 PM, pjfarl...@earthlink.net wrote: -Original Message- From: Grant Edwards Sent: Monday, May 31, 2021 11:18 AM To: python-list@python.org Subject: Re: How to debug python + curses? [was: RE: Applying winpdb_reborn] On 2021-05-31, Dennis Lee Bieber wrote: On Mon, 31 May 2021 08:07:21 +1000, Cameron Simpson declaimed the following: Open another terminal, note its terminal device with the "tty" command. Start your programme like this: python .. 2>/dev/tty-of-the-other-termina The OP specified Win10, so the above is dead from the start. Perhaps Windows isn't an appropriate OS under which to develop curses applicatoins? Perhaps, but why isn't it? Why are Windows users, even knowledgeable ones, so often considered second- or even third-class netizens? I do know some of the answers that will come back for that question, but the attitude is not professional. Not trying to answer the question, just commenting: it's gotten a lot better in the Python world the last few years, as people have realized that like it or not, most users are actually on Windows. BUT, the ML/Big Data world isn't quite the same. It's new and people are developing at a rapid rate and Windows just seems to get in the way (again avoiding speculating since I don't work in that world) and those things often are heavily tilted to a Linux bias. Or if you can't do that, WSL. So the bias you mention is arising again in a new way. curses is its own story - that's what kicked off this thread. It was a UNIX thing well before there was a Windows at all (1970s, "I was there", but not in any way a contributor), and just wasn't built to the WIndows programming paradigm, why would it be? Of course people have tried to fill that void over the years, with some success, but as has been seen from details in this thread it just doesn't seem to be that important even to those folks and seems to be dying on the vine again. -- https://mail.python.org/mailman/listinfo/python-list
RE: ctypes on Windows question: How to access an array of uint32_t exported from a DLL?
> -Original Message- > From: Eryk Sun > Sent: Monday, June 7, 2021 12:34 PM > To: python-list@python.org > Cc: pjfarl...@earthlink.net > Subject: Re: ctypes on Windows question: How to access an array of uint32_t > exported from a DLL? > > On 6/6/21, pjfarl...@earthlink.net wrote: > > > > On a Windows 10 platform (python 3.8.9 and 3.9.5), how do I use ctypes > > to access an array of uint32_t's exported from a DLL? > > ... > > __declspec(dllexport) extern uint32_t array_name[128]; > > A ctypes data type has an in_dll() method [1] that returns an instance of the > type > that references data in a shared library (DLL). It takes a CDLL instance for > the > shared library and the exported symbol name. For > example: > > data = (ctypes.c_uint32 * 128).in_dll(library, "array_name") Thanks for the help. I just didn't see this kind of simple case demonstrated on the ctypes doc page. I guess I am just a bit dense. Mea culpa. Anyway, thanks again. Peter -- -- https://mail.python.org/mailman/listinfo/python-list