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

packaging programs

2006-07-11 Thread Brian Blais
numpy/matplotlib, is there something which will locally package these modules to distribute with the program? What are the options here? Are there any good docs for this? thanks, Brian Blais -- - [EMAIL PROTECTED] http://web.bryant.edu/~bblais --

advice for web-based image annotation

2006-10-19 Thread Brian Blais
verse to learning the database end, but I don't want to climb that hill unless I feel there is a significant benefit. I don't have admin rights on the server, if that makes a difference. Any suggestions would be greatly appreciated! thanks,

Re: advice for web-based image annotation

2006-10-20 Thread Brian Blais
Paul Rubin wrote: > Brian Blais <[EMAIL PROTECTED]> writes: >> I want to set up a system where I can have my family members write >> comments about a number of pictures, as part of a family tree project. >> ...Any suggestions would be greatly appreciated! > > How

idle with ipython

2006-11-02 Thread Brian Blais
h. thanks, Brian Blais -- - [EMAIL PROTECTED] http://web.bryant.edu/~bblais -- http://mail.python.org/mailman/listinfo/python-list

setting up wxPython on a Mac

2006-11-03 Thread Brian Blais
know Macs all that well, but is there something similar? Thanks, Brian Blais -- - [EMAIL PROTECTED] http://web.bryant.edu/~bblais -- http://mail.python.org/mailman/listinfo/python-list

Re: setting up wxPython on a Mac

2006-11-03 Thread Brian Blais
Kevin Walzer wrote: > Brian Blais wrote: >> Hello, >> >> I have a wxPython program that I would like to give to a friend of mine >> who has a Mac. Is there a resource out there that can tell me what >> steps I need to follow to do this? >> > Install Py

python to NQC converter?

2006-05-31 Thread Brian Blais
thinking that 90% of it could be done by converting indentation to {}, cdef int X to int X declarations at the top, and other simple text-replace features. Brian Blais -- - [EMAIL PROTECTED] http://web.bryant.edu/~bblais -- http

replace a method in class: how?

2006-06-26 Thread Brian Blais
thanks, Brian Blais -- - [EMAIL PROTECTED] http://web.bryant.edu/~bblais -- http://mail.python.org/mailman/listinfo/python-list

pyrex functions to replace a method (Re: replace a method in class: how?)

2006-06-27 Thread Brian Blais
Thanks for all who replied to this question about replacing a method. I feel a little sheepish for not having caught that I have to replace it in the class, not the instance, but I have found a very similar problem trying to replace a method using a function defined in pyrex. I post all of

Re: [Pyrex] pyrex functions to replace a method (Re: replace a method in class: how?)

2006-06-28 Thread Brian Blais
Greg Ewing wrote: > Brian Blais wrote: >> I have found a very similar problem trying to replace a method using a >> function defined in pyrex. > > > What *should* work is to define the method inside a > class in Pyrex (plain class, not extension type) and >

Re: Does Python provide "Struct" data structure?

2006-09-22 Thread Brian Blais
Daniel Mark wrote: > > 1> Does Python provide such Struct in this standard libary. > Python has "4.3 struct -- Interpret strings as packed binary data", but > it looks like different > from what I really want to get. I like the following version: class Struct(dict): def __getattr__(self,na

Re: About alternatives to Matlab

2006-11-17 Thread Brian Blais
-colons at the ends of the Matlab lines, and all of your arrays will display and scroll like crazy on your screen. :) thanks all for making such a great set of tools! Brian Blais -- - [EMAIL PROTECTED] http://web.bryant.edu/~bblais -- http://mail.python.org/mailman/listinfo/python-list

Re: About alternatives to Matlab

2006-11-25 Thread Brian Blais
Phil Schmidt wrote: > > I'd love to use Python, but I'm not comfortable with the hardware side > of that. I'm certain that most, if not all data acquisition hardware > comes with DLL drivers, which I could interface with using ctypes. I'm > concerned though about spending more time messing around

