Hi, I just tried to make a listbox in python3 but that isn’t working, so I tried with Rhino UI, but that doesn’t work either:
import rhinoscriptsyntax as rs
import Rhino
items = []
items.append("test 0")
items.append("test 1")
items.append("test 2")
### This doesn't work so I made another, but that doesn't work either
#print rs.ListBox(list)
title="test"
message="test"
default = 0
result = Rhino.UI.Dialogs.ShowListBox(title, message, items, default)
print(result)
Question: Why does it spend time on ‘Restoring packages’ every time I run WIP as a new instance?
Isn’t the packages installed via PIP? Or am I missunderstanding and this is just the ‘import’ thing doing it’s thing?
@Holo Currently it is the import thing doing it’s thing. There are bugs there I’m sure which we will fix when I can get passed the editor UI issues and changes.
Thanks, good to know. It works well, just seemed odd that it did it every time, but now I know.
A wish: It would be great if it could indicate some sort of status from the installation of external libraries, maybe indicating how big the file it installs is, or how far it has come in the process. I got the experience that Rhino had crashed the other day, but then realized that the library I was trying to use was 50MB, so it was just downloading and installing.
I noticed that if I try to import a big library just after referencing it then it can fail, so it is better to reference first, then import scriptsyntax, Rhino etc and then import the new library. Maybe Rhino tries to move on before it is done or something.
Also in the python editor we get examples shown when we type commands, can this be activated in RhinoCode too? They are of great help.
I found a few issues, It’s great that the script editor minimizes when ran, but it should wait until packages are read in, or in some way indicate that something is going on in the background. Right now I can run other tools in Rhino when this happens.
And It shows spaces in names as %20
I also found that Rhino can think that a file is open in python when I try to save over a file, so “it’s” prevented from renaming the file.
Don’t know what that is yet, I’ll see if I can find a pattern.
I see that I can start a new ScriptEditor while one is running and that causes some trouble, this typically happen when a script tries to install some packages.
And I see that I can run a Python3 script from a button now, great stuff! Thanks! …but… it seems to install the needed libraries every single time that button is pushed. I guess this is just a Beta thing but I want to make sure you know about it.
I also sometimes get’s an error that an api can’t be found and I have to restart Rhino, or the entire computer for it to work again. I have not found anything that makes sense as to why, I’ll keep my eyes open.
EDIT: and another thing that affects the speed of programming, if I add a hash in front of a line then the scripteditor takes a break before it updates the line, forcing me to wait. I think it is checking the code, but it would be nice if this was done in the background.
Hi again!
Can you please move “line info” to the front of the error report?
It would make it easier to navigate to the correct line when the error report is very long.