Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyObject_Print with Visual Studio 2010 #53931

Closed
Krauzi mannequin opened this issue Aug 31, 2010 · 4 comments
Closed

PyObject_Print with Visual Studio 2010 #53931

Krauzi mannequin opened this issue Aug 31, 2010 · 4 comments
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) OS-windows type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@Krauzi
Copy link
Mannequin

Krauzi mannequin commented Aug 31, 2010

BPO 9722
Nosy @malemburg, @amauryfa

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2012-06-10.02:32:52.856>
created_at = <Date 2010-08-31.09:43:01.398>
labels = ['interpreter-core', 'invalid', 'OS-windows', 'type-crash']
title = 'PyObject_Print with Visual Studio 2010'
updated_at = <Date 2012-06-10.02:32:52.855>
user = 'https://bugs.python.org/Krauzi'

bugs.python.org fields:

activity = <Date 2012-06-10.02:32:52.855>
actor = 'r.david.murray'
assignee = 'none'
closed = True
closed_date = <Date 2012-06-10.02:32:52.856>
closer = 'r.david.murray'
components = ['Interpreter Core', 'Windows']
creation = <Date 2010-08-31.09:43:01.398>
creator = 'Krauzi'
dependencies = []
files = []
hgrepos = []
issue_num = 9722
keywords = []
message_count = 4.0
messages = ['115256', '115257', '115258', '115261']
nosy_count = 3.0
nosy_names = ['lemburg', 'amaury.forgeotdarc', 'Krauzi']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = None
status = 'closed'
superseder = None
type = 'crash'
url = 'https://bugs.python.org/issue9722'
versions = ['Python 2.6', 'Python 3.1', 'Python 2.7']

@Krauzi
Copy link
Mannequin Author

Krauzi mannequin commented Aug 31, 2010

Hi guys,
i recently found out that PyObject_Print is not working with Visual Studio 2010:

#include <Python.h>
#include <iostream>

int main( int argc, char** argv )
{
    Py_Initialize();
    PyObject_Print( PyUnicode_FromString("test"), stdout, Py_PRINT_RAW );
    Py_Finalize();
    
    std::cin.get();
    return EXIT_SUCCESS;
}

@Krauzi Krauzi mannequin added interpreter-core (Objects, Python, Grammar, and Parser dirs) OS-windows type-crash A hard crash of the interpreter, possibly with a core dump labels Aug 31, 2010
@malemburg
Copy link
Member

Krauzi wrote:

New submission from Krauzi <krauzi_gmbh@yahoo.de>:

Hi guys,
i recently found out that PyObject_Print is not working with Visual Studio 2010:

#include <Python.h>
#include <iostream>

int main( int argc, char** argv )
{
Py_Initialize();
PyObject_Print( PyUnicode_FromString("test"), stdout, Py_PRINT_RAW );
Py_Finalize();

std::cin.get();
return EXIT_SUCCESS;

}

In what way is this not working ?

Have you compiled Python with VS2010 or are you using the stock
from python.org (which is compiled with VS2008) ?

@Krauzi
Copy link
Mannequin Author

Krauzi mannequin commented Aug 31, 2010

i used the one from python.org.
I cant build python with VC2010 because it cant convert the project from VC2008 to VC2010.

@amauryfa
Copy link
Member

You really should use the same version of Visual Studio than the one used to compile python.
"stdout" points to a FILE object created by your version of the compiler (VS2010); it cannot be passed to PyObject_Print(), which uses definitions from the VS2008 compiler.

What issue did you encounter when converting the project files to VS2010?

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) OS-windows type-crash A hard crash of the interpreter, possibly with a core dump
Projects
None yet
Development

No branches or pull requests

3 participants