扩展已编译为.exe的Python程序?

时间:2014-01-05 13:51:41

标签: python exe python-2.5 python-extensions python-embedding

我正在使用python 2.5(windows)制作网络分析工具,它使用scapy捕获网络流量并将捕获数据存储在* .pcap文件中。我想要实现的是允许用户编写自己的功能来分析网络流量。所以我做的是我创建了一个允许用户编写该函数的接口类。

#analyzer function class
class date_validator:
    def __init__(self,dbh):

        #any intializations required for the function.
        self.dbHandle=dbh
        #All interaction with the database can be done by using this handle.
        return

    def importer(self):
        #contains all the modules that have to be imported for
        #execution of the analyzer function.
        return

    def LogAnalyzer(self):
       #Main function that contains the analyzer code.

       return data
       #this function must return 2D data to populate a table View.
       # It can accomadate 1D data also .

现在我面临的问题是,在将整个程序打包为exe之后,如果我加载具有上述给定结构的分析器函数并且必须导入模块,那么可以说“import nmap”将如何工作并且在模块安装在系统上的情况?

所以我的问题是我如何完成这项任务,有更好的方法吗?

提前致谢。

0 个答案:

没有答案
相关问题