Re: Pointers/References in Python?

2008-07-30 Thread Brian Blais
bytes more, but no copy after this, my python process takes about 80 meg. names like big_object are just names, and they reference an object in memory. if you say a=big_object, you are saying that the name "a" should also reference that same object.

read large zip file

2008-04-06 Thread Brian Blais
t one Is there a way to stream an unzip, so it behaves more like a file? thanks, Brian Blais -- Brian Blais [EMAIL PROTECTED] http://web.bryant.edu/~bblais -- http://mail.python.org/mailman/listinfo/python-list

Re: Frame work for simple physics web applications

2008-04-19 Thread Brian Blais
are you using matplotlib for the plots? bb -- Brian Blais [EMAIL PROTECTED] http://web.bryant.edu/~bblais -- http://mail.python.org/mailman/listinfo/python-list

Re: simple chemistry in python

2008-04-30 Thread Brian Blais
o read it into a python dict. It misses anything not a scalar, but you can easily modify it to include arrays, etc... in the xml. hope it's useful. certainly a neat site! bb -- Brian Blais [EMAIL PROTECTED] http://web.bryant.edu/~bblais from __f

framework build question for mac

2008-05-08 Thread Brian Blais
t link, I also had to manually re-point python, pydoc, idle, etc... in /usr/local/bin Is there a reason for this, or is it just a small oversight on the install script? thanks, Brian Blais -- Brian Blais [EMAIL PROTEC

Vacuum World version 1e-6alpha ;) released

2006-04-03 Thread Brian Blais
questions will get me a long way. Let me know what you think! Please be gentle, because this is really my first somewhat significant python project, so there is probably some cruft from my Matlab and C experience (stray semi-colons here and there, etc.) thanks,

teaching python using turtle module

2009-11-29 Thread Brian Blais
thanks, Brian Blais -- Brian Blais bbl...@bryant.edu http://web.bryant.edu/~bblais -- http://mail.python.org/mailman/listinfo/python-list

Re: [Edu-sig] teaching python using turtle module

2009-11-29 Thread Brian Blais
thod would be clearer. If-statements could possibly be used with some sort of random behavior (if rand()<0.5 ...). Drunkard's Walk. yes, that was the kind of thing I was thinking about. thanks! bb -- Brian Blais bbl...@bryant.edu http://web.bryant.e

Re: Python Concurrency Workshop, Jan 14-15, 2010

2010-01-02 Thread Brian Blais
both places at the same time. bb -- Brian Blais bbl...@bryant.edu http://web.bryant.edu/~bblais http://bblais.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

turtle, ipython, and pylab don't mix

2010-01-20 Thread Brian Blais
more of a pain for my students. thanks, Brian Blais -- Brian Blais bbl...@bryant.edu http://web.bryant.edu/~bblais http://bblais.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

some turtle questions

2010-01-24 Thread Brian Blais
turtle can travel? it seems I can keep moving off of the screen. Is there a way to make it so that a forward(50) command, at the edge, either raises an exception (at the wall) or simply doesn't move the turtle because of the limit? thanks! bb -- Brian Blai

sympy returns a dictionary sometimes, and sometimes a list of tuples...why?

2009-09-30 Thread Brian Blais
n, but I'd like to know what is a solution for x, and for y. Why isn't it in a dictionary? Am I doing something wrong? thanks, Brian Blais -- Brian Blais bbl...@bryant.edu http://web.bryant.edu/~bblais -- http://mail.python.org/mailman/listinfo/python-list

Re: The rap against "while True:" loops

2009-10-12 Thread Brian Blais
On Oct 12, 2009, at 15:18 , Falcolas wrote: Glad to hear, by the way, that you don't use gotos in Python. =D actually, it is there. http://entrian.com/goto/ I particularly like the comefrom construct! bb -- Brian Blais bbl...@bryant.edu http://web.bryant.edu/~b

Re: xmlrpc idea for getting around the GIL

