Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #82700 > unrolled thread
| Started by | John Culleton <john@wexfordpress.com> |
|---|---|
| First post | 2014-12-20 08:34 -0800 |
| Last post | 2014-12-23 13:09 -0700 |
| Articles | 3 — 3 participants |
Back to article view | Back to comp.lang.python
Old newbie needs help. John Culleton <john@wexfordpress.com> - 2014-12-20 08:34 -0800
Re: Old newbie needs help. Larry Martell <larry.martell@gmail.com> - 2014-12-20 11:40 -0500
Re: Old newbie needs help. Ian Kelly <ian.g.kelly@gmail.com> - 2014-12-23 13:09 -0700
| From | John Culleton <john@wexfordpress.com> |
|---|---|
| Date | 2014-12-20 08:34 -0800 |
| Subject | Old newbie needs help. |
| Message-ID | <c4f9fd6d-0ac2-4238-ac99-509acd0ba5e8@googlegroups.com> |
This week I wrote my first Python program, a script callable from Scribus, a DTP program. It ran! Now I want to spread my wings a little. How do I call a C language executable subprogram from Python and pass information back and forth? I am of the old school, meaning that object oriented programming is only slightly less obscure to me than Sanscrit or Navaho. So be gentle. Python 2.7.5 on Slackware 14.1 John Culleton.
[toc] | [next] | [standalone]
| From | Larry Martell <larry.martell@gmail.com> |
|---|---|
| Date | 2014-12-20 11:40 -0500 |
| Message-ID | <mailman.17073.1419093614.18130.python-list@python.org> |
| In reply to | #82700 |
On Sat, Dec 20, 2014 at 11:34 AM, John Culleton <john@wexfordpress.com> wrote: > This week I wrote my first Python program, a script callable from Scribus, a DTP program. It ran! Now I want to spread my wings a little. How do I call a C language executable subprogram from Python and pass information back and forth? > > I am of the old school, meaning that object oriented programming is only slightly > less obscure to me than Sanscrit or Navaho. So be gentle. > > Python 2.7.5 on Slackware 14.1 Look at the subprocess module: https://docs.python.org/2/library/subprocess.html
[toc] | [prev] | [next] | [standalone]
| From | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| Date | 2014-12-23 13:09 -0700 |
| Message-ID | <mailman.17163.1419365449.18130.python-list@python.org> |
| In reply to | #82700 |
[Multipart message — attachments visible in raw view] — view raw
On Sat, Dec 20, 2014 at 9:34 AM, John Culleton <john@wexfordpress.com> wrote: > > This week I wrote my first Python program, a script callable from Scribus, a DTP program. It ran! Now I want to spread my wings a little. How do I call a C language executable subprogram from Python and pass information back and forth? When you say "subprogram", do you mean that you want to start and communicate with a whole new process, or do you merely want to invoke some dynamically loaded entry point within the same process? For the former, use the subprocess module. For the latter, use the ctypes module (or consider using Cython instead of pure Python if Scribus will support it).
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web