Find Jobs
Hire Freelancers

python release dll, can't capture error output

$30-100 USD

Cancelled
Posted over 11 years ago

$30-100 USD

Paid on delivery
I have a C++ program that captures and displays the syntax or runtime error information when a python script is run. It works when compiled with the debug python dll, [login to view URL], but not with the realease dll. Another programmer working on the project tod me this has something to do with the dll itself. ## Deliverables here is some of the code showing how input is captured: //set up error and print catching, do this first so that any following error will be caught PyRun_SimpleString("import ograb72984"); PyRun_SimpleString("import sys"); PyRun_SimpleString("class a7198429:\n\tdef write(self,s):\n\t\[login to view URL](s)\n");//output-grabber class, funny name to prevent ambiguity with user-defined classes PyRun_SimpleString("sys.stderr=a7198429()\nsys.stdout=a7198429()"); //\n"); //////////////////////py grabber include "pyinc.h" #include "AutoCore.h" #include "PyMethsGrabber.h" extern AutoCore Auto; //used to capture python stderr and stdout streams //equivilent to [login to view URL], [login to view URL] not used becasue would require importing tp module in globab interpreter, now only small module needs importing, see AutoCore::AutoCore() static PyObject* ograb(PyObject *self, PyObject *args) { char *s; if(!PyArg_ParseTuple(args, "s", &s)) return NULL; [login to view URL](s); Py_INCREF(Py_None); return Py_None; } static PyMethodDef ograbMeths[] = { {"ograb", ograb, METH_VARARGS, NULL}, }; void InitGrabberMeths() { Py_InitModule("ograb72984", ograbMeths); }
Project ID: 2782104

About the project

2 proposals
Remote project
Active 12 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
2 freelancers are bidding on average $90 USD for this job
User Avatar
See private message.
$100.30 USD in 5 days
5.0 (43 reviews)
6.3
6.3
User Avatar
See private message.
$80 USD in 5 days
5.0 (50 reviews)
5.3
5.3

About the client

Flag of UNITED STATES
Tallahassee, United States
5.0
63
Payment method verified
Member since Jun 27, 2003

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.