2009-11-24 Thread Brian Blais
any sample code? bb -- Brian Blais bbl...@bryant.edu http://web.bryant.edu/~bblais -- http://mail.python.org/mailman/listinfo/python-list

odd drawing problem with turtle.py

2010-01-31 Thread Brian Blais
turtle.circle(self.r) self.turtle.fill(False) self.turtle.penup() for i in range(5): c=Circle(randint(-350,350),randint(-250,250),10,"red") T=Turtle() T.forward(100) T.forward(100) thanks, bb -- Bria

Re: [Edu-sig] odd drawing problem with turtle.py

2010-02-01 Thread Brian Blais
bb On Sun, Jan 31, 2010 at 4:27 PM, Brian Blais wrote: I'm on Python 2.5, but using the updated turtle.py Version 1.0.1 - 24. 9. 2009. The following script draws 5 circles, which it is supposed to, but then doesn't draw the second turtle which is supposed to simply move fo

mouse input in turtle module

2010-02-03 Thread Brian Blais
n or return a button=-1 or something. thanks, Brian Blais -- Brian Blais bbl...@bryant.edu http://web.bryant.edu/~bblais http://bblais.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

multiprocessing and games

2010-02-13 Thread Brian Blais
king about this incorrectly. Any help would be great! Pointers to other examples of using multiprocessing, especially with games, would be fantastic. thanks, Brian Blais -- Brian Blais bbl...@bryant.edu http://web.bryant.edu/~bblais http://bblais.blogs

Re: multiprocessing and games

2010-02-13 Thread Brian Blais
On Feb 13, 2010, at 12:54 , MRAB wrote: Brian Blais wrote: I've been thinking about implementing some simple games Forget about global variables, they're not worth it! :-) Think in terms of messages, sent via pipes, sockets or multiprocessing queues. okay...let's mak

Re: Some syntactic sugar proposals

2010-11-15 Thread Brian Blais
too!" x=3.2 if x in range(1,10): print "yay!" if 1<=x<10: print "yay too!" output: yay! yay too! yay too! bb -- Brian Blais bbl...@bryant.edu http://web.bryant.edu/~bblais http://bblais.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

packaging and installing

2010-12-13 Thread Brian Blais
my own (1-line) .bat file, but I didn't want to reinvent the wheel. Perhaps there is a better way for me to do this, ideally in a platform independent way. thanks, Brian Blais -- Brian Blais bbl...@bryant.edu http://web.bryant.edu/~bblais http:/

Re: packaging and installing

2010-12-14 Thread Brian Blais
On Dec 13, 2010, at 12:30 PM, Godson Gera wrote: > > > On Mon, Dec 13, 2010 at 10:46 PM, Brian Blais wrote: >> Hello, >> >> I was wondering if there is any standard or suggested way of installing >> packages *without* going to the commandline. I often

Re: Incorrect scope of list comprehension variables

2010-04-04 Thread Brian Blais
nd skimmed the section: http://docs.python.org/tutorial/datastructures.html which describes list comps, and didn't see any mention of this behavior. it's probably there, but it certainly doesn't jump out. bb -- Brian Blais bbl...@bryant.edu http://web.

Re: Download Visual Studio Express 2008 now

2010-04-16 Thread Brian Blais
isual Studio to do it? bb -- Brian Blais bbl...@bryant.edu http://web.bryant.edu/~bblais http://bblais.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: GUIs - A Modest Proposal

2010-06-09 Thread Brian Blais
me the standard. I guess that answers that one! :) bb -- Brian Blais bbl...@bryant.edu http://web.bryant.edu/~bblais http://bblais.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: GUIs - A Modest Proposal

2010-06-10 Thread Brian Blais
On Jun 10, 2010, at 4:28 , Gregory Ewing wrote: Brian Blais wrote: In this whole discussion, I haven't seen anyone mention wax (http:// zephyrfalcon.org/labs/wax_primer.html) Just had a quick look at that. In the third example code box: def Body(self): self.te

