public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andrea Arteaga" <andyspiros@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/auto-numerical-bench:master commit in: numbench/
Date: Wed, 17 Aug 2011 16:21:58 +0000 (UTC)	[thread overview]
Message-ID: <fb542b414ea5b4fe280bff5cb164006d9211c42a.spiros@gentoo> (raw)

commit:     fb542b414ea5b4fe280bff5cb164006d9211c42a
Author:     Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
AuthorDate: Wed Aug 17 16:21:49 2011 +0000
Commit:     Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
CommitDate: Wed Aug 17 16:21:49 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/auto-numerical-bench.git;a=commit;h=fb542b41

Solved issue with module import.

---
 numbench/main.py |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/numbench/main.py b/numbench/main.py
index 5bdacd2..21822d7 100755
--- a/numbench/main.py
+++ b/numbench/main.py
@@ -80,6 +80,7 @@ def tests_from_input(input):
 import benchconfig as cfg
 import benchchilds
 
+
 # If no argument is given, print the help
 if (len(sys.argv) < 2):
     print_help()
@@ -98,16 +99,15 @@ try:
     
     # Print module help
     if (sys.argv[2] in ('-h', '--help')):
-        os.chdir(cfg.scriptdir)
         cfg.inputfile = ''
-        tmp = __import__(cfg.modulename, fromlist = ['Module'])
+        tmp = __import__('numbench.'+cfg.modulename, fromlist = ['Module'])
         tmp.Module.printHelp()
         exit(0)
     
     # Normal run: import module
     cfg.inputfile = os.path.abspath(sys.argv[2])
     os.chdir(cfg.scriptdir)
-    tmp = __import__(sys.argv[1], fromlist = ['Module'])
+    tmp = __import__('numbench.'+cfg.modulename, fromlist = ['Module'])
     mod = tmp.Module(sys.argv[3:])
     del tmp
     cfg.makedirs()
@@ -182,7 +182,8 @@ for tname, ttest in cfg.tests.items():
     Print()
 Print(80*'=')
 Print()
-Print("The script is located in the directory" + cfg.scriptdir)
+Print("The script is located in the directory " + cfg.scriptdir)
+Print("The script is run from the directory " + os.path.realpath('.'))
 Print("The BTL is located in the directory " + cfg.btldir)
 Print("The logs will be available in the directory " + cfg.logdir)
 Print("The results will be available in the directory " + cfg.reportdir)



             reply	other threads:[~2011-08-17 16:22 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-17 16:21 Andrea Arteaga [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-09-27 11:19 [gentoo-commits] proj/auto-numerical-bench:master commit in: numbench/ Andrea Arteaga
2012-09-17  8:08 Andrea Arteaga
2012-09-17  8:08 Andrea Arteaga
2012-09-17  8:08 Andrea Arteaga
2012-09-02 11:41 Andrea Arteaga
2012-08-07 22:58 Andrea Arteaga
2012-08-04 20:24 Andrea Arteaga
2012-04-09 19:25 Andrea Arteaga
2012-02-28 19:20 Andrea Arteaga
2012-02-27 15:05 Andrea Arteaga
2011-12-27  0:13 Andrea Arteaga
2011-08-22 18:02 Andrea Arteaga
2011-08-19 23:19 Andrea Arteaga
2011-08-19 23:11 Andrea Arteaga
2011-08-18 19:47 Andrea Arteaga
2011-08-17 18:00 Andrea Arteaga
2011-08-17 15:00 Andrea Arteaga
2011-08-17 14:38 Andrea Arteaga
2011-08-17 14:38 Andrea Arteaga
2011-08-17  0:00 Andrea Arteaga

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fb542b414ea5b4fe280bff5cb164006d9211c42a.spiros@gentoo \
    --to=andyspiros@gmail.com \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox