Re: a more precise distance algorithm

2015-05-27 Thread Brian Blais
On Mon, May 25, 2015 at 11:11 PM, Steven D'Aprano wrote: > > Let's compare three methods. > > def naive(a, b): > return math.sqrt(a**2 + b**2) > > def alternate(a, b): > a, b = min(a, b), max(a, b) > if a == 0: return b > if b == 0: return a > return a * math.sqrt(1 + b**2 /

Re: 3 Suggestions to Make Python Easier For Children

2014-08-05 Thread Brian Blais
On Sat, Aug 2, 2014 at 2:45 AM, Mark Summerfield wrote: > Last week I spent a couple of days teaching two children (10 and 13 -- too > big an age gap!) how to do some turtle graphics with Python. Neither had > programmed Python before -- one is a Minecraft ace and the other had done > Scratch.

paper submission and versioning system - advice?

2012-02-20 Thread Brian Blais
has to be available tools like this, but I am not even sure what such a system is called. Is there anything like this, in python preferably? thanks, Brian Blais -- Brian Blais bbl...@gmail.com http://web.bryant.edu/~bblais http://brianblais.wordpr

Re: What is xrange?

2011-07-30 Thread Brian Blais
pers are lazy, or bored! bb > > > > -- > Steven > > -- > http://mail.python.org/mailman/listinfo/python-list -- Brian Blais bbl...@bryant.edu http://web.bryant.edu/~bblais http://bblais.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: What is xrange?

2011-07-30 Thread Brian Blais
current implementation that wouldn't work as a generator? bb -- Brian Blais bbl...@bryant.edu http://web.bryant.edu/~bblais http://bblais.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: TextWrangler "run" command not working properly

2011-04-15 Thread Brian Blais
/python it's better to use the former, as it will work even as you change versions, etc... You should avoid using the shebang with a *specific* python version. just use #!/usr/bin/env python bb -- Brian Blais bbl...@bryant.edu http:/

Re: May I discuss here issues on Machine Learning?

2011-03-23 Thread Brian Blais
able to suggest more efficient libraries to call for doing these sorts of models. bb -- Brian Blais bbl...@bryant.edu http://web.bryant.edu/~bblais http://bblais.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: writing command-line options into file

2011-03-14 Thread Brian Blais
23) parser.add_option("--opt2", metavar="YOUR_OPTION2" ,default= "abc") parser.add_option("--opt3", metavar="FLAG", default=True) parser.save('test.yaml') newparser=MyOptionParser() newparser.load('test.yaml') bb -- Brian Blais bbl...@bryant.edu http://web.bryant.edu/~bblais http://bblais.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

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

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: 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

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

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

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

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

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.

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: 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: 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: 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: 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

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: 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

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: 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: 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: 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

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

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

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

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

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

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

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

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

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: 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

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

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: 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

Re: easiest way to plot x,y graphically during run-time?

2009-06-03 Thread Brian Blais
0+0.1*cos(t) y=y0+0.1*sin(t) if t==0: # first time calling h=plot(x,y,'o') else: h[0].set_data(x,y) draw() bb -- Brian Blais bbl...@bryant.edu http://web.bryant.edu/~bblais -- http://mail.python.org/mailman/listinfo/python-list

Re: What text editor is everyone using for Python

2009-05-26 Thread Brian Blais
http://wiki.python.org/moin/PythonEditors and see how it works for you. Depending on what you need, and how they "feel", you may find what you want with a free editor. bb -- Brian Blais bbl...@bryant.edu http://web.bryant.edu/~bbl

Re: What text editor is everyone using for Python

2009-05-26 Thread Brian Blais
g war. Jean-Michel I've heard notepad is pretty good. http://www.notepad.org/ I'm sorry, but ed is the standard editor[1]. :) bb [1] http://en.wikipedia.org/wiki/Ed_(text_editor) -- Brian Blais bbl...@bryant.edu http://web.bryant.edu/~bbl

Re: Is there a programming language that is combination of PythonandBasic?

2009-04-19 Thread Brian Blais
On Apr 19, 2009, at 4:35 , Hendrik van Rooyen wrote: Brian Blais wrote: On Apr 18, 2009, at 5:44 , Hendrik van Rooyen wrote: to untangle some spaghetti code. He did not mention if the spaghetti was actually doing it's job, bug free, which IMO is the only rational test for the qu

Re: Is there a programming language that is combination of Python andBasic?

2009-04-18 Thread Brian Blais
he program, because the flow jumps around. It's not just about aesthetics, but about being able to work with a piece of code. bb -- Brian Blais bbl...@bryant.edu http://web.bryant.edu/~bblais -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a programming language that is combination of Python and Basic?

2009-04-17 Thread Brian Blais
. bb -- Brian Blais bbl...@bryant.edu http://web.bryant.edu/~bblais -- http://mail.python.org/mailman/listinfo/python-list

Re: Reference or Value?

2009-02-23 Thread Brian Blais
won't work: it doesn't mutate the objects at all. In the case of a list or a dict, then one can mutate them, and the changes are seen in the caller. In both cases, the object itself is passed the same way. bb -- Brian Blais bbl...@bryant.edu http://web

Re: Keeping the Console Open with IDLE

2009-02-20 Thread Brian Blais
dvice already posted, by running it directly from the commandline. Another hack is to put: x=raw_input("pausing...") at the end of your script, but this is really a hack and it would be better to use a different solution. bb -- Brian Blais bbl...@

Re: simple web app, where to start

2009-02-08 Thread Brian Blais
apps with it. bb -- Brian Blais bbl...@bryant.edu http://web.bryant.edu/~bblais -- http://mail.python.org/mailman/listinfo/python-list

Re: MacPython 2.5 IDLE font size

2009-02-08 Thread Brian Blais
esn't show. What I did was to manually edit the file: /Library/Frameworks/Python.framework/Versions/Current/lib/python2.5/ idlelib/config-main.def to include the lines: font= monaco font-size= 13 font-bold= 0 (can't remember what the default was). bb

Re: Recommendation for a small web framework like Perl's CGI::Application to run as CGI?

