我尝试将lsvirtual传递给xargs:
lsvirtualenv -b|xargs -0 -I env rmvirtualenv env
并返回:
xargs: rmvirtualenv: No such file or directory
我在做什么错了?
答案 0 :(得分:1)
#!/usr/bin/python3
# -*- coding: utf-8 -*-
"""
ZetCode Tkinter tutorial
In this script, we draw an image
on the canvas.
Author: Jan Bodnar
Last modified: July 2017
Website: www.zetcode.com
"""
from tkinter import Tk, Canvas, Frame, BOTH, NW
from PIL import Image, ImageTk
class Example(Frame):
def __init__(self):
super().__init__()
self.initUI()
def initUI(self):
self.master.title("High Tatras")
self.pack(fill=BOTH, expand=1)
self.img = Image.open("tatras.jpg")
self.tatras = ImageTk.PhotoImage(self.img)
canvas = Canvas(self, width=self.img.size[0]+20,
height=self.img.size[1]+20)
canvas.create_image(10, 10, anchor=NW, image=self.tatras)
canvas.pack(fill=BOTH, expand=1)
def main():
root = Tk()
ex = Example()
root.mainloop()
if __name__ == '__main__':
main()
不是脚本,它是rmvirtualenv
创建的Shell函数。您无法从. virtualenvwrapper.sh
调用Shell函数。您可以尝试调用bash,采购xargs
,然后调用virtualenvwrapper.sh
。或者您可以尝试
rmvirtualenv