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


Groups > comp.soft-sys.math.mathematica > #2943

Re: Cool FTP implementation with "minimal" Python

From David Bailey <dave@removedbailey.co.uk>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Cool FTP implementation with "minimal" Python
Date 2011-06-05 11:02 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <isfnnl$bq6$1@smc.vnet.net> (permalink)
References <isd0rh$1mb$1@smc.vnet.net>

Show all headers | View raw


On 04/06/2011 11:19, McHale, Paul wrote:
> I enjoy using Mathematica, but as with any language they can't do everything.  Nor should they.  Here is a way I implemented quick FTP get routine.
>
> Mathematica code:
> Note:  All communication to python program is through command line parameters.
> Returns {Success} or {Failure}
> ----------------------------------------------------------------------
>
> SetDirectory[NotebookDirectory[]];
> mFileList=ReadList["!c:\\python27\\python.exe "<>  NotebookDirectory[]<>  "FtpPutFile.py 192.168.192.201 /Test/Coms Test.bin",Record]
> ----------------------------------------------------------------------

>
> Anyone else have cool and easy ways to extend Mathematica (Stay in Mathematica longer :) )?  So far Python called this way has been a great way to accomplish some interesting things including sending and receiving small Ethernet commands.

I can't quite understand why you would want to extend Mathematica in 
this particular way, unless perhaps you had not realised that the 
Mathematica Fourier command uses the FFT algorithm if the data length is 
a power of two.

More generally, most of my extensions happen via J/Link and Java, which 
gives a very clean interface. It is also possible in 8.0 to call C code 
in a DLL directly (i.e. with no inter-process overhead) and although I 
have not made use of this yet, this feature obviously has interesting 
possibilities.

David Bailey
http://www.dbaileyconsultancy.co.uk

Back to comp.soft-sys.math.mathematica | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Cool FTP implementation with "minimal" Python "McHale, Paul" <Paul.McHale@excelitas.com> - 2011-06-04 10:19 +0000
  Re: Cool FTP implementation with "minimal" Python David Bailey <dave@removedbailey.co.uk> - 2011-06-05 11:02 +0000

csiph-web