User directory in PATH in zsh: ~ Does Not Work
1,006
Use $HOME
instead.
PATH="$HOME/scripts:$PATH"
Related videos on Youtube
Author by
Dan G.
Updated on September 17, 2022Comments
-
Dan G. over 1 year
I am trying to make a basic drawing program with a RadioButton to determine shape of the brush.
self.choseo = Radiobutton(text='Circle', variable=shape,indicatoron=0, value=1) self.choser = Radiobutton(text='Rectangle', variable=shape,indicatoron=0, value=2) self.chosea = Radiobutton(text='Arc', variable=shape,indicatoron=0, value=3)
Which corresponds to:
if shape.get()==3: self.display.create_arc( self.x1, self.y1, self.x2, self.y2, fill = mycolor, outline= mycolor, tags = "line") elif shape.get()==2: self.display.create_rectangle( self.x1, self.y1, self.x2, self.y2, fill = mycolor, outline= mycolor, tags = "line") elif shape.get()==1: self.display.create_oval( self.x1, self.y1, self.x2, self.y2, fill = mycolor, outline= mycolor, tags = "line")
When i run this i get this error:
"TypeError: get() takes exactly 1 argument (0 given)"
How do i make this work?
-
Nix over 11 yearsWhat is shape? Generally .get() accepts an index.
-
-
Chris Johnsen almost 14 yearsExpansion of
~
in PATH is an abhorrent bashism. The PATH-searching library functionsexeclp
orexecvp
do not expand~
, so other programs that use them to find and run programs in the PATH would also fail to search~
entries. -
Dennis Williamson almost 14 yearsI consider
~
to be a command-line convenience. It shouldn't be used in scripts and variable values for expansion. -
Dan Rosenstark almost 14 years@Chris Johnsen, it's amazing, the main impact on my *nix knowledge after switching shells is learning what is universal and what is not. I think zsh is cool, but I've learned quite a bit suffering through the switch (and I'm only two days in). @Dennis Williamson, I'm getting that, and it makes sense, somehow.