English 中文(简体)
几个关于甲型六氯环己烷进口特征的问题
原标题:A few questions regarding Pythons import feature

我刚刚下载了美德·索普,我已经决定,Ill将建造一个小的图书馆(即他们称之为Adhur?),该图书馆将归还电影和监文银行电影搜索的结果。

我的问题是,这一进口究竟如何工作?

例如,我下载了《美容》的版本,它都是一纸空文。 该档案是否必须与我的假日申请(将使用图书馆的我的项目)相同。

最佳回答

就班图而言,你可以与指挥部一道寻找包裹。

apt-cache search beautifulsoup

这应当产生效果。

python-beautifulsoup - error-tolerant HTML parser for Python

因此,为乌本图安装美容最容易的方法是运行。

sudo apt-get install python-beautifulsoup

一旦你这样做,你就可以说,

import BeautifulSoup 

在你的任何文字和你的 p安装中都将找到这个模块。

问题回答

美丽 因此,需要将一些地方置于“灰色”搜索道路上,可在<条码>sys.path阵列上查阅。 请注意,目前的名录总是列入这一阵列(作为空洞)。

>>> import sys
>>> sys.path
[  ,  C:\Windows\system32\python26.zip ,  c:\python26\DLLs ,  c:\python26\lib ,  c:\python26\lib\plat-win ,  c
:\python26\lib\lib-tk ,  c:\python26 ,  c:\python26\lib\site-packages ,  c:\python26\lib\site-packages\win32 
,  c:\python26\lib\site-packages\win32\lib ,  c:\python26\lib\site-packages\Pythonwin ]

module search path。 就你的案件而言,将py档案放在同一个文件夹中将发挥作用。

<modules是可进口的花on方案(与C文档的对照)中的顶级实体。 有一种装载途径,其中包含一份目录清单,在你重新进口时搜寻模块。 我建议你通过。 官方教学课程()的模块部分(通过整个教学)。

不是相关的,但你们是否考虑使用注射器? 最后,我用了这段话。





相关问题
Can Django models use MySQL functions?

Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...

An enterprise scheduler for python (like quartz)

I am looking for an enterprise tasks scheduler for python, like quartz is for Java. Requirements: Persistent: if the process restarts or the machine restarts, then all the jobs must stay there and ...

How to remove unique, then duplicate dictionaries in a list?

Given the following list that contains some duplicate and some unique dictionaries, what is the best method to remove unique dictionaries first, then reduce the duplicate dictionaries to single ...

What is suggested seed value to use with random.seed()?

Simple enough question: I m using python random module to generate random integers. I want to know what is the suggested value to use with the random.seed() function? Currently I am letting this ...

How can I make the PyDev editor selectively ignore errors?

I m using PyDev under Eclipse to write some Jython code. I ve got numerous instances where I need to do something like this: import com.work.project.component.client.Interface.ISubInterface as ...

How do I profile `paster serve` s startup time?

Python s paster serve app.ini is taking longer than I would like to be ready for the first request. I know how to profile requests with middleware, but how do I profile the initialization time? I ...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

Converting Dictionary to List? [duplicate]

I m trying to convert a Python dictionary into a Python list, in order to perform some calculations. #My dictionary dict = {} dict[ Capital ]="London" dict[ Food ]="Fish&Chips" dict[ 2012 ]="...

热门标签