How to instantiate a custom Python class inside a C extension?

2020-04-01 Thread Musbur
Hi guys, I'm wondering how to create an instance of an extension class I wrote. There's a minimal self-contained C module at the bottom of this post which exports two things: 1) a class Series, and 2) a function make_series() which is supposed to create a Series object on the C side and retur

Re: How to instantiate a custom Python class inside a C extension?

2020-04-01 Thread Rhodri James
On 01/04/2020 13:42, Musbur wrote: So when created from C, neither the "new" nor the "init" functions are called on the object, only "finalize". No wonder I get segfaults in the real life application. So how is this done right? Here's the C module: I believe you do it in C as you would in Py

Identifying tkinter version

2020-04-01 Thread Rich Shepard
Here, on Slackware-14.2, Python3-3.8.2 is installed. I would like to learn which version of tkinter is provided with it. There's no local VERSION file and tkinter.version() returns nothing. How do I determine the installed version? Regards, Rich -- https://mail.python.org/mailman/listinfo/pytho

Re: Identifying tkinter version

2020-04-01 Thread Tony van der Hoff
On 01/04/2020 17:34, Rich Shepard wrote: Here, on Slackware-14.2, Python3-3.8.2 is installed. I would like to learn which version of tkinter is provided with it. There's no local VERSION file and tkinter.version() returns nothing. How do I determine the installed version? >>> import tkinter

Re: Identifying tkinter version [ANSWERED]

2020-04-01 Thread Rich Shepard
On Wed, 1 Apr 2020, Tony van der Hoff wrote: How do I determine the installed version? import tkinter tkinter.TkVersion 8.6 Thanks, Tony. I was close, but still too far away. Stay healthy, Rich -- https://mail.python.org/mailman/listinfo/python-list

Python3 module with financial accounts?

2020-04-01 Thread Peter Wiehe
Is there a Python3 module with financial accounts? -- Greetings Peter Wiehe -- https://mail.python.org/mailman/listinfo/python-list

Re: How to instantiate a custom Python class inside a C extension?

2020-04-01 Thread Musbur
Am 01.04.2020 15:01 schrieb Rhodri James: I believe you do it in C as you would in Python: you call the Series class! pyseries = PyObject_CallObject((PyObject *)&series_type, NULL); Well, that dumps core just as everything else I tried. What does work, however, is calling PyType_Ready first

Re: How to instantiate a custom Python class inside a C extension?

2020-04-01 Thread Rhodri James
On 01/04/2020 18:24, Musbur wrote: Am 01.04.2020 15:01 schrieb Rhodri James: I believe you do it in C as you would in Python: you call the Series class! pyseries = PyObject_CallObject((PyObject *)&series_type, NULL); Well, that dumps core just as everything else I tried. What does work, ho

Fw: Python installation problem

2020-04-01 Thread HERNANDEZ AGUIRRE JOSE GABRIEL DE LA DOLOROSA
En Mar, 31 Marzo, 2020 en 18:48, yo escribió:   Para: python-list@python.org I  installed  the Python software , but I could not find the python.exe file with the Unscramble software What do you advise ? Regards -- https://mail.python.org/mailman/listinfo/python-list

Re: about to resolve problem in installation

2020-04-01 Thread anson freer
Re: Calvin Spealman,Terry Reedyreading Kapuganti Rakesh post Terry Reedy said"You are re-running the installer. Hit 'start' in lower left corner andfind python under 'p'. Kapuganti Rakesh looks like he is refering to modify setup and cancel is the only otheroption no "p". Then Kapuganti Rakesh"I h

Re: Python3 module with financial accounts?

