Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Using modules not included in Pythonista
-
I am new to Pythonista - like 30 minutes new.
I am writing code which interacts with the boto3 module for AWS. Additionally, I reuse a lot of code, and I need to also be able to import my own code.
When I do
import boto3
Pythonista correctly reports it doesn't know anything about the module. How do i get it into Pythonista?
Thanks
-
https://github.com/ywangd/stash has to be installed first and that contains pip to allow you to pip install xyz as long as xyz is a pure Python module (no C code).
-
Ok - I got boto3 installed now - thank you for that. How do I tell Pythonista to load my own module, which is in the same directory as the code I am working on.
-
from boto3 import * #or import boto3
-
@ChrisHare, just import with the file’s name without the .py extension, but note that your file name must fit Python syntax (
import my_module
works, butimport my-module
will not).