module - How can I use import, from import and sys.append together in Python -
i have directory add sys.path import custom modules. correct/best way use import, import , sys.path together? mean if acceptable use sys.path.append in between "imports".
for example:
#!c:/python27 import sys sys.path.append('c:\\users\\user\\mypythonmodules') import writedata wd import os import csv collections import defaultdict
edit:
i should have mentioned writedata
custom module want import wd
. module writedata
located in c:\\users\\user\\mypythonmodules
yes, is. there no syntax or semantic rule in language prevents that.
i not aware of "style" rule may breaking, in case, option providing pythonpath python interpreter.
Comments
Post a Comment