Ok, so I have a project that I've written in Python(Actually it's not done yet), its the card game "Cheat" that you play in the command prompt with (until I learn wxPython -- GUI for Python) with computer players (or other people with you). I want to distribute it later, and I've found a way to make a nice executable installer to make it easy for the users. The problem is it will install the python files on their system, and theres not much point in an easy to use installer if they also have to go download the python interpreter. So anyway, I want it to download a .exe file also so you can just click it and play (Obviously will only work on windows, maybe after I solve this I might make executables for other platforms). So what I want to do is to Make a C program that will call a single function from the python program, which will play the game (without the user needing to install python). I tried, but I got all confused with a lot of errors. Also, it may seem the obvious solution is to just program the whole game in C, but I don't really like C, I prefer python, and if someone can come up with a simple way to do this, I'll write all my projects in python and use this to make the exe. I tried including the Python.h header and then using RunPy_SimpleString among other things but nothing seems to work, all giving me errors and I'm tired of trying. I looked up before this some Python things for making exe's like "freeze", which makes enormous C byte arrays with python somehow.., and other things, but I couldn't find them where they should have been, I just want to directly make the C program if possible. So if anyone knows anything about this, please post. I don't know very much about C, but I can program and understand it fine because I did Java for a long time before I started Python, the only exception being that I'm not familiar with its API, which makes it harder since I havn't been able to find clear 'official' documentation anywhere. Thankyou in advance, sorry for the long post.
(I'm pretty sure this is more related to C than Python so I put it here)
MK12 6 Light Poster
Murtan 317 Practically a Master Poster
MK12 6 Light Poster
mitrmkar 1,056 Posting Virtuoso
MK12 6 Light Poster
MK12 6 Light Poster
MK12 6 Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.