automatically grading small programming assignments

2006-12-14 Thread Brian Blais
ow do others who teach Python handle this? thanks, Brian Blais -- - [EMAIL PROTECTED] http://web.bryant.edu/~bblais -- http://mail.python.org/mailman/listinfo/python-list

Re: automatically grading small programming assignments

2006-12-14 Thread Brian Blais
[EMAIL PROTECTED] wrote: > [EMAIL PROTECTED] wrote: > Then on your PC you can >> run a script that loads each of such programs, and runs a good series >> of tests, to test their quality... > What happens if someone-- perhaps not even someone in the class-- does > some version of os.system('rm -Rf /

Re: automatically grading small programming assignments

2006-12-14 Thread Brian Blais
Paddy wrote: > It might turn out to be a poor substitute for the personal touch, > especially If they are just starting to program. Oh, I didn't mean it to completely replace me grading things, but I think it would be useful if there were a lot of little assignments that could be done automatica

Re: automatically grading small programming assignments

2006-12-15 Thread Brian Blais
Dan Bishop wrote: > On Dec 14, 8:36 pm, Brian Blais <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] wrote: >>> [EMAIL PROTECTED] wrote: >>> Then on your PC you can >>>> run a script that loads each of such programs, and runs a good series >>>&g

numeric expression from string?

