一个简单的调用模块问题

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

一个简单的调用模块问题

James liu-2
写了个类,比如fileinfo.py,,,放在d:\python

把 路径加进去
sys.path.append('d:\python')

然后想
import fileinfo...但是提示没有这个模块



--
regards
j.L
_______________________________________________
python-chinese
Post: send [hidden email]
Subscribe: send subscribe to [hidden email]
Unsubscribe: send unsubscribe to  [hidden email]
Detail Info: http://python.cn/mailman/listinfo/python-chinese
Reply | Threaded
Open this post in threaded view
|

Re: 一个简单的调用模块问题

limodou
2008/1/18 j. L <[hidden email]>:
> 写了个类,比如fileinfo.py,,,放在d:\python
>
> 把 路径加进去
> sys.path.append('d:\python')

这里要么使用'\\'要么前面加个r

>
> 然后想
> import fileinfo...但是提示没有这个模块

--
I like python!
UliPad <<The Python Editor>>: http://code.google.com/p/ulipad/
meide <<wxPython UI module>>: http://code.google.com/p/meide/
My Blog: http://www.donews.net/limodou
_______________________________________________
python-chinese
Post: send [hidden email]
Subscribe: send subscribe to [hidden email]
Unsubscribe: send unsubscribe to  [hidden email]
Detail Info: http://python.cn/mailman/listinfo/python-chinese
Reply | Threaded
Open this post in threaded view
|

Re: 一个简单的调用模块问题

James liu-2
不加也可以的。。我用sys.path看过。

加上去,,也没用啊

2008/1/18 limodou <[hidden email]>:
2008/1/18 j. L <[hidden email]>:
> 写了个类,比如fileinfo.py,,,放在d:\python
>
> 把 路径加进去
> sys.path.append('d:\python')

这里要么使用'\\'要么前面加个r

>
> 然后想
> import fileinfo...但是提示没有这个模块

--
I like python!
UliPad <<The Python Editor>>: http://code.google.com/p/ulipad/
meide <<wxPython UI module>>: http://code.google.com/p/meide/
My Blog: http://www.donews.net/limodou
_______________________________________________
python-chinese
Post: send [hidden email]
Subscribe: send subscribe to [hidden email]
Unsubscribe: send unsubscribe to  [hidden email]
Detail Info: http://python.cn/mailman/listinfo/python-chinese



--
regards
j.L
_______________________________________________
python-chinese
Post: send [hidden email]
Subscribe: send subscribe to [hidden email]
Unsubscribe: send unsubscribe to  [hidden email]
Detail Info: http://python.cn/mailman/listinfo/python-chinese
Reply | Threaded
Open this post in threaded view
|

Re: 一个简单的调用模块问题

James liu-2
搞定了。。谢谢。

2008/1/18 j. L <[hidden email]>:
不加也可以的。。我用sys.path看过。

加上去,,也没用啊

2008/1/18 limodou <[hidden email]>:

2008/1/18 j. L <[hidden email]>:
> 写了个类,比如fileinfo.py,,,放在d:\python
>
> 把 路径加进去
> sys.path.append('d:\python')

这里要么使用'\\'要么前面加个r

>
> 然后想
> import fileinfo...但是提示没有这个模块

--
I like python!
UliPad <<The Python Editor>>: http://code.google.com/p/ulipad/
meide <<wxPython UI module>>: http://code.google.com/p/meide/
My Blog: http://www.donews.net/limodou
_______________________________________________
python-chinese
Post: send [hidden email]
Subscribe: send subscribe to [hidden email]
Unsubscribe: send unsubscribe to  [hidden email]
Detail Info: http://python.cn/mailman/listinfo/python-chinese



--
regards
j.L



--
regards
j.L
_______________________________________________
python-chinese
Post: send [hidden email]
Subscribe: send subscribe to [hidden email]
Unsubscribe: send unsubscribe to  [hidden email]
Detail Info: http://python.cn/mailman/listinfo/python-chinese