Re: Calculator Problem

2014-02-03 Thread Charlie Winn
On Monday, February 3, 2014 6:17:44 PM UTC, Joel Goldstick wrote: > On Feb 3, 2014 1:05 PM, "Charlie Winn" wrote: > > > > > > On Sunday, February 2, 2014 9:46:24 PM UTC, Gary Herron wrote: > > > > On 02/02/2014 01:16 PM, Charlie Winn wrote: > >

Re: Calculator Problem

2014-02-03 Thread Charlie Winn
On Sunday, February 2, 2014 9:46:24 PM UTC, Gary Herron wrote: > On 02/02/2014 01:16 PM, Charlie Winn wrote: > > > Hey Guys i Need Help , When i run this program i get the 'None' Under the > > program, see what i mean by just running it , can someone help me fix thi

Calculator Problem

2014-02-02 Thread Charlie Winn
Hey Guys i Need Help , When i run this program i get the 'None' Under the program, see what i mean by just running it , can someone help me fix this def Addition(): print('Addition: What are two your numbers?') 1 = float(input('First Number:')) 2 = float(input('Second Number:')) p

Re: Peculiarity of '@' in logging.Formatter

2011-11-21 Thread Charlie Martin
Oops, forgot the python version etc: bash $ /usr/bin/env python -V Python 2.7 On SuSE 11.4 bash $ uname -a Linux crmartin 2.6.37.6-0.9-desktop #1 SMP PREEMPT 2011-10-19 22:33:27 +0200 x86_64 x86_64 x86_64 GNU/Linux -- http://mail.python.org/mailman/listinfo/python-list

Peculiarity of '@' in logging.Formatter

2011-11-21 Thread Charlie Martin
This is what seems like an odd bug, but in code I'd thing often-enough used it must be the expected behavior and I just don't understand. Please, sirs/mesdames, is this a bug? Example code: begin code --- #!/usr/bin/env python """ @-character WTF? """ import sy

Re: a questions about thread-safety of boolean variables

