Linked Questions

-1 votes
1 answer
183 views

When run wmi.WMI() I am getting this "<_wmi_namespace: >" anyone explain this? import wmi c = wmi.WMI() output: <_wmi_namespace: <COMObject winmgmts:>> Can anyone ...
Grover Nick's user avatar
1534 votes
32 answers
1.4m views

So what I'm looking for here is something like PHP's print_r function. This is so I can debug my scripts by seeing what's the state of the object in question.
fuentesjr's user avatar
  • 52.5k
490 votes
25 answers
632k views

I want to iterate through the methods in a class, or handle class or instance objects differently based on the methods present. How do I get a list of class methods? Also see: How can I list the ...
Purrell's user avatar
  • 13k
504 votes
10 answers
396k views

When debugging in PHP, I frequently find it useful to simply stick a var_dump() in my code to show me what a variable is, what its value is, and the same for anything that it contains. What is a good ...
Zoredache's user avatar
  • 39.9k
73 votes
10 answers
97k views

What is the reason of having globals() function in Python? It only returns dictionary of global variables, which are already global, so they can be used anywhere... I'm asking only out of curiosity, ...
user avatar
25 votes
5 answers
59k views

In r, with the str() function you can see structure from an object like this: > str(mari) 'data.frame': 25834 obs. of 6 variables: $ Xcoor: num 0.0457 0.0469 0.0481 0.0495 0.0519 ... $ Ycoor:...
Jose's user avatar
  • 525
-2 votes
1 answer
2k views

I am looking at a code given to me by a co-worker who no longer works with us. I have a list variable called rx. >> type(rx) type 'list' When I go to look inside rx[0] I get this: >> ...
Darcy's user avatar
  • 669
4 votes
1 answer
1k views

In Chrome development console one can type name of a variable and output is a visual and interactive representation of the object. (In JavaScript objects are like dictionaries, so this is easy.) I ...
Martin Jiřička's user avatar
0 votes
1 answer
913 views

I am doing the django tutorial so I am literally cutting and pasting code. I keep getting this error on step 1 from django.conf.urls import url from django.conf.urls import include from . import ...
Kyle Sponable's user avatar
-2 votes
1 answer
600 views

Background I am using gkeepapi to get the labels of my Google Keep notes: import gkeepapi keep = gkeepapi.Keep() keep.login('[email protected]', 'password') labels = keep.labels() I want to read the ...
Ooker's user avatar
  • 3,404
0 votes
1 answer
79 views

I was making my personal assistant speech_recognition is working properly with headphones but without headphones on internal mic it is not recognising the voice. Code: with sr.Microphone() as source: ...
Ansh Tyagi's user avatar
0 votes
0 answers
87 views

I am trying to return an object from a database in Django. So I have this line in my views.py: single_appointment = Appointment.objects.get(id=int(app_id)) app_id is passed into the view as an ...
ruslaniv's user avatar
  • 664