简体   繁体   English

在哪里可以找到导入的python源文件?

[英]Where can I find a python source file by the import?

There is this line in a python class file, and I am trying to find the python file that defines the PeieApi python类文件中有此行,我正在尝试查找定义PeieApi的python文件

from peieapi.peieapi import PeieApi

I've recursively searched in the project folder for "class PeieApi", didn't find it. 我已经在项目文件夹中递归搜索“ class PeieApi”,但没有找到它。

I've check the directory where this file is located for any file or directory with the name peieapi, didn't find any. 我已经检查了该文件所在的目录中是否有名称为peieapi的任何文件或目录,但未找到任何文件或目录。

So, where else can I find the source file that defines this python class PeieApi? 因此,在哪里还能找到定义此python类PeieApi的源文件?

It was actually installed into this directory by pip when running the project installation script. 运行项目安装脚本时,它实际上是通过pip安装到此目录中的。 I saw it showed up from the list returned by this command. 我从该命令返回的列表中看到了它。

pip list

Seems if it's not in the project directory, it will be in the global python library directory, in my case on a Mac, it's in 似乎它不在项目目录中,而是在全局python库目录中,在我的Mac上,它位于

/usr/local/lib/python2.7/site-packages/

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我应该在哪里导入源文件中的Python库? - Where should I import Python libraries in my source file? 在哪里可以找到 Python 的 hash() 函数的源代码或算法? - Where can I find source or algorithm of Python's hash() function? 我在哪里可以找到'admin.site.urls'的源文件? - where can i find the source file of 'admin.site.urls'? python中的相对导入错误以及在哪里可以找到python模块源代码 - relative import error in python and where can find python module source code 我正在尝试使用这个 python 脚本来比较声音,但我找不到在哪里上传它们 ''源文件'' 和 ''目标文件'' - i'm trying to use this python script to compare sound but i can't find where to upload them ''source file'' and ''target file'' 我可以导入其中包含我编写导入语句的python文件的模块吗? - Can I import a module that has in it the python file where I wrote the import statement? 在编辑Mac OS X的Emacs配置时,在哪里可以找到“ Python模式”的来源? - Where can I find the source for “python mode” when editing emacs configuration for mac os x? python&numpy:在numpy的github上哪里可以找到dtype类的源代码 - python&numpy:where can I find class dtype's source code in numpy's github 在哪里可以找到python低级线程API _thread扩展模块的源代码? - where can I find the source code for python Low-level threading API _thread extension module? 在哪里可以找到 Python 源代码分发中的示例,例如 Modules/xxmodule.c? - Where can I find examples from the Python source distribution, such as Modules/xxmodule.c?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM