Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

cx_freeze & py scripts


Demons Halo's Avatar
Member
0 0

Hi.

In order to compile .py files to executable files, I use a program called cx_freeze, which is pretty similar to py2exe. Now the problem is that I wrote a small script (20 lines and no modules imported) and compiled it into exe file, but instead of having 1 file I ended up with 900 files at least… Is there any way to compile a py script so that I can skip having so many files?

Google didn't help out that much, all I could find is HOW TO compile -_-

Also, when I run the program, I get a cmd window in the background running at the same time, which I personally find very annoying… :/

Now is there anyone in here that is experienced with py -> exe that could help me out? :P

cheers!


korg's Avatar
Admin from hell
0 0

What version of python are you using. I had issues with py2exe with 3.0.


Demons Halo's Avatar
Member
0 0

I'm using 2.6.1 and I had issues with py2exe too. That's why I use cx_freeze


Demons Halo's Avatar
Member
0 0

ok seriously.. I'm going CRAZY!!!

I've tried 3-4 different compilers and every piece of shit had more problems involved than the previous one -_- I'm currently trying bbfreeze but It seems like if a module is missing. Fuck me sideways…

Please if anyone has some sort of idea about how to make a single exe file, spill it!

and yes spyware.. I've googled it, yet no luck :/


spyware's Avatar
Banned
0 0

Lol compiling python.


Demons Halo's Avatar
Member
0 0

spyware wrote: Lol compiling python.

don't lol :@

I need to send the program to a friend of mine who has been waiting :( he can't run py files ^^


ranma's Avatar
Member
0 0

Linux compile?


Demons Halo's Avatar
Member
0 0

ranma wrote: Linux compile? grrr… screw linux, Win XP > ALL!!!


SySTeM's Avatar
-=[TheOutlaw]=-
20 0

Demons Halo wrote: he can't run py files ^^

Options:

a) Tell him to download the Python exe, and run it CLI style. b) Write it in C/C++ ^_^


ghost's Avatar
0 0

system_meltdown wrote: [quote]Demons Halo wrote: he can't run py files ^^

Options:

a) Tell him to download the Python exe, and run it CLI style. b) Write it in C/C++ ^_1

+1 most GUI based apps(i don't make very often, if at all) i primarily just code in C, or start in perl/python and recode in C


  1. /quote 


Demons Halo's Avatar
Member
0 0

system_meltdown wrote: [quote]Demons Halo wrote: he can't run py files ^^

Options:

a) Tell him to download the Python exe, and run it CLI style. b) Write it in C/C++ ^_1

a) sounds good ^^ 2 files would do the trick =D b) no can do :/ I'm an ignorant fuck when it comes to C/C++ -_-


  1. /quote 


ghost's Avatar
0 0

Demons Halo wrote: [quote]system_meltdown wrote: [quote]Demons Halo wrote: he can't run py files ^^

Options:

a) Tell him to download the Python exe, and run it CLI style. b) Write it in C/C++ ^_1

a) sounds good ^^ 2 files would do the trick =D b) no can do :/ I'm an ignorant fuck when it comes to C/C++ -_-[/quote]

Learn?


  1. /quote 


Demons Halo's Avatar
Member
0 0

I'm learning python right now so I can't keep up with 2 languages yet. I'm concentrating on python GUI/Pygame scripts, after that I'll take a look @ C/C++

Which one is more similar to python? For some reason I find C++ more like python but I might be wrong :P care to explain the difference? Looking at the codes in the code bank I'd say that one of them is OO while the other is direct coding, is this true or am I delusional?


ranma's Avatar
Member
0 0

C and C++, to the lower-level user pretty much no difference. C++ does have classes and structs, though, which are good. So go with C++.


Demons Halo's Avatar
Member
0 0

ranma wrote: C and C++, to the lower-level user pretty much no difference. C++ does have classes and structs, though, which are good. So go with C++.

