executable

Cython standalone executable on ubuntu

故事扮演 提交于 2019-12-11 06:41:28
问题 I want my cython program to be standalone executable on linux, not to be imported. After cython --embed i got a c file,now how can i make it executable? 回答1: I guess you have to compile the .c file you have obtained. Assuming you are using python 3.5 and don't have to link to other libraries than python you can do this with a simple gcc command like : gcc -I /usr/include/python3.5m -o your_program your_file.c -lpython3.5m (you might need to remove the m following the version number) As you

Nodejs Child Process with Unix Executable

旧巷老猫 提交于 2019-12-11 06:04:35
问题 I'm having a problem with the 'child_process' module and an executable program. I want to pipe the stdout from the executable to my node process. I have no problem getting this to work with simple commands such as "cat" and "ls" but not with my executable. I'm using the code below. My executable logs data to the terminal when run standalone so I'm not sure why this isn't working. The node script and executable are in the same directory and running on MacOS X. EDIT: The executable remains

Where do I find (and run) an executable compiled with a cabal sandbox?

一个人想着一个人 提交于 2019-12-11 05:19:53
问题 I'm compiling my myProgram.lhs with the use of a cabal sandbox (set up with cabal sandbox init ). I'm using a simplest approach I've come up with: cabal exec -- ghc myProgram or (having a rule in Makefile ) cabal exec -- make myProgram After that, in my source directory, appears myProgram.o , but not the executable myProgram . How do I run the resulting program? cabal exec -- ./myProgram doesn't work. Now, I've come up with a simplest approach to test it: cabal exec -- runghc myProgram.lhs

Launch File on Client's Computer from PHP?

馋奶兔 提交于 2019-12-11 04:59:37
问题 I have written a utility that requires an installation key for uninstallation to ensure that only authorized users are uninstalling. After logging in to our website, the user will be presented with a uninstallation key, but then I would like to also launch the uninstallation wizard on the clients computer. I know this is possible, as I've done it before... just don't remember the code, nor did I save it. Thanks in advance for any input. 回答1: Assuming Windows, you could tell your installer to

How does the shebang execute the program?

帅比萌擦擦* 提交于 2019-12-11 04:34:01
问题 I feel like a total noob asking this question, but I'm wondering, how does the shebang in a program ( Ex : #!/usr/bin/env python ) execute it? I know that the file is run by ./filename , but how does it run it with the right executor? Would it be the same as running it with the python command? If so, how does the shebang redirect it to the command? 回答1: Sergio Answered: The shebang line specifies the right "executor". That's how it is found (by the program loader). 来源: https://stackoverflow

Noob file.copy question having issues copying .exe files C#

一世执手 提交于 2019-12-11 04:26:07
问题 I am trying to copy a .exe file from the temp directory to the desktop, however when I do so it just creates a new .exe which has no data in it and is 0 KB in size. I tested this syntax with a .txt file and it copied it completely, it just refuses to copy .exe files for some reason. I tried executing it using the the string path to make sure it was grabbing the correct location and that worked, executing the helloworld.exe program in the temp directory. Also I do not get any compiler errors,

Pyinstaller and cython application files way too huge

十年热恋 提交于 2019-12-11 04:25:02
问题 I am creating executables that can run on my laptop without having Python installed. The below works perfectly... pyinstaller -r file_a.so,dll,file_a.so -r file_b.so,dll,file_b.so -F ./bin/hello However each executable is 181,177kb+. When before the job was about 10kbs. I can compress that down to 170,100kbs. Any ideas on how I can compress this further. It is using cython + Pyinstaller which works perfectly however the only issue is the huge size..... 来源: https://stackoverflow.com/questions

Start external exe within own process

我怕爱的太早我们不能终老 提交于 2019-12-11 03:58:47
问题 I have a VB6 executable we use as a Starter executable for our real program. The problem is that windows 7 shows a new icon in the taskbar for the new process, instead of the one i clicked on to start my program (of course, because the starter exe has already ended, and the new exe seems to be a new program). Currently I use the Shell object to start the other exe. Is there a better way to do it from vb6, maybe by using a native C function with declare that does start an exe in the current

Execute a piece of code from the data-section

一个人想着一个人 提交于 2019-12-11 03:45:11
问题 I want to take a piece of code, copy it into a global array and execute it from there. In other words, I am trying to to copy a bunch of instructions from the code-section into the data-section, and then set the program-counter to continue the execution of the program from the data-section. Here is my code: #include <stdio.h> #include <string.h> typedef void(*func)(); static void code_section_func() { printf("hello"); } #define CODE_SIZE 73 // I verified this size in the disassembly of 'code

Ruby 2.0.0 cannot load such file even though gem is installed

懵懂的女人 提交于 2019-12-11 03:28:53
问题 I've tried all of the other solutions people have talked about on here, but none of them have helped / applied. I've written a Ruby script that requires the spreadsheet gem. The requiring works fine when I execute the script normally with ruby myscript.rb , but after running chmod +x myscript.rb , and then trying to run the program with ./myscript.rb I get the following error.... /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45