![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Sep 2005
Posts: 6
Rep Power: 0
![]() |
Ok, I have been programming in C++ for a while, and I recently started learning Python because Blender uses it as its script language.
As I have been learning Python, I have been making silly little programs I would like to share with my firends, yet many of them do not have Python installed. I've seen all of these things that say that they turn your Python scripts into .exe files. Yet none of them actually DO that, it always has some sort of confusing system that is rather anouying. I have a C++ compiler that makes .exe files. And thats really all I want, a pure and simple .exe file. So I was wondering if there was anyway to turn Python script into C++ code for me to compile into a .exe file. Perhaps some sort of program might do this. If there is no way for that to happen, is there any simple way for a noob Python programmer to make a pure and simple .exe file? If you want to know how noobish I am, I just finished learning the "while" and "if" statements... yeah. Thanks to anyone who helps! ![]() I'm farely sure this belongs in the Python forum. |
|
|
|
|
|
#2 |
|
Expert Programmer
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4
![]() |
Converting a python file to a C++ file? Forget it.. python is high level, C++ is low level.. that's a huge difference.
the trick of creating an automatically running python file is including the interpretter and the python files in one file. There are probably lots of tool on the net for that. |
|
|
|
|
|
#3 |
|
Programming Guru
![]() ![]() ![]() |
That's the problem with Python, you have to distribute the interpreter with your code.
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
|
|
#4 | |
|
Programming Guru
![]() |
Quote:
__________________
|
|
|
|
|
|
|
#5 | |
|
Expert Programmer
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4
![]() |
Quote:
<?php $var = 3; $var = "echo (\"5\" + \"10\");"; eval($var); ?> ![]() |
|
|
|
|
|
|
#6 |
|
Newbie
Join Date: Sep 2005
Posts: 6
Rep Power: 0
![]() |
I was thinking there must be some way for it to happen, as usually the same actions are being done, just different syntax.
|
|
|
|
|
|
#7 |
|
Expert Programmer
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4
![]() |
it all depends on the code you are using. The example i gave in the last post, is a quite unusual piece of code - i just wanted to make clear you can't convert everything back to low-level.
|
|
|
|
|
|
#8 |
|
Newbie
Join Date: Sep 2005
Posts: 6
Rep Power: 0
![]() |
I personaly have no freaking clue about anything in PHP so I don't know what the result of that would be, but I'm sure there would be some way to emulate that in a low level language.
I always thought that low level languages gave you more freedom then high level. |
|
|
|
|
|
#9 | |
|
Newbie
|
Quote:
http://www.python.org/doc/current/dist/dist.html Next what you want to do is get py2exe, I am noob to python also and I have found it to be usefull, go to this link http://starship.python.net/crew/theller/py2exe/ to get documentation and the py2exe modules. It does take a bit of reading but it isn't all that hard to use and implement.
__________________
War cannot be avoided until the physical cause for its recurrence is removed and this, in the last analysis, is the vast extent of the planet on which we live. ~ Nikola Tesla |
|
|
|
|
|
|
#10 | |
|
Expert Programmer
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4
![]() |
Quote:
|
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|