mm sounds nice. Although I don't use classes really :P so if that is the only difference, I should go for the one with the easiest syntax (even though both are similar).


ranma's Avatar
Member
0 0

Ooooo :p lol. Everyone uses classes. SOOOO useful.


Demons Halo's Avatar
Member
0 0

In case you're a pro maybe :P importing the same modules all the time etc. but In my case all I need is a py document, a pen and a paper!!!

works just fine =D


ghost's Avatar
0 0

Demons Halo wrote: I'm learning python right now so I can't keep up with 2 languages yet. I'm concentrating on python GUI/Pygame scripts, after that I'll take a look @ C/C++

Which one is more similar to python? For some reason I find C++ more like python but I might be wrong :P care to explain the difference? Looking at the codes in the code bank I'd say that one of them is OO while the other is direct coding, is this true or am I delusional?

Both Python and C++ are OOP(Object Oriented Programming) languages. If you mean what language in general is most similiar to python…im not sure pythons similiar mix between C++ but with simplicity similiar to Perl. As far as closes to C++ syntax wise PHP is VERY similiar


ranma's Avatar
Member
0 0

Oh yeah, C++, Php, and javascript are all really similar, that's why I always suggest taking them together. Well, first javascript, then php, then c++.


Demons Halo's Avatar
Member
0 0

S1L3NTKn1GhT wrote: [quote]Demons Halo wrote: I'm learning python right now so I can't keep up with 2 languages yet. I'm concentrating on python GUI/Pygame scripts, after that I'll take a look @ C/C++

Which one is more similar to python? For some reason I find C++ more like python but I might be wrong :P care to explain the difference? Looking at the codes in the code bank I'd say that one of them is OO while the other is direct coding, is this true or am I delusional?

Both Python and C++ are OOP(Object Oriented Programming) languages. If you mean what language in general is most similiar to python…im not sure pythons similiar mix between C++ but with simplicity similiar to Perl. As far as closes to C++ syntax wise PHP is VERY similiar[/quote]

So if I dive into C++ later on, I'll get a free PHP ride as well?? Not a bad deal if you ask me ^^ C++ it is then =D

This thread is way off topic now, but instead of starting a new one I'll just ask here…

I've worked with the following python sections:

  • Basics
  • Tkinter (GUI)
  • Pygame
  • Time challenges (Urllibs and cookies handling etc.)
  • Math problems (Project Euler)
  • Regular expressions (not that much actually)

Steps left:

  • Another GUI module.
  • Classes (I hate them but still…)
  • Sockets
  • Multithreading (not that necessary but still…)

Except for these 3 steps, what else should I start reading about?

Oh yeah, C++, Php, and javascblockedript are all really similar, that's why I always suggest taking them together. Well, first javascblockedript, then php, then c++.

Well I have basic knowledge of JS, I did JS challenges 1-15 without any problems, yet I still have not tried to write my own script :P maybe I should give it a shot =D


ranma's Avatar
Member
0 0

Meh, the only thing you can learn from java-script that you would use in php is functions, loops, operators, and… that's it. I mean syntax-wise almost exactly alike. You don't really need to study java-script to learn php. But then again, if you wanna learn php, you wanna do web pages, and you need java-script.


Demons Halo's Avatar
Member
0 0

ranma wrote: Meh, the only thing you can learn from java-script that you would use in php is functions, loops, operators, and… that's it. I mean syntax-wise almost exactly alike. You don't really need to study java-script to learn php. But then again, if you wanna learn php, you wanna do web pages, and you need java-script.

I did not say that I was going to learn JS :P I'm going to try writing one of my python programs in javascript, and see how far I can make it :P that's all. Once I'm done with that "python to do list", I'll head over to C++ and then hopefully PHP (if I'm alive by that time). I'll follow ynouri7's advice and stick with python for the timebeing!

now what else can I learn (python wise) that would help me in the future? suggestions?!?!