Questions tagged [inspect]

DO NOT USE! THIS IS AMBIGUOUS. You might be looking for [web-inspector].

562 questions
9
votes
0 answers

How do I hide the new Chrome v84.0.4147.89 Issues Detected messages in the Console area?

Since latest Chrome update, version 84.0.4147.89 (Official Build) (64-bit)) on 14 July 20, when I open the brower's Inspection (debugging) panel, I see 'Issues detected: The new Issues tab displays information about deprecations, breaking changes…
user2505564
9
votes
3 answers

Why Chrome can't inspect nodejs code in Docker container?

I try to start simple nodejs server inside Docker container and debug it with chrome://inspect or WebStorm. Debugging port 9229 is binded but inspection not works. On the other hand when I run same code without docker i can inspect it in…
alexey2baranov
  • 184
  • 2
  • 12
9
votes
2 answers

Python: how to get the *full* name of the function I am in

Is there a way so that the following code: import traceback def log(message): print "%s: %s" %(traceback.extract_stack()[0:-1][-1][2], message) def f1(): log("hello") class cls(object): def f1(self): log("hi…
Julien REINAULD
  • 499
  • 4
  • 13
9
votes
1 answer

Uispy Return's Value as "?"

i am using UISpy to detect the outlook TO Address Field but uispy return the Values as "?" If it's normal text then Uispy detects correctly it's showing the To Address. the problem is when we enter any email address in To address field its…
Ravi Kanth
  • 1,074
  • 11
  • 32
9
votes
0 answers

List modules in namespace package

I'm trying to get Python to list all modules in a namespace package. I have the following file structure: cwd |--a | `--ns | |--__init__.py | `--amod.py |--b | `--ns | |--__init__.py | `--bmod.py `--c `--ns |--__init__.py …
siebz0r
  • 14,765
  • 11
  • 55
  • 100
9
votes
2 answers

How can I find out where an object has been instantiated?

I'm trying to find out, at runtime, where an object has been instantiated, as this would enable providing a very useful error message to users of my library. Suppose we have the following code: import mylib obj = mylib.MyClass() obj is then passed…
Brecht Machiels
  • 2,562
  • 3
  • 19
  • 35
8
votes
2 answers

how ot solve chrome ERR_DISALLOWED_URL_SCHEME when open wss protocol ?

I run node cli node --inspect start/server Whichstart/server is a koa2 webserver. and then I got : Debugger listening on ws://127.0.0.1:9229/3323c837-cc74-4897-af12-8fccc9d709c1 I got bellow in chrome when I input ws url …
pingfengafei
  • 519
  • 2
  • 6
  • 12
8
votes
2 answers

How can I find out which capabilities a container has been given?

Say I run a container adding a capability, e.g. --cap-add=SYS_ADMIN Is there a way to find out that this container has been assigned the SYS_ADMIN capability? docker-inspect doesn't seem to return such information.
Marcello Romani
  • 2,393
  • 22
  • 34
8
votes
4 answers

Get method of a class in the order that it was in the code

This code: import inspect class Obj(): def c(self): return 1 def b(self): return 2 def a(self): return 3 o = Obj() for name, value in inspect.getmembers(o, inspect.ismethod): print str(value())+"…
santos82h
  • 311
  • 2
  • 9
8
votes
2 answers

Python inspect.stack is slow

I was just profiling my Python program to see why it seemed to be rather slow. I discovered that the majority of its running time was spent in the inspect.stack() method (for outputting debug messages with modules and line numbers), at 0.005 seconds…
dpitch40
  • 2,421
  • 6
  • 25
  • 40
7
votes
2 answers

Get Python function's owning class from decorator

I have a decorator in PY. It is a method and takes the function as a parameter. I want to create a directory structure based based on the passed function. I am using the module name for the parent directory but would like to use the classname for…
Corey Coogan
  • 1,489
  • 1
  • 17
  • 29
7
votes
3 answers

Detect if class was defined declarative or functional - possible?

Here's a simple class created declaratively: class Person: def say_hello(self): print("hello") And here's a similar class, but it was defined by invoking the metaclass manually: def say_hello(self): …
wim
  • 266,989
  • 79
  • 484
  • 630
7
votes
1 answer

chrome devtools source not inspectable after backtick

If I stop my javascript code in a breakpoint and try to inspect certain part of the code like a variable or a function by hovering over, it gives a popup with its value like in the screenshot below: But If I use es6 template strings in my code like…
Probosckie
  • 1,163
  • 2
  • 18
  • 31
7
votes
2 answers

How to check if the docker image has all the files?

Is there a way to check if the docker image has all of the files that the Dockerfile copies over and to understand if the image is built as configured in the Dockerfile? My situation is that the image is built successfully, however when I try…
sharman
  • 465
  • 4
  • 17
7
votes
2 answers

How do I print the variable arguments with names from previous stack?

I would like to define a log function that is called with a message followed by one or more variables to be printed out. So, something like the following: log( "Oh no, error.", x, d) log would be defined sorta like: def log( msg, *arg): # Loop…
Bitdiot
  • 1,378
  • 1
  • 13
  • 27
1 2
3
37 38