dynamically modify help text

2010-06-27 Thread Brian Blais
shown if one does: help(myobject) thanks, Brian Blais -- Brian Blais bbl...@bryant.edu http://web.bryant.edu/~bblais http://bblais.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: dynamically modify help text

2010-06-28 Thread Brian Blais
On Jun 27, 2010, at 22:37 , Red Forks wrote: Read you doc file and set the __doc__ attr of the object you want to change. On Monday, June 28, 2010, Brian Blais wrote: I know that the help text for an object will give a description of every method based on the doc string. Is there a way

Re: dynamically modify help text

2010-06-28 Thread Brian Blais
, Chris so that gets back to my original question: can I change this text at runtime. Doesn't look like I can, because it is defined for classes rather than instances. Am I thinking about this correctly? bb -- Brian Blais bbl...@bryant.edu http://web.bryant.edu/~b

Re: I strongly dislike Python 3

2010-06-30 Thread Brian Blais
rens are a bit more irritating than just a print 2) in my quick-and-dirty scripts, I often want to get rid of all of the prints after it works. 3) being able to redefine print vastly outweighs the irritation caused by the extra parens bb -- Brian Blais bbl...@bryan

Re: random number generation

2010-08-16 Thread Brian Blais
e, True], [ True, False, True, False, False, False, False], [False, False, False, False, False, False, False]], dtype=bool) just like matlab. bb -- Brian Blais bbl...@bryant.edu http://web.bryant.edu/~bblais http://bblais.blogspot.com/ -- http://mail.python.org

Re: Save/load like matlab?

2010-08-23 Thread Brian Blais
for two open source projects that I own: http://code.google.com/p/ssdf/ this is fantastic! what a great format! I've been looking for something like this for quite some time. thanks! bb -- Brian Blais bbl...@bryant.edu http://web.bryant.edu/~bblais

Re: easy question, how to double a variable

2009-09-23 Thread Brian Blais
twice("an int parameter") -- Brian Blais bbl...@bryant.edu http://web.bryant.edu/~bblais -- http://mail.python.org/mailman/listinfo/python-list

unicode problem?

2010-10-09 Thread Brian Blais
codeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 0: ordinal not in range(128) am I doing something stupid here? of course, as a workaround, I can do: ''.join([c for c in s if ord(c)<128]) but I thought the encode call should work.

drawing with the mouse with turtle

2010-11-12 Thread Brian Blais
.x,event.y) turtle.reset() turtle.speed(0) c=turtle.getcanvas() c.bind("", gothere) turtle.pendown() but this seemed to draw in the wrong place (like the coordinates were wrong). Is there a good way to do this? thanks, bb -- Brian Blais bb

Re: drawing with the mouse with turtle

2010-11-12 Thread Brian Blais
On Nov 12, 2010, at 8:05 PM, Steven D'Aprano wrote: > On Fri, 12 Nov 2010 19:24:50 -0500, Brian Blais wrote: > >> I'd like to draw on a turtle canvas, but use the mouse to direct the >> turtle. I don't see a good way of getting the mouse coordinates and the

Re: drawing with the mouse with turtle

2010-11-13 Thread Brian Blais
On Nov 13, 2010, at 1:31 AM, Dennis Lee Bieber wrote: > On Fri, 12 Nov 2010 20:48:34 -0500, Brian Blais > declaimed the following in gmane.comp.python.general: > >> turtle.ondrag(turtle.goto) >> turtle.pendown() >> >> > I'm not familiar with th

Re: drawing with the mouse with turtle...solved?

2010-11-13 Thread Brian Blais
On Nov 12, 2010, at 8:48 PM, Brian Blais wrote: > > On Nov 12, 2010, at 8:05 PM, Steven D'Aprano wrote: > >> On Fri, 12 Nov 2010 19:24:50 -0500, Brian Blais wrote: >> >>> I'd like to draw on a turtle canvas, but use the mouse to direct the >>&g

<    1   2