Floats as keys in dict

2007-08-01 Thread Brian Elmegaard
. When profiling I see that the most time consuming part of my script is rounding. Is there a faster way than round() or is there a better way to test than 'in' or should I store the keys in another way than a dict? tia, -- Brian (remove the sport for mail) http://www.et.web.mek.dtu.d

Re: Floats as keys in dict

2007-08-01 Thread Brian Elmegaard
Steve Holden <[EMAIL PROTECTED]> writes: > Alex Martelli wrote: [snip] Thanks a lot for your intersting answers. I will start out taking a look at bisect. -- Brian (remove the sport for mail) http://www.et.web.mek.dtu.dk/Staff/be/be.html http://www.rugbyklubben-speed.dk

Re: Floats as keys in dict

2007-08-02 Thread Brian Elmegaard
is is a big problem. It will only give me one more node. Wouldn't the same be possible if I use bisect? -- 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

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

ANN: ChiPy August Meeting Topic "Snakes On Apples"

2007-08-05 Thread Brian Ray
es to automate your coding needs - Address Book Plugin for syncing with gmail contacts utilizing libgmail -- Brian Ray - Python Sprint at Google and PyCon '08 updates / discussion - After: If you wish, follow Chipy the Chipmunk to Greektown or Taylor Street Venue - :: The Un

Gotcha I never ran into before

2007-08-09 Thread Brian Cole
of debugging this. Luckily I was making a small incremental change so I could just back up and figure out what went wrong. Thanks, Brian -- http://mail.python.org/mailman/listinfo/python-list

reading a line in file

2007-08-20 Thread Brian McCann
directory named 20070820_build1 Thanks, Brian <mailto:[EMAIL PROTECTED]> -- http://mail.python.org/mailman/listinfo/python-list

RE: reading a line in file

2007-08-20 Thread Brian McCann
Hi, I can read in the whole file build.number which has the following lines how do I just capture the value of build.number and assign it to a variable Thanks, Brian contents of file build.number: #Build Number for ANT. Do not edit! #Mon Aug 20 04:04:51 EDT 2007 build.number=1 buildinfo.py

RE: reading a line in file

2007-08-20 Thread Brian McCann
Hi Tim, The sample data is in file build.number contents of file build.number: #Build Number for ANT. Do not edit! #Mon Aug 20 04:04:51 EDT 2007 build.number=1 Thanks, Brian From: [EMAIL PROTECTED] on behalf of Tim Williams Sent: Mon 8/20/2007 2:59 PM

RE: reading a line in file

2007-08-20 Thread Brian McCann
Shawn, Tim ,Jay many thanks, It looks like there are many ways this problem can be approached either by using regex or a tokens Tim I'm not familiar with your solution, but will learn about that method also Jay, what do you mean by regex comes with a lot of overhead? --

RE: reading a line in file

2007-08-20 Thread Brian McCann
Hi Shawn, what if I had a file com.properties with the below line in it If I needed to capture the value of everything separeted by a ":" and asign each to a variable would regex be the right method to grab those? like a=jdbc b=oracle [EMAIL PROTECTED] d=1521 e:XE --Brian com.

creating a tar file with python

2007-08-23 Thread Brian McCann
Hi, I'm trying to create a tar file of the contents of the current directory right now there is only one file "text.xml" in the current dir, I'm using"." current dir as source but that gives syntax error any help would be greatly appreciated --Brian #

RE: creating a tar file with python

2007-08-23 Thread Brian McCann
Hi, I tried Steve's solution but get this error using the tar script below --Brian tar = tarfile.open(".","test.tar.gz",w:gz) [EMAIL PROTECTED] tmp]$ ./tarup.py File "./tarup.py", line 24 tar = tarfile.open(".","test.tar.gz",w:gz)

RE: creating a tar file with python

2007-08-23 Thread Brian McCann
Hi, I'm now getting this error any ideas? Thanks, Brian Traceback (most recent call last): File "./tarup.py", line 25, in ? tar = tarfile.open("test.xml","sample.tar.gz", 'w:gz') File "/usr/lib64/python2.4/tarfile.py", line

RE: creating a tar file with python

