DO NOT USE! THIS IS AMBIGUOUS. You might be looking for [web-inspector].
Questions tagged [inspect]
610 questions
6
votes
1 answer
Why does inspect return different line for class inheriting from superclass?
While trying to figure out if a function is called with the @decorator syntax, we realized that inspect has a different behaviour when looking at a decorated class that inherits from a superclass.
The following behaviour was found with CPython 3.6.2…

Olivier Melançon
- 21,584
- 4
- 41
- 73
6
votes
2 answers
Proving `T b` when `b` is already matched on
I am trying to prove something simple:
open import Data.List
open import Data.Nat
open import Data.Bool
open import Data.Bool.Properties
open import Relation.Binary.PropositionalEquality
open import Data.Unit
repeat : ∀ {a} {A : Set a} → ℕ → A →…

Cactus
- 27,075
- 9
- 69
- 149
6
votes
1 answer
Listing all class members with Python `inspect` module
What is the "optimal" way to list all class methods of a given class using inspect? It works if I use the inspect.isfunction as predicate in getmembers like so
class MyClass(object):
def __init(self, a=1):
pass
def somemethod(self,…
user2489252
6
votes
2 answers
Load locally stored images through css with inspect element
I'm trying to redesign a small portion of vastly huge site and I was told that I can load custom images to Inspect Element (Chrome) if they are located in the same path as the stylesheet to which the site is remapped. (all done through css via…

Andrej K
- 73
- 1
- 1
- 3
6
votes
2 answers
Adding items to a list if it's not a function
I'm trying to write a function right now, and its purpose is to go through an object's __dict__ and add an item to a dictionary if the item is not a function.
Here is my code:
def dict_into_list(self):
result = {}
for each_key,each_item in…

Tyler
- 365
- 2
- 4
- 15
6
votes
3 answers
Google Chrome Inspecting Issue. Not showing CSS paths for local files
I am having very unexpected problem on my Google Chrome inspector today. When I was inspecting my local HTML files I noticed I was unable to see from which css file, my classes were coming from. It's very strange because it's always showed it…

Raihan
- 3,551
- 3
- 22
- 38
5
votes
2 answers
Python inspect.getmembers does not return the actual function when used with decorators
I have three python functions:
def decorator_function(func)
def wrapper(..)
return func(*args, **kwargs)
return wrapper
def plain_func(...)
@decorator_func
def wrapped_func(....)
inside a module A.
Now I want to get all the functions…

Rajat
- 1,766
- 2
- 21
- 42
5
votes
1 answer
Python - Get the source code of the line that called me
Using the python inspect module, in a function, I would like to get the source code of the line that called that function.
So in the following situation:
def fct1():
# Retrieve the line that called me and extract 'a'
return an object…

u2gilles
- 6,888
- 7
- 51
- 75
5
votes
1 answer
Android Chrome Inspect Devices Blank Screen
I'm dealing with a problem since a few days. In normally Chrome Inspect property was working properly but suddenly that broke down. I didn't understand why happened. I'm seeing devices in page. When I clicked to inspect, It opens blank page. I…

Andev
- 355
- 3
- 7
- 16
5
votes
1 answer
How to check if default value for python function argument is set using inspect?
I'm trying to identify the parameters of a function for which default values are not set. I'm using inspect.signature(func).parameters.value() function which gives a list of function parameters. Since I'm using PyCharm, I can see that the parameters…

Pushkar Nimkar
- 394
- 3
- 11
5
votes
1 answer
Problem with inspect using PyInstaller; can get source of class but not function
My first post on here, bear with me.....
I'm working on bundling a tkinter application using PyInstaller, and I've come across an issue when I use the inspect library. Basically, I can call the source code of a class, but not a function, that I…

Tom
- 8,310
- 2
- 16
- 36
5
votes
0 answers
How to Inspect iOS 13 and above? (on Chrome dev tools)
No devices appear at chrome inspect when i try to inspect iOS 13.2
I have tried remotedebug ios webkit adapter and it was working fine and able to see the device and inspect, now i cannot see the device after the new update of iOS 13 so any idea how…

Eslam Allam
- 85
- 9
5
votes
2 answers
Python - inspect.getmembers in source code order
I am trying to get a list of functions from a module using inspect.getmembers in the order of source code.
Below is the code
def get_functions_from_module(app_module):
list_of_functions = dict(inspect.getmembers(app_module,
…

Young
- 419
- 3
- 19
5
votes
1 answer
get source code for method with @property decorator python
Suppose I have a class MyClass that has a property created with the @property decorator, like this:
class MyClass(object):
@property
def foo(self):
if whatever:
return True
else:
return False
Suppose…

Marc
- 3,386
- 8
- 44
- 68
5
votes
1 answer
Inspect InAppBrowser from Chrome devTools
Inside my Cordova mobile app i'm using inAppBrowser to open an external link.
From chrome devTools I can open and inspect my app but there's no reference to the new inAppBrowser window.
I've tried on safari (for the iOS version of the app) and i…

6160
- 1,002
- 6
- 15