Re: Calling Python functions from Excel

2009-11-16 Thread Darcy Mason
On Nov 15, 2:20 am, Cannonbiker wrote: > Please I need Calling Python functions from Excel and receive result > back in Excel. Can me somebody advise simplest solution please? I am > more VBA programmer than Python. A couple of years ago I used MSScriptControl for this. Couldn't find a great ref

Re: Newbie thwarted by sys.path on Vista

2009-08-02 Thread Michael M Mason
"Mark Lawrence" wrote in message news:mailman.4130.1249203322.8015.python-l...@python.org... Be careful, I'm screwed things up on several occasions by placing a file on PYTHONPATH that overrides a file in the standard library, test.py being my favourite! Thanks. Sure enough, I've already got

Re: Newbie thwarted by sys.path on Vista

2009-08-02 Thread Michael M Mason
"Dave Angel" wrote in message news:mailman.4120.1249172970.8015.python-l...@python.org... Michael M Mason wrote: I'm running Python 3.1 on Vista and I can't figure out how to add my own directory to sys.path. Thanks to Jon, Piet, David and Dave for the responses.

Newbie thwarted by sys.path on Vista

2009-08-01 Thread Michael M Mason
I'm running Python 3.1 on Vista and I can't figure out how to add my own directory to sys.path. The docs suggest that I can either add it to the PYTHONPATH environment variable or to the PythonPath key in the registry. However, PYTHONPATH doesn't exist, and updating the registry key has no e

Re: Running all unit tests

2009-02-06 Thread Darcy Mason
On Feb 6, 9:11 pm, Jason Voegele wrote: > I'm working on my first substantial Python project, and I'm following a fully > test-first approach.  I'd like to know how Pythonistas typically go about > running all of their tests to ensure that my application stays "green". > > In Ruby, I would have a

Re: Dummy explanation to win32com needed

2008-10-22 Thread Darcy Mason
On Oct 22, 3:43 pm, korean_dave <[EMAIL PROTECTED]> wrote: > Hi. I need a dummy's explanation to utilizing the win32com component > to access Microsoft Excel. > > So far, I have this code. > >     import win32com.client >     xl = win32com.client.Dispatch("Excel.Application") >     xl.Visible = 1 >

Re: Python Imaging Library (PIL) question

2008-10-20 Thread Darcy Mason
On Oct 20, 2:14 pm, Sid <[EMAIL PROTECTED]> wrote: > Hi, > >   I am tryin to copy an image into my own data structure(a sort of 2d array   > for further FFT). I've banged my head over the code for a couple of hours   > now. The simplified version of  my problem is below. > > #-Code-

Re: convert binary to float

2008-06-01 Thread Mason
On Jun 1, 6:41 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Sun, 1 Jun 2008 12:55:45 -0700 (PDT), Mason > <[EMAIL PROTECTED]> declaimed the following in > comp.lang.python: > > > I have tried and tried... > > > I'd like to read in a binary file

Re: convert binary to float

2008-06-01 Thread Mason
On Jun 1, 5:12 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > On Jun 1, 3:55 pm, Mason <[EMAIL PROTECTED]> wrote: > > > > > I have tried and tried... > > > I'd like to read in a binary file, convert it's 4 byte values into > > floats, and then

convert binary to float

2008-06-01 Thread Mason
tagData = f.read(4) print tagData I get this (ASCII??): └@ I only know how to work with '\x00\x00\xc0@'. I don't understand why the output isn't the same. I need a solution that will allow me to convert my binary file into floats. Am I close? Can anyone point me in the right direction? Thanks, Mason -- http://mail.python.org/mailman/listinfo/python-list

Re: Data structure recommendation?

2008-04-07 Thread Charles Mason
If you can imply a partial order on your ranges then you can get O(n lg n) random access using a heap data structure. You'll have to implement your own heap, but heap search is easy to implement (it's Heapify that might require a little thinking). This will only work, of course, if your ranges ar

Re: Is there an official way to add methods to an instance?

2008-04-04 Thread Charles Mason
And for such a behavior they've termed "monkeying" Thus, the coinage "Monkeypatching" for what you want to do: http://mail.python.org/pipermail/python-dev/2008-January/076194.html There are a group of people who think "monkeypatching is destroying ruby." You still probably should avoid it for p