Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/286.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/perl/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
什么是Python';s相当于;perl-V";_Python_Perl_Configuration_Version_System - Fatal编程技术网

什么是Python';s相当于;perl-V";

什么是Python';s相当于;perl-V";,python,perl,configuration,version,system,Python,Perl,Configuration,Version,System,运行perl-V生成的输出包含有用的信息(参见下面的示例)。Python有类似的功能吗 示例输出: %perl-V 我的perl5(修订版5版本10 subversion 1)配置摘要: 站台: osname=linux,osvers=2.6.32-5-amd64,archname=x86_64-linux-gnu-thread-multi uname='linux brahms 2.6.32-5-amd64#1 smp星期二6月14日09:42:28 utc 2011 x86_64 Gnul

运行
perl-V
生成的输出包含有用的信息(参见下面的示例)。Python有类似的功能吗


示例输出:

%perl-V
我的perl5(修订版5版本10 subversion 1)配置摘要:
站台:
osname=linux,osvers=2.6.32-5-amd64,archname=x86_64-linux-gnu-thread-multi
uname='linux brahms 2.6.32-5-amd64#1 smp星期二6月14日09:42:28 utc 2011 x86_64 Gnulux'
config_args='-Dusethreads-Duselargefiles-Dccflags=-DDEBIAN-Dcccdlflags=-fPIC-Darchname=x86_64-linux-gnu-Dprefix=/usr-Dprivlib=/usr/share/perl/5.10-Darchlib=/usr/lib/perl/perl/5.10-Dvendorlib=/usr-Dvendorlib=/usr/share/perl5-Dvendorarch=/usr/lib/perl5-Dsiteprefix=/usr/local/local/perl-Dsitearch=/usr/local/lib/perl/5.10.1-Dman1dir=/usr/share/man/man1-Dman3dir=/usr/share/man/man3-Dsiteman1dir=/usr/local/man/man1-Dsiteman3dir=/usr/local/man/man3-Dman1ext=1-dman3perl-Dpager=/usr/bin/sensible-pager-Uafs-Ud-usu-csh-Ud-ualarm-uussesfio-uussenm-DDEBUGGING=-g-dopsibo2=1-libesho2.10.10-Dd_dosuid-des'
提示=推荐,使用POSIX=真,d_sigaction=定义
useithreads=define,useithmultiplicity=define
useperlio=define,d_sfio=undef,uselagefiles=define,usesocks=undef
use64bitint=define,use64bitall=define,uselongdouble=undef
usemymalloc=n,bincompat5005=undef
编译器:
cc='cc',ccflags='-D_REENTRANT-D_GNU_SOURCE-DDEBIAN-fno严格别名-pipe-fstack protector-I/usr/local/include-D_LARGEFILE_SOURCE-D_FILE_OFFSET_BITS=64',
优化='-O2-g',
cppflags='-D_可重入-D_GNU_源-DDEBIAN-fno严格别名-pipe-fstack-protector-I/usr/local/include'
ccversion='',gccversion=''4.4.5',gccosandvers=''
intsize=4,longsize=8,ptrsize=8,doublesize=8,byteorder=12345678
d_longlong=define,longlongsize=8,d_longdbl=define,longdblsize=16
ivtype='long',ivsize=8,nvtype='double',nvsize=8,Off\u t='Off\u t',lseeksize=8
alignbytes=8,prototype=define
链接器和库:
ld='cc',ldflags='-fstack-protector-L/usr/local/lib'
libpth=/usr/local/lib/lib/usr/lib/lib64/usr/lib64
libs=-lgdbm-lgdbm_compat-ldb-ldl-lm-lpthread-lc-lcrypt
perllibs=-ldl-lm-lpthread-lc-lcrypt
libc=/lib/libc-2.11.2.so,so=so,useshrplib=true,libperl=libperl.so.5.10.1
gnulibc_version='2.11.2'
动态链接:
dlsrc=dl_dlopen.xs,dlext=so,d_dlsymun=unde,ccdlflags='-Wl,-E'
cccdlflags='-fPIC',lddlflags='-shared-O2-g-L/usr/local/lib-fstack-protector'
此二进制文件的特征(来自libperl):
编译时选项:多重PERL\u DONT\u CREATE\u GVSV
PERL\u隐式\u上下文PERL\u MALLOC\u WRAP使用64位\u ALL
使用64位文件使用ITHEREAD使用大文件
使用PERLIO使用可重入API
本地应用的修补程序:
DEBPKG:debian/arm\u线程\u应力\u超时-http://bugs.debian.org/501970 提高ext/threads/shared/t/stress.t的超时以适应较慢的构建主机
DEBPKG:debian/cpan_config_path-将cpan::config的位置设置为/etc/perl as/usr可能不可写。
DEBPKG:fixes/safe-reval-rdo-cve-2010-1447-[PATCH]默认包装rdo和reval返回的coderefs
解包:补丁级别-http://bugs.debian.org/567489 列出patchlevel.h中5.10.1-17挤压2的包装补丁
在linux下构建
编制时间:2011年6月30日22:28:00
@公司:
/etc/perl
/usr/local/lib/perl/5.10.1
/usr/local/share/perl/5.10.1
/usr/lib/perl5
/usr/share/perl5
/usr/lib/perl/5.10
/usr/share/perl/5.10
/usr/local/lib/site\u perl
/usr/local/lib/perl/5.10.0
/usr/local/share/perl/5.10.0
.
不要与信息量小得多的
perl-v
混淆:

% perl -v
This is perl, v5.10.1 (*) built for x86_64-linux-gnu-thread-multi
(with 53 registered patches, see perl -V for more detail)

Copyright 1987-2009, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

尽管这是令人难以置信的黑客行为,不切实际,而且没有perl-V详细,但这是一个可以获得有关环境的适当信息的单行程序

python -c "import platform as p;exec('for x in vars(p):\n try:\n  print ({x:vars(p)[x]()})\n except:\n  pass')"
由于这不是典型的易于记忆的命令,您可以将这一行保存到Python的
Lib
目录中,作为
sys\u info.py
,然后您可以运行:

python -m sys_info

哈哈,完全拥有我的答案。另外,perl还有一个到
perl-V
数据的模块接口:the。
python -c 'import sysconfig, pprint; pprint.pprint(sysconfig.get_config_vars())'