2006-02-04 Thread Brian Blais
lead to bad security problems (not that it's a big deal in my app, but still...) string.atof won't do the job. Is there a preferred way of doing this? thanks, Brian Blais -- - [EMAIL PROTECTED]

Numeric and matlab

2006-02-05 Thread Brian Blais
Numeric.arange(1,11,1) idx=Numeric.nonzeros(a) a=a[idx] % doesn't work and what about meshgrid? Do I use the fromfunction() in some way? Is there a resource that goes through comparisons like this? thanks, Brian Blais -- - [EMAIL PROTECTED]

Re: Numeric and matlab

2006-02-06 Thread Brian Blais
Robert Kern wrote: > A better place to ask would be [EMAIL PROTECTED] . By the > way, Numeric has undergone a rewrite and is now known as numpy. > thanks for the pointer! it is a bit confusing with all of the different numerical modules (Numeric, numpy, scipy, ScientificPython, numarray, etc...

Re: numeric expression from string?

2006-02-06 Thread Brian Blais
Steven D'Aprano wrote: > > It is good to be cautious. Big thumbs up. But what exactly are you worried > about? Do you think your users might enter something Evil and break their > own system? I'd suggest that's not your problem, and besides, it is hard > to think of anything they could do with eva

Re: Numeric and matlab

2006-02-06 Thread Brian Blais
Bas wrote: > I am also considering a switch from Matlab to NumPy/SciPy at some > point. > > Note that in the last version of Matlab (7?) you don't have to use > 'find', but you now can 'conditional arrays' as an index, so instead > of > idx=find(a>5); > a(idx)=6; > you can do: > cond=a>5; >

critique my code, please

2006-02-06 Thread Brian Blais
ng on context. There is a dialog class which allows you to edit/change the values, and a wrapper function of the form: new_params <== wrapper(old_params) which calls the dialog, and returns the updated params instance. thanks, Bri

jump into the interpreter in a script

2006-02-08 Thread Brian Blais
u exit the interpreter, the script continues from where it left off. Is this possible in python? thanks, Brian Blais -- - [EMAIL PROTECTED] http://web.bryant.edu/~bblais -- http://mail.python.org/mailma

calculating on matrix indices

2006-02-16 Thread Brian Blais
Hello, In my attempt to learn python, migrating from matlab, I have the following problem. Here is what I want to do, (with the wrong syntax): from numpy import * t=arange(0,20,.1) x=zeros(len(t),'f') idx=(t>5) tau=5 x[idx]=exp(-t[idx]/tau) # <---this line is wrong (gives a TypeError) #

Re: calculating on matrix indices

2006-02-16 Thread Brian Blais
Colin J. Williams wrote: > Brian Blais wrote: >> In my attempt to learn python, migrating from matlab, I have the >> following problem. Here is what I want to do, (with the wrong syntax): >> >> from numpy import * >> >> t=arange(0,20,.1

Re: calculating on matrix indices

2006-02-17 Thread Brian Blais
Robert Kern wrote: > The traceback tells you exactly what's wrong: > > In [7]: x[idx] = exp(-t[idx]/tau) > --- > exceptions.TypeError Traceback (most recent > call > last) > yes, I saw that,

strange error I can't figure out...

2006-02-18 Thread Brian Blais
Hello, I have an odd kind of Heisenbug in what looks like a pretty simple program. The program is a progress bar code I got at the Python Cookbook: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/168639 (including the code below) If you uncomment the one print statement I added in t

Re: strange error I can't figure out...

2006-02-18 Thread Brian Blais
John Zenger wrote: > It works fine for me. You must be having an indentation problem. > > Also, get rid of the comma at the end of that last print statement. > > Brian Blais wrote: >> Hello, >> >> I have an odd kind of Heisenbug in what looks like a pretty simpl

algorithm, optimization, or other problem?

2006-02-21 Thread Brian Blais
lse anyone needs to know, I'll post it. I put the main script, and a dohebb.pyx code below. thanks! Brian Blais -- - [EMAIL PROTECTED] http://web.bryant.edu/~bblais # Main scrip

execfile error exception line number?

2006-02-23 Thread Brian Blais
an I get the line number in "somefile.py" where the error occurs? When I do the above, I get the line number in the script which calls execfile instead. thanks, Brian Blais -- - [EMAIL PROTECTED]

execfile time out?

2006-02-23 Thread Brian Blais
t has an infinite loop, I don't want to freeze at that point. If it helps, this part of the code is already running in a thread, so I guess I could time-out the thread rather than the execfile. Is there an easy way to do that? thanks, Brian Blai

sort one list using the values from another list

2006-02-26 Thread Brian Blais
;this','hello','there','that'] The sort method on lists does in-place sorting. Is there a way to do what I want here? thanks, Brian Blais -- - [EMAIL PROTECTED] http://web.bryant.edu/~bblais -- http://mail.python.org/mailman/listinfo/python-list

Re: Python advocacy in scientific computation

2006-03-04 Thread Brian Blais
sturlamolden wrote: > > Typically a scientist need to: > > 1. do a lot of experiments > > 2. analyse the data from experiments > > 3. run a simulation now and then > unless you are a theorist! in that case, I would order this list backwards. > > 1. Time is money. Time is the only thing th

Re: Python advocacy in scientific computation

2006-03-05 Thread Brian Blais
Robert Kern wrote: > > That said, we have an excellent array object far superior to Matlab's. > > http://numeric.scipy.org/ > I'd like to ask, being new to python, in which ways is this array object far superior to Matlab's? (I'm not being sarcastic, I really would like to know!) I've hear

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.

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

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

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

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

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?

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: 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. :) &

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

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

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

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

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,

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

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

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

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

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

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

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

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

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

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

which windows python to use?

2006-05-11 Thread Brian Blais
ght 3) activepython Are there advantages/disadvantages? I have used enthought before, but it seems as if they are not at 2.4, and may lag behind in versions (which may not be a bad thing). Any other recommendations? thanks, Brian

Re: \t not working

2006-05-17 Thread Brian Blais
Alex Pavluck wrote: > I am just learning Python and I am using the book, "Thinking like a > Computer Scientist". There is an exercise that I am not able to get > working and it is really easy so I thought I would ask for help here. > > > Q: As an exercise, write a single string that: > Procu

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

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

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

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

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

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

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

  1   2   >