Python-related Animation Packages?
Hello all, Does anyone know of software that might be of use in an attempt to animate an object undergoing 6-DOF rigid body motions: surge, sway, heave, roll, pitch and yaw? Thanks so much, Ben Racine -- http://mail.python.org/mailman/listinfo/python-list
Extending classes __init__behavior for newbies
I don't quite understand the interplay of the two different __init__ methods when trying to extend a class. Below is my hack attempt at doing so... class ship(object): def __init__(self,l=0,b=0,t=0,name=''): self.l = l self.b = b self.t = t self.namehttp://self.name = name def make_it_deeper(self,t): self.t = self.t - t class fast_ship(ship): def __init__(self,speed = 0): self.speed = speed my_ship = fast_ship(l = 100,b = 50, t = 10, name = 'cutter',speed = 10) If anyone would be so kind as to show me how to get the intended effect that I've hinted at, I would be most grateful, Ben -- http://mail.python.org/mailman/listinfo/python-list
Re: Trying to decide between PHP and Python
Cython/Sage is no small undertaking, but I have no idea how to measure relative success between that and hiphop. Ben On Jan 6, 2011, at 11:11 AM, John Nagle wrote: On 1/4/2011 12:20 PM, Google Poster wrote: About once a year, I have to learn yet another programming language. Given all the recommendations (an outstanding accolade from Bruce Eckel, author of Thinking in Java) I have set my aim to Python. Sounds kinda cool. If you're just doing simple web-based services, PHP is the way of least resistance. It's supported by almost all hosting services. Trying to run Python on shared hosting is generally painful. Either you're stuck running in CGI, which means you take the cost of a Python load on every transaction, or you have to find someone who will let you run long-running processes so you can run FCGI/WSGI or some Python framework. Efforts to compile PHP to hard code have been more successful than the corresponding efforts for Python. Facebook developed and uses their HipHop compiler for their huge internal PHP code base. John Nagle -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list
combined functionality of ipython's %whos and pdb's next (without a resource heavy IDE)
I am trying to combine the ability to move line-by-line through the code as is done with pdb's next function with ipython's ability to list all variables at once... without the use of a full-fledged IDE. I am not seeing how this might be done. Many thanks for your help... Ben Racine -- http://mail.python.org/mailman/listinfo/python-list
Re: measuring a function time
I just use ipython's functions (that are themselves just calls to the time module functions) for timing my functions... Enter: %timeit? or %time At the Ipython command prompt to get started. Ben R. On Jul 29, 2010, at 7:43 AM, D'Arcy J.M. Cain wrote: On Thu, 29 Jul 2010 08:45:23 -0400 Joe Riopel goo...@gmail.com wrote: On Thu, Jul 29, 2010 at 8:34 AM, Mahmood Naderan nt_mahm...@yahoo.com wrote: the output should be 7600 (s) for example. What is the best and easiest way to do that? Take a look at time.clock() I don't know if that's what he wants. The clock() method returns processor time, not wall time. Python 2.6.5 (r265:79063, Jul 8 2010, 16:01:18) [GCC 4.1.3 20080704 prerelease (NetBSD nb2 20081120)] on netbsd5 Type help, copyright, credits or license for more information. from time import time, clock, sleep t = time() print time() - t, clock() 0.000596046447754 0.03 sleep(3) print time() - t, clock() 3.03474903107 0.03 x = open(BIGFILE).read() print time() - t, clock() 10.2008538246 1.42 -- D'Arcy J.M. Cain da...@druid.net | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list
RE: What text editor is everyone using for Python
I use Textmate (with vim keybindings) on OS X or just vim on the others OS's. I still can't decide on which IDE between Wing, PyDev and Netbeans. Ben Racine -Original Message- From: python-list-bounces+bjracine=glosten@python.org [mailto:python-list-bounces+bjracine=glosten@python.org] On Behalf Of Dave Angel Sent: Tuesday, May 26, 2009 2:36 PM Cc: python-list@python.org; Lacrima Subject: Re: What text editor is everyone using for Python Lacrima wrote: I am new to python. And now I am using trial version of Wing IDE. But nobody mentioned it as a favourite editor. So should I buy it when trial is expired or there are better choices? I'm a little surprised nobody has explicitly mentioned Komodo IDE (the full version). Although it's not free, it has plenty of useful features, is very configurable, supports Python and a host of other languages, and is a full IDE with an out-of-process debugger. This means you can step through GUI code, without it interfering with the debugger's event loop. You can customize it in four ways: 1) through Edit-Preferences 2) through recorded macros 3) through macros written in Javascript 4) through macros written in Python A subset of Komodo IDE is available as Komodo Edit, which is open source. Apparently Komodo is developed from some of the same code base as Firefox, so they can be integrated more tightly when debugging internet stuff. I haven't tried anything of the sort, so I can't say how well this works, and for what. -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list
RE: Wing vs Netbeans IDE?
I'd love to see an updated shootout between these three, as I cannot for the life of me seem to be able to settle down with one of them. Things I don't like: Wing's lack of integrated mercurial/svn support. The clunkiness and scattered plugin approach of Eclipse (the latter is relavent when starting work on new machines all the time). Netbeans project browser doesn't show class or functions inside the files. Netbeans autocompletion doesn't seem immediately impressive. But... Wing has mentioned future support of svn,git,bazaar,mercurial,etc in the future. QT designer is integrated with Eclipse. So is Photran, which is convenient for some of science types. It seems that there are reasons to be optimistic about the future of netbeans. It seems to be well put together so far, but the least mature. I know that this comes up time and again, but I think a feature-specific debate over these might be worth revisiting for a lot of newcomers. Ben Racine -- http://mail.python.org/mailman/listinfo/python-list
RE: pylab quick reference? (matplotlib)
Not exactly what you've described, but I like this... I just spot the type of plot I'm looking for, copy the code, and I'm off... http://matplotlib.sourceforge.net/gallery.html I like this technique better than any formal documentation almost. Btw, there is a specific matplotlib list as well. https://lists.sourceforge.net/lists/listinfo/matplotlib-users Hope this helps, Ben R. -Original Message- From: python-list-bounces+bjracine=glosten@python.org [mailto:python-list-bounces+bjracine=glosten@python.org] On Behalf Of Esmail Sent: Wednesday, April 22, 2009 8:28 AM To: python-list@python.org Subject: pylab quick reference? (matplotlib) Hello all, Does anyone know of a quick reference for the various plotting functions for pylab? I'm just getting started with this after years of work with gnuplot. I found this http://matplotlib.sourceforge.net/api/pyplot_api.html which is very comprehensive and would be good for digging into specific commands. What I'm looking for is something small enough to print out ( 10-20 pages) that gives a sufficient overview so that I know what's available. I've looked on the web without much success. I'd be grateful if you have any pointers. Thanks! Esmail -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list
RE: Rounding to the nearest 5
Doesn't this work? round_by_5.py import sys def round_by_5(x= sys.argv[0]): x = x/5. x = round(x) x = x*5 print(x) return x Ben R. -Original Message- From: python-list-bounces+bjracine=glosten@python.org [mailto:python-list-bounces+bjracine=glosten@python.org] On Behalf Of D'Arcy J.M. Cain Sent: Friday, January 30, 2009 6:07 AM To: Steven D'Aprano Cc: python-list@python.org Subject: Re: Rounding to the nearest 5 On 30 Jan 2009 06:23:17 GMT Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: On Fri, 30 Jan 2009 00:24:47 -0500, D'Arcy J.M. Cain wrote: That appears to be rounding to nearest 10, not 5. Clarify your requirements first. Look again. 36 = 35. You are correct. I should have ommitted my first sentence and emphasized the second. :-) -- D'Arcy J.M. Cain da...@druid.net | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list
RE: New to python, open source Mac OS X IDE?
I've tried Wing IDE professional, vim, textmate, and PyDev and am intrigued by each one for different reasons. Whichever module browser I get more comfortable between Wing and PyDev/Eclipse is probably the direction I will end up going. Further, if I get the Hg and SVN plugins for PyDev/Eclipse up and running, I think I will probably go in that direction, but will probably still need to use a wxPython GUI constructor like BOA or Glade. I have vim key-bindings in all four, so at least I don't fumble over that. I really haven't been able to decide yet... You could go to showmedo.com in order to see ipython, wing and pydev/eclipse all in action. HTH, Ben -Original Message- From: python-list-bounces+bjracine=glosten@python.org [mailto:python-list-bounces+bjracine=glosten@python.org] On Behalf Of joseph.a.mar...@gmail.com Sent: Tuesday, January 27, 2009 4:14 PM To: python-list@python.org Subject: Re: New to python, open source Mac OS X IDE? On Jan 27, 6:47 pm, André andre.robe...@gmail.com wrote: On Jan 27, 7:06 pm, joseph.a.mar...@gmail.com joseph.a.mar...@gmail.com wrote: Greetings! I've heard enough raving about Python, I'm going to see for myself what all the praise is for! I'm on a Mac. I use Netbeans for Java, PHP, and C if needed. Do you even use an IDE for Python? If you already use netbeans, what abouthttp://www.netbeans.org/features/python/ ? Wow, you guys are fast... yes, I was having trouble deciding between that (Netbeans), Smultron, or TextWrangler. Thanks! -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list
RE: English-like Python
Doesn't ipython (the interactive shell) make this possible in some cases... not that's what you seem to be looking for exactly. Ben Racine -Original Message- From: python-list-bounces+bjracine=glosten@python.org [mailto:python-list-bounces+bjracine=glosten@python.org] On Behalf Of Aaron Brady Sent: Tuesday, January 20, 2009 10:14 AM To: python-list@python.org Subject: Re: English-like Python On Jan 17, 6:10 pm, The Music Guy music...@alphaios.net wrote: Wow, impressive responses. It sounds like the general consensus is that English would not be a good choice for programming even if there were an interpreter capable of turning human language into machine language. But that makes sense; even English professionals have trouble understanding each other sometimes. Until that problem is somehow overcome, there's not much hope of computers to overcome it. I think it would be a good step if you could make some sensible interpretation of a typical statement without its parentheses. f abc 123 -- f( abc, 123 ) It would be just the thing in a couple of situations... though it does conflict with raw-string literals as stated: rabc... which if you left open, would be susceptible to a local definition of r!. Maybe you could put it after, like numeric literals: 123L, abcr, which is not bad. -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list