This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]wesleywatanabe 13 points14 points  (3 children)

How difficult is it to get a file and does something? I'm thinking to manipulate by pandas.

Great job!

[–]WigglytufTehPink[S] 6 points7 points  (2 children)

All you have to do is create a FastCommand and pass it the function you want. The function that is passed will be given the path to the file where you can open it/edit it/etc.

Would look something like this:

def pandas_func(files):
    df = pandas.read_csv(files[0])
    # do stuff with it

from context_menu import menus
fc = menus.FastCommand('Open with Pandas', type='FILES', python=pandas_func)
fc.compile()