ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2020/10/24/19:35:23

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
X-CMAE-Analysis: v=2.4 cv=JoM0EO0C c=1 sm=1 tr=0 ts=5f94b53c
a=+cj0cO56Fp8x7EdhTra87A==:117 a=uk6vJ0hgOxDmNQKXMQJsew==:17
a=9+rZDBEiDlHhcck0kWbJtElFXBc=:19 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19
a=afefHYAZSVUA:10 a=r77TgQKjGQsHNAKrUKIA:9 a=TqsVcwz1OZ1ZsGQvA4YA:9
a=QEXdDO2ut3YA:10 a=a1KZgU7cAAAA:8 a=igN6xSeiEbBzceSI_vsA:9 a=B2y7HmGcmWMA:10
a=ng0hpkU2jXKPaRTLMVYJ:22
X-SECURESERVER-ACCT: glimrick AT epilitimus DOT com
X-Original-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=epilitimus.com; s=default; h=Content-Type:MIME-Version:Date:Message-ID:
Subject:From:To:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID:
Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
:Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
List-Subscribe:List-Post:List-Owner:List-Archive;
bh=6Puik215rQjU3bnQOC4Qwkl3VFe1wX2whyfQ6ZiY8Q8=; b=m3GS6MaS4sPF3FXUzg+R5fC7NZ
AflSdJw+KnnYY9gi18okgEgxP7M2+ukiJMts7PtEbGoNSB4l7oju2ZzjY8RA35QjBywHb97zIhuQd
cABw4jho4bpewUh0A6+sfNycrnqSk5XGKPnGJqZ+svu8wG532baa8DhHgXOj2L3TnQRg18a9TfR0/
6mp0vAQNz6WWOF3FUb4KGxT1IG6mDeirVzVD+eASCE/5HVE8HIHM2c25vT4puDPEwIZIlU40QGh36
U94XuM6/Z4rWBEiJN+Gr0pgjk8uTfbQarjhPvkWB8czJ2ShgvP9YHirRG71PWiOH70gZLH2m9dV0h
wK5yKd0A==;
To: geda-user ailing list <geda-user AT delorie DOT com>
From: "Glenn (glimrick AT epilitimus DOT com) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com>
Subject: [geda-user] A patch on xorn/src/command/netlist.py
Message-ID: <05c320fa-70a0-0c3e-dd7b-47ae9d33e626@epilitimus.com>
Date: Sat, 24 Oct 2020 15:13:36 -0800
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
Firefox/60.0 SeaMonkey/2.53.3
MIME-Version: 1.0
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - a2plcpnl0121.prod.iad2.secureserver.net
X-AntiAbuse: Original Domain - delorie.com
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - epilitimus.com
X-Get-Message-Sender-Via: a2plcpnl0121.prod.iad2.secureserver.net: authenticated_id: glimrick AT epilitimus DOT com
X-Authenticated-Sender: a2plcpnl0121.prod.iad2.secureserver.net: glimrick AT epilitimus DOT com
X-Source:
X-Source-Args:
X-Source-Dir:
X-CMAE-Envelope: MS4xfEbZCVRtDoajI+S/N8rGHfGcg0myaZm4mUfsu87S2IzejrGnwcp21Nf8cAgli5CvRpThxg3SZeGL6l19eMWee5dcsYnuS8hP6m+UhW87Zsmrrmn2ooy0
4Y1hvGYblhuWDlSNCz0j9uZ5iblUdz3BMN4KOlPUj69FaJx8A2z3weKFGKdr6BJNTTq2BnuRbycY5IiNqhniH7W8s9P2vJpLU6Y13GmQ9i5t+l8dJo7bl4Av
Reply-To: geda-user AT delorie DOT com

This is a multi-part message in MIME format.
--------------F0D460158F7956E3985979A6
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

Roland,
I've attached a small patch for netlist.py. Let me know whether I made
the patch correctly. It should apply correctly since it is based on the
current master.

It just adds the backend object to the interactive session (gnetlist -i)
so the user can look/play with it. Figured I'd start small since this is
my first git generated patch. It is a suggestion I thought of while
playing with the code, it already helped me clarify some things I wasn't
sure about. I have one other in mind but I want to make sure this one
works for you first.

My main project has gotten bigger in my head too :)

Glenn

--------------F0D460158F7956E3985979A6
Content-Type: text/x-patch;
 name="0001-For-gnetlist-i-allow-access-to-the-backend.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="0001-For-gnetlist-i-allow-access-to-the-backend.patch"

From b5a5eab3ebb4aa3d4fb97bcf03a77fa91364e1b3 Mon Sep 17 00:00:00 2001
From: Glenn Pavlovic <glimrick AT epilitimus DOT com>
Date: Sat, 24 Oct 2020 14:33:27 -0800
Subject: [PATCH] For gnetlist -i allow access to the backend

Changed the netlist module in xorn so that when an interactive
session is requested the user can also access the backend. I figure
the most likely people to use the interactive mode are developers
or people trying to add their own backend so may as well let them
look at it.
	modified:   xorn/src/command/netlist.py
---
 xorn/src/command/netlist.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/xorn/src/command/netlist.py b/xorn/src/command/netlist.py
index e7218e0..79a9157 100644
--- a/xorn/src/command/netlist.py
+++ b/xorn/src/command/netlist.py
@@ -584,10 +584,15 @@ def inner_main():
         # there were netlist errors during backend loading (shouldn't happen)
         sys.exit(3)
 
+    # Anyone invoking an interactive session is going to poke around so may as well
+    # give them access to the backend. Contrary to the comment in xorn regarding
+    # interactive mode the backend will in fact be run if provided and the interpreter
+    # is exited with CTRL-D (that's the way I found it.) - GP
     if interactive_mode:
         import code
         code.interact(local = {
             'netlist': netlist,
+            'backend': m,
             # default values
             '__name__': '__console__',
             '__doc__': None
-- 
2.9.0


--------------F0D460158F7956E3985979A6--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019