[ANN] Game Microwar 2.0 beta 2

2009-09-17 Thread Pierre-Alain Dorange
://microwar.sourceforge.net/faq.html All logos used are tradmarks from the corresponding compagny. Use is illustrative. -- Pierre-Alain Dorangehttp://microwar.sourceforge.net/ Ce message est sous licence Creative Commons by-nc-sa-2.0 http://creativecommons.org/licenses/by-nc-sa/2.0

Re: equivalent of py2exe in other os

2008-10-07 Thread Pierre-Alain Dorange
-- Pierre-Alain Dorange Ce message est sous licence Creative Commons by-nc-sa-2.0 http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ -- http://mail.python.org/mailman/listinfo/python-list

Trouble with getdefaultlocale on Mac

2008-11-06 Thread Pierre-Alain Dorange
return the right answer ; ('fr_FR','mac-roman') My goal is to dertermine th user language define on the running system, any helps ? -- Pierre-Alain Dorange Ce message est sous licence Creative Commons by-nc-sa-2.0 http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ -- http

Trouble using pinckle

2008-07-02 Thread Pierre-Alain Dorange
() return 0 def main(): p=Prefs() p.load() print 'test %d (after load)' % p.test p.test+=1 print 'test %d (before save)' % p.test p.save() print '--' if __name__ == '__main__': main() -- Pierre-Alain Dorange Vidéo, DV et QuickTime

Re: Trouble using pinckle

2008-07-02 Thread Pierre-Alain Dorange
(preferences) have to be stored in a special directory : ~/Library/Preferences, no problem. But on other platform that's not the same directory and perhaps i would also faced to permissions issues... But first is there a way to determine on which platfrom the python script is running ? -- Pierre-Alain

Re: Trouble using pinckle

2008-07-03 Thread Pierre-Alain Dorange
(according to python phylosophy). -- Pierre-Alain Dorange Vidéo, DV et QuickTime http://www.garage-video.com/ Clarus, the DogCowhttp://clarus.chez.tiscali.fr/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python embedding question (2).

2008-07-30 Thread Pierre-Alain Dorange
render (group.draw) in the order i need. Easy and efficient. - There seems to be support for video overlay, i.e. is it possible to have an external program paint an image from a camera into a portion of the screen while pyGame is running? Don't know... -- Pierre-Alain Dorange Ce message est sous

Re: python vs smalltalk 80

2008-11-19 Thread Pierre-Alain Dorange
gavino [EMAIL PROTECTED] wrote: python vs smalltalk 80 which is nicer? 1st clue : Python got less letters in its name. 2nd clue : 80 is the year of the release of Alan Vega/Martin Rev album 3rd clue : Smalltalk began with an S, but Python with a P -- Pierre-Alain Dorange Ce message est

Re: Air Force1 and Air Jordan shoes PAYPAL wholesale

2008-11-20 Thread Pierre-Alain Dorange
air force1 shoes [EMAIL PROTECTED] wrote: air force1 shoes. air force1 high shoes. air force1 light shoes File stdin, line 1 air force1 shoes. air force1 high shoes. air force1 light shoes ^ SyntaxError: invalid syntax -- Pierre-Alain Dorange Ce message est sous licence

Re: Strengths and weaknesses of Pygame vs. pyglet vs. PyOpenGL?

2008-12-08 Thread Pierre-Alain Dorange
game (a spaceinvader like) between 800-1400 fps using dirtyrect. I can also run without modification on Windows and Unbuntu using WMWare on the same machine. -- Pierre-Alain Dorange http://microwar.sourceforge.net/ Ce message est sous licence Creative Commons by-nc-sa-2.0 http

Re: Beginner trying to understand functions.

2008-12-08 Thread Pierre-Alain Dorange
it was not pythonic, but i'm sure someone will tell is it's not. -- Pierre-Alain Dorangehttp://microwar.sourceforge.net/ Ce message est sous licence Creative Commons by-nc-sa-2.0 http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and audio frequency analysis

2008-12-08 Thread Pierre-Alain Dorange
, there are fast. For the audio analysis i thought the module must be written in C or something very fast, because python, due to it's nature, would probably not compute spectrum as fast as real time : 44100 samples per seconds is a lot of work... -- Pierre-Alain Dorangehttp

Game to test : MicroWar 2.0 alpha 6

2008-12-14 Thread Pierre-Alain Dorange
super-bomb) * adding Saucer explosion : generate Virus that can infect PC * clean the screens handling -- Pierre-Alain Dorange Ce message est sous licence Creative Commons by-nc-sa-2.0 http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ -- http://mail.python.org/mailman/listinfo/python-list

Re: re.match() performance

