1111 ****************************************************/
1212
1313
14- //including python header for calling python scripts
15- #include <Python.h>
14+
1615
1716#ifndef COMMANDS_H
1817#define COMMANDS_H
@@ -75,22 +74,9 @@ int quickoverflow_cd(char **args)
7574int quickoverflow_search (char * * args )
7675{
7776
78- int argc = 0 ;
79- while (args [argc ] != NULL ) {
80- argc ++ ;
81- }
82-
83- // Initialize the Python interpreter.
84- Py_Initialize ();
85- FILE * fp = fopen ("search.py" , "r" );
86- if (fp == NULL ) {
87- perror ("QuickOverFlowFileNotFoundError: Have you deleted search.py by any chance?" );
88- return 1 ;
89- }
90- PyRun_SimpleFile (fp , "search.py" );
91- fclose (fp );
92-
93- //Update 2.0.0 removed Py_Finalise to avoid segmentation faults
77+ //Update 3.0.0 - Removed Python API and enabled directly calling from anywhere in the OS
78+ //Now uses PyInstaller to generate Python Executable to run anywhere
79+ system ("search" );
9480
9581 return 1 ;
9682}
@@ -109,7 +95,7 @@ int quickoverflow_help(char **args){
10995"\\ \\/' / |_| | | (__| <\\ \\_/ /\\ V / __/ | | | | | (_) \\ V V / \n"
11096" \\_/\\_\\\\__,_|_|\\___|_|\\_\\\\___/ \\_/ \\___|_| |_| |_|\\___/ \\_/\\_ \n"
11197" \n" );
112- printf ("---------------------------------Version 2.1 .0----------------------------\n" );
98+ printf ("---------------------------------Version 3.0 .0----------------------------\n" );
11399 printf ("Type program names and arguments, and hit enter.\n" );
114100 printf ("The following are built in:\n" );
115101
@@ -137,7 +123,7 @@ int quickoverflow_about(char **args){
137123"\\ \\/' / |_| | | (__| <\\ \\_/ /\\ V / __/ | | | | | (_) \\ V V / \n"
138124" \\_/\\_\\\\__,_|_|\\___|_|\\_\\\\___/ \\_/ \\___|_| |_| |_|\\___/ \\_/\\_ \n"
139125" \n" );
140- printf ("Version: 2.1 .0\n" );
126+ printf ("Version: 3.0 .0\n" );
141127 printf ("License: GNU GPL-3 License\n" );
142128 printf ("Author: Aryan Karamtoth (SpaciousCoder78)\n" );
143129 printf (
"Author Email: [email protected] \n" );
0 commit comments