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
its attendees, and that should be an
expectation of anyone concerned with conference organization. Period.
Exclamation point.
Brian K. Jones
Editor in Chief
Python Magazine
--
http://mail.python.org/mailman/listinfo/python-list
#x27;t see why they would need to hit 'C' at all. Maybe
some of the APIs, but not syntax at all.
I would consider Python an ideal language for HS students to learn. The
teacher who hosts our KPLUG meetings has had good luck using Python in
her classes.
Brian
- --
- ---[Office 67
.5 on OSX from within TextMate and it ran as
expected.
Brian
- --
- ---[Office 70.9F]--[Outside 54.5F]--[Server 103.3F]--[Coaster 68.0F]---
- ---[ KLAHOWYA WSF (366773110) @ 47 31.2076 -122 27.2249 ]---
Software, Linux, Microcontrollers http://www.brianlane.com
AIS Parser SDK
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
John Nagle wrote:
>What's the cheapest way to test for an empty dictionary in Python?
>
> if len(dict.keys() > 0) :
>
> is expensive for large dictionaries, and makes loops O(N^2).
>
> John Nagle
if d
er's __init__ you are now
setting the *same* variable to a 2.
Basically, you can't do what you are trying to do without using a
different variable, or keeping track of a separate instance for the
super instead of sub-classing it.
Brian
- --
- ---[Office 71.7F]--[Outside 33.2
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
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...@
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
apps with it.
bb
--
Brian Blais
bbl...@bryant.edu
http://web.bryant.edu/~bblais
--
http://mail.python.org/mailman/listinfo/python-list
en. Can python read and
parse as an xml or do I need to read it into memory. If it is in
memory, is there a similar parsing function. Thanks Brian Kaplan
--
http://mail.python.org/mailman/listinfo/python-list
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...@
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
ot;possibly missing 'self' argument."
bb
--
Brian Blais
[EMAIL PROTECTED]
http://web.bryant.edu/~bblais
--
http://mail.python.org/mailman/listinfo/python-list
/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
to download.
I am not root on the box where I need to install this module so I need
the source (rpm/deb packages will not do).
Thank you in advance for the guidance!
-Brian
--
http://mail.python.org/mailman/listinfo/python-list
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
t was used to start IDLE.
Strange, because sys.stderr.write() does print to the IDLE window.
I've tried this on Windows and OSX, so it doesn't appear to be a
platform issue. Is this just a fundamental deficiency in the IDLE
shell prompt?
-Brian
--
http://mail.python.org/mailman/listinfo/python-list
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
hon2.4/plat-linux2',
'/usr/lib/python2.4/lib-tk', '/usr/lib64/python2.4/lib-dynload',
'/usr/lib/portage/pym', '/usr/lib64/python2.4/site-packages',
'/usr/lib/python2.4/site-packages']
Can anyone explain why purge_client.py has a different sys.path when
imported from another script? At this point I'm quite puzzled and would like
to continue using the 2.4 interpreter for the time being.
Thanks,
Brian Kelly
smime.p7s
Description: S/MIME cryptographic signature
--
http://mail.python.org/mailman/listinfo/python-list
e
else:
return False
When I saw the imports I assumed the functions in purge_client.py were being
referenced from the calling scripts symbol table. However, that is not the
case.
Thanks,
Brian
-Original Message-
From: John Machin [mailto:sjmac...@lexicon.net]
Sent: Tuesday, De
Appears like a patch was submitted to allow GzipFile to work from
pipes long ago. But there's no comment on why this was never accepted.
Is there a good reason?
http://mail.python.org/pipermail/patches/2006-June/020064.html
-Brian
--
http://mail.python.org/mailman/listinfo/python-list
Hey Helmut,
Did you try just:
print("Hallo, Süßes Python")
Cheers,
Brian
Helmut Jarausch wrote:
Hi,
do I miss something (I do hope so) or is switching to Python3
really hard for Latin1-users?
My simplest hello world script - which uses a few German
umlaut characters - doesn
Results for
Commend Out disable and enable
So, when I avoid using enable or disable, the results from everything
look like what we are expecting.
Am I doing something wrong (or excepting something wrong), or is
cProfile doing something wrong?
Thanks,
-Brian J. Stinar-
--
http://mail.python.org/mailman/listinfo/python-list
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
[
t for more details.
bb
--
Brian Blais
[EMAIL PROTECTED]
http://web.bryant.edu/~bblais
--
http://mail.python.org/mailman/listinfo/python-list
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
uld prefer avoiding the proper object cache based on
weakref as it would be a lot more complexity.
Thanks
Brian
--
http://mail.python.org/mailman/listinfo/python-list
Demidov Andrey wrote:
class MyClass:
def __init__(self, a):
self.a = a
# and some heavy works which I would like to do once
def say(self):
return a
Change:
def say(self):
return a
to:
def say(self):
return self.a
Cheers,
Brian
.
bb
--
Brian Blais
bbl...@bryant.edu
http://web.bryant.edu/~bblais
--
http://mail.python.org/mailman/listinfo/python-list
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
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
_to_content[url] = future.result()
return url_to_content
The Python 3.0+ code is here:
http://code.google.com/p/pythonfutures/source
Any feedback on the API would be very much appreciated!
Cheers,
Brian
--
http://mail.python.org/mailman/listinfo/python-list
Colin J. Williams wrote:
Brian,
Since the word "future" is part of the Python lingo:
A future statement is a directive to the compiler that a particular
module should be compiled using syntax or semantics that will be
available in a specified future release of Python. The future
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
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
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
t; # The same closure is used by every lambda
But it seems very odd to me and it can lead to some problems that are a
real pain in the ass to debug.
Cheers,
Brian
--
http://mail.python.org/mailman/listinfo/python-list
Gabriel Genellina wrote:
En Thu, 04 Jun 2009 18:40:07 -0300, Brian Quinlan
escribió:
This is from Python built from the py3k branch:
It's not new; same thing happens with 2.x
A closure captures (part of) the enclosing namespace, so names are
resolved in that environment even afte
f the generator into a loop.
Cheers,
Brian
--
http://mail.python.org/mailman/listinfo/python-list
ot;input.txt".
If data is an error then go to ...
Hey Dave,
Does this mean that Flaming Thunder requires explicit checking rather
than offering exceptions?
Cheers,
Brian
--
http://mail.python.org/mailman/listinfo/python-list
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
ng.letters:
or
if char.isalpha():
--
Brian
--
http://mail.python.org/mailman/listinfo/python-list
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
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.
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.
ou have any other questions about the conference, you can also
send me an email, or join me (and the authors and editors of Python
Magazine, among others) on irc in #pymag on irc.freenode.net
Thanks to everyone here -- I've learned tons by lurking here over the
past year or so. Hope to meet
to do this?
Cheers,
Brian
--
http://mail.python.org/mailman/listinfo/python-list
, just got bit.
But I guess the name mangling has to occur at compile (to bytecode) time?
Cheers,
Brian Hawthorne
--
http://mail.python.org/mailman/listinfo/python-list
I'm struggling with an architectural problem and could use some
advice.
I'm writing an application that will gather statuses from disparate
systems. Because new systems show up all the time, I'm trying to
design a plugin architecture that will allow people to contribute new
backends by just dropp
main application, I can do the following
main.py
---
import backends
print backends.__all__
This gives me ['system1','system2'] - which I can then use __import__
on.
-- brian
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 2, 12:07 pm, Brian Munroe <[EMAIL PROTECTED]> wrote:
>
> This gives me ['system1','system2'] - which I can then use __import__
> on.
>
Addendum, thanks Bruno!
I also required the helper function (my_import) from the Python docs
you pointed me to
he names because I am
populating a GUI selection list element. I also assumed that I could
then lazy load the modules I needed...
Thanks for the help though, you've gotten me past my first of many
(I'm sure) hurdles!
-- brian
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 2, 2:26 pm, 7stud <[EMAIL PROTECTED]> wrote:
>
> You don't need that helper function, which is a little tricky to
> follow:
>
Well, I appreciate the code sharing you did, but the helper function
is nice and compact, and I didn't have much trouble following it. I
ended up doing the followi
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
to
dlopen is the correct shared library. Unfortunately, either python or
OS X is lying to me here. If I inspect the python process with OS X's
Activity Monitor and look at the "Open Files and Ports" tab, it shows
that the _foo.so shared library is actually the one located inside
/c/func/dlopen
Whereas, linux will respect the fact you gave it a specific shared library:
http://linux.die.net/man/3/dlopen
If I am provided a workaround by apple I will post a python patch. A
little scary that someone can circumvent my application by just
setting an environment variable.
-Brian
)alloca($1*sizeof(char*));
for (Py_ssize_t i = 0; i < $1; ++i) {
PyObject *o = PySequence_GetItem($input, i);
$2[i] = PyString_AsString(o);
}
}
That one works for mapping a python sequence (such as a list) into the
argc, argv arguments commonly passed into main.
-Brian
On Wed, Apr 9, 20
generated by swig as a shared library,
then import the functions like you would a normal python module.
If all you need is to make some numerical code run faster it may be
more of a learning curve then you bargain for. Perhaps trying NumPy is
more appropriate. http://numpy.scipy.org/
-Brian
On
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
):
self.__name = name
if __name__ == '__main__':
a = A('class a')
print a.getName()
b = B('class b')
print b.getName()
b.setName('class b, reset')
print b.getName()
I get the following error:
mtinky:~
Ok, so thanks everyone for the helpful hints. That *was* a typo on my
part (should've been super(B...) not super(A..), but I digress)
I'm building a public API. Along with the API I have a few custom
types that I'm expecting API users to extend, if they need too. If I
don't use name mangling, i
On Apr 24, 10:11 pm, Arnaud Delobelle <[EMAIL PROTECTED]> wrote:
> In python, use attributes starting with a single underscore (such as
> _name). It tells users that they shouldn't mess with them. By
> design, python doesn't include mechanisms equivalent to the Java / C++
> 'private'.
Arnaud, G
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
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
Ivan Reborin wrote:
> win.Show
This line isn't doing anything. It needs to be:
win.Show() # note the parentheses
--
Brian
--
http://mail.python.org/mailman/listinfo/python-list
append(Foo(60.0))
ys=([y[].x])
y_max=max(y[].x)
y_min=min(y[].x)
yz=[y[:-1].x-y[1:].x]
--
Brian (remove the sport for mail)
http://www.et.web.mek.dtu.dk/Staff/be/be.html
http://www.rugbyklubben-speed.dk
--
http://mail.python.org/mailman/listinfo/python-list
"Matt Hammond" <[EMAIL PROTECTED]> writes:
> See "List comprehensions" in python docs:
Great, thanks for the hint.
--
Brian (remove the sport for mail)
http://www.et.web.mek.dtu.dk/Staff/be/be.html
http://www.rugbyklubben-speed.dk
--
http://mail.python.org/mailman/listinfo/python-list
ot'
else:
self.type='cold'
and I thought it would make sense to store this a objects. Otherwise I
would need to store each stream as a list is refer their indexes.
--
Brian (remove the sport for mail)
http://www.et.web.mek.dtu.dk/Staff/be/be.html
http://www.rugbyklubben-speed.dk
--
http://mail.python.org/mailman/listinfo/python-list
would probably be easier to read :)
Me too, would that be what I already had?
--
Brian (remove the sport for mail)
http://www.et.web.mek.dtu.dk/Staff/be/be.html
http://www.rugbyklubben-speed.dk
--
http://mail.python.org/mailman/listinfo/python-list
"Matt Hammond" <[EMAIL PROTECTED]> writes:
> y_max = max([e.x for e in y])
Would there be a way to refer back to the e with maximum x, or how
could I find other attributes of it?
--
Brian (remove the sport for mail)
http://www.et.web.mek.dtu.dk/Staff/be/be.html
http://www.ru
ces of itself. The class is extendible and has all the needed
methods. This means that any global lists can be
avoided. Interesting.
--
Brian (remove the sport for mail)
http://www.et.web.mek.dtu.dk/Staff/be/be.html
http://www.rugbyklubben-speed.dk
--
http://mail.python.org/mailman/listinfo/python-list
alError: local variable '_add_instance' referenced before assignment
d:/DTU/80494 $
> Yeps too. This is called "encapsulation".
Interesting.
> Also, if you intend to use such a solution (with or without multiple
> lists), you may want to add a classmethod to delet
need to
use __repr__ and get the id from it to find xx of the instance with
maximum x?
class C:
def __init__(self, x):
self.x = x
self.xx = x*x
sees = [C(x) for x in (4,7,1,3,0,9,2)] # random-ish ints
print max(sees)
--
Brian (remove the sport for mail)
http://www.et.web.mek.dtu
bject X knowing that it is the 5th item of list L,
> then you must either store that information yourself somewhere, and
> maintain it, or you must change your algorithm.
OK, I think this is the answer I was looking for.
--
Brian (remove the sport for mail)
http://www.et.web.mek.dtu.dk/
e with this messy, self-referential, piece of code. If you could
> explain what your goal is, there is probably a better way of reaching it.
Probably, this was just an example posted to show me how to add all
the instances to the class.
--
Brian (remove the sport for mail)
http://www.e
bruno at modulix <[EMAIL PROTECTED]> writes:
> May I suggest that you first learn the language syntax and basics ?-)
I'll try
--
Brian (remove the sport for mail)
http://www.et.web.mek.dtu.dk/Staff/be/be.html
http://www.rugbyklubben-speed.dk
--
http://mail.python.org/mailman/l
Michael <[EMAIL PROTECTED]> writes:
> Based on the code that runs, you want* this:
>
> [(y[x+1].x-y[x].x) for x in range(len(y)-1) ]
Yes.
> Since personally I find that a lot clearer than:
>
> map(float.__sub__, [X.x for X in y[1:]], [X.x for X in y[:-1] ])
Me too.
--
Steven D'Aprano <[EMAIL PROTECTED]> writes:
> With this method in the class, your solution is easier than ever:
Nice solution.
--
Brian (remove the sport for mail)
http://www.et.web.mek.dtu.dk/Staff/be/be.html
http://www.rugbyklubben-speed.dk
--
http://mail.python.org/mailman/l
bruno at modulix <[EMAIL PROTECTED]> writes:
> I should just take some time and learn to read !-)
Then I am better of than you. I just had to learn the syntax of a
language :-)
--
Brian (remove the sport for mail)
http://www.et.web.mek.dtu.dk/Staff/be/be.html
http://www.rugbyklubben
nterface to our classes
to support models that rely on caching, etc.
--
Brian Beck
Adventurer of the First Order
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> http://www.doxdesk.com/img/software/py/icons.png
Great work! Add an icon for Python egg files and you've covered all the
bases.
--
Brian Beck
Adventurer of the First Order
--
http://mail.python.org/mailman/listinfo/python-list
Is the new Python logo (i.e. http://python.org/images/python-logo.gif)
available someone in a high-resolution format?
That would be nice to integrate into websites, T-shirts, etc.
Cheers,
Brian
--
http://mail.python.org/mailman/listinfo/python-list
is limited to numbers between -2147483648
and 2147483647).
Cheers,
Brian
--
http://mail.python.org/mailman/listinfo/python-list
The new Python logo is available in high-resolution format here:
http://tinyurl.com/n4rge
Cheers,
Brian
--
http://mail.python.org/mailman/listinfo/python-list
fle the entire list
return shuffle_nums[:5] # return the first 5 elements
Cheers,
Brian
--
http://mail.python.org/mailman/listinfo/python-list
r creating a file just to unzip your data.
Cheers,
Brian
--
http://mail.python.org/mailman/listinfo/python-list
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,
For certain errors like Syntax Errors, you'll get a much more helpful
response if you post some actual code. Strip it down if you have to,
but make sure we can reproduce the errors.
--
Brian Beck
Adventurer of the First Order
--
http://mail.python.org/mailman/listinfo/python-list
c' has incomplete type
Anyone have tips on how to fix this?
--
Brian
--
http://mail.python.org/mailman/listinfo/python-list
start: http://pythoncard.sourceforge.net/
--
Brian Beck
Adventurer of the First Order
--
http://mail.python.org/mailman/listinfo/python-list
has wrote:
> Anyone know where I can find source artwork, preferably vector-based,
> for python.org's new 'ying-yang' snake icon? I think it's hiding.
> Thanks.
>
I don't know how office it is, but you can get the artwork here:
http://tinyurl.com/n4rge
Che
systems?
5: What about a package repository and a manager like miktex has?
regards,
--
Brian (remove the sport for mail)
http://www.et.web.mek.dtu.dk/Staff/be/be.html
http://www.rugbyklubben-speed.dk
--
http://mail.python.org/mailman/listinfo/python-list
every possible module, e.g., py2exe, ctypes,
mysqldb, wxpython...
--
Brian (remove the sport for mail)
http://www.et.web.mek.dtu.dk/Staff/be/be.html
http://www.rugbyklubben-speed.dk
--
http://mail.python.org/mailman/listinfo/python-list
ink that the problem here is that we are confusing transport with
request handling.
If you take a look at CGIXMLRPCRequestHandler
(http://docs.python.org/lib/node564.html), you will see an example of
how to write an XMLRPCRequestHandler without HTTP.
Cheers,
Brian
--
http://mail.python.org/mail
Jos Vos wrote:
> On Mon, Apr 17, 2006 at 03:30:04AM -0500, Nick Craig-Wood wrote:
>
>> UTSL ;-)
>>
>> Look at /usr/lib/python2.4/SimpleXMLRPCServer.py (adjust as per your
>> distro) and in particular the definition of the CGIXMLRPCRequestHandler
>> class.
>
> I did this before posting my questio
thanks,
Brian Blais
--
Brian Blais
bbl...@bryant.edu
http://web.bryant.edu/~bblais
--
http://mail.python.org/mailman/listinfo/python-list
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
All,
I'm hoping to implement a project that will be historically
transformational by mapping inequalities in property assessments.
I'm stuck at step one: Scrape data from http://www.opboa.org.
The site uses a bunch of hidden controls. I can't find a way to get
past the initial disclaimer page be
Just kidding. That was a fascinating discussion.
Now I'd like to see if anyone would rather procrastinate than finish
last-minute shopping.
This problem remains untouched. Anyone want to give it a try? Please?
I'm hoping to implement a project that will be historically
transformational by mappin
601 - 700 of 1138 matches
Mail list logo