I was going through a post on http://codeverge.com/perl.inline/running-inline-python-in-a-cgi-script/741065

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 :

#---------------------------- # 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
and getting the below error:
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.
Can somebody please help ?

Need it as asap


In reply to using Inline Python with CGI by garima3003

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.