2008-12-18 Thread Pierre-Alain Dorange
(Compiled) Pattern Matching Time: 0.12012 Ratio Compiled/NotCompiled: 0.981116048092 2nd time and more Pattern Matching Time: 0.00257 (Compiled) Pattern Matching Time: 0.000619 Ratio Compiled/NotCompiled: 0.240856031128 Config python 2.5.1 / MacOS X 10.5 -- Pierre-Alain Dorange

no sign() function ?

2008-12-22 Thread Pierre-Alain Dorange
be faster. How do you implement this or is there any other module with a sign() function ? -- Pierre-Alain Dorangehttp://microwar.sourceforge.net/ Ce message est sous licence Creative Commons by-nc-sa-2.0 http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ -- http://mail.python.org

Re: no sign() function ?

2008-12-22 Thread Pierre-Alain Dorange
Christian Heimes li...@cheimes.de wrote: Pierre-Alain Dorange schrieb: I don't find any sign(x) function in the math library (return the sign of the value). I've read that math module is a wrapper to C math lib and that C math lib has not sign(), so... Starting with Python 2.6

Re: no sign() function ?

2008-12-22 Thread Pierre-Alain Dorange
/ the precise one (IEEE 754) is also fast (1) -- Pierre-Alain Dorangehttp://microwar.sourceforge.net/ Ce message est sous licence Creative Commons by-nc-sa-2.0 http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ -- http://mail.python.org/mailman/listinfo/python-list

Re: no sign() function ?

2008-12-22 Thread Pierre-Alain Dorange
from -500 to +500 sign_0 : 0.37 sign_1 : 0.42 (+13%) -- Pierre-Alain Dorangehttp://microwar.sourceforge.net/ Ce message est sous licence Creative Commons by-nc-sa-2.0 http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ -- http://mail.python.org/mailman/listinfo/python-list

Re: no sign() function ?

2008-12-23 Thread Pierre-Alain Dorange
(+76%) sign_3 : 0.498 (+33%) It seems it don't change the relative results between the methods. Using timeit make measure accurate and remove print/range footprints. I also try Arnaud's proposition, it make sign_0 just a little better (-1%) -- Pierre-Alain Dorangehttp

Re: Python's popularity

2008-12-23 Thread Pierre-Alain Dorange
color too? Only if it's pythonic. -- Pierre-Alain Dorangehttp://microwar.sourceforge.net/ Ce message est sous licence Creative Commons by-nc-sa-2.0 http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ -- http://mail.python.org/mailman/listinfo/python-list

[Offtopic] Re: I always wonder ...

2008-12-23 Thread Pierre-Alain Dorange
r rt8...@gmail.com wrote: [...] Well that shows that even lads with tiny nads can be brave, any of the other trolls want to expose them selfs? This thread is offtopic, please just keep silent and let it be closed... -- Pierre-Alain Dorangehttp://microwar.sourceforge.net/ Ce message

Re: no sign() function ?

2008-12-24 Thread Pierre-Alain Dorange
and discover that the sign() function is the bottleneck keeping your program slow. In each frame i'll have to use about 10 to 20 sign() call, so it'll not be the bottleneck. -- Pierre-Alain Dorangehttp://microwar.sourceforge.net/ Ce message est sous licence Creative Commons by-nc-sa-2.0

Re: I always wonder ...

2008-12-25 Thread Pierre-Alain Dorange
nice indeed, but you forget ascii art need a fixed font... -- Pierre-Alain Dorange Ce message est sous licence Creative Commons by-nc-sa-2.0 http://creativecommons.org

Re: I always wonder ...

2008-12-26 Thread Pierre-Alain Dorange
r rt8...@gmail.com wrote: Go to Google groups... it looks perfect :) It's a usenet group here, nothing to do with google groups. To get back to the group subject, what is your actual python projects ? -- Pierre-Alain Dorange Ce message est sous licence Creative Commons by-nc-sa-2.0

Re: I always wonder ...

2008-12-27 Thread Pierre-Alain Dorange
on board? I've other real project on the run, no crusade just programming. Google sketchup doesn't really interest me, sorry... -- Pierre-Alain Dorange Ce message est sous licence Creative Commons by-nc-sa-2.0 http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ -- http://mail.python.org

Pythonic way to handle coordinates

2009-01-17 Thread Pierre-Alain Dorange
? -- Pierre-Alain Dorange Ce message est sous licence Creative Commons by-nc-sa-2.0 http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ -- http://mail.python.org/mailman/listinfo/python-list

Re: s=ascii(hexlify(urandom(10)))

2009-01-17 Thread Pierre-Alain Dorange
-read the documentation of the ascii() builtin - it probably does something completely different from what you expect it to do. s = str(hexlify(urandom(8)))[2:18] And your question is? The answer is probably 23. -- Pierre-Alain Dorange Ce message est sous licence Creative Commons by-nc

[MacOS] Multiple versions of a module

