1
vote
1answer
17 views

Python: setLevel of specific class's logger

How do I silence a class's logging without knowing the name of its logger? Class in question is qualysconnect. import logging import qualysconnect.util # Set log options. This is my attempt to ...
0
votes
1answer
18 views

Save to file and load an instance of a python class with its attributes

I am working with python to do data analysis and was hoping to find a good way to save an instance of a class to file so it can be reloaded later with the values of its attributes maintained. In ...
1
vote
4answers
77 views

Using a python class without calling __init__ method?

I am learning python, step-by-step. Today is about Object Oriented Programming. I know how to create and use simple classes, but something bugs me. Most of the objects I use in python do not require ...
4
votes
3answers
82 views

How to get the object name from within the class? [duplicate]

I've got a simple class from which I create two objects. I now want to print the name of the object from within the class. So something like this: class Example: def printSelf(self): ...
-2
votes
1answer
24 views

Call functions from class which is in another Python-File

I have the following Problem in Python 2.7: If I define 3 functions in a file "a.py", and call these functions in another file, like: import a a.function1(arg1,...) everything works fine. But when ...
1
vote
1answer
48 views

Using Python's multiprocessing.Process class

This is a newbie question: A class is an object, so I can create a class called pippo() and inside of this add function and parameter, I don't understand if the functions inside of pippo are executed ...
0
votes
2answers
55 views

How to find the list of all the class name in a file in python?

I am currently writing a python script to display all name of all the python files in a package and also all the name of the class a file contains. scenario #A.py class apple: . . class ...
0
votes
2answers
31 views

How do I provide proper arguments for a class?

I have this code I am playing with but have no idea on how to call it? class Slide: def __init__(self, pictureFile, soundFile): self.picture - makePicture(pictureFile) self.sound = ...
1
vote
3answers
32 views

Importing functions from classes outside original file

I'm working on a text based adventure game. One of the things that I want to do, is build the game using classes, have the main data classes in a separate file, and then have the actual main loop that ...
0
votes
1answer
42 views

How to get the value of a dictionary declared inside a class as a local variable with Python

I am wondering how can I get the value of a dictionary declared as local variable inside a class? look at my source below. Note: If I declare this variable inside the function get_current_weather it ...
1
vote
1answer
21 views

python objectlist adds to all objects

I'm trying to have a class (dprObject) that is a container for several dprVariables each variable has a list with integers (for now) but when I change something to one variable, it changes to all the ...
1
vote
2answers
20 views

Override multiple methods with a wrapper (Python 3)

In my effort to subclass float and override multiple numeric operations with a wrapper, I looked at this example and tried the following: def naturalize(*methods): def decorate(cls): for method ...
-1
votes
0answers
49 views

In Python, what are classes, objects and methods? [closed]

Can I just have a simple beginner's (I'm not, but everything I've read describes it in very technical terms) definition of a class, an object and a method. I think a class is a group of functions ...
1
vote
0answers
28 views

Class Inheritance: could you explain this behavior? [duplicate]

In my program, I have different classes that all inherit from the same one. These classes process different kind of operations, they store the operations in an inherited attribute, and then sometime ...
0
votes
3answers
45 views

Python Method Call

class AlarmBox(Widget): hour = ["12","1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11"] tensMin = ["0", "1", "2", "3", "4", "5"] onesMin = ["0", "1", "2", "3", "4", "5", "6", "7", ...

1 2 3 4 5 124
15 30 50 per page