Creating a Windows application that has to call bash scripts and Python scripts that use Linux-based modules?












0














I want to create a Windows application that calls bash scripts and Python scripts that use Linux-based modules. I'm pretty new to this, so I'm sorry if this is a dumb question.




  1. What would be the cleanest way to do this, and in such a way that a new user can simply run one install file that will install the Windows application?


  2. If someone needs to do something like this, do people generally have the user install something such as Cygwin as part of the installation of the Windows application? Or can some sort of DLL be generated to use the bash/python feature I need?



On the scripts side, the scripts will still change in the future, so having to port everything to work with Windows is not ideal.



The main issues I see so far are bash scripts, Linux-based python packages like pexpect, and directory path slashes and locations (e.g. the tmp directory in Linux)



My thoughts are that I can either:



a) Add conditional checks for the OS type in the Python scripts and execute the compatible code depending on the OS; and have the user install something like win-bash to handle the calling of bash files. OR ...



b) Require the user to install Cygwin, and have minimal changes in the scripts to support anything that it can't handle.










share|improve this question
























  • The B option is more simple as application development; the packages available are a lot cygwin.com/packages/package_list.html. Question: is it a console only or do you need graphic interface ?
    – matzeri
    Dec 21 '18 at 16:55










  • It'll be with a graphical interface.
    – trialUser
    Dec 22 '18 at 22:14










  • Than be sure to test with X interface and be sure to define which cygwin packages will be needed by your user.
    – matzeri
    Dec 23 '18 at 4:38
















0














I want to create a Windows application that calls bash scripts and Python scripts that use Linux-based modules. I'm pretty new to this, so I'm sorry if this is a dumb question.




  1. What would be the cleanest way to do this, and in such a way that a new user can simply run one install file that will install the Windows application?


  2. If someone needs to do something like this, do people generally have the user install something such as Cygwin as part of the installation of the Windows application? Or can some sort of DLL be generated to use the bash/python feature I need?



On the scripts side, the scripts will still change in the future, so having to port everything to work with Windows is not ideal.



The main issues I see so far are bash scripts, Linux-based python packages like pexpect, and directory path slashes and locations (e.g. the tmp directory in Linux)



My thoughts are that I can either:



a) Add conditional checks for the OS type in the Python scripts and execute the compatible code depending on the OS; and have the user install something like win-bash to handle the calling of bash files. OR ...



b) Require the user to install Cygwin, and have minimal changes in the scripts to support anything that it can't handle.










share|improve this question
























  • The B option is more simple as application development; the packages available are a lot cygwin.com/packages/package_list.html. Question: is it a console only or do you need graphic interface ?
    – matzeri
    Dec 21 '18 at 16:55










  • It'll be with a graphical interface.
    – trialUser
    Dec 22 '18 at 22:14










  • Than be sure to test with X interface and be sure to define which cygwin packages will be needed by your user.
    – matzeri
    Dec 23 '18 at 4:38














0












0








0







I want to create a Windows application that calls bash scripts and Python scripts that use Linux-based modules. I'm pretty new to this, so I'm sorry if this is a dumb question.




  1. What would be the cleanest way to do this, and in such a way that a new user can simply run one install file that will install the Windows application?


  2. If someone needs to do something like this, do people generally have the user install something such as Cygwin as part of the installation of the Windows application? Or can some sort of DLL be generated to use the bash/python feature I need?



On the scripts side, the scripts will still change in the future, so having to port everything to work with Windows is not ideal.



The main issues I see so far are bash scripts, Linux-based python packages like pexpect, and directory path slashes and locations (e.g. the tmp directory in Linux)



My thoughts are that I can either:



a) Add conditional checks for the OS type in the Python scripts and execute the compatible code depending on the OS; and have the user install something like win-bash to handle the calling of bash files. OR ...



b) Require the user to install Cygwin, and have minimal changes in the scripts to support anything that it can't handle.










share|improve this question















I want to create a Windows application that calls bash scripts and Python scripts that use Linux-based modules. I'm pretty new to this, so I'm sorry if this is a dumb question.




  1. What would be the cleanest way to do this, and in such a way that a new user can simply run one install file that will install the Windows application?


  2. If someone needs to do something like this, do people generally have the user install something such as Cygwin as part of the installation of the Windows application? Or can some sort of DLL be generated to use the bash/python feature I need?



On the scripts side, the scripts will still change in the future, so having to port everything to work with Windows is not ideal.



The main issues I see so far are bash scripts, Linux-based python packages like pexpect, and directory path slashes and locations (e.g. the tmp directory in Linux)



My thoughts are that I can either:



a) Add conditional checks for the OS type in the Python scripts and execute the compatible code depending on the OS; and have the user install something like win-bash to handle the calling of bash files. OR ...



b) Require the user to install Cygwin, and have minimal changes in the scripts to support anything that it can't handle.







linux windows bash python cygwin






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 20 '18 at 22:20









Blackwood

2,89461728




2,89461728










asked Dec 20 '18 at 21:48









trialUser

31




31












  • The B option is more simple as application development; the packages available are a lot cygwin.com/packages/package_list.html. Question: is it a console only or do you need graphic interface ?
    – matzeri
    Dec 21 '18 at 16:55










  • It'll be with a graphical interface.
    – trialUser
    Dec 22 '18 at 22:14










  • Than be sure to test with X interface and be sure to define which cygwin packages will be needed by your user.
    – matzeri
    Dec 23 '18 at 4:38


















  • The B option is more simple as application development; the packages available are a lot cygwin.com/packages/package_list.html. Question: is it a console only or do you need graphic interface ?
    – matzeri
    Dec 21 '18 at 16:55










  • It'll be with a graphical interface.
    – trialUser
    Dec 22 '18 at 22:14










  • Than be sure to test with X interface and be sure to define which cygwin packages will be needed by your user.
    – matzeri
    Dec 23 '18 at 4:38
















The B option is more simple as application development; the packages available are a lot cygwin.com/packages/package_list.html. Question: is it a console only or do you need graphic interface ?
– matzeri
Dec 21 '18 at 16:55




The B option is more simple as application development; the packages available are a lot cygwin.com/packages/package_list.html. Question: is it a console only or do you need graphic interface ?
– matzeri
Dec 21 '18 at 16:55












It'll be with a graphical interface.
– trialUser
Dec 22 '18 at 22:14




It'll be with a graphical interface.
– trialUser
Dec 22 '18 at 22:14












Than be sure to test with X interface and be sure to define which cygwin packages will be needed by your user.
– matzeri
Dec 23 '18 at 4:38




Than be sure to test with X interface and be sure to define which cygwin packages will be needed by your user.
– matzeri
Dec 23 '18 at 4:38










0






active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1386454%2fcreating-a-windows-application-that-has-to-call-bash-scripts-and-python-scripts%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Super User!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1386454%2fcreating-a-windows-application-that-has-to-call-bash-scripts-and-python-scripts%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Mouse cursor on multiple screens with different PPI

Agildo Ribeiro

Sometime when accessing a menu: “Ubuntu 16.04 has experienced an internal error”