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

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

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

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

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

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

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

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

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

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 >

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

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

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

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

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

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,

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

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

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

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

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]

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

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

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

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

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

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

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

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

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

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]

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]

<    1   2