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

Popular posts from this blog

java - HTTP Status 500 - An exception occurred processing JSP page /second.jsp at line 15 -

php - Using str_replace to translate a MySQL Table in html -

asp.net mvc - Cannot display error message on Editor or EditorFor -