Mail Archives: geda-user/2016/08/01/06:24:26
X-Authentication-Warning: | delorie.com: mail set sender to geda-user-bounces using -f
|
X-Recipient: | geda-user AT delorie DOT com
|
X-Original-DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed;
|
| d=gmail.com; s=20120113;
|
| h=date:from:to:subject:message-id:mail-followup-to:references
|
| :mime-version:content-disposition:content-transfer-encoding
|
| :in-reply-to:user-agent;
|
| bh=AUJMIYAdwNmkJSTo4DvzYHi08UCXGugTbHOupqUNTAg=;
|
| b=knNx0QoIVuRXNyfWGtL6F+XUu+HrGVievyMz7L9mFNwgWxxLTUSeVKw/GfNn43qQlw
|
| a8bRWjLB/nX02LgKf2Ior0vrXML7Ndqd0mpDPydUgiJ6jrLjn+hC6AMccn0s9HOR5an0
|
| mUAm9G+2Vpfbu4Gg7xzuw8l3exXY9lzbI+TL/zMlks/sM/eDGZ27g0yGLrk4M5VDw6wT
|
| CCVCKHqQgN7z4Q+X8oExr+FBJt5P7Bq1gbcBThCEgDzRmAmf71OP992oXfv4EmSzgjYK
|
| PLR3/AhvbxAJVNLNeyo0kddVelrHpsYGtTCsSKmYrCwEleq9+ktGmrVvzyJMnhkB1rTx
|
| 5SJA==
|
X-Google-DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed;
|
| d=1e100.net; s=20130820;
|
| h=x-gm-message-state:date:from:to:subject:message-id:mail-followup-to
|
| :references:mime-version:content-disposition
|
| :content-transfer-encoding:in-reply-to:user-agent;
|
| bh=AUJMIYAdwNmkJSTo4DvzYHi08UCXGugTbHOupqUNTAg=;
|
| b=Zk1T4WLq/G9N+RVacs2WrWOgXWQUw91H+4838kduLtcyP9GSkYIyvs0C9cxXhj5kOg
|
| 6g+Oimi5Gz/GdFqMbC1dmmFcr/QLNSLg1x01tCRck3E1HqMcFU/hQ0GHNuu6qTQ6bb41
|
| LvXT+9vreTGUth9Hi4I5aGwmzvU5FiawBtcRK/IFSCnfQFeIu8eA08zWUeGyCxnCl3fk
|
| 3JR1qliBKcIQBr7XF0Lf/LsML/ESXYDu3okNFWAzt7IMQl9c41HLWcuPCl9/4Hms6MDe
|
| Rz82u0LNR89lL5gaS1WgDWPcoHFqVE9QJkRBWI7dgs/pqZiocJyH2KtF5ugO7q5V/nYn
|
| X45A==
|
X-Gm-Message-State: | AEkooutEKZPUYPxA0IBop28TJh3/fnkDOGcrol5o/6fKJDRvoWGq3FkkEkDfIB9bJWuT/g==
|
X-Received: | by 10.25.42.82 with SMTP id q79mr19506638lfq.102.1470046969129;
|
| Mon, 01 Aug 2016 03:22:49 -0700 (PDT)
|
Date: | Mon, 1 Aug 2016 13:22:46 +0300
|
From: | "Vladimir Zhbanov (vzhbanov AT gmail DOT com) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com>
|
To: | geda-user AT delorie DOT com
|
Subject: | [geda-user] Oscopy [was: [OT] ngspice integration in KiCad]
|
Message-ID: | <20160801102246.GA2561@localhost.localdomain>
|
Mail-Followup-To: | geda-user AT delorie DOT com
|
References: | <CANqhZFwC48g07MUY411a20C5oipkmmkzUimhz8OgvL2Thi-yDg AT mail DOT gmail DOT com>
|
| <1470000765 DOT 3607 DOT 17 DOT camel AT oscopy DOT org>
|
MIME-Version: | 1.0
|
In-Reply-To: | <1470000765.3607.17.camel@oscopy.org>
|
User-Agent: | Mutt/1.5.23 (2014-03-12)
|
Reply-To: | geda-user AT delorie DOT com
|
Errors-To: | nobody AT delorie DOT com
|
X-Mailing-List: | geda-user AT delorie DOT com
|
X-Unsubscribes-To: | listserv AT delorie DOT com
|
--45Z9DzgjV8m4Oswq
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
Arnaud,
On Sun, Jul 31, 2016 at 11:32:45PM +0200, Arnaud Gardelein wrote:
...
> Did you had the opportunity to look to oscopy [1] ? It features
> integration with gschem through a Scheme script adding a menu. There is
> the possibility from gschem to run the netlister, simulator and update
> the graphs.
> In experimental branch, major changes were made  (python3, gtk3, smith
> plots, eye plots) and is now being tested before release.
> A next step toward integration with gschem could be the support of
> "probes" in complement of using spice directives. The user would place
> a probe (voltage, current...) in a location of the circuit, and then
> somehow this would be translated to a spice directive and passed to the
> netlister, simulator and viewer. How to do this ? For example, using a
> new special symbol (per probe type) that the netlister would understand
> could this be a good approach ?
>
> Arnaud.
>
> [1] http://oscopy.org/dokuwiki/doku.php?id=screenshots bottom of the
> page
>
Your presentation looks nice. However I tried it before several
times and it never worked for me.
I've tried to compile it just now. First some notes on your
download page:
- it mentions python-gtk, it should be python-gtk2, at least for
the experimental branch;
- ipython should be replaced with ipython3 for the experimental
branch
- python-gobject & python-gobject-dev since version 3.14 is needed
(there are other packages python-gobject-2 and
python-gobject-2-dev in Debian)
Besides, I've installed python3-numpy (and python3-numpy-dev),
python3-dbus, and python3-matplotlib to avoid some unclear
./configure messages and to make 'make' work.
It would be nice if you also add the link to the page describing
how to set up oscopy for gschem on the download page or/and just
notice the line that has to be added into gschemrc to make it work
in gschem.
Apart from what has been already said, there are other things to
improve:
- your keymap seems to conflict with gschem's default one,
e.g. "l" is used for adding lines; I would suggest to use
something like "<Shift>O L" where the prefix "<Shift>O" could
mean Oscopy menu and would be easily to remember for users.
- your oscopy.scm is obsolete for gschem 1.9.x.
I had to change your keymap to make it work in the recent
version. The patch set is attached. It would be better, if you
had a check of gschem version in Makefile.am to choose a proper
version of oscopy.scm. The suggested changes include gettext
support so your new menus are automatically translated if they
have corresponding records in the geda-gaf *.po files.
- I have no $COLORTERM defined, and thus your oscopy:oscopy-cmd
did not work for me. I've rewritten it to make it work using
the function system*. Defining your preferred terminal using
some variable in gschemrc before loading your script would be
convenient. Anyway, you have to mention this variable (I mean
COLORTERM) somewhere in your docs.
Now, I'm on the stage when something is launched if I "launch
Oscopy" though I see the message as follows in the background
terminal gschem was launched from:
Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Oscopy was not provided by any .service files
I tried to add "/usr/lib/python3/" and
"/usr/lib/python3/dist-packages/" to $PYTHONPATH with no success.
Any hints?
--
Vladimir
--45Z9DzgjV8m4Oswq
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment; filename="0001-Add-menu-support-for-geda-gaf-1.9.x.patch"
From 3e9afc3daaf2473b9b7b878ff164c338d4396e99 Mon Sep 17 00:00:00 2001
From: Vladimir Zhbanov <vzhbanov AT gmail DOT com>
Date: Mon, 1 Aug 2016 12:32:10 +0300
Subject: [PATCH 1/2] Add menu support for geda-gaf 1.9.x.
---
scheme/oscopy.scm.in | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/scheme/oscopy.scm.in b/scheme/oscopy.scm.in
index 248a55b..3b061a5 100644
--- a/scheme/oscopy.scm.in
+++ b/scheme/oscopy.scm.in
@@ -67,20 +67,20 @@
)
)
-(define oscopy:oscopy-keymap
- '(
- ("?" . oscopy:about)
- ("l" . oscopy:launch-oscopy)
- ("u" . oscopy:update-oscopy)
- )
-)
-
(define oscopy:menu-items
- '( ("About..." oscopy:about oscopy:about)
- ("Launch oscopy" oscopy:launch-oscopy oscopy:launch-oscopy)
- ("Update oscopy" oscopy:update-oscopy oscopy:update-oscopy)
- )
-)
+ ;; menu item name menu action menu stock icon
+ `((,(N_ "_About...") oscopy:about "gtk-help")
+ (,(N_ "_Launch oscopy") oscopy:launch-oscopy "gtk-execute")
+ (,(N_ "_Update oscopy") oscopy:update-oscopy "gtk-execute")))
-(add-menu "oscopy" oscopy:menu-items)
+;;; Define Oscopy keymap
+(global-set-key "<Shift>O A" 'oscopy:about)
+(global-set-key "<Shift>O L" 'oscopy:launch-oscopy)
+(global-set-key "<Shift>O U" 'oscopy:update-oscopy)
+;;; Add Oscopy menu
+(begin
+ ;; (begin...) is necessary here for guile 2.0.
+ ;; See 'info guile' "R6RS Incompatibilities" for information on bug related
+ ;; to syntax-transformers in top-level programs (N_ is a syntax transformer)
+ (add-menu (N_ "_Oscopy") oscopy:menu-items))
--
2.1.4
--45Z9DzgjV8m4Oswq
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment; filename="0002-Use-system-to-run-oscopy-in-gschem.patch"
From 1214e0d8230662c3ea6cabfbbf823cc3cf323d8d Mon Sep 17 00:00:00 2001
From: Vladimir Zhbanov <vzhbanov AT gmail DOT com>
Date: Mon, 1 Aug 2016 13:11:39 +0300
Subject: [PATCH 2/2] Use system* to run oscopy in gschem.
---
scheme/oscopy.scm.in | 30 +++++++++++++++++-------------
1 file changed, 17 insertions(+), 13 deletions(-)
diff --git a/scheme/oscopy.scm.in b/scheme/oscopy.scm.in
index 3b061a5..3e20756 100644
--- a/scheme/oscopy.scm.in
+++ b/scheme/oscopy.scm.in
@@ -23,10 +23,9 @@
(define oscopy:bindir "@BINDIR@")
(define oscopy:pythonpath "@PYEXECDIR@")
-(define oscopy:oscopy-cmd
- (string-append "PATH=" oscopy:bindir ":$PATH "
- "PYTHONPATH=" oscopy:pythonpath
- " $COLORTERM -e 'sh ioscopy'"))
+(define oscopy:oscopy-cmd-list
+ (let ((color-term (getenv "COLORTERM")))
+ `(,(if color-term color-term "xterm") "-e" "'sh ioscopy'")))
(define oscopy:dbus-oscopy-is-running-cmd "dbus-send --print-reply --session --dest=org.freedesktop.Oscopy /org/freedesktop/Oscopy org.freedesktop.OscopyIFace.dbus_running")
(define oscopy:dbus-oscopy-update-cmd "dbus-send --print-reply --session --dest=org.freedesktop.Oscopy /org/freedesktop/Oscopy org.freedesktop.OscopyIFace.dbus_update")
@@ -47,25 +46,30 @@
(define (oscopy:is-running)
(eq? (status:exit-val (system oscopy:dbus-oscopy-is-running-cmd)) 0))
+(define (prepend-var-to-env-path path var)
+ (setenv path (string-append var ":" (getenv path))))
+
+(define (oscopy:run-oscopy)
+ (and (prepend-var-to-env-path "PATH" oscopy:bindir)
+ (setenv "PYTHONPATH"
+ (string-append "/usr/local/lib/python3.4/site-packages/"
+ ":"
+ oscopy:pythonpath))
+ (apply system* oscopy:oscopy-cmd-list)))
+
(define (oscopy:launch-oscopy)
(if (oscopy:is-running)
(if (gschem-confirm (string-append "An instance of oscopy is already running\n"
"Launch anyway ?"))
- (system oscopy:oscopy-cmd)
- )
- (system oscopy:oscopy-cmd)
- )
- )
+ (oscopy:run-oscopy))
+ (oscopy:run-oscopy)))
(define (oscopy:update-oscopy)
(if (oscopy:is-running)
(system oscopy:dbus-oscopy-update-cmd)
(if (gschem-confirm (string-append "No running instance of oscopy\n"
"Launch oscopy ?"))
- (system oscopy:oscopy-cmd)
- )
- )
- )
+ (oscopy:run-oscopy))))
(define oscopy:menu-items
;; menu item name menu action menu stock icon
--
2.1.4
--45Z9DzgjV8m4Oswq--
- Raw text -