emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Python with org-mode
@ 2019-03-30  3:18 Lawrence Bottorff
  2019-03-30  7:40 ` richardfieldsend
  2019-03-30 15:16 ` Martin Alsinet
  0 siblings, 2 replies; 4+ messages in thread
From: Lawrence Bottorff @ 2019-03-30  3:18 UTC (permalink / raw)
  To: emacs-orgmode Mailinglist

[-- Attachment #1: Type: text/plain, Size: 277 bytes --]

I've seen many "start using Python" parades, but what is the best way to
use Python with org-mode, i.e., in babel source blocks? I'm on U18.10,
which comes with standard 2 (2.7.15+) and 3 (3.6.7). But then I keep
hearing about Anaconda. Your opinions, experiences, please.

LB

[-- Attachment #2: Type: text/html, Size: 393 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Python with org-mode
  2019-03-30  3:18 Python with org-mode Lawrence Bottorff
@ 2019-03-30  7:40 ` richardfieldsend
  2019-03-30 15:16 ` Martin Alsinet
  1 sibling, 0 replies; 4+ messages in thread
From: richardfieldsend @ 2019-03-30  7:40 UTC (permalink / raw)
  To: Lawrence Bottorff, emacs-orgmode Mailinglist

[-- Attachment #1: Type: text/plain, Size: 1135 bytes --]

I recently began experimenting with literate programming, starting with converting my configuration to use org and elisp. Python is the second language I have worked with. My observations so far:* you need to activate languages other than elisp. I am on my phone, so I don't have the links to hand, but I could post them later. * as of now, I haven't tried setting up a program which you can use interactively. I have only used it to output text which then forms part of the document. Interactivity is on my list of things to investigate. I suspect Jupyter would be a better choice for that. Best wishes Richard Sent from my Samsung Galaxy smartphone.
-------- Original message --------From: Lawrence Bottorff <borgauf@gmail.com> Date: 30/03/2019  03:18  (GMT+00:00) To: emacs-orgmode Mailinglist <emacs-orgmode@gnu.org> Subject: [O] Python with org-mode I've seen many "start using Python" parades, but what is the best way to use Python with org-mode, i.e., in babel source blocks? I'm on U18.10, which comes with standard 2 (2.7.15+) and 3 (3.6.7). But then I keep hearing about Anaconda. Your opinions, experiences, please.LB

[-- Attachment #2: Type: text/html, Size: 1807 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Python with org-mode
  2019-03-30  3:18 Python with org-mode Lawrence Bottorff
  2019-03-30  7:40 ` richardfieldsend
@ 2019-03-30 15:16 ` Martin Alsinet
  2019-03-30 18:10   ` Martin Schöön
  1 sibling, 1 reply; 4+ messages in thread
From: Martin Alsinet @ 2019-03-30 15:16 UTC (permalink / raw)
  To: Lawrence Bottorff; +Cc: emacs-orgmode Mailinglist

[-- Attachment #1: Type: text/plain, Size: 1743 bytes --]

Lawrence,

It depends on what you want to do. Anaconda is a python distribution
intended for data science and machine learning, so if you want to work on
machine learning, it provides an easy way to install all the required
packages for that. You can use any python distribution with org-mode, you
just have to tell org-babel the path to the python interpreter you want to
use.

I would suggest that you pick a project, an application you want to make,
and start from there. I am currently making an application using python and
org-mode, which consists of a single org document and has ~170 python
source blocks. It is a simple podcast database, I am just doing it to try
the literary programming style in python. You can check it out here
<https://github.com/martinalsinet/podcast-db>, the only problem is that the
document is in spanish, my native language.

In this application I have leveraged python's import feature, so that I
write small functions (each in their corresponding source code block) which
I tangle into files and import from other blocks. This allows the document
to have a logical structure as a document, with sections for each module,
and also being able to call any block from any other.

If you have any doubts or need help starting out, don't hesitate to contact
me, I would be happy to help you.


Martín

On Fri, Mar 29, 2019 at 10:38 PM Lawrence Bottorff <borgauf@gmail.com>
wrote:

> I've seen many "start using Python" parades, but what is the best way to
> use Python with org-mode, i.e., in babel source blocks? I'm on U18.10,
> which comes with standard 2 (2.7.15+) and 3 (3.6.7). But then I keep
> hearing about Anaconda. Your opinions, experiences, please.
>
> LB
>

[-- Attachment #2: Type: text/html, Size: 2312 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Python with org-mode
  2019-03-30 15:16 ` Martin Alsinet
@ 2019-03-30 18:10   ` Martin Schöön
  0 siblings, 0 replies; 4+ messages in thread
From: Martin Schöön @ 2019-03-30 18:10 UTC (permalink / raw)
  To: emacs-orgmode Mailinglist

[-- Attachment #1: Type: text/plain, Size: 335 bytes --]

Just a comment related to Anaconda.

Your Ubuntu 18.10 already has some Python installed and bringing in Python
packages from outside of the Ubuntu ecology may create problems. I don't
know how this works with Anaconda but I have 'been there, done that' with
pip before I learned how to use pip properly.

-- 
Martin Schöön

[-- Attachment #2: Type: text/html, Size: 489 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-03-30 18:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-30  3:18 Python with org-mode Lawrence Bottorff
2019-03-30  7:40 ` richardfieldsend
2019-03-30 15:16 ` Martin Alsinet
2019-03-30 18:10   ` Martin Schöön

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).