格式输出为表格

时间:2016-08-07 11:35:35

标签: powershell

我写了一个简单的循环,它将字符串返回给变量:

col1         col2

---         ----

var          test

我想将输出格式化为表格,如:

var = 1
if type(var) == int:
   print('your variable is an integer')

可以吗?

1 个答案:

答案 0 :(得分:0)

将输出传输到android.content.res.Resources$NotFoundException: File res / drawable / ripple_effect_square2.xml from drawable resource ID #0x7f02017d at android.content.res.Resources.loadDrawable(Resources.java:2101) at android.content.res.Resources.getDrawable(Resources.java:700) at android.view.View.setBackgroundResource(View.java:15303) Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line # 2: invalid drawable tag ripple at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java: 933) at android.graphics.drawable.Drawable.createFromXml(Drawable.java: 877) at android.content.res.Resources.loadDrawable(Resources.java: 2097) at android.content.res.Resources.getDrawable(Resources.java: 700)  at android.view.View.setBackgroundResource(View.java: 15303) 

Format-Table

如果要将格式化的输出作为字符串存储在变量中,请将其管道传输到PS C:\> $var |Format-Table col1 col2 --- ---- var test

Out-String