Quantcast
Channel: What is the proper way to write (and source?) .pdbrc file? - Stack Overflow
Viewing all articles
Browse latest Browse all 2

What is the proper way to write (and source?) .pdbrc file?

$
0
0

I tried to write a .pdbrc file in both Python 2.7 and Python 3.5, using a sample code provided in pdb doc, see below:

# Print instance variables (usage "pi classInst")alias pi for k in %1.__dict__.keys(): print("%1.",k,"=",%1.__dict__[k])# Print instance variables in selfalias ps pi self

In my home directory, I open a file with nano .pdbrc and save the above code into it. Then I ran source .pdbrc and got the following error message:

-bash: .pdbrc: line 3: syntax error near unexpected token `('-bash: .pdbrc: line 3: `alias pi for k in %1.__dict__.keys(): print("%1.",k,"=",%1.__dict__[k])'

How do I fix it?


Viewing all articles
Browse latest Browse all 2

Trending Articles