Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #65597

Re: python and matlab

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.002
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'url:pypi': 0.03; 'url:sourceforge': 0.03; 'python:': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'windows,': 0.09; 'python': 0.11; 'docs.': 0.16; 'matlab': 0.16; 'pywin32': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'header:User- Agent:1': 0.23; 'this:': 0.26; 'header:X-Complaints-To:1': 0.27; 'programming.': 0.30; 'adams': 0.31; 'ctypes': 0.31; 'embed': 0.31; 'embedding': 0.31; 'invoke': 0.31; 'extend': 0.32; 'url:python': 0.33; '(e.g.': 0.33; 'could': 0.34; 'problem.': 0.35; 'but': 0.35; 'there': 0.35; 'really': 0.36; 'thanks': 0.36; 'url:org': 0.36; 'server': 0.38; 'to:addr:python-list': 0.38; 'that,': 0.38; 'explain': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'new': 0.61; 'information': 0.63; 'more': 0.64; 'details,': 0.68; 'sam': 0.68; 'apart': 0.72; 'activex': 0.93
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Sturla Molden <sturla.molden@gmail.com>
Subject Re: python and matlab
Date Fri, 7 Feb 2014 05:28:26 +0000 (UTC)
References <239c6022-9c8d-48d4-8ddf-cae552ab1e3d@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 8bit
X-Gmane-NNTP-Posting-Host 207-95-11.connect.netcom.no
User-Agent NewsTap/4.0.1 (iPad)
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.6484.1391750931.18130.python-list@python.org> (permalink)
Lines 34
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1391750931 news.xs4all.nl 2887 [2001:888:2000:d::a6]:59299
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:65597

Show key headers only | View raw


Sam Adams <cuongpn@gmail.com> wrote:

> Thanks Sturla, could you please explain in more details, I am new to Python :)

All the information you need to extend or embed Python is in the docs. 

Apart from that, why do you need Matlab? A distro like Enthought Canopy or
Anaconda has all the tools you will ever need for scientific programming.
Embedding Python is almost never the right solution to a problem. But if
you really need Matlab, you will be far better off by calling Matlab engine
from Python (e.g. using ctypes or Cython). 

There are also packages like mlab and matlabwrap that will help you embed
Matlab in Python:

   https://pypi.python.org/pypi/mlab
   http://mlabwrap.sourceforge.net

Apart from that, you can also invoke Python from Matlab like this:

   arg1 = 'script.py';
   s = system(sprintf('python %s', arg1));

or 

   arg1 = 'some Python code';
   s = system(sprintf('python -c "%s"', arg1));

Or if you are on Windows, you can use pywin32 to create an ActiveX server
with Python, and invoke that from Matlab.


Sturla

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

python and matlab Sam <cuongpn@gmail.com> - 2014-02-06 05:30 -0800
  Re: python and matlab Sturla Molden <sturla.molden@gmail.com> - 2014-02-06 13:55 +0000
    Re: python and matlab Sam Adams <cuongpn@gmail.com> - 2014-02-06 06:18 -0800
      Re: python and matlab Sturla Molden <sturla.molden@gmail.com> - 2014-02-07 05:28 +0000
        Re: python and matlab Rustom Mody <rustompmody@gmail.com> - 2014-02-06 22:06 -0800
          Re: python and matlab Sturla Molden <sturla.molden@gmail.com> - 2014-02-07 11:07 +0000
  Re: python and matlab pavlovevidence@gmail.com - 2014-02-08 22:30 -0800

csiph-web