2020-04-01 Thread Tim Chase
On 2020-04-01 19:27, Peter Wiehe wrote: > Is there a Python3 module with financial accounts? You'd have to be more specific. For interacting with online accounts with financial institutions? For tracking financial data locally? There's beancount (http://furius.ca/beancount/ and written in Pytho

Re: Identifying tkinter version [ANSWERED]

2020-04-01 Thread Christian Gollwitzer
Am 01.04.20 um 19:22 schrieb Rich Shepard: On Wed, 1 Apr 2020, Tony van der Hoff wrote: How do I determine the installed version? import tkinter tkinter.TkVersion 8.6 Thanks, Tony. I was close, but still too far away. This only shows you the major version. There have been many updates to

Re: Fw: Python installation problem

2020-04-01 Thread Michael Torrie
On 4/1/20 11:09 AM, HERNANDEZ AGUIRRE JOSE GABRIEL DE LA DOLOROSA wrote: > I  installed  the Python software , but I could not find the python.exe file > with the Unscramble software What is this "Unscramble software?" After Python is installed, you probably will find the "Idle" integrated devel

Re: Fw: Python installation problem

2020-04-01 Thread Michael Torrie
On 4/1/20 11:09 AM, HERNANDEZ AGUIRRE JOSE GABRIEL DE LA DOLOROSA wrote: > Para: python-list@python.org > > I  installed  the Python software , but I could not find the python.exe file > with the Unscramble software Actually in windows 10, Idle shows up in the start menu under the "I"s, not in a

Fwd: Problemas para ejecutar Python en windows 7

2020-04-01 Thread Honori R. Camacho
Ok. 1.- Necesitamos ayuda. No podemos ejecutar Python 3.5.4 en windows 7, se descargo la version Python 3.5.4 y se instalo correctamente.Y se corrigieron los path. Pero no permite ejecutar los .py ni los .pyw por acceso directo. gracias. * Usa (SL) Software Libre ...Twitter: @rhonoricBlog Spot: h

questions:

2020-04-01 Thread anson freer
Will Anaconda2, Python2, jupyter and many applications I have for python harm the 3.8.2? should I be in Python Tutor and in this one(current email)at the same time? Or is it one or the other not both I want to learn how to use PDF to read files that have racing form style forms(my hobbie is Horse h

Re: Python3 module with financial accounts?

2020-04-01 Thread Peter Wiehe
On 01.04.20 20:02, Tim Chase wrote: On 2020-04-01 19:27, Peter Wiehe wrote: Is there a Python3 module with financial accounts? You'd have to be more specific. For interacting with online accounts with financial institutions? For tracking financial data locally? There's beancount (http://furi

Re: How to instantiate a custom Python class inside a C extension?

2020-04-01 Thread MRAB
On 2020-04-01 13:42, Musbur wrote: Hi guys, I'm wondering how to create an instance of an extension class I wrote. There's a minimal self-contained C module at the bottom of this post which exports two things: 1) a class Series, and 2) a function make_series() which is supposed to create a Serie

ANN: Wing Python IDE version 7.2.2 released

2020-04-01 Thread Wingware
Wing Python IDE version 7.2.2 introduces a How-To for using Wing Pro's remote development features with AWS, adds support for Python 3 enums, allows constraining Find Uses of imported symbols to only the current file, and makes a number of usability and stability improvements. == Downloads ==

How To Change Package Representation on Shell?

2020-04-01 Thread Abdur-Rahmaan Janhangeer
Greetings list, I have a custom package. >>> import package >>> package '> what do i have to modify from my package to have like >>> package Hi! Thanks! Kind Regards, Abdur-Rahmaan Janhangeer compileralchemy.com | github

Re: How To Change Package Representation on Shell?

2020-04-01 Thread Rhodri James
On 01/04/2020 21:22, Abdur-Rahmaan Janhangeer wrote: Greetings list, I have a custom package. import package package '> what do i have to modify from my package to have like package Hi! Do you mean "How do I override the str() or repr() of a module"? I don't think you can. -- Rhodri

Re: How To Change Package Representation on Shell?

2020-04-01 Thread Chris Angelico
On Thu, Apr 2, 2020 at 7:37 AM Rhodri James wrote: > > On 01/04/2020 21:22, Abdur-Rahmaan Janhangeer wrote: > > Greetings list, > > > > I have a custom package. > > > import package > package > > '> > > > > what do i have to modify from my package to have like > > > package > > Hi!

Re: How To Change Package Representation on Shell?

2020-04-01 Thread Abdur-Rahmaan Janhangeer
Having fun with packages Since i don't master packaging completely thought there was a __repr__.py protocol nearby! Might be useful maybe to replace it by a help message Kind Regards, Abdur-Rahmaan Janhangeer compileralchemy.com | github

confused by matplotlib and subplots

2020-04-01 Thread Luca
Hello Covid fighters and dodgers, I'm sort of confused by what I am seeing in a Pandas book. This works: fig = plt.figure() ax1 = fig.add_subplot(2,2,1) ax2 = fig.add_subplot(2,2,2) ax3 = fig.add_subplot(2,2,3) ax3.plot(np.random.randn(50).cumsum(), 'k--'); but also this works! fig = plt.fi

Re: questions:

2020-04-01 Thread DL Neil via Python-list
On 2/04/20 6:49 AM, anson freer wrote: Will Anaconda2, Python2, jupyter and many applications I have for python harm the 3.8.2? should I be in Python Tutor and in this one(current email)at the same time? Or is it one or the other not both I want to learn how to use PDF to read files that have rac

How Does requests.get Work?

2020-04-01 Thread Abdur-Rahmaan Janhangeer
Greetings list, I was viewing requests https://github.com/psf/requests I know we can do `requests.get` Found `get` defined in api.py I would appreciate an explanation as to how to configure the package so that we can use get directly. Thanks. Kind Regards, Abdur-Rahmaan Janhangeer compileralc

Re: How to uninstall Python3.7 in Windows using cmd ?

2020-04-01 Thread Barry Scott
> On 30 Mar 2020, at 02:03, Dennis Lee Bieber wrote: > > On Sun, 29 Mar 2020 07:24:03 -0400, Terry Reedy > declaimed the following: > >> To clarify, the pydev/python.org installer does not use msi. I don't >> know that anyone else does. And if someone did, why do you think it >> would al

why are the ticker and date column labels lower than High Low Open Close

2020-04-01 Thread Rakesh Kapoor
I am using this to download stock prices. But i find that the column names are not in same row. I am guessing i am missing something. import pandas as pd import numpy as np import datetime import pandas_datareader as pdr py.init_notebook_mode(connected=True) # we download the stock prices for

Re: How Does requests.get Work?

2020-04-01 Thread Juergen Brendel
Hello! Can you elaborate on what you mean by "use directly"? Juergen On Thu, 2020-04-02 at 01:12 +0400, Abdur-Rahmaan Janhangeer wrote: > Greetings list, > > I was viewing requests https://github.com/psf/requests > > I know we can do `requests.get` > > Found `get` defined in api.py > > I

Re: Fwd: Problemas para ejecutar Python en windows 7

2020-04-01 Thread DL Neil via Python-list
On 2/04/20 7:15 AM, Honori R. Camacho wrote: Ok. 1.- Necesitamos ayuda. No podemos ejecutar Python 3.5.4 en windows 7, se descargo la version Python 3.5.4 y se instalo correctamente.Y se corrigieron los path. Pero no permite ejecutar los .py ni los .pyw por acceso directo. gracias. Hola! Pytho

numpy array question

2020-04-01 Thread jagmit sandhu
python newbie. I can't understand the following about numpy arrays: x = np.array([[0, 1],[2,3],[4,5],[6,7]]) x array([[0, 1], [2, 3], [4, 5], [6, 7]]) x.shape (4, 2) y = x[:,0] y array([0, 2, 4, 6]) y.shape (4,) Why is the shape for y reported as (4,) ? I expected it to be a

Re: Identifying tkinter version [ANSWERED]

2020-04-01 Thread Terry Reedy
On 4/1/2020 2:47 PM, Christian Gollwitzer wrote: Am 01.04.20 um 19:22 schrieb Rich Shepard: On Wed, 1 Apr 2020, Tony van der Hoff wrote: How do I determine the installed version? import tkinter tkinter.TkVersion 8.6 Thanks, Tony. I was close, but still too far away. This only shows you t

Re: How Does requests.get Work?

2020-04-01 Thread Abdur-Rahmaan Janhangeer
When dev a package, if you can do: >>> from package import x does not mean you can do >>> import package >>> package.x for requests i was wondering how requests package can have >>> requests.get while requests is defined in api.py Kind Regards, Abdur-Rahmaan Janhangeer https://www.compile

Re: How Does requests.get Work?

2020-04-01 Thread Chris Angelico
On Thu, Apr 2, 2020 at 5:12 PM Abdur-Rahmaan Janhangeer wrote: > > When dev a package, if you can do: > > >>> from package import x > > does not mean you can do > > >>> import package > >>> package.x > > for requests i was wondering how requests package can have > > >>> requests.get > > while requ

Re: How Does requests.get Work?

2020-04-01 Thread Abdur-Rahmaan Janhangeer
Ah i get it from .api import request, get, head, post, patch, put, delete, options Whatever you import in __init__.py, you can access it directly. Thanks! Kind Regards, Abdur-Rahmaan Janhangeer compileralchemy.com | github M