Re: Is there anyway to uninstall vPython?
kirby urner <[email protected]> Sun, 26 Aug 2012 12:10:52 -0700
| Newsgroups | gmane.comp.python.visualpython.user |
|---|---|
| Message-ID | <CAPJgG3Sw_1tD=8XKUZ35c5hd5fysQuoZiRDU3EBnN_dtZVT8+Q@mail.gmail.com> |
On Sun, Aug 26, 2012 at 11:48 AM, M Hartman <[email protected]> wrote: > That's what I'm using is PyCharm and it seems to be so much better than > Eclipse/PyDev, at least for a beginner. Anyway, is that the whole library in > /Lib/site-packages/visual? Does it install anything somewhere else? Also, I > see the visual directory but for some reason, I cannot import anything from > this directory, as I get errors in PyCharms built-in console. This is the > particular error: > > Traceback (most recent call last): > File "C:/Users/airspoon/PycharmProjects/goo/vis.py", line 1, in <module> > from visual import * > File "C:\Python32\lib\site-packages\visual\__init__.py", line 1, in > <module> > from .visual_all import * > File "C:\Python32\lib\site-packages\visual\visual_all.py", line 1, in > <module> > from vis import version > File "C:\Users\airspoon\PycharmProjects\goo\vis.py", line 3, in <module> > floor = Box (pos=(0,0,0), length=4, height=0.5, width=4, > color=color.blue) > NameError: name 'Box' is not defined > > > This is what I get when I copy and paste the 'bouncing ball' example from > the vPython website. Isn't that telling me that it can't import anything > from the visual library? > > Thanks for the help > In my version of bounce.py, Box is lowercase: from visual import * floor = box(length=4, height=0.5, width=4, color=color.blue) ball = sphere(pos=(0,4,0), color=color.red) ball.velocity = vector(0,-1,0) dt = 0.01 while 1: rate(100) ball.pos = ball.pos + ball.velocity*dt if ball.y < 1: ball.velocity.y = -ball.velocity.y else: ball.velocity.y = ball.velocity.y - 9.8*dt There is not Box I don't think: >>> from visual import Box Traceback (most recent call last): File "<pyshell#0>", line 1 from visual import Box ImportError: cannot import name Box Kirby ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/