15
$\begingroup$

I have written a small mathematica code to input a ".csv" file and output the data in a specific format, in a ".txt" file. I would like to give this program as an executable to my friend as she doesn't have mathematica installed. I've seen how one creates ".exe" from mathematica. However the process doesn't seem to work for me. Can anyone kindly help. Here is the mathematica code:

content=Drop[Transpose[Import["~/Downloads/19162.csv"]],2];

sorted=GatherBy[DeleteCases[DeleteCases[Flatten[content],""],"="],StringTake[#,StringPosition[#,"="][[1]][[1]]]&];

tab=OutputForm[TableForm[sorted]];

Export["~/Downloads/19162.txt",tab]

I would like the executable to input a file (in ".csv") format and output the text file in the "~/Downloads/" folder (of course the choice of the folder isn't important here).

$\endgroup$
5
  • $\begingroup$ Do you have an Enterprise Edition? $\endgroup$
    – Kuba
    Dec 20, 2013 at 14:18
  • 5
    $\begingroup$ I'm afraid you are in for disappointment. Apart from the Enterprise Edition or Wolfram Player Pro Mathematica does not have this feature, and even in those cases the distributable functionality is limited (I believe). $\endgroup$
    – Mr.Wizard
    Dec 20, 2013 at 14:20
  • 1
    $\begingroup$ wolfram.com/player-pro/how-player-pro-compares.html $\endgroup$
    – Kuba
    Dec 20, 2013 at 14:23
  • $\begingroup$ @PavithranIyer Import and Export functions cannot be compiled and written to C, so you are left with what can be done in the middle and writing something to do the bits on either side. $\endgroup$ Dec 21, 2013 at 18:55
  • $\begingroup$ You could do this with wolfram engine + dockerized web server. $\endgroup$
    – M.R.
    Apr 12, 2022 at 20:37

1 Answer 1

12
$\begingroup$

Unfortunately, it does not appear that this is possible without the Enterprise edition of Mathematica (or, perhaps, an alternative conclusion is that Mathematica is not the best tool for this job). As Mr. Wizard points out:

I'm afraid you are in for disappointment. Apart from the Enterprise Edition or Wolfram Player Pro Mathematica does not have this feature, and even in those cases the distributable functionality is limited.

Kuba provides a link to a chart showing a feature comparison between FreeCDF, Enterprise CDF, Player Pro, and Mathematica.

My suggestion would be to approach this problem in Python instead. It is easy to learn, not extremely dissimilar from Mathematica in overall style and (programming) functionality, and will not give you any problems with redistribution.

$\endgroup$
1
  • 4
    $\begingroup$ I've done the same with Python -- thanks, it was a good choice ! $\endgroup$ Jan 13, 2014 at 15:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.