2009-01-28 Thread Brian Blais
Perl's CGI::Application? Or would it just be better to roll my own? I'd strongly suggest webpy (http://webpy.org/). It is easy, works with CGI, FastCGI, etc... or you can run its own built-in server. It's very nice! bb -- Brian Blais bbl...@

modify IDLE?

2009-01-19 Thread Brian Blais
cking around with the IDLE code something easy, or a bit of a challenge? thanks, Brian Blais -- Brian Blais bbl...@bryant.edu http://web.bryant.edu/~bblais -- http://mail.python.org/mailman/listinfo/python-list

Re: multiply each element of a list by a number

2008-12-26 Thread Brian Blais
go to www.enthought.com and they have a single-download package geared specifically for scientists. bb -- Brian Blais bbl...@bryant.edu http://web.bryant.edu/~bblais -- http://mail.python.org/mailman/listinfo/python-list

Re: Mathematica 7 compares to other languages

2008-12-11 Thread Brian Blais
t use numpy: from numpy import * def normal(x): return x/sqrt(x.sum()) or something like that. bb -- Brian Blais bbl...@bryant.edu http://web.bryant.edu/~bblais -- http://mail.python.org/mailman/listinfo/python-list

Re: Python for kids?

2008-12-07 Thread Brian Blais
/writing/snake-wrangling-for-kids/ it's specifically for Python, and geared for the age of your son. bb -- Brian Blais [EMAIL PROTECTED] http://web.bryant.edu/~bblais -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido's new method definition idea

2008-12-07 Thread Brian Blais
ot;possibly missing 'self' argument." bb -- Brian Blais [EMAIL PROTECTED] http://web.bryant.edu/~bblais -- http://mail.python.org/mailman/listinfo/python-list

Re: Can I load a python program at the interactive >>> prompt?

2008-12-05 Thread Brian Blais
you should be able to right-click and choose Edit/Paste. Not too convenient, but I think it works. bb -- Brian Blais [EMAIL PROTECTED] http://web.bryant.edu/~bblais -- http://mail.python.org/mailman/listinfo/python-list

Re: plot for sale

2008-11-11 Thread Brian Blais
t for more details. bb -- Brian Blais [EMAIL PROTECTED] http://web.bryant.edu/~bblais -- http://mail.python.org/mailman/listinfo/python-list

Re: Sorting a list

2008-10-28 Thread Brian Blais
YZ","ABC"]) In [2]:sortedList = unsortedList.sort() In [3]:print sortedList None In [4]:print unsortedList ['ABC', 'XYZ'] or, better, just: In [5]:unsortedList = list(["XYZ","ABC"]) In [6]:unsortedList.sort() In [7]:print unsortedList [

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.

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.

Re: a simple 'for' question

2008-07-08 Thread Brian Blais
s: filename='my/path/way/%s/my_file.txt' % x fid=open(filename,'r') also, make sure that you do mean the relative path my/path/way/... # in current folder as opposed to the absolute path: /my/path/way # in root folder

Re: Python is slow

2008-05-23 Thread Brian Blais
moving code from Matlab. I haven't regretted it since. bb -- Brian Blais [EMAIL PROTECTED] http://web.bryant.edu/~bblais -- http://mail.python.org/mailman/listinfo/python-list

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

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

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

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: Joseph Weizenbaum

2008-03-14 Thread Brian Blais
What is Eliza? You: What is Eliza? Eliza: Does that question interest you? (http://www-ai.ijs.si/eliza/eliza.html) bb -- Brian Blais [EMAIL PROTECTED] http://web.bryant.edu/~bblais -- http://mail.python.org/mailman/listinfo/python-list

load movie frames in python?

2008-01-29 Thread Brian Blais
convenient would be avi, mov, and flv (for youtube videos). thanks, Brian Blais -- Brian Blais [EMAIL PROTECTED] http://web.bryant.edu/~bblais -- http://mail.python.org/mailman/listinfo/python-list

packaging questions

2008-01-09 Thread Brian Blais
Brian Blais -- Brian Blais [EMAIL PROTECTED] http://web.bryant.edu/~bblais -- http://mail.python.org/mailman/listinfo/python-list

problem building simple package with extensions in Windows, but not OS X

2008-01-09 Thread Brian Blais
on="Here is a description", author="Brian Blais", ext_modules=[ Extension("myproject/train",["myproject/train.pyx"]), ], packages=['myproject'], cmdclass = {'build_ext': build_ext} ) and my project has one directory, m

Re: pass 3D Matrix from matlab to C mex- file

2007-12-19 Thread Brian Blais
out the mex documentation. Or, you can use Python with numpy for matrices, and use Pyrex for the c-extensions and make your life a *lot* easier. bb -- Brian Blais [EMAIL PROTECTED] http://web.bryant.edu/~bblais -- http://mail.python.org/mailman/listinfo

Re: "do" as a keyword

2007-12-12 Thread Brian Blais
if Touched(): break but somehow that feels wrong to me, like bypassing the point of the while: all that power to check for conditions, and you just use it to check True, and then use a break inside. It's readable, I guess, but not a programming construct I am immediately drawn to.

Re: How to Teach Python "Variables"

2007-11-27 Thread Brian Blais
t is implemented. So when you say: a=1 it is *really* a pointer to a 1-object, and that b=1 points to the same 1-object. In [4]:id(a) Out[4]:25180552 In [5]:b=1 In [6]:id(b) Out[6]:25180552 bb -- Brian Blais [EMAIL PROTECTED] http://web.brya

which tool to use?

2007-11-11 Thread Brian Blais
of thing, preferably customizable in Python? I can be more specific about my requirements if that would help. thanks, Brian Blais -- Brian Blais [EMAIL PROTECTED] http://web.bryant.edu/~bblais -- http://mail.python.org/mailman/listinfo/python-list

advice for threaded/parallel application

2007-11-03 Thread Brian Blais
putting a lot of time into the development. Any advice for this sort of thing? Brian Blais -- Brian Blais [EMAIL PROTECTED] http://web.bryant.edu/~bblais -- http://mail.python.org/mailman/listinfo/python-list

Re: compiler module bug?

2007-10-21 Thread Brian Blais
On Oct 21, 2007, at Oct 21:2:05 PM, Gabriel Genellina wrote: The parseFile function does exactly that, along with this comment: thanks! bb -- Brian Blais [EMAIL PROTECTED] http://web.bryant.edu/~bblais -- http://mail.python.org/mailman/listinfo/python-list

Re: compiler module bug?

2007-10-21 Thread Brian Blais
On Oct 21, 2007, at Oct 21:1:15 PM, Gabriel Genellina wrote: En Sun, 21 Oct 2007 13:36:46 -0300, Brian Blais <[EMAIL PROTECTED]> escribi�: I am experiencing a problem with the compiler module. Is this a bug, or am I doing something wrong? I think it's a well-known fact... it s

compiler module bug?

2007-10-21 Thread Brian Blais
def main(): a=10 # comment at the end of the file it seems like a comment at the end breaks the parse command, but not parseFile. Is this reproducible by others? am I doing something wrong? thanks, Brian Blais -- Brian Blais [EMAIL PROTE

Re: Best way to generate alternate toggling values in a loop?

2007-10-18 Thread Brian Blais
readability of it: value='Even' other_value='Odd' for i, (id,name) in enumerate(result): stringBuffer.write(''' %d %s ''' % (value,id,name) value,other_value=other_value,value # swap the value

where to put application-specific data files?

2007-10-11 Thread Brian Blais
nt to save user- configuration files, is there a recommended procedure/place for these? thanks, Brian Blais -- Brian Blais [EMAIL PROTECTED] http://web.bryant.edu/~bblais -- http://mail.python.org/mailman/listinfo/python-list

distutils and development workflow

2007-08-03 Thread Brian Blais
it isn't portable, so I'd like to learn how I am supposed to do it. thanks, Brian Blais -- Brian Blais [EMAIL PROTECTED] http://web.bryant.edu/~bblais -- http://mail.python.org/mailman/listinfo/python-list

Re: Tix not properly installed on OS X?

2007-07-24 Thread Brian Blais
nough to have the headers from the source of tcl? I just don't want to break something that is already there. thanks! bb -- Brian Blais [EMAIL PROTECTED] http://web.bryant.edu/~bblais -- http://mail.python.org/mailman/listinfo/python-list

Tix not properly installed on OS X?

2007-07-24 Thread Brian Blais
rections seems a bit daunting, and I don't want to mess up something that is already there. Can someone help me? thanks, Brian Blais -- Brian Blais [EMAIL PROTECTED] http://web.bryant.edu/~bblais -- http://mail.python.org/mailman/listinfo/python-list

Re: good matlab interface

2007-07-02 Thread Brian Blais
On Jun 30, 2007, at 2:31 AM, felix seltzer wrote: > Does any one know of a good matlab interface? > I would just use scipy or numpy, but i also need to use > the matlab neural network functions. I have tried PyMat, but am > having > a hard time getting it to install correctly. > What problems

database design help

2007-06-23 Thread Brian Blais
equence field? Am I thinking about this correctly? Is there a resource I can read that goes through any of this? thanks, Brian Blais -- - [EMAIL PROTECTED] http://web.bryant.edu/~bblais -- http://mail.python.org/mailman/listinfo/python-list

pickling problem

2007-06-07 Thread Brian Blais
dict, and take out all of the non-pickleable objects? I could replace them with something else (a tag of some sort, for me to reconstruct things later). thanks, Brian Blais -- - [EMAIL PROTECTED] http://web.

Re: Python and GUI

2007-05-24 Thread Brian Blais
rward, practical, and pythonic solution out there. Do others think like me here? thanks, Brian Blais -- - [EMAIL PROTECTED] http://web.bryant.edu/~bblais -- http://mail.python.org/mailman/listinfo/python-list

Re: Cherrypy setup questions

2007-05-23 Thread Brian Blais
fumanchu wrote: > > No, you're not missing anything; my fault. I wasn't very awake when I > wrote that, I guess. Don't include the hostname, just write: > > sn = '/~myusername/apps' > cherrypy.quickstart(Root(), sn, config) > yay! Thanks, that works perfectly.

Re: Cherrypy setup questions

2007-05-23 Thread Brian Blais
fumanchu wrote: > On May 22, 6:38 pm, Brian Blais <[EMAIL PROTECTED]> wrote: >> I'd like to start trying out some cherrypy apps, but I've >> been having some setup problems. I think I need some >> bone-head simple example to clear my understanding. :) &

Cherrypy setup questions

2007-05-22 Thread Brian Blais
for port 8080, or is there only one, and the two apps share it? Are there any examples that show such a setup? I didn't see a CherryPy mailing list, so I'm posting here, but if there is somewhere else better I'd be glad to know!

Re: Organizing code - import question

2007-05-03 Thread Brian Blais
Carlos Hanson wrote: > It looks like you need __init__.py in MyPackage. Then you can import > starting with MyPackage. For example, you might use one of the > following: > > import MyPackage > from MyPackage.Common import * > etc > that means that MyPackage must be in the sys path too?

Organizing code - import question

2007-05-03 Thread Brian Blais
ying the code from Common into the other two directories, and making a link to the Part1 directory in the Part2 so I can import it. There must be a better way, yes? thanks, Brian Blais -- - [

python and COM

2007-04-27 Thread Brian Blais
led". I have no idea how to get this to point to a python function, so I can make the AdxList.OnUpdate call python code. Is there a tutorial somewhere about this stuff, or is there a proper place to ask such questions? thanks, Brian Blais -- --

minimum age to learn python (a.k.a graphical vs text languages)

2007-03-10 Thread Brian Blais
responses from people who have experience teaching programming in elementary/middle (or even high) school. Do graphical languages make a big difference? Do text-based languages put up barriers to young learners? Is it no big deal either way? thanks,

CherryPy + Database questions

2007-03-05 Thread Brian Blais
, Brian Blais -- - [EMAIL PROTECTED] http://web.bryant.edu/~bblais -- http://mail.python.org/mailman/listinfo/python-list

Re: CherryPy/Turbogears on server not controlled by me

2007-02-22 Thread Brian Blais
Jorge Vargas wrote: > On 2/20/07, Brian Blais <[EMAIL PROTECTED]> wrote: >> I was wondering if there is a way to run CherryPy/Turbogears on a >> server that I don't >> have root access to. > > I have never run ANY webapp as root. you should follow that adv

CherryPy/Turbogears on server not controlled by me

2007-02-20 Thread Brian Blais
ctant to make changes...it took me a couple months to get them to upgrade to 2.4 from 2.3 last year, even when 2.5 was out. thanks, Brian Blais -- - [EMAIL PROTECTED] http://web.bryant.edu/~bblais --

Re: huge amounts of pure Python code broken by Python 2.5?

2007-02-10 Thread Brian Blais
ck out the cool new features. thanks, Brian Blais -- - [EMAIL PROTECTED] http://web.bryant.edu/~bblais -- http://mail.python.org/mailman/listinfo/python-list

Re: Need better run/edit method. I have to restart the shell after every script change.

2007-01-11 Thread Brian Blais
E" to start editing it directly. You shouldn't save things as .txt, because then IDLE will not recognize it is python you are writing, and the right-click trick probably won't work either. You should never use Notepad, because it is just icky, and doesn't know about any pro

  1   2   >