SiEPIC-Tools icon indicating copy to clipboard operation
SiEPIC-Tools copied to clipboard

Catalina and/or klayout working

Open atait opened this issue 5 years ago • 4 comments

Hi Lukas,

Starting a new thread here off of https://github.com/KLayout/klayout/issues/381

I am getting the same GSI warnings as you are. Is this affecting the workshop? If so, I could spend some time on it tomorrow.

The warnings do not seem to affect my stuff which is python 3 and non-GUI. The GSI was originally Ruby then made "general" with the addition of python. My image didn't contain ruby, so that is probably why it is warning. It's possible, unfortunately, that klayout GUI or GSI depends on ruby pieces and parts.

When I was trying to use SiEPIC sans GUI, I came up with an approach in lygadgets called patch_environment. SiEPIC code runs GUI functions on import, so, if you want to use it within pure python, you have to trick it into thinking there's a GUI. If the students are having trouble opening a window and loading a layout, then klayout should be modified, otherwise I think it would be easier to extend the environment patch in lygadgets.

-Alex

atait avatar Nov 02 '19 04:11 atait

Hi Alex,

Workshop was fine as I told people to install 0.25.9. 0.26 is still too experimental (and not even on the downloads page yet for Mac OSX!)

Thomas and I discussed extensively and agreed to move to Python 3 only for SiEPIC-tools and PDKs, and to have these work both within KLayout as well as in an outside python.

Lots of work ahead! But it will be a good investment for the large systems we will be making.

Lukas

On Nov 1, 2019, at 9:19 PM, Alex Tait [email protected] wrote:

Hi Lukas,

Starting a new thread here off of KLayout/klayout#381 https://github.com/KLayout/klayout/issues/381 I am getting the same GSI warnings as you are. Is this affecting the workshop? If so, I could spend some time on it tomorrow.

The warnings do not seem to affect my stuff which is python 3 and non-GUI. The GSI was originally Ruby then made "general" with the addition of python. My image didn't contain ruby, so that is probably why it is warning. It's possible, unfortunately, that klayout GUI or GSI depends on ruby pieces and parts.

When I was trying to use SiEPIC sans GUI, I came up with an approach in lygadgets called patch_environment. SiEPIC code runs GUI functions on import, so, if you want to use it within pure python, you have to trick it into thinking there's a GUI. If the students are having trouble opening a window and loading a layout, then klayout should be modified, otherwise I think it would be easier to extend the environment patch in lygadgets.

-Alex

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/lukasc-ubc/SiEPIC-Tools/issues/103?email_source=notifications&email_token=ADY37AHKAQFZJBBKUDGZHQDQRT5TVA5CNFSM4JICTLQKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HWIUWEA, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADY37AEAVCTOUIXLAWYLBYLQRT5TVANCNFSM4JICTLQA.

lukasc-ubc avatar Nov 02 '19 08:11 lukasc-ubc

If there is no Catalina for 0.25.9, is it possible to supply a command to suppress these warnings? I also am having no affect on my functionality with Python 3.7 and no GUI. I'm just curious if anyone had a workaround since I've tried redirecting stdout, stderr and catching warnings but I could have done those wrong as well.

trcote avatar Feb 12 '20 23:02 trcote

Not sure what you mean… Can you explain more?
Last night, I succeeded in getting KLayout 0.26.3 + SiEPIC-Tools working on the Mac (both Mojave and Catalina). I pushed the changes last night.

On Feb 12, 2020, at 3:51 PM, timoteoman3 [email protected] wrote:

If there is no Catalina for 0.25.9, is it possible to supply a command to suppress these warnings? I also am having no affect on my functionality with Python 3.7 and no GUI. I'm just curious if anyone had a workaround since I've tried redirecting stdout, stderr and catching warnings but I could have done those wrong as well.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lukasc-ubc/SiEPIC-Tools/issues/103?email_source=notifications&email_token=ADY37AHNLHEPQ33LAGU5PS3RCSDRDA5CNFSM4JICTLQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELS2Y7Q#issuecomment-585477246, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADY37AFPGCMPK6QWY7WETL3RCSDRDANCNFSM4JICTLQA.

lukasc-ubc avatar Feb 13 '20 06:02 lukasc-ubc

I think I found a workaround solution for now. Basically, the problem I was getting was the same GSI warnings when running Klayout from the command line from my python script.

Ex.

# test.py
os.system('path/to/klayout_executable -zz path/to/klayout_macro')

klayout_executable: the path to the klayout executable on my Mac -zz: open in GUI-less mode klayout_macro: the path to my klayout_macro.py file

I wanted to suppress the GSI warnings when calling Klayout which I can do by editing the Klayout call to this

# test.py
os.system('path/to/klayout_executable -zz path/to/klayout_macro &>/dev/null')

The &>/dev/null removes any warnings that occur in the klayout process.

trcote avatar Feb 13 '20 16:02 trcote