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: 
Here is something that does not leave safe train of python completely.

```
def extract_function_from_string(content, function_index=0):
    import ast
    tree = ast.parse(content, mode='exec')
    function = tree.body[function_index]
    module = ast.Module([function])
    exec(compile(module, filename="<ast>", mode='exec'))
    return locals()[function.name]

content = "def my_function(x):\n    return x**2"
my_function = extract_function_from_string(content) # extract_function_from_string ???
print(my_function(5)) # prints 25

```
a = "lambda x:x\*\*2" 

my\_func = eval(a)

print my\_func(3)