ChinaUnix.net
相关文章推荐:

perl print 格式化输出

使用print输出各型的 字符串 整数 浮点数 出度及精度控制 strHello = 'Hello Python' print strHello #输出结果:Hello Python #直接出字符串 1.格式化输出整数 python print也支持参数格式化,与C言的printf似, strHello = "the length of (%s) is %d" %('Hello World',len('Hello World')) print strHello #输出果:the length of (Hello World) is 11 2.格式化输出16制整数 nHex = 0x20 #%x --- hex 十六进制 #%d --- de...

by hkebao - Python文档中心 - 2009-10-12 10:33:54 阅读(3666) 回复(0)

相关讨论

perl直接输出图片,(不用GD)代码为 print "Content-type: image/gif\n\n"; open(IMAGE,"<6.gif"); $b=;; close(IMAGE); print $b; 这个是没有问题的,可以显示一个图,但是如果我想连续输出几个图片,于是就 print "Content-type: image/gif\n\n"; open(IMAGE,"<6.gif"); $b=;; close(IMAGE); print $b; print $b; 这样的结果还是一个图片,我又尝试重复来2次 print "Content-type: image/gif\n\n"; open(...

by 白水 - Perl - 2005-09-02 19:40:33 阅读(1902) 回复(9)

一个很简单的python小程序。从终端读取输入,然后输出,方式挺多的,体现python的简单和强大。 1 #!/usr/bin/env python a=raw_input("please input:") print "you just input",a 2 #!/usr/bin/env python a=raw_input("please input:") print "you just input %s"%a 3 #!/usr/bin/env python a=raw_input("please input:") print "you just input %s"%(a) 或许还有,发现了再添加。 本文来自ChinaUnix博客,如果查...

by blueycx - Python文档中心 - 2008-10-22 20:22:15 阅读(1018) 回复(0)

一个很简单的python小程序。从终端读取输入,然后输出,方式挺多的,体现python的简单和强大。 1 #!/usr/bin/env python a=raw_input("please input:") print "you just input",a 2 #!/usr/bin/env python a=raw_input("please input:") print "you just input %s"%a 3 #!/usr/bin/env python a=raw_input("please input:") print "you just input %s"%(a) 或许还有,发现了再添加。 本文来自ChinaUnix博客,如果查...

by blueycx - Python文档中心 - 2008-10-22 20:22:15 阅读(976) 回复(0)

一个很简单的python小程序。从终端读取输入,然后输出,方式挺多的,体现python的简单和强大。 1 #!/usr/bin/env python a=raw_input("please input:") print "you just input",a 2 #!/usr/bin/env python a=raw_input("please input:") print "you just input %s"%a 3 #!/usr/bin/env python a=raw_input("please input:") print "you just input %s"%(a) 或许还有,发现了再添加。 本文来自ChinaUnix博客,如果查...

by blueycx - Python文档中心 - 2008-10-22 20:22:15 阅读(1026) 回复(0)

一个很简单的python小程序。从终端读取输入,然后输出,方式挺多的,体现python的简单和强大。 1 #!/usr/bin/env python a=raw_input("please input:") print "you just input",a 2 #!/usr/bin/env python a=raw_input("please input:") print "you just input %s"%a 3 #!/usr/bin/env python a=raw_input("please input:") print "you just input %s"%(a) 或许还有,发现了再添加。 本文来自ChinaUnix博客,如果查...

by blueycx - Python文档中心 - 2008-10-22 20:22:15 阅读(1106) 回复(0)

比如 Create or replace procedure stp14(col01 out char) As BEG...

by benh - Oracle - 2012-06-11 20:38:52 阅读(2301) 回复(4)

$foo = 111; print $foo & 255 + 1,“\n"; 如果是print ($foo & 255) + 1, "\n";呢(这个是programming perl书中的代码)

by andy820303 - Perl - 2008-04-23 09:09:51 阅读(1967) 回复(5)

现在用python写了个corba的程序,但是就刚开始能接受到的数据,才就长时间无法接受到数据,不知道为什么啊??? 求解!!!

by siyantianji - Python - 2006-09-04 15:18:07 阅读(1168) 回复(1)

我写一个程序,把源文件中所有的行读出,经过正则匹配后再使用 print >>处理后的文件 $a;语句写到处理后的文件中,因为源文件非常大,有2万多行,我虽然用 while一行一行读,但是使用print函数时当变量$a超过4096个字节的时候就得等上好一阵子,估计是把缓存全部写到处理后的文件中,这个过程可能有1分钟,跑完整个程序等待的时间可能比程序主体执行的时间还长。 而同样使用shell来做,只需要用echo $aa>> 处理后的...

by chenzq1604 - Perl - 2006-03-30 17:18:47 阅读(1156) 回复(5)

perl如何实现读取一个文件,该文件内容如下 # # System Type # # CONFIG_ARCH_ARM7 is not set CONFIG_ARCH_ARM9=y # # General setup # CONFIG_BOOTLOAD_ADDR=y CONFIG_BOOTLOAD_TEXTADDR=33000000 # CONFIG_RESET_HANDLING is not set #号开始行为注释 将CONFIG_ARCH_ARM9=y这样的行转换成 GBLL CONFIG_ARCH_ARM9 CONFIG_ARCH_ARM9 SETL {TRUE} 将# CONFIG_ARCH_ARM7 is not set这样的行转换成 GBLL CONFIG_ARCH_AR...

by hubeichenrui - Perl - 2008-11-10 18:58:29 阅读(1206) 回复(8)