473,405 Members | 2,167 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Embedding processing module in c (winxp sp2)

Hello every one

Did anybody tried to embed pyprocessing (http://
pyprocessing.berlios.de/) in a c app? im using python 2.4 and
pyprocessing 0.52 under winxp sp2. but it doesnt seem to work. I added
a print statement in Process.start() method after
'_current_process._children.add(self)' command in process.py file line
97 and it prints as its in a kind of loop!

here is the sample program:

#define WIN32_LEAN_AND_MEAN
#include<windows.h>
#include "python.h"

int main(int argc, char **argv)
{
Py_Initialize();

PyRun_SimpleString("import sys\n"
"sys.argv=['']\n" //a cheat to make processing go on!
"from processing import Process,Queue,freezeSupport\n"
"def f(q):\n"
"\timport wx\n"
"\tfrom wx.py import crust\n"
"\tapp = wx.PySimpleApp(redirect=False)\n"
"\tframe = crust.CrustFrame()\n"
"\tframe.Show()\n"
"\tapp.MainLoop()\n"
"q=Queue()\n"
"if __name__ == '__main__':\n"
"\tfreezeSupport()\n"
"\tq=Queue()\n"
"\tp = Process(target=f, args=(q,))\n"
"\tp.start()\n");

Py_Finalize();
}
Best Regards,
Mani
Jun 27 '08 #1
0 654

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Alicia Haumann | last post by:
I accidentally sent this to webmaster@python.org, so this could be a duplicate if "webmaster" forwards it to this list. :{ Hi, there. Thanks for any help that can be offered. I've been...
0
by: smilechaser | last post by:
Hi All, A question about embedding: If I take the example code on embedding (Section 5.3 of Extending and Embedding the Python Interpreter 2.4) and add the lines: PyRun_SimpleString("import...
2
by: Ralph | last post by:
I used to have Visual Basic .net std. 2003 installed on WinXP SP1A. But I found it too hard to upgrade WinXP to SP2. Now, I do have WinXP SP2 installed, but I am having problems installing...
2
by: Don Leverton | last post by:
Hi Folks, I'm experiencing a problem that seems to be unique to running Access97 on Windows XP, and seems to be worse on WinXP SP2. It appears when I'm trying to import a text file. I'm...
0
by: Peter Wagner | last post by:
Hi I've made a program about 2 years ago. The main window is a ListView. The contents of the ListView is copied from a multiline TextBox. After the installation of the SP2 for WinXP Prof the...
6
by: mistabean | last post by:
Hello, first of all, I am a programming newbie, especially in python... Onwards to the problem, I have been having difficulty embedding a python module into my C/C++ program. (just a test...
0
by: Gabriel Genellina | last post by:
En Wed, 09 Jul 2008 15:02:56 -0300, Mirko Vogt <lists@nanl.deescribi�: Which Python version? Which Windows version? I've tried 2.3.4, 2.4.4, 2.5.1 and 3.0a4, all on WinXP SP2, and in all...
0
by: Mirko Vogt | last post by:
Gabriel Genellina wrote: Hey, this is strange. Linux: $ python --version Python 2.5.2 $ Windows:
3
by: C a r l o s A n t o n i o | last post by:
Hello all, I'm testing my setup package in a PC with a fresh installation of WinXP. When i try to execute it, it shows a message indicating that first i need to install WinXP Service Pack2. I...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.