Re: [O] Mixing Python2 and Python3 blocks in one file

2016-05-19 Thread William Henney
On Thu, May 19, 2016 at 2:32 PM, Ken Mankoff wrote: > > On 2016-05-19 at 15:21, William Henney wrote: > > I think Elpy works fine with conda environments - you just have to > > call pyvenv-activate with the desired path. > > Yes, I have discovered that since I sent my email. > > > You have inspi

Re: [O] Mixing Python2 and Python3 blocks in one file

2016-05-19 Thread Ken Mankoff
On 2016-05-19 at 15:21, William Henney wrote: > I think Elpy works fine with conda environments - you just have to > call pyvenv-activate with the desired path. Yes, I have discovered that since I sent my email. > You have inspired me to try and automate this for org source blocks > (see org sn

Re: [O] Mixing Python2 and Python3 blocks in one file

2016-05-19 Thread William Henney
On Thu, May 19, 2016 at 8:18 AM, Ken Mankoff wrote: > > Thanks for the example. This makes conda + Org work better than it has for > me in the past. Unfortunately, one major issues is editing and running code > outside of Org via (org-edit-special). Perhaps elpy will support conda > environments

Re: [O] Mixing Python2 and Python3 blocks in one file

2016-05-19 Thread Ken Mankoff
Hi Will, Thanks for the example. This makes conda + Org work better than it has for me in the past. Unfortunately, one major issues is editing and running code outside of Org via (org-edit-special). Perhaps elpy will support conda environments soon. On 2016-05-18 at 23:37, William Henney wrot

Re: [O] Mixing Python2 and Python3 blocks in one file

2016-05-18 Thread William Henney
Hi Ken, On Wed, May 18, 2016 at 8:45 AM, Ken Mankoff wrote: On 2016-05-17 at 21:19, William Henney wrote: > > Why is the :python parameter insufficient for your needs? You can also > > use it for different virtual environments > > Can you clarify how to do this? Does it work with conda environm

Re: [O] Mixing Python2 and Python3 blocks in one file

2016-05-18 Thread Ken Mankoff
Hi Will, On 2016-05-17 at 21:19, William Henney wrote: > Why is the :python parameter insufficient for your needs? You can also > use it for different virtual environments Can you clarify how to do this? Does it work with conda environments too? Thanks, -k.

Re: [O] Mixing Python2 and Python3 blocks in one file

2016-05-18 Thread Karl Voit
* Thomas S. Dye wrote: > > William Henney writes: >> >> It is documented at >> http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-python.html > > As of a few hours ago, when I added it. It probably wasn't there when > Karl looked. Thank you very much Thomas! I can not appreciate documen

Re: [O] Mixing Python2 and Python3 blocks in one file

2016-05-17 Thread Thomas S. Dye
William Henney writes: >> Cool, I did not find this parameter yet. >> >> Is this undocumented? http://orgmode.org/org.html does not contain >> the string ":python:" and >> http://orgmode.org/org.html#Language_002dspecific-header-arguments >> also does not mention this parameter. >> >> > It is docu

Re: [O] Mixing Python2 and Python3 blocks in one file

2016-05-17 Thread William Henney
Hi Karl On Tue, May 17, 2016 at 9:54 AM, Karl Voit wrote: > Hi William > > * William Henney wrote: > > > > On Sun, May 8, 2016 at 3:31 AM, Karl Voit wrote: > > > > Python2 and Python3 are two different languages. Unfortunately, > >> Org-mode only uses ~#+BEGIN_SRC python~ for both and uses > >

Re: [O] Mixing Python2 and Python3 blocks in one file

2016-05-17 Thread John Kitchin
You can hack this to work: #+BEGIN_SRC emacs-lisp (defun org-babel-execute:python2 (body params) (let ((org-babel-python-command "/Users/jkitchin/Library/Enthought/Canopy_64bit/User/bin/python2")) (org-babel-execute:python body params))) #+END_SRC #+BEGIN_SRC python2 print 'Hello' #+END_

Re: [O] Mixing Python2 and Python3 blocks in one file

2016-05-17 Thread Karl Voit
Hi William * William Henney wrote: > > On Sun, May 8, 2016 at 3:31 AM, Karl Voit wrote: > > Python2 and Python3 are two different languages. Unfortunately, >> Org-mode only uses ~#+BEGIN_SRC python~ for both and uses >> python-shell-interpreter to choose/switch the compiler. >> >> Shouldn't Org-

Re: [O] Mixing Python2 and Python3 blocks in one file

2016-05-17 Thread William Henney
Hi Karl On Sun, May 8, 2016 at 3:31 AM, Karl Voit wrote: Python2 and Python3 are two different languages. Unfortunately, > Org-mode only uses ~#+BEGIN_SRC python~ for both and uses > python-shell-interpreter to choose/switch the compiler. > > Shouldn't Org-mode introduce ~#+BEGIN_SRC python2~ an

Re: [O] Mixing Python2 and Python3 blocks in one file

2016-05-08 Thread Karl Voit
* Karl Voit wrote: > Hi! > > Python2 and Python3 are two different languages. Unfortunately, > Org-mode only uses ~#+BEGIN_SRC python~ for both and uses > python-shell-interpreter to choose/switch the compiler. > > Shouldn't Org-mode introduce ~#+BEGIN_SRC python2~ and ~#+BEGIN_SRC > python3~ to s

[O] Mixing Python2 and Python3 blocks in one file

2016-05-08 Thread Karl Voit
Hi! Python2 and Python3 are two different languages. Unfortunately, Org-mode only uses ~#+BEGIN_SRC python~ for both and uses python-shell-interpreter to choose/switch the compiler. Shouldn't Org-mode introduce ~#+BEGIN_SRC python2~ and ~#+BEGIN_SRC python3~ to solve this issue in a clean way? ~