Question: I am using Perforce 2015 client (P4V) on Windows 7.

I changed some files in my IDE. Then I use "Folder Diff" in Perforce to locate them. I was expecting to find "checkout" right click menu on the "Folder Diff" Perforce window in order to move my changes to a changeset but I don't see any "checkout" around.

How can I checkout directly from Diff view?

Answer: 
Try the [`exec`](https://docs.python.org/2/reference/simple_stmts.html#exec) statement:

```
>>> content = "def my_function(x):\n    return x**2"
>>> exec content
>>> my_function(5)
25

```
You can use the eval function to do this. e.g. eval("print('Hello')"). 

However, do be advised that this can be a security risk, and there is probably a better way of doing it than parsing a string.