2009-01-25 Thread Pierre-Alain Dorange
for pygame, 1.9.0 is ignored. The same with Any clue ? -- Pierre-Alain Dorange http://microwar.sourceforge.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: New to python, open source Mac OS X IDE?

2009-01-28 Thread Pierre-Alain Dorange
but i do not understand the right way to do this. There is project for PyObjC but a can't make working directly simple script project, so i continue to use terminal... -- Pierre-Alain Dorangehttp://microwar.sourceforge.net/ Ce message est sous licence Creative Commons by-nc-sa-2.0

Re: Profiling Python Apps on Mac?

2009-01-28 Thread Pierre-Alain Dorange
://docs.python.org/library/profile.html -- Pierre-Alain Dorange MicroWar 2.0 : tuez des PC http://microwar.sourceforge.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: pygame and py2app : big package

2009-09-20 Thread Pierre-Alain Dorange
needed Excuse me, but what was the point? (id est, are you just saying this or do you wish to ask a question?;) Sorry, it was not clear. But i want to know if i can make the package smaller, because the total package weight 59.4 MB just for a small arcade game. -- Pierre-Alain Dorange

Re: Can math.atan2 return INF?

2016-06-22 Thread Pierre-Alain Dorange
an2(0, 0) would have been NaN too but i'm not a math expert, but the limit of atan2 would be 45°, so pi/4 radians (0,7854). As x,y are coordinates, the both infinite would tend toward 45°. x only infinite would be 0° (0 radians) y only infinite woudl be 180° (pi/2 radians) --

Re: [tkinter] widget size adjustment

2016-06-22 Thread Pierre-Alain Dorange
pmx-bigmap> the tkinter code is in pmx.py the canvas class was TMap GUI was created in main_gui.__init__() callback function was main_gui.resize() -- Pierre-Alain Dorange<http://microwar.sourceforge.net/> Ce message est sous licence Creative Commons &q

Re: Can math.atan2 return INF?

2016-06-22 Thread Pierre-Alain Dorange
nvalid... -- Pierre-Alain Dorange<http://microwar.sourceforge.net/> Ce message est sous licence Creative Commons "by-nc-sa-2.0" <http://creativecommons.org/licenses/by-nc-sa/2.0/fr/> -- https://mail.python.org/mailman/listinfo/python-list

Re: [tkinter] widget size adjustment

2016-06-22 Thread Pierre-Alain Dorange
map servers) : user can drag the map to see a different portion. So i except the map to be resized to show a bigger portion of the whole map : no streching. -- Pierre-Alain Dorange<http://microwar.sourceforge.net/> Ce message est sous licence Creative Commons "by-n

Re: [tkinter] widget size adjustment

2016-06-21 Thread Pierre-Alain Dorange
cell where the canvas widget is put). I think i can resize the canvas, but i can't find a way to get the available space after resize. Perhaps using the grid manager is not the godd idea for that ? I except it was more understandable. -- Pierre-Alain Dorange<http://microwar.sourcef

Re: Can math.atan2 return INF?

2016-06-21 Thread Pierre-Alain Dorange
sed the correct quadrant (for angle answer). -- Pierre-Alain Dorange<http://microwar.sourceforge.net/> Ce message est sous licence Creative Commons "by-nc-sa-2.0" <http://creativecommons.org/licenses/by-nc-sa/2.0/fr/> -- https://mail.python.org/mailman/listinfo/python-list

[tkinter] widget size adjustment

2016-06-19 Thread Pierre-Alain Dorange
to do from that. Any clue or advice or tutorial ? -- Pierre-Alain Dorange<http://microwar.sourceforge.net/> Ce message est sous licence Creative Commons "by-nc-sa-2.0" <http://creativecommons.org/licenses/by-nc-sa/2.0/fr/> -- https://mail.python.org/mailman/listinfo/python-list

Re: [tkinter] widget size adjustment

2016-06-22 Thread Pierre-Alain Dorange
just CENTERED... I do not explore this, i just thought NSEW was also CENTERED. Many Thanks. -- Pierre-Alain Dorange<http://microwar.sourceforge.net/> Ce message est sous licence Creative Commons "by-nc-sa-2.0" <http://creativecommons.org/licenses/by-nc-sa/2.0/fr/&

Re: Can math.atan2 return INF?

2016-06-23 Thread Pierre-Alain Dorange
Steven D'Aprano <st...@pearwood.info> wrote: > > which infinity. There are many - some larger than others > > China has just announced a new supercomputer that is so fast it can run an > infinite loop in 3.7 seconds. Near a black hole 3.7 seconds can last an infinite time

Re: Can math.atan2 return INF?

2016-06-23 Thread Pierre-Alain Dorange
e maximum value. So the tendancy is always atan2(y,x) tend to pi/4 if you looks at lot od y and x that will be grater and greater each time : the final frontier would always be pi/4, even if t take a long time to reach it. -- Pierre-Alain Dorange<http://microwar.sourceforge.net/> C

