1
votes

I have a folder of . py files(a package made by me) which i have uploaded into my google drive.

I have mounted my google drive in colab but I still can not import the folder in my notebook as i do in my pc.

I know how to upload a single .py file into google colab and import it into my code, but i have no idea about how to upload a folder of .py files and import it in notebook and this is what i need to do.

This is the code i used to mount drive:

from google.colab import drive

drive.mount('/content/drive')

!ls 'drive/My Drive'

1

1 Answers

1
votes

I found how to do it. after uploading all modules and packages into the directory which my notebook file is in, I changed colab's directory from "/content" to this directory and then i simply imported the modules and packages(folder of .py files) into my code