VPanjeta / ModiScript

Acche din aa gaye
MIT License
1.04k stars 111 forks source link

add support for programmatic execution #17

Closed 0xDaksh closed 4 years ago

0xDaksh commented 5 years ago
from modiscript.api import ModiScript

ms = ModiScript(debug=False)

ms.execute("""
mitrooon

bhaiyo aur behno "Do whatever you want here"

acche din aa gaye
""", valueType="code")

I've moved the binary back to the repo directory.

VPanjeta commented 4 years ago

Hey @DakshMiglani As I mentioned earlier, the runnable file should be present in the directory that has the project's name or in a bin folder. Since the latter isn't a viable option for now given that we don't have a setup.py file, keeping the runnable in the directory called modiscript makes more sense. Is there any reason why you would prefer it out of the project folder? I'm keeping the PR open for now in case you have a reason to keep the runnable out of the folder. But as I pointed out earlier, the runnable file is never kept in the root folder. You can lookup structures of open source compilers like gcc where the runnable file is always in the gcc folder before installation and is moved to the /usr/bin/ after installation.

0xDaksh commented 4 years ago

Yes yes that's not an issue, I actually accidentally committed setup.py and after realizing removed it in the next commit and squashed those commits. So it's not there anymore @VPanjeta

VPanjeta commented 4 years ago

Thanks for the contribution. There were some small issues with relative imports. I will be fixing those and meanwhile I have merged this PR.