Post Reply 

Python-fu PDB query

Mar 8, 2012, 11:46 (This post was last modified: Mar 8, 2012 11:46 by borko1980.)
Post: #1
Python-fu PDB query
Is it possible (rather how) to list commands where each is on new line, something like:
Code:
>>> pdb.query()
function1()
function2()
function3()
...
functionN()

NOTE TO PERSON WHO WROTE PYTHON-FU CONSOLE:
No offense buddy, but you must get your brain checked!!!
Also ask your self, what is the use of console if it is not human-friendly!!!

Try to read yourself:
[Image: commands.jpg]
Find all posts by this user
Quote this message in a reply
Mar 8, 2012, 12:34
Post: #2
RE: Python-fu PDB query
pdb.query() is a function. Why would you expect it to produce pretty-formated output?

try:

for thing in pdb.query(): print thing

although you need to hit Enter twice
Find all posts by this user
Quote this message in a reply
Mar 8, 2012, 12:56 (This post was last modified: Mar 8, 2012 12:57 by borko1980.)
Post: #3
RE: Python-fu PDB query
1. I can't get out nothing, it spit out errors. I don't get correct sytaks. Care to share small example? Please.

In documentation says:
Quote:proc_name - The name of the procedure.
proc_blurb - A short piece of information about the procedure.
proc_help - More detailed information about the procedure.
...
2. Can someone give me example to call "help" on one arbitary function/proc?
What is correct syntaks?

Thanks for your time.
Find all posts by this user
Quote this message in a reply
Mar 8, 2012, 13:03
Post: #4
RE: Python-fu PDB query
Quote:Why would you expect it to produce pretty-formated output?
Why not??? Its much usefull other way, and i guess its one line of code change.
Something like:
Code:
for commands_in_list
    print commands_in_list[i].name
    print new_line
Find all posts by this user
Quote this message in a reply
Mar 8, 2012, 14:00
Post: #5
RE: Python-fu PDB query
IMHO you are barking up the wrong tree... what you need is click the "browse" button at the bottom of the python-fu console... It takes you to the PDB browser where you can look up function much more easily (and they are displayed with all info/help/parm definition...):

[attachment=998]

And if you hit the "apply'" button, the browser entry is copied to the console... much better thought out than you think, actually Smile It even documents plugins you have installed (if the authors have correctly set the necessary strings for registration).

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Mar 8, 2012, 14:13
Post: #6
RE: Python-fu PDB query
Aha. It was there all the time but i didn't tried to search there. Thanks a lot.
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Loading PythonFu Plugin: ImportError for .../python/gimp.so (GIMP 2.8.22/OSX/Py2.7.9) joroek 1 256 Jul 11, 2017 07:26
Last Post: ythgilb
  Setting text markup from python script Burbly 1 392 Sep 16, 2014 12:29
Last Post: Burbly
  Python-Fu Script Not Registering image_artist 1 353 Sep 14, 2014 13:24
Last Post: image_artist
  Bashing my head - Batch Python Script nmiltner 1 410 Sep 5, 2014 00:58
Last Post: nmiltner
  PDB call to Image/Canvas size... ? Shadowes 3 400 Sep 1, 2014 22:31
Last Post: Shadowes

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS