I am trying to create a virus scanner in Python, and I know that signature based detection is possible, but is heuristic based detection possible in Python, ie. run a program  in a safe environment, or scan the program's code, or check what the program behaves like, and then decide if the program is a virus or not.
Python is described as a general purpose programming language so yes, this is defiantly possible but not necessarily the best implementation. In programming, just like a trade, you should use the best tools for the job.
It could be recommended prototyping your application with Python and Clamd and then consider moving to another language if you want a closed source solution, which you can sell and protect your intellectual property. 
Newb quotes: 

Anything written in python is typically quite easy to
  reverse-engineer, so it won't do for real protection.

I disagree, in fact a lot but it is up for debate I suppose. I really depends how the developer packages the application.
Is it possible to implement heuristic virus scanning in Python?