2007-08-23 Thread Brian McCann
from you go to trash. May your pillow not have pity on your head! --Brian From: Steve Holden [mailto:[EMAIL PROTECTED] Sent: Thu 8/23/2007 11:15 PM To: Brian McCann Cc: python-list@python.org Subject: Re: creating a tar file with python Brian McCann wrote: &g

how to tar with python

2007-08-24 Thread Brian McCann
n the directory test any help would be greatly appreciated --Brian ## [tmp]$ ./tarup.py Traceback (most recent call last): File "./tarup.py", line 29, in ? tfile .add(f) File "/usr/lib64/python2.4/tarfile.py", line 1229, in add tarinfo

RE: creating a tar file with python

2007-08-24 Thread Brian McCann
I don't care if Steve Holden is the python God himself, He's a rude, arrogant, vulgar human who shows his true level of intellect by his use of profanity And he goes one level lower stating he respects the python group he spews his profanity to He chose to respond to my question, no one dragged

RE: creating a tar file with python

2007-08-24 Thread Brian McCann
Ed, Carsten, Steve, I don't care if Steve Holden is the python God himself, He's a rude, arrogant, vulgar human who shows his true level of intellect by his use of profanity And he goes one level lower, stating he respects the python group he spews his profanity to. He chose to respond to my

copying files

2007-08-29 Thread Brian McCann
tly appreciated --Brian #!/usr/bin/python import string import os import sys import errno import shutil import tarfile TEST_HOME = "/v01/test_home" m = "./lib" os.system("cp -r m TEST_HOME") #os.system("tar -cvf viziant-ingestion.tar /v01/") -- http://mail.python.org/mailman/listinfo/python-list

RE: copying files

2007-08-29 Thread Brian McCann
<mailto:[EMAIL PROTECTED]> one thing I just noticed is that when I run the script I get a new symbolic link created in my current dir TEST_HOME-->lib --Brian From: [EMAIL PROTECTED] on behalf of Brian McCann Sent: Wed 8/29/2007 2:40 PM To: py

RE: copying files

2007-08-29 Thread Brian McCann
<mailto:[EMAIL PROTECTED]> Hi Ricardo, what do the + signs do? From: Ricardo Aráoz [mailto:[EMAIL PROTECTED] Sent: Wed 8/29/2007 2:51 PM To: Brian McCann Cc: python-list@python.org Subject: Re: copying files Brian McCann wrote: > Hi, > >

Re: Adding attributes stored in a list to a class dynamically.

2007-09-02 Thread Brian Munroe
ference between calling __setattr__ and setattr or __getattr__ and getattr, for that matter? >From my example that follows, it doesn't seem to make a difference? thanks -- brian class Person(object): def __init__(self): pass def newAttribute(self,

Re: Adding attributes stored in a list to a class dynamically.

2007-09-02 Thread Brian Munroe
ll double-underscore methods (although you > often may _write_ double-underscore methods). > I think I understand. You are saying that if I wanted to override the normal behavior when doing something like p1.firstName = "Brian" then I'd override __setattr__()? But if I am doin

Re: Adding attributes stored in a list to a class dynamically.

2007-09-03 Thread Brian Munroe
pose deleting a specific attribute. I think I understand what you meant by 'compute the value on the fly', the keyword being *compute*? thanks for taking the time to explain this (over and over, heh!) -- brian -- http://mail.python.org/mailman/listinfo/python-list

passing command line arguments

2007-09-07 Thread Brian McCann
Error: name 's' is not defined # <mailto:[EMAIL PROTECTED]> this is the script #!/usr/bin/python import sys, string print 'The arguments of %s are "%s"' %s \ (sys.argv[0], string.join(sys.argv[1:])) any help would be greatly appreciated -Brian -- http://mail.python.org/mailman/listinfo/python-list

RE: passing command line arguments

2007-09-07 Thread Brian McCann
Darren, Thanks From: [EMAIL PROTECTED] on behalf of darren kirby Sent: Fri 9/7/2007 1:58 PM To: python-list@python.org Subject: Re: passing command line arguments quoth the Brian McCann: > Hi, > > when I run the script show_args2.py > > # ./

sys.argv index out of range error

2007-09-13 Thread Brian McCann
import sys filename = sys.argv[0] aaa = sys.argv[1] print aaa # If I remove "source init $1" from init.sh and replace it with "init 1$" I get this output which works $ bootstrap.sh spam ham JAVA_OPTIONS=-Djava.library.path=spam/:spam/:spa

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: merits of Lisp vs Python

2007-03-07 Thread Brian Adkins
George Sakkis wrote: > [EMAIL PROTECTED] wrote: > >> 1. Lisp is the only industrial strength language > ^^^ > You keep using that phrase. I don't think it means what you think it > means. [Vizzini has just cut the rope The Dread Pirate Roberts is climbing up]

Re: merits of Lisp vs Python

2007-03-07 Thread Brian Adkins
John Nagle wrote: >Neither Lisp nor Python is an "industrial strength language". > The infrastructure is too weak. Hosting providers and distro > makers aren't concerned over whether Python works. They > care if C, C++, Java, PHP, and Perl work, but not Python or LISP. > Ask them. > >

Re: merits of Lisp vs Python

2007-03-07 Thread Brian Adkins
alex23 wrote: > John Nagle wrote: >> Hosting providers and distro >> makers aren't concerned over whether Python works. They >> care if C, C++, Java, PHP, and Perl work, but not Python or LISP. >> Ask them. > > Do you have any real experience with recent linux distros? Or with any > _real_ hostin

Re: merits of Lisp vs Python

2007-03-07 Thread Brian Adkins
John Nagle wrote: > Brian Adkins wrote: >> alex23 wrote: >> >>> John Nagle wrote: >>> >>>> Hosting providers and distro >>>> makers aren't concerned over whether Python works. They >>>> care if C, C++, Java, PHP, and Per

Re: merits of Lisp vs Python

2007-03-07 Thread Brian Adkins
Paul Rubin wrote: > Brian Adkins <[EMAIL PROTECTED]> writes: >> With prices of dedicated servers and virtual private servers so cheap, >> why would anyone get a hosting account without root access? > > Because it turns you into a sysadmin instead of letting specialist

Re: merits of Lisp vs Python

2007-03-07 Thread Brian Adkins
John Nagle wrote: > Paul Rubin wrote: >> Brian Adkins <[EMAIL PROTECTED]> writes: >> >>> With prices of dedicated servers and virtual private servers so cheap, >>> why would anyone get a hosting account without root access? >> >> Because it turns

Re: merits of Lisp vs Python

2007-03-07 Thread Brian Adkins
Ken Tilton wrote: > John Nagle wrote: >> Brian Adkins wrote: >>> John Nagle wrote: >>> If you want to restart a debate, please go back and reply to some >>> serious post in the thread - don't hijack mine for your own evil >>> purposes and c

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,

Re: Phase change material ...

2007-03-17 Thread Brian Whatcott
tons of wax might have a good chance of holding the temperature up with a temp differential of 80-20degC= 60 degrees. Wonder what the latent heat is? Less than 340 kJ/kg I imagine. How much did it cost? Brian Whatcott Altus OK -- http://mail.python.org/mailman/listinfo/python-list

Auto execute python in USB flash disk

2007-03-27 Thread Brian Erhard
I am still fairly new to python and wanted to attempt a home made password protection program. There are files that I carry on a USB flash drive that I would like to password protect. Essentially, I would like to password protect an entire directory of files. Is there a way to auto execute a pyt

Re: Python Magazine: Issue 1 Free!

2007-10-05 Thread Brian Jones
first volume are > so hard to come by. > > But I suspect that, come January, we will see the release of Vol 2, > Issue 1. Just an artifact of having the first issue come out in some > month other than January. > > -- Paul > > -- > http://mail.python

Re: Problem of Readability of Python

2007-10-07 Thread Brian Elmegaard
list of class instances: class a: def __init__(self,name,val): self.name=name self.val=val l=list() l.append(a('yadda',42)) print l[0].name print l[0].val Is the dict preferable to a list or tuple of class instances? -- Brian (remove the sport

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

Need some help with my first Twisted program

2007-10-19 Thread McCann, Brian
def connectionLost(self,reason): print "lost:%s" %reason self.serialServerSocket.close() self.alive = False self.serialSocketReadThread.join() Can someone please tell me what I'm doing wrong? Thanks, --Brian -- http://mail.python.org/mailman/listinfo/python-list

cgi scripts in Mac OS X

2007-10-20 Thread Brian Shine
I'm trying to get cgi scripts to work. I can link to the python script, but instead of running and producing an output, it prints the script on the page. I've obviously missed a step in setting it up, but I can't see what it is. Thanks in advance, Brian Shine -- http://

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: Is any python like linux shell?

2007-01-30 Thread Brian Visel
ipython is probably what you're looking for. -- http://mail.python.org/mailman/listinfo/python-list

what are you using python language for?

2007-02-02 Thread Brian Epstein
Brian Y. Epstein, Esq. Belkin Burden Wenig & Goldman LLP 270 Madison Avenue New York, New York 10016 Bus: (212) 867-4466 (x363) Fax: (212) 867-0709 [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> -- This messag

Re: XMLRPC Server

2007-02-06 Thread Brian Quinlan
he number of requests handled simultaneously depending on your apache configuration. > I need to make it very efficient, Actually, you might not have to. 2000 calls/minute isn't that big, assuming you have a decent server. Cheers, Brian -- http://mail.python.org/mailman/listinfo/python-list

Re: XMLRPC Server

2007-02-06 Thread Brian Quinlan
impleXMLRPCServer; import MySQLdb" real 0m0.144s user 0m0.046s sys 0m0.064s So it's already almost 4x too slow. But I'm running this on Ubuntu, running on VMWare on my 1.6GHz Pentium-M laptop. I would assume that a beefy server would do a lot better. Cheers, Brian -- http://mail.python.org/mailman/listinfo/python-list

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: Catching a segfault in a Python library

2007-11-27 Thread Brian Cole
so, I have a friend in need of a computer science senior project who may help. The general question is why not build this directly into the interpreter? The interpreter can automatically raise a seg fault exception when SIGSEGV occurs. Easier said then done, but why not? -Brian -- http://mail.python.org/mailman/listinfo/python-list

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: lotus nsf to mbox

2007-12-15 Thread Brian Munroe
On Dec 15, 11:04 am, Fabian Braennstroem <[EMAIL PROTECTED]> wrote: > > thanks for your ideas! I actually thought of something like > a python parser, which just converts the nsf structure to an > mbox; could that work!? > Well, If you wish to go that route, I believe you will have to reverse eng

Re: [OT] Fractions on musical notation

2007-12-16 Thread Brian Victor
nsider it to have two separate pieces of information: the length of the beat and the number of those beats per bar. When I've written code to represent music I have used rationals to represent when something occurs, but a different structure to represent time signatures. -- Brian -- http://mail.python.org/mailman/listinfo/python-list

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: xml-filter with XMLFilterBase() and XMLGenerator() shuffles attributes

2007-12-20 Thread Brian Smith
ave this option. BTW, I have never been able to get XMLGenerator to work; it seems really buggy regarding namespaces. I had to write my own version of it. - Brian -- http://mail.python.org/mailman/listinfo/python-list

Re: Upgrading and modules

2006-04-18 Thread Brian Elmegaard
make an hour. I installed 2.4 some days ago. I then needed ctypes and mySQLdb. Both of them had had some updates in addition to the version change. What could have been seconds did take a while because of this. Of course it is because I try to do both steps in one installation. -- Brian (remove

Re: MinGW and Python

2006-04-24 Thread Brian Elmegaard
Robert Kern <[EMAIL PROTECTED]> writes: > - gcc does not optimize particularly well. But well enough for other platforms. -- 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

Re: MinGW and Python

2006-04-24 Thread Brian Elmegaard
he source so I could just extend it. After messing around I found I couldn't because I don't have msvc. -- 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

Re: MinGW and Python

2006-04-25 Thread Brian Elmegaard
on), and you can > build extensions for the python.org binary using MingW. Great, then I tend to agree that there is no reason for building it with mingw. -- 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

Re: MinGW and Python

2006-04-25 Thread Brian Elmegaard
.lang.python/browse_thread/thread/3f721b5a38fbc2d1/7af1aea19aa187b6?lnk=st&q=author%3Aelmegaard+distutils&rnum=1#7af1aea19aa187b6 > mingw for the standard Python distribution. Please see my post in the thread > "MS > VC++ Toolkit 2003, where?". Thanks, I will. --

Re: MinGW and Python

2006-04-25 Thread Brian Elmegaard
"Fredrik Lundh" <[EMAIL PROTECTED]> writes: > a better optimizer usually results in programs that run faster, not slower. Got it the wrong after some editing ;-( -- Brian (remove the sport for mail) http://www.et.web.mek.dtu.dk/Staff/be/be.html http://www.rugbyklubbe

Re: MS VC++ Toolkit 2003, where?

2006-04-26 Thread Brian Elmegaard
mingw, too? I.e. a .a not a .lib? It is possible to load a .dll in mingw. -- 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

Importing modules through directory shortcuts on Windows

2006-04-26 Thread Brian Quinlan
tcut/shortcutimporter.py BTW, does anyone else think that this functionality should be part of core Python? Cheers, Brian -- http://mail.python.org/mailman/listinfo/python-list

Re: MinGW and Python

2006-04-26 Thread Brian Elmegaard
Neal Becker <[EMAIL PROTECTED]> writes: > release. Since mingw is usually current, I haven't checked, but they may > be using 4.1 now. It is not, it is 3.4.2. http://www.mingw.org/download.shtml#hdr2 -- Brian (remove the sport for mail) http://www.et.web.mek.dtu.dk/Staf

Re: MS VC++ Toolkit 2003, where?

2006-04-28 Thread Brian Elmegaard
"sturlamolden" <[EMAIL PROTECTED]> writes: > I believe MinGW can link .lib C libraries files from Visual Studio. But > there are no .a for Python24.dll as far as I can tell. But afaik you don't need one. -- Brian (remove the sport for mail) http://www.et.web.mek.d

Chicago Python Users Group Thurs May 11 at 7pm

2006-05-10 Thread Brian Ray
This will be our best meeting yet! ChiPy's Monthly meeting this Thurs. May 11, 2006. 7pm. (except for folks who want to help setup at 6:30 and get first dibs on pizza) Location ThoughtWorks' Chicago office 651 West Washington Blvd., 6th floor Chicago, IL 60661 Location description: "6

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

Broken essays on python.org

2006-05-12 Thread Brian Cole
I'm not sure if this is the proper place to post this... A lot of the essays at http://www.python.org/doc/essays/ have a messed up layout in Firefox and IE. -Brian -- http://mail.python.org/mailman/listinfo/python-list

ANN: Vancouver Python Workshop

2006-05-15 Thread Brian Quinlan
* case studies of Python in action * after-hours social events * informative keynote speakers * tracks on multimedia, Web development, education and more More information see: http://www.vanpyz.org/conference/ or contact Brian Quinlan at: [EMAIL PROTECTED] Vancouver = In addition

Re: Tabs versus Spaces in Source Code

2006-05-15 Thread Brian Quinlan
itor to use 8-space tabs and the code is all messed up. Of course, a very disciplined group of people could be trained to never use tabs except to align with the current block level but, in practice, that doesn't work. Therefore tabs are bad. Cheers, Brian -- http://mail.python.org/mailman/listinfo/python-list

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

ANN: Vancouver Python Workshop - keynote speakers announced

2006-05-18 Thread Brian Quinlan
eakers * tracks on multimedia, Web development, education and more More information see: http://www.vanpyz.org/conference/ or contact Brian Quinlan at: [EMAIL PROTECTED] Vancouver = In addition to the opportunity to learn and socialize with fellow Pythonistas, the Vancouver Python Workshop

Re: Complex evaluation bug

2006-05-18 Thread Brian Blazer
I am not exactly sure what is going on, but I get the error: ValueError: complex() arg is a malformed string I think that it might be because the value of 'j' is not defined. But I am a newbie so I could very well be wrong. Brian Blazer [EMAIL PROTECTED] On May 18, 2006, at 11

Newbie append() question

2006-05-18 Thread Brian Blazer
. Hopefully someone could enlighten me as to what is going on and maybe offer a suggestion to help me figure this one out. Thank you for your time, Brian [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie append() question

2006-05-19 Thread Brian Blazer
Thanks guys. Your solutions worked. I'm still not sure why it was grabbing the prompt string though. Thanks again, Brian [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

noob import question

2006-05-19 Thread Brian Blazer
st: from Student import * s1 = Student("Brian", "Smith", "N") print s1.lName This works as expected. However, if I change the import statement to: import Student I get an error: TypeError: 'module' object is not callable I have tried to look up what i

Re: noob import question

2006-05-19 Thread Brian Blazer
Thank you for your responses. I had a feeling is had something to do with a namespace issue but I wasn't sure. You are right, I do come from a Java background. If it is poor form to name your class file the same as your class, can I ask what the standard is? Thanks again, Brian O

Vancouver Python Workshop - registration open

2006-05-22 Thread Brian Quinlan
ative keynote speakers * tracks on multimedia, Web development, education and more More information see: http://www.vanpyz.org/conference/ or contact Brian Quinlan at: [EMAIL PROTECTED] Vancouver = In addition to the opportunity to learn and socialize with fellow Pythonistas, the Vancouver P

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
. Also, within the python code, and the setup.py, there are properties like __version__ which one would like to have generated automatically as well, so that you aren't hand-editing a number of files. Is there a standard way of doing this? thanks,

RE: "env" parameter to "popen" won't accept Unicode on Windows -minor Unicode bug

2008-01-15 Thread Brian Smith
a unicode string, it has enough information to apply the conversion automatically, and doing so saves the caller from having to figure out what exact encoding is to be used. - Brian -- http://mail.python.org/mailman/listinfo/python-list

RE: Some Berkeley DB questions (being maintained? queries?)

2008-01-17 Thread Brian Smith
and WAY more complex than gdbm, for example. If you don't need all its functionality, especially its multi-user capabilities, then I recommend using something simpler. However, if you DO need its multi-user cabailities or its advanced features like secondary indexes, then it is better to use

RE: HTTP POST uploading large files

2008-01-20 Thread Brian Smith
ap(file.fileno(), len(file), access=ACCESS_READ) try: data = mmap.read() request = Request(url, data, headers) ... finally: map.close() - Brian -- 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: [XML-SIG] SAX characters() output on multiple lines for non-ascii

2008-02-02 Thread Brian Smith
if len(self.newchars) > 0: combined = "".join(self.newchars).encode('ISO-8859-1') print "Strean read is '%s'" % combined I recommend using ElementTree instead. - Brian -- http://mail.python.org/mailman/listinfo/python-list

FW: apache/mod_wsgi daemon mode

2008-02-03 Thread Brian Smith
e WSGI socket prefix such that the domain sockets will get put in that directory. If that doesn't solve the problem then use the procedures in the SELinux documentation to create a security policy. And then, please share it with me. :) Regards, Brian -- http://mail.python.org/mailman/listinfo/python-list

RE: Is there a way to "link" a python program from several files?

2008-02-16 Thread Brian Smith
r py2exe for windows to > py2app on OSX - and some more, e.g. cx_freeze. I would be interested in a program that can combine multiple modules into a single module, which removes all the inter-package imports and fixes other inter-module references, like Haskell All-in-One does f

RE: Is there a way to "link" a python program from several files?

2008-02-16 Thread Brian Smith
Diez B. Roggisch wrote: > Brian Smith wrote: > > I would be interested in a program that can combine > > multiple modules into a single module, which removes > > all the inter-package imports and fixes other > > inter-module references, like Haskell > > All-

RE: Large file support >2/4GB ?

2008-02-25 Thread Brian Smith
e' > > > > on a big file >4GB > > > > ( Python 2.4.4 / Linux ) > > > > How about that? Does Python not support large files? Or which > > functions do not support? It looks like Python is not being compiled with large file support by default. Most di

RE: anydbm safe for simultaneous writes?

2008-02-28 Thread Brian Smith
cording to pysqlite developer, the version of pysqlite included in CPython 2.5 is old. - Brian -- http://mail.python.org/mailman/listinfo/python-list

RE: Socket Performance

2008-03-13 Thread Brian Smith
data. Do this 819200 times. > > If you time both methods, method A has much greater > throughput than method B. Why is it faster to drink a liter of water a cupful at a time than to drink it out of an eyedropper? - Brian -- http://mail.python.org/mailman/listinfo/python-list

<    1   2   3   4   5   6   7   8   9   10   >