Re: Break and Continue: While Loops

2016-06-24 Thread Pierre-Alain Dorange
hing". To be empty, something must exist first. -- Pierre-Alain Dorange Moof <http://clarus.chez-alice.fr/> Ce message est sous licence Creative Commons "by-nc-sa-2.0" <http://creativecommons.org/licenses/by-nc-sa/2.0/fr/> -- https://mail.python.org/mailman/listinfo/python-list

Re: Can math.atan2 return INF?

2016-06-24 Thread Pierre-Alain Dorange
Marko Rauhamaa <ma...@pacujo.net> wrote: > Note that the "valid point of view for external observers" is the only > valid scientific point of view. For a scientific point of view, right. But tell this to the one that will be close to a blackhole ;-) -- Pierre-Alain Dora

Re: Empty List

2016-06-27 Thread Pierre-Alain Dorange
izing you should do "something" that perhaps will fill the list (word.append("hello"). Then after do your job, you perhaps need to print it. But initializing and just print, will do nothing else than initialize and print the result... As state before this code more or

Re: Creating a calculator

2016-07-01 Thread Pierre-Alain Dorange
- More reduced : -- u=raw_input('Enter calculation:") print eval(u) -- works and compute : 1+2+3+4-1+4*2 2+3.0/2-0.5 Perform better and shorter, but less educationnal of course... -- Pierre-Alain Dorange

Re: Creating a calculator

2016-07-01 Thread Pierre-Alain Dorange
--- env={} env["__builtins__"] = None u=raw_input('Enter calculation:") print eval(u,env) - -- Pierre-Alain Dorange Moof <http://clarus.chez-alice.fr/> Ce message est sous licence Creative Commons "by-nc-sa-2.0" <http://creativecommons.org/licenses/by-nc-sa/2.0/fr/> -- https://mail.python.org/mailman/listinfo/python-list

Re: Creating a calculator

2016-07-04 Thread Pierre-Alain Dorange
DFS <nos...@dfs.com> wrote: > > 2 lines? Love it! > > But apparently eval==evil. > > http://nedbatchelder.com/blog/201206/eval_really_is_dangerous.html > > I bet you get hammered about it here on clp. It was a software to be deploy, it was just for educatio

Re: BeautifulSoup help !!

2016-10-07 Thread Pierre-Alain Dorange
eb site (vigiecrue) : retrieve the page, extract data, extract last river level and mean the 24h last levels. <https://www.dropbox.com/sh/k5974t374zmcoj6/AACes_Xo5DrxCbE1RjSaeKXYa?dl=0> Note : it was probably not beautiful python code, but it works for the purpose it was written. -- Pierre-Al

Re: How to process syntax errors

2016-10-14 Thread Pierre-Alain Dorange
previously, do not except python to understand your new syntax, just write a small interpreter to translate your new language to python. -- Pierre-Alain Dorange Moof <http://clarus.chez-alice.fr/> Ce message est sous licence Creative Commons "by-nc-sa-2.0" <h

Re: Python code is compiled before execution

2016-10-11 Thread Pierre-Alain Dorange
n and all kind of combinaison : strict interpretation, byte-code compilation, JIT compilation, AOT compilation... So yes Python compile (bytecode). -- Pierre-Alain Dorange Moof <http://clarus.chez-alice.fr/> Ce message est sous licence Creative Commons "by-nc-sa-2.0"

Re: Python code is compiled before execution

2016-10-11 Thread Pierre-Alain Dorange
reted language, and i found strange the initial request. And sure, i overinterpret or simplify thing (compiling)... But it seems that all this talk do not interested the initial requester (Mr Puneet) : at that time he has not answer to the thread. -- Pierre-Alain Dorange Moof <htt

Re: How to process syntax errors

2016-10-12 Thread Pierre-Alain Dorange
eur developer. But what confuse me, is that Python require "real live" interpratation of the code to work properly (or perhaps i also confuse on that but Python rely on interpretation of the code to conform to its own standard, ie variables can change type during execution...) -- Pierre-A

Re: How to process syntax errors

2016-10-11 Thread Pierre-Alain Dorange
means it is most definitely > meant to be able to be caught. Using compile() function yes. So yes there is a way to check "syntax error" before executing code (using compile function and exceptions) but it was not standard, nor widely used... It was still a hack for me, but perha

Re: How to process syntax errors

2016-10-10 Thread Pierre-Alain Dorange
requested but that only a hack and should not be used in real world. -- Pierre-Alain Dorange Moof <http://clarus.chez-alice.fr/> Ce message est sous licence Creative Commons "by-nc-sa-2.0" <http://creativecommons.org/licenses/by-nc-sa/2.0/fr/> -- https://mail.python.org/mailman/listinfo/python-list