Re: [pygame] Linux binaries
Boost is C++. On Thu, Nov 6, 2008 at 5:42 AM, Peter Gebauer [EMAIL PROTECTED] wrote: Hey there! There are some alternatives, some like automatic generation like Swig, Boost, etc, some like Pyrex, I prefer to write Python extensions in C using the standard Python C-implementation API. PyGame, being written in C, is also easy to access. As for C++, I don't know of any specific C++ API's, but then again I don't use C++ at all so I haven't looked. There's also the option of doing the reverse scenario, embedding instead of extending, you'll have to see what fits your project best. /Peter On 2008-11-05 (Wed) 08:29, Matt Pearson wrote: i agree, does the wrapper have a name, or is it on the python/pygame sites On Wed, Nov 5, 2008 at 8:13 AM, René Dudfield [EMAIL PROTECTED] wrote: yeah, best to use both! Use each tool where it is best at - and get best of both worlds! cu, On Thu, Nov 6, 2008 at 12:53 AM, Peter Gebauer [EMAIL PROTECTED] wrote: Hi guys! I agree, just wanted to add that many iterations over trivial code benefits (speed-wise) tremendously from being written in C and accessed in Python, or at least that is my experience. :) Guess you have to weigh it against the added complexity of having to compile C code, maybe for mulitple platforms, etc. On 2008-11-05 (Wed) 13:57, Greg Ewing wrote: Patrick Mullen wrote: On Tue, Nov 4, 2008 at 12:55 AM, Greg Ewing [EMAIL PROTECTED] wrote: The only way to improve speed is to re-code the cpu-intensive parts using something more efficent, such as C or Pyrex. Or, of course, write better python code if possible in those parts. Yes, certainly -- finding a better algorithm is always the best form of optimization! -- Greg
Re: [pygame] Linux binaries
For most libraries you could use Ctypes. On 11/6/08, Peter Gebauer [EMAIL PROTECTED] wrote: Hey there! There are some alternatives, some like automatic generation like Swig, Boost, etc, some like Pyrex, I prefer to write Python extensions in C using the standard Python C-implementation API. PyGame, being written in C, is also easy to access. As for C++, I don't know of any specific C++ API's, but then again I don't use C++ at all so I haven't looked. There's also the option of doing the reverse scenario, embedding instead of extending, you'll have to see what fits your project best. /Peter On 2008-11-05 (Wed) 08:29, Matt Pearson wrote: i agree, does the wrapper have a name, or is it on the python/pygame sites On Wed, Nov 5, 2008 at 8:13 AM, René Dudfield [EMAIL PROTECTED] wrote: yeah, best to use both! Use each tool where it is best at - and get best of both worlds! cu, On Thu, Nov 6, 2008 at 12:53 AM, Peter Gebauer [EMAIL PROTECTED] wrote: Hi guys! I agree, just wanted to add that many iterations over trivial code benefits (speed-wise) tremendously from being written in C and accessed in Python, or at least that is my experience. :) Guess you have to weigh it against the added complexity of having to compile C code, maybe for mulitple platforms, etc. On 2008-11-05 (Wed) 13:57, Greg Ewing wrote: Patrick Mullen wrote: On Tue, Nov 4, 2008 at 12:55 AM, Greg Ewing [EMAIL PROTECTED] wrote: The only way to improve speed is to re-code the cpu-intensive parts using something more efficent, such as C or Pyrex. Or, of course, write better python code if possible in those parts. Yes, certainly -- finding a better algorithm is always the best form of optimization! -- Greg
Re: [pygame] Linux binaries
ahhh... i see It's like the Rube Goldberg machines of the computer world. - Original Message - From: James Paige [EMAIL PROTECTED] To: pygame-users@seul.org Subject: Re: [pygame] Linux binaries Date: Wed, 5 Nov 2008 17:03:36 -0800 Here is a nice bogosort http://www.siafoo.net/algorithm/5 On Thu, Nov 06, 2008 at 08:48:04AM +0800, yanom @linuxmail.org wrote: What's Bogosort? - Original Message - From: Charlie Nolan [EMAIL PROTECTED] To: pygame-users@seul.org Subject: Re: [pygame] Linux binaries Date: Tue, 4 Nov 2008 22:06:39 -0600 Yes, certainly -- finding a better algorithm is always the best form of optimization! Yup. Even a supercomputer is going to choke if you feed it Bogosort. = Local Doors Door Frames Find Local area door door frame dealers at YellowPages. http://a8-asy.a8ww.net/a8-ads/adftrclick?redirectid=749b3206efcdf5712e92bb91fe34e820 -- Powered by Outblaze = Antarctica Cruise Antarctica expeditions with landings on luxurious expedition ships. http://a8-asy.a8ww.net/a8-ads/adftrclick?redirectid=f7dac12e8d148d3396cce0882afc1941 -- Powered by Outblaze
Re: [pygame] Linux binaries
For algorithms you could try Weave, a package in SciPy, no need to compile with any compiler, it just runs, Fast. Check these http://www.scipy.org/PerformancePython comparisons out, the only thing faster than Pyrex, C++ on Weave, without the additional memory overhead of Pyrex :-) Kind Regards, Patrick Atambo. On Wed, Nov 5, 2008 at 4:57 PM, Matt Pearson [EMAIL PROTECTED] wrote: i have been doing C++ for a while now and was wondering if there was a python wrapper for it, if so can i use and compile in visual studio?? On Wed, Nov 5, 2008 at 7:53 AM, Peter Gebauer [EMAIL PROTECTED] wrote: Hi guys! I agree, just wanted to add that many iterations over trivial code benefits (speed-wise) tremendously from being written in C and accessed in Python, or at least that is my experience. :) Guess you have to weigh it against the added complexity of having to compile C code, maybe for mulitple platforms, etc. On 2008-11-05 (Wed) 13:57, Greg Ewing wrote: Patrick Mullen wrote: On Tue, Nov 4, 2008 at 12:55 AM, Greg Ewing [EMAIL PROTECTED] wrote: The only way to improve speed is to re-code the cpu-intensive parts using something more efficent, such as C or Pyrex. Or, of course, write better python code if possible in those parts. Yes, certainly -- finding a better algorithm is always the best form of optimization! -- Greg
Re: [pygame] Linux binaries
Hey there! There are some alternatives, some like automatic generation like Swig, Boost, etc, some like Pyrex, I prefer to write Python extensions in C using the standard Python C-implementation API. PyGame, being written in C, is also easy to access. As for C++, I don't know of any specific C++ API's, but then again I don't use C++ at all so I haven't looked. There's also the option of doing the reverse scenario, embedding instead of extending, you'll have to see what fits your project best. /Peter On 2008-11-05 (Wed) 08:29, Matt Pearson wrote: i agree, does the wrapper have a name, or is it on the python/pygame sites On Wed, Nov 5, 2008 at 8:13 AM, René Dudfield [EMAIL PROTECTED] wrote: yeah, best to use both! Use each tool where it is best at - and get best of both worlds! cu, On Thu, Nov 6, 2008 at 12:53 AM, Peter Gebauer [EMAIL PROTECTED] wrote: Hi guys! I agree, just wanted to add that many iterations over trivial code benefits (speed-wise) tremendously from being written in C and accessed in Python, or at least that is my experience. :) Guess you have to weigh it against the added complexity of having to compile C code, maybe for mulitple platforms, etc. On 2008-11-05 (Wed) 13:57, Greg Ewing wrote: Patrick Mullen wrote: On Tue, Nov 4, 2008 at 12:55 AM, Greg Ewing [EMAIL PROTECTED] wrote: The only way to improve speed is to re-code the cpu-intensive parts using something more efficent, such as C or Pyrex. Or, of course, write better python code if possible in those parts. Yes, certainly -- finding a better algorithm is always the best form of optimization! -- Greg
Re: [pygame] Linux binaries
im sorry if this is the wrong forum but im having an error im doing the AI example in Will McGugans Python/Pygame book The error is run() NameError: name 'run' is not defined i have the lastest gameobjects module so im kinda stumped and its not using OpenGL either thanks On Wed, Nov 5, 2008 at 7:34 PM, Bill Coderre [EMAIL PROTECTED] wrote: On Nov 5, 2008, at 4:48 PM, yanom @linuxmail.org wrote: What's Bogosort? Back in my day, we didn't have Wikipedia, we had the Jargon file, and we LIKED it. (Note that although if I am really to show my age, I have to decry the Eric Raymond update which, to a large extent, diluted the winnage of the original. But the original does not have an entry for Bogo-Sort, so there you go.) http://catb.org/jargon/html/B/bogo-sort.html It is highly educational and entertaining to read these old repositories of wordplay and politics. For instance, you probably have always frobbed things (it's part of the hacker DNA), but now you can understand the distinction between frobbing, twiddling, and tweaking, and this might actually come in handy at some point. See also the story about Magic in the Appendix.
Re: [pygame] Linux binaries
Hi guys! I agree, just wanted to add that many iterations over trivial code benefits (speed-wise) tremendously from being written in C and accessed in Python, or at least that is my experience. :) Guess you have to weigh it against the added complexity of having to compile C code, maybe for mulitple platforms, etc. On 2008-11-05 (Wed) 13:57, Greg Ewing wrote: Patrick Mullen wrote: On Tue, Nov 4, 2008 at 12:55 AM, Greg Ewing [EMAIL PROTECTED] wrote: The only way to improve speed is to re-code the cpu-intensive parts using something more efficent, such as C or Pyrex. Or, of course, write better python code if possible in those parts. Yes, certainly -- finding a better algorithm is always the best form of optimization! -- Greg
Re: [pygame] Linux binaries
yeah, best to use both! Use each tool where it is best at - and get best of both worlds! cu, On Thu, Nov 6, 2008 at 12:53 AM, Peter Gebauer [EMAIL PROTECTED] wrote: Hi guys! I agree, just wanted to add that many iterations over trivial code benefits (speed-wise) tremendously from being written in C and accessed in Python, or at least that is my experience. :) Guess you have to weigh it against the added complexity of having to compile C code, maybe for mulitple platforms, etc. On 2008-11-05 (Wed) 13:57, Greg Ewing wrote: Patrick Mullen wrote: On Tue, Nov 4, 2008 at 12:55 AM, Greg Ewing [EMAIL PROTECTED] wrote: The only way to improve speed is to re-code the cpu-intensive parts using something more efficent, such as C or Pyrex. Or, of course, write better python code if possible in those parts. Yes, certainly -- finding a better algorithm is always the best form of optimization! -- Greg
Re: [pygame] Linux binaries
i agree, does the wrapper have a name, or is it on the python/pygame sites On Wed, Nov 5, 2008 at 8:13 AM, René Dudfield [EMAIL PROTECTED] wrote: yeah, best to use both! Use each tool where it is best at - and get best of both worlds! cu, On Thu, Nov 6, 2008 at 12:53 AM, Peter Gebauer [EMAIL PROTECTED] wrote: Hi guys! I agree, just wanted to add that many iterations over trivial code benefits (speed-wise) tremendously from being written in C and accessed in Python, or at least that is my experience. :) Guess you have to weigh it against the added complexity of having to compile C code, maybe for mulitple platforms, etc. On 2008-11-05 (Wed) 13:57, Greg Ewing wrote: Patrick Mullen wrote: On Tue, Nov 4, 2008 at 12:55 AM, Greg Ewing [EMAIL PROTECTED] wrote: The only way to improve speed is to re-code the cpu-intensive parts using something more efficent, such as C or Pyrex. Or, of course, write better python code if possible in those parts. Yes, certainly -- finding a better algorithm is always the best form of optimization! -- Greg
Re: [pygame] Linux binaries
nvm i just got to see which one wil be the best for what im doing On Wed, Nov 5, 2008 at 8:29 AM, Matt Pearson [EMAIL PROTECTED] wrote: i agree, does the wrapper have a name, or is it on the python/pygame sites On Wed, Nov 5, 2008 at 8:13 AM, René Dudfield [EMAIL PROTECTED] wrote: yeah, best to use both! Use each tool where it is best at - and get best of both worlds! cu, On Thu, Nov 6, 2008 at 12:53 AM, Peter Gebauer [EMAIL PROTECTED] wrote: Hi guys! I agree, just wanted to add that many iterations over trivial code benefits (speed-wise) tremendously from being written in C and accessed in Python, or at least that is my experience. :) Guess you have to weigh it against the added complexity of having to compile C code, maybe for mulitple platforms, etc. On 2008-11-05 (Wed) 13:57, Greg Ewing wrote: Patrick Mullen wrote: On Tue, Nov 4, 2008 at 12:55 AM, Greg Ewing [EMAIL PROTECTED] wrote: The only way to improve speed is to re-code the cpu-intensive parts using something more efficent, such as C or Pyrex. Or, of course, write better python code if possible in those parts. Yes, certainly -- finding a better algorithm is always the best form of optimization! -- Greg
Re: [pygame] Linux binaries
i have been doing C++ for a while now and was wondering if there was a python wrapper for it, if so can i use and compile in visual studio?? On Wed, Nov 5, 2008 at 7:53 AM, Peter Gebauer [EMAIL PROTECTED] wrote: Hi guys! I agree, just wanted to add that many iterations over trivial code benefits (speed-wise) tremendously from being written in C and accessed in Python, or at least that is my experience. :) Guess you have to weigh it against the added complexity of having to compile C code, maybe for mulitple platforms, etc. On 2008-11-05 (Wed) 13:57, Greg Ewing wrote: Patrick Mullen wrote: On Tue, Nov 4, 2008 at 12:55 AM, Greg Ewing [EMAIL PROTECTED] wrote: The only way to improve speed is to re-code the cpu-intensive parts using something more efficent, such as C or Pyrex. Or, of course, write better python code if possible in those parts. Yes, certainly -- finding a better algorithm is always the best form of optimization! -- Greg
Re: [pygame] Linux binaries
Uh. you misunderstood me. I use Linux (Xubuntu), and I am going to release the source code for my game. The only reason I wanted to release a so-called Binary Blob is to give Linux users another option for using the game than installing from source. I also thought that Binary Blobs where faster than Source Blobs. - Original Message - From: bhaaluu [EMAIL PROTECTED] To: pygame-users@seul.org Subject: Re: [pygame] Linux binaries Date: Tue, 4 Nov 2008 23:27:48 -0500 On Mon, Nov 3, 2008 at 5:10 PM, yanom @linuxmail.org [EMAIL PROTECTED] wrote: I understand you can use py2exe to make your python program into a Windows executable, but is there a tool for making them into a Linux binary? I want my game to run faster. Your game will run faster on GNU/Linux anyway. The important thing is to make your source code available, so many eyes can see it. You'll find out soon enough where the knotholes are! Use the Source Luke! Now, if the real reason you want to distribute a Binary Blob to GNU/Linux users is because you want to generate some sort of income, your game probably isn't worth the few cents you want to charge for it. As if! Why do you even think GNU/linux users would want a Binary Blob of your little game on their disk? Think about it! I don't even know what thought process caused you to even ask this question? The best thing about GNU/Linux is the people who USE it! -- b h a a l u u at g m a i l dot c o m Kid on Bus: What are you gonna do today, Napoleon? Napoleon Dynamite: Whatever I feel like I wanna do. Gosh! = Uniforms Browse a huge selection now. Find exactly what you want today. http://a8-asy.a8ww.net/a8-ads/adftrclick?redirectid=664e80acdb7b3b4b11840ee7539e52c2 -- Powered by Outblaze
Re: [pygame] Linux binaries
Here is a nice bogosort http://www.siafoo.net/algorithm/5 On Thu, Nov 06, 2008 at 08:48:04AM +0800, yanom @linuxmail.org wrote: What's Bogosort? - Original Message - From: Charlie Nolan [EMAIL PROTECTED] To: pygame-users@seul.org Subject: Re: [pygame] Linux binaries Date: Tue, 4 Nov 2008 22:06:39 -0600 Yes, certainly -- finding a better algorithm is always the best form of optimization! Yup. Even a supercomputer is going to choke if you feed it Bogosort. = Local Doors Door Frames Find Local area door door frame dealers at YellowPages. http://a8-asy.a8ww.net/a8-ads/adftrclick?redirectid=749b3206efcdf5712e92bb91fe34e820 -- Powered by Outblaze
Re: [pygame] Linux binaries
On Nov 5, 2008, at 4:48 PM, yanom @linuxmail.org wrote: What's Bogosort? Back in my day, we didn't have Wikipedia, we had the Jargon file, and we LIKED it. (Note that although if I am really to show my age, I have to decry the Eric Raymond update which, to a large extent, diluted the winnage of the original. But the original does not have an entry for Bogo-Sort, so there you go.) http://catb.org/jargon/html/B/bogo-sort.html It is highly educational and entertaining to read these old repositories of wordplay and politics. For instance, you probably have always frobbed things (it's part of the hacker DNA), but now you can understand the distinction between frobbing, twiddling, and tweaking, and this might actually come in handy at some point. See also the story about Magic in the Appendix.
Re: [pygame] Linux binaries
yanom @linuxmail.org wrote: I understand you can use py2exe to make your python program into a Windows executable, but is there a tool for making them into a Linux binary? I want my game to run faster. If you're thinking that py2exe makes Python programs run faster on Windows, you're assuming wrongly. All it does is bundle up the bytecode files with a copy of the interpreter into a convenient package. There's a tool called freeze that allows you to do something similar on unix systems, but it won't make anything run faster either. The only way to improve speed is to re-code the cpu-intensive parts using something more efficent, such as C or Pyrex. -- Greg
Re: [pygame] Linux binaries
On Tue, Nov 4, 2008 at 12:55 AM, Greg Ewing [EMAIL PROTECTED] wrote: The only way to improve speed is to re-code the cpu-intensive parts using something more efficent, such as C or Pyrex. -- Greg Or, of course, write better python code if possible in those parts.
Re: [pygame] Linux binaries
- Original Message - From: Greg Ewing [EMAIL PROTECTED] To: pygame-users@seul.org Subject: Re: [pygame] Linux binaries Date: Tue, 04 Nov 2008 21:55:45 +1300 yanom @linuxmail.org wrote: I understand you can use py2exe to make your python program into a Windows executable, but is there a tool for making them into a Linux binary? I want my game to run faster. If you're thinking that py2exe makes Python programs run faster on Windows, you're assuming wrongly. All it does is bundle up the bytecode files with a copy of the interpreter into a convenient package. There's a tool called freeze that allows you to do something similar on unix systems, but it won't make anything run faster either. The only way to improve speed is to re-code the cpu-intensive parts using something more efficent, such as C or Pyrex. -- Greg Speed isn't a problem, because I plan on making my game 2d. = Fruit and Apple Presses for Sale Happy Valley Ranch sells apple and fruit presses, grinders and accessories. Apple pickers, apple bags, small Yakima fruit presses and much more. http://a8-asy.a8ww.net/a8-ads/adftrclick?redirectid=5f4704b5238de55c6a463af91671f85d -- Powered by Outblaze
Re: [pygame] Linux binaries
Patrick Mullen wrote: On Tue, Nov 4, 2008 at 12:55 AM, Greg Ewing [EMAIL PROTECTED] wrote: The only way to improve speed is to re-code the cpu-intensive parts using something more efficent, such as C or Pyrex. Or, of course, write better python code if possible in those parts. Yes, certainly -- finding a better algorithm is always the best form of optimization! -- Greg
Re: [pygame] Linux binaries
Yes, certainly -- finding a better algorithm is always the best form of optimization! Yup. Even a supercomputer is going to choke if you feed it Bogosort.
Re: [pygame] Linux binaries
On Mon, Nov 3, 2008 at 5:10 PM, yanom @linuxmail.org [EMAIL PROTECTED] wrote: I understand you can use py2exe to make your python program into a Windows executable, but is there a tool for making them into a Linux binary? I want my game to run faster. Your game will run faster on GNU/Linux anyway. The important thing is to make your source code available, so many eyes can see it. You'll find out soon enough where the knotholes are! Use the Source Luke! Now, if the real reason you want to distribute a Binary Blob to GNU/Linux users is because you want to generate some sort of income, your game probably isn't worth the few cents you want to charge for it. As if! Why do you even think GNU/linux users would want a Binary Blob of your little game on their disk? Think about it! I don't even know what thought process caused you to even ask this question? The best thing about GNU/Linux is the people who USE it! -- b h a a l u u at g m a i l dot c o m Kid on Bus: What are you gonna do today, Napoleon? Napoleon Dynamite: Whatever I feel like I wanna do. Gosh!
Re: [pygame] Linux binaries
On Tue, Nov 04, 2008 at 06:10:03AM +0800, yanom @linuxmail.org wrote: I understand you can use py2exe to make your python program into a Windows executable, but is there a tool for making them into a Linux binary? I want my game to run faster. cx_freeze can bindle your python application into a linux program similar to how py2exe bundles an exe file for Windows However, you are mistaken if you think this will cause your program to execute faster. There will be no meaningful speed difference. You might want to look into psyco. The psyco module can usually make your python program run faster on most processors. But if you are really serious about making your program faster, you need to learn about profiling. --- James Paige