2009-09-30 Thread Charlie Dickens
at it will stop entering the loop sometime (I don't care if there are n iterations or n+1 or even n+m) Thanks On Wed, Sep 30, 2009 at 10:44 AM, steve wrote: > Hi, > > On 09/30/2009 01:53 PM, Charlie Dickens wrote: > >> Hi, >> if I have a class A that contains a bo

a questions about thread-safety of boolean variables

2009-09-30 Thread Charlie Dickens
Hi,if I have a class A that contains a boolean variable named x, is it safe to read and change it from different threads without using locks? Is it guaranteed that A.x will be always True or False, and not any other weird value that that causes it to be inconsistent (assuming I only set it to True

Re: Optimizing math functions

2009-05-25 Thread Charlie
Esmail hotmail.com> writes: > > Charlie wrote: > > > > You might also look at: > > http://pyparasol.sourceforge.net/example_1.html > > Thanks for this lead, I had never heard of parasol before. Do you know > if this also works under Linux? The docs ment

Re: Optimizing math functions

2009-05-24 Thread Charlie
Steven D'Aprano REMOVE-THIS-cybersource.com.au> writes: > > On Sat, 23 May 2009 09:22:59 -0400, Esmail wrote: > > > Hello all, > > > > I would like to maximize or minimize a given math function over a > > specific set of values, in Python preferably. > ... > > What it apparently can't do is fo

Re: C Function Pointer Wrapping Example not working

2008-11-18 Thread Charlie
> Nowhere in your code is the definition of binary_op - that is why you > get a linker error. > > Is it defined in another C file?  If so you need to link it with the > swig wrapper before you make the .so > Thanks for pointing out. I sorted the code out finally

Re: C Function Pointer Wrapping Example not working

2008-11-16 Thread Charlie
> > >  But when I try to import test in python, it complains: > >  import _test > >  ImportError: ./_test.so undefined symbol: _Z9binary_opiiPFiiiE > > The above is a mangled name so you've got some C vs C++ problems I'd > say. > > You could try putting some extern "C" {} in around all the functio

C Function Pointer Wrapping Example not working

2008-11-14 Thread Charlie
} // NOTE: this is func ptr from example in Doc 1.3: 5.4.9 It is really strange to me. I am a novice swigger but I really need its power to accelerate my development. Could anybody point out where my problem is? TIA Charlie -- http://mail.python.org/mailman/listinfo/python-list

Re: Python is slow

2008-06-07 Thread Charlie Hubbard
That hardware battle was fought long ago. Von Neumann machine vs. the Lisp machine. Guess who won? http://en.wikipedia.org/wiki/Lisp_machine It would be very hard to fight that war all over again. Charlie On Fri, Jun 6, 2008 at 4:59 PM, Jan Claeys <[EMAIL PROTECTED]> wrote: > Op Fr

Biggles on Windows with python2.5

2008-04-04 Thread Charlie
Has anyone installed a version of biggles on Windows with python 2.5? The Martin Lamar version for python 2.3 was a big help, but I finally upgraded to python 2.5 and I am having trouble with the biggles build. Thanks, Charlie -- http://mail.python.org/mailman/listinfo/python-list

Re: How would I compile a Python file to a exe

2007-08-23 Thread Charlie
Quoting Lamonte Harris <[EMAIL PROTECTED]>: > Been a while and I'm wondering how I would go about doing it. > py2exe seems to be a fairly good option for this, at least in the world of Windows. -- http://mail.python.org/mailman/listinfo/python-list

Re: MsiLib

2007-08-23 Thread Charlie
Quoting "Martin v. Löwis" <[EMAIL PROTECTED]>: > Charlie schrieb: >> Thank you everybody for your help. It finally runs without errors and I >> should be able to use this as I figure out more of it. I am curios if >> there is any idea as to when GetString w

Re: MsiLib

2007-08-23 Thread Charlie
Thank you everybody for your help. It finally runs without errors and I should be able to use this as I figure out more of it. I am curios if there is any idea as to when GetString will be implemented? Charlie -- http://mail.python.org/mailman/listinfo/python-list

Re: MsiLib

2007-08-22 Thread Charlie
uded as an argument, especially for a select statement. Thanks for the help. Charlie -- http://mail.python.org/mailman/listinfo/python-list

Re: MsiLib

2007-08-22 Thread Charlie
Thanks for pointing that out. It solved the one problem and along came another. Now I get the following error when I try running it. Thanks for the help. Traceback (most recent call last): File "msi.py", line 7, in record = view.Fetch() _msi.MSIError: function failed -- http://mail.

Re: MsiLib

2007-08-22 Thread Charlie
Thanks for the help. That definitely gets me on the right track. I am having an issue though. I keep getting the error that MSIDBOPEN_READONLY is not defined. Here is my code for testing. Am I missing something really obvious or is something just not working that should and my system is scre

MsiLib

2007-08-22 Thread Charlie
le to find one? If there isn't one, would anybody be willing to throw one together? Thanks Charlie -- http://mail.python.org/mailman/listinfo/python-list

Python on mac - can't extend interpreter with "catch_exception_raise" wrapper.

2006-12-08 Thread Charlie Miller
eter already has a symbol named "catch_raise_exception", (in my case at 0x2030 under gdb). The problem is when exc_server calls catch_raise_exception it calls the one from the python binary and not the one I provided and dies. Does anyone have any ideas on how to deal with this perple

Re: Is this a bug? Python intermittently stops dead for seconds

2006-10-01 Thread Charlie Strauss
On Oct 1, 2006, at 9:48 AM, Fredrik Lundh wrote: > charlie strauss wrote: > >> level0: newly created objects >> level1: objects that survived 1 round of garbage collection >> level2: objects that survivied 2+ rounds of gargbage collection >> >> Since a

Re: Is this a bug? Python intermittently stops dead for seconds

2006-10-01 Thread charlie strauss
Steve, digging into the gc docs a bit more, I think the behaviour I am seeing is still not expected. Namely, the program I offered has no obvious place where objects are deallocated. The way GC is supposed to work is thate there are three levels of objects level0: newly created objects level

Re: Is this a bug? Python intermittently stops dead for seconds

2006-10-01 Thread charlie strauss
>> >I think the point you are missing is that the garbage collector is >triggered from time to time to ensure that no cyclical garbage remains >uncollected, IIRC. The more data that's been allocated, the longer it >takes the collector to scan all of memory to do its job. > >If you can find a w

Re: Is this a bug? Python intermittently stops dead for seconds

2006-10-01 Thread charlie strauss
to say 0.1 second. This is the threshold for which the computer program flags the time it takes to create a "foo" object. on a fast computer it should take much less than 0.1 sec. -Original Message- >From: charlie strauss <[EMAIL PROTECTED]> >Sent: Oct 1, 2006 10

Re: Is this a bug? Python intermittently stops dead for seconds

2006-10-01 Thread charlie strauss
Steve and other good folks who replied: I want to clarify that, on my computer, the first instance of the gap occurs way before the memory if filled. (at about 20% of physical ram). Additionally the process monitor shows no page faults. Yes if you let the as-written demo program run to comp

Is this a bug? Python intermittently stops dead for seconds

2006-09-30 Thread charlie strauss
Below is a simple program that will cause python to intermittently stop executing for a few seconds. it's 100% reproducible on my machine. I'd be tempted to say this is a nasty garbage collection performance issue except that there is no major memory to be garbage collected in this script.

Volume of CSG (constructive solid geometry) objects

2005-12-02 Thread Charlie
pointers/etc., I would be very grateful. Thanks, Charlie -- http://mail.python.org/mailman/listinfo/python-list

Defending Python

2005-07-08 Thread Charlie Calvert
leView/articleId/135/RankingLanguagesFearasaCareerMove.aspx http://www.codefez.com/Home/tabid/36/articleType/ArticleView/articleId/134/TheWaroftheVirtualBills.aspx Thanks. - Charlie -- http://mail.python.org/mailman/listinfo/python-list

Obtaining glyph width in Python

2005-07-04 Thread Charlie
at could be done to achieve this? Is there metadata in the font that holds this information that could be extracted? Thanks in advance, -Charlie -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and Excel

2005-01-19 Thread Charlie Taylor
If it helps, I started a similar project a few years ago on SourceForge when I was just learning python called python2xlw. I haven't supported it for quite a while, however, I still use it a lot in my own work. I needed to create Excel files with scatter charts in them for a web interface so

dynamic data types

2005-01-17 Thread Charlie
al of operators defined on? Or is there something else meant by "dynamic data types" in Python? Regards, Charlie -- http://mail.python.org/mailman/listinfo/python-list

Is this a good use for lambda

2004-12-17 Thread Charlie Taylor
I find that I use lambda functions mainly for callbacks to things like integration or root finding routines as follows. flow = integrate(lambda x: 2.0*pi * d(x)* v(x) * sin(a(x)),xBeg, xEnd) root = findRoot(xBeg, xEnd, lambda x: y2+ lp*(x-x2) -wallFunc( x )[0], tolerance=1.0E-15) I hav

Re: embedded python and interpreter threads

2004-12-07 Thread Charlie DeTar
Woohoo, fixed my problem. It had to do with the way I was handling the methods which overwrote stderr and stdout. Yeehaw! =Charlie Charlie DeTar wrote: Quick correction, sorry - the command should read like this (I had omitted the "log" before 'CaptureStdout' and &#x

Re: embedded python and interpreter threads

2004-12-06 Thread Charlie DeTar
s StdoutCatcher:\n" "\tdef write(self, str):\n" "\t\tlog.CaptureStdout(str)\n" "class StderrCatcher:\n" "\tdef write(self, str):\n" "\t\tlog.CaptureStderr(str)\n" "sys.stdout =

embedded python and interpreter threads

2004-12-06 Thread Charlie DeTar
d explicitly 'stdout' and 'stderr'. I thought of the possibility that the 'logMethods' structure which includes my versions of stdout and stderr might be behaving statically. But I didn't define it as static... I am new to C, so there might be something basic I am missing. Any suggestions or ideas? Thanks, Charlie DeTar -- http://mail.python.org/mailman/listinfo/python-list