I forgot to mention that you'll have to sign the CLA before we can accept your
patch, see https://code.google.com/p/v8/wiki/Contributing.


https://codereview.chromium.org/478163002/diff/1/test/test262/testcfg.py
File test/test262/testcfg.py (right):

https://codereview.chromium.org/478163002/diff/1/test/test262/testcfg.py#newcode50
test/test262/testcfg.py:50:
sys.path.append(os.path.abspath(os.path.join('test', 'test262',
*TEST_262_PYTHON_ROOT)))
On 2014/08/18 16:04:27, smikes wrote:
On 2014/08/18 11:55:47, Jakob wrote:
> nit: 80col please.
>
> Also, if we need to muck with sys.path at all, please restore it
when done,
> i.e.:
>
> original_sys_path = sys.path
> sys.path.append(...)
> import ...
> sys.path = original_sys_path

Fixed both.  Is there a more idiomatic way of importing a file
from a directory not in sys.path?

There is imp, https://docs.python.org/2/library/imp.html, which we use
in
https://code.google.com/p/v8/source/browse/branches/bleeding_edge/tools/testrunner/local/testsuite.py#38.
It's more verbose but less hacky, does that count as idiomatic?

https://codereview.chromium.org/478163002/

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to