Relative Content

Tag Archive for pythonclass

How can I pass different instance variables between classes?

I have multiple .py files in my directory which are all imported by main.py. All generate a variable that points to the class, but as I create new ones I need to include them as parameters to be used by that instance. Is there a better way to do this?
Here are the relevant pieces of code:

Using Python to pull data from a Case Management System utilizing classes

I am looking to pull data from a Case Management System into Python while utilizing a Class Structure. I’m not quite sure where to begin but I feel like it should be something along the lines of a
Case Mgmt Package with classes that pull different sections of data from a given case. Has anyone done anything similar or have any ideas on best practices or a starting point?

How to check the running speed of each method in a Python class

I’m writing a python program containing a class. I want to find out the running speed of each method in my class because the overall running speed of my program is obviously lowered by my class. Is there any possible way to print out the running speed of each method cause I want to find the bottleneck of the computation.

Not sure why script running but doesn’t give output?

New beginner here for python and ı have sense of basics of python. I was trying to learn OOP details by following a tutorial then ı realized when ı run my code on VScode. It doesn’t give me anything back. I just gives me back the filepath. I am not sure what to do. I tried adding print to see if anything comes out but nope!