{"action":"created","issue":{"url":"https://api.github.com/repos/stevengj/PyCall.jl/issues/251","repository_url":"https://api.github.com/repos/stevengj/PyCall.jl","labels_url":"https://api.github.com/repos/stevengj/PyCall.jl/issues/251/labels{/name}","comments_url":"https://api.github.com/repos/stevengj/PyCall.jl/issues/251/comments","events_url":"https://api.github.com/repos/stevengj/PyCall.jl/issues/251/events","html_url":"https://github.com/stevengj/PyCall.jl/issues/251","id":144654039,"number":251,"title":"Add a file with functions instead of importing a package.","user":{"login":"silgon","id":901061,"avatar_url":"https://avatars.githubusercontent.com/u/901061?v=3","gravatar_id":"","url":"https://api.github.com/users/silgon","html_url":"https://github.com/silgon","followers_url":"https://api.github.com/users/silgon/followers","following_url":"https://api.github.com/users/silgon/following{/other_user}","gists_url":"https://api.github.com/users/silgon/gists{/gist_id}","starred_url":"https://api.github.com/users/silgon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silgon/subscriptions","organizations_url":"https://api.github.com/users/silgon/orgs","repos_url":"https://api.github.com/users/silgon/repos","events_url":"https://api.github.com/users/silgon/events{/privacy}","received_events_url":"https://api.github.com/users/silgon/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-30T17:03:32Z","updated_at":"2016-04-06T15:35:59Z","closed_at":"2016-04-06T15:35:59Z","body":"I would like to call a python function only. For this reason I want to add a python file to my julia package containing this function.\r\nI cannot translate this function to julia because it's generating some errors because some components used in `cvxpy` (the package I'm using), nonetheless it works fine when I use it alone in python. Thus, I want to avoid creating a whole package only for one function, but I need a python script nonetheless.\r\nAny ideas or thoughts?"},"comment":{"url":"https://api.github.com/repos/stevengj/PyCall.jl/issues/comments/206432921","html_url":"https://github.com/stevengj/PyCall.jl/issues/251#issuecomment-206432921","issue_url":"https://api.github.com/repos/stevengj/PyCall.jl/issues/251","id":206432921,"user":{"login":"stevengj","id":2913679,"avatar_url":"https://avatars.githubusercontent.com/u/2913679?v=3","gravatar_id":"","url":"https://api.github.com/users/stevengj","html_url":"https://github.com/stevengj","followers_url":"https://api.github.com/users/stevengj/followers","following_url":"https://api.github.com/users/stevengj/following{/other_user}","gists_url":"https://api.github.com/users/stevengj/gists{/gist_id}","starred_url":"https://api.github.com/users/stevengj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevengj/subscriptions","organizations_url":"https://api.github.com/users/stevengj/orgs","repos_url":"https://api.github.com/users/stevengj/repos","events_url":"https://api.github.com/users/stevengj/events{/privacy}","received_events_url":"https://api.github.com/users/stevengj/received_events","type":"User","site_admin":false},"created_at":"2016-04-06T15:35:59Z","updated_at":"2016-04-06T15:35:59Z","body":"You should just be able to do `pybuiltin(\"execfile\")(\"myfile.py\")`.   As I understand it, `execfile` is the Python equivalent of Julia's `include`, which seems to be what you want.\r\n\r\n(For importing a local module, you just need to set the path appropriately, as @cstjean mentioned.)"}}