I'm working with the PyFacebook
package in Python, and I've seen people mention numerous times that you can write an import statement as follows:
from facebook.djangofb import facebook
However, it does not work. It states that facebook.method_name
exists in the facebook
module, rather than the djangofb
module. I assume I'm importing the facebook.method_name
as facebook
, not that I'm receiving it from the facebook
package itself.
I'm using Python 2.6.
How can I alias facebook.djangofb
as facebook
?
This is the proper way to alias a module via import:
import facebook.djangofb as facebook
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With