garima3003 has asked for the wisdom of the Perl Monks concerning the following question:
Unfortunately i ended up getting into the same situation.
I am new to perl and python and through a cgi calling a perl script and python code is embedded in Perl script.
Tried the same code but still no luck.
Below is the code :
and getting the below error:#---------------------------- # Defining The constants #--------------------------- *SUBMIT = \'submit'; *TRUE = \1; *FALSE = \0; *DISABLED = \'DISABLED'; sub store_policy() { print "Started\n"; use Inline::Python qw(py_new_object py_call_method); use Inline Python => 'DATA', DIRECTORY => '/usr/local/webmin/gehc_password_management/_Inli +ne/'; Inline->init(); print "\nGoing to create Object\n"; my $obj = py_new_object("gehc_password_management","gehc_password_mana +gement","passwordManagement"); #print "hello".py_call_method($obj,"testPrint")."\n"; print("\nCreated the Object"); #my $flag = $obj->getPasswordConfigFilePath(); #print($flag); print "\nClosed"; } 1; # Return true, required for libraries __DATA__ __Python__ from passwordChangeNew import PasswordManagement as passwordManagement
Can somebody please help ?Started HTTP/1.0 500 Perl execution failed Server: MiniServ/1.840 Date +: Tue, 11 Jun 2019 22:58:49 GMT Content-type: text/html; Charset=iso- +8859-1 Connection: close Error - Perl execution failed Marker '__Python__ from passwordChangeNew import PasswordManagement as + passwordManagement ' does not match Inline 'Python' section.at ./pol +icy-lib.pl line 36.
Need it as asap
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: using Inline Python with CGI
by hippo (Archbishop) on Jun 12, 2019 at 08:06 UTC | |
|
Re: using Inline Python with CGI
by Corion (Patriarch) on Jun 12, 2019 at 08:16 UTC | |
by Anonymous Monk on Jun 13, 2019 at 08:20 UTC | |
|
Re: using Inline Python with CGI
by bliako (Abbot) on Jun 13, 2019 at 12:55 UTC | |
by Anonymous Monk on Jun 14, 2019 at 06:01 UTC | |
by afoken (Chancellor) on Jun 14, 2019 at 19:58 UTC | |
by bliako (Abbot) on Jun 14, 2019 at 07:48 UTC |