From mboxrd@z Thu Jan 1 00:00:00 1970 From: stardiviner Subject: Re: Python source block and :dir header arg Date: Fri, 05 Apr 2019 11:07:50 +0800 Message-ID: <87a7h5w3nd.fsf@gmail.com> References: Reply-To: numbchild@gmail.com Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([209.51.188.92]:54236) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hCFMQ-0005Kc-Mh for emacs-orgmode@gnu.org; Thu, 04 Apr 2019 23:17:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hCFMO-0000XX-Ht for emacs-orgmode@gnu.org; Thu, 04 Apr 2019 23:17:45 -0400 Received: from [122.236.28.29] (port=48946 helo=dark.localdomain) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hCFLu-00087I-2P for emacs-orgmode@gnu.org; Thu, 04 Apr 2019 23:17:44 -0400 In-reply-to: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Joao Cortes writes: > Consider the following python source block, > > #+begin_src python :results output : session :dir ./run > import os; > cwd = os.getcwd() > print(cwd) > #+end_src > > The dir header arg should change the directory used to run the session, > in this case to the directory "../base/run", where "base" is the parent > directory the file visited by the current buffer. Instead, I get > "../base". Is this a bug? It works fine in my machine. It print absolute path to "/run". > > Thank you > Joao Cortes -- [ stardiviner ] I try to make every word tell the meaning what I want to express. Blog: https://stardiviner.github.io/ IRC(freenode): stardiviner, Matrix: stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3