Re: Python/pyobjC Apps on iPhone now a possibility?

2009-07-07 Thread Dr Mephesto
Sure, I am learning Objective C already, but the syntax is really unfriendly after python. I think it really depends on the type of app you want to write. Anything held back by network delays or that sits around waiting for user input are perfectly acceptable target apps. If you need speed for som

Python/pyobjC Apps on iPhone now a possibility?

2009-07-07 Thread Dr Mephesto
I have been following the discussion about python and pyobjc on the iphone, and it seemed to me that the app-store rules prohibited embedded interpreters; so, python apps are a no-no. But now it seems that the Rubyists have the option that we don't. It seems there is a company, http://rhomobile.co

Re: namespace query

2009-04-22 Thread Dr Mephesto
ok, sorted. I had thought that when a module was imported, it was added to a larger shared namespace used by all the modules. And yes, you are all correct; the "global numpy" thing was an illusion caused by saving the file at the wrong time after making a few changes. -- http://mail.python.org/

namespace query

2009-04-22 Thread Dr Mephesto
Hi, I have a quick question about global namespace, and I'm hoping someone could give a quick reply to sort me out :) I have a single file program that uses numpy, and it works just fine. I want to move some classes into their own files, to make the code reusable. When I cut and paste the the cl

Re: Compiling modules in OSX, eg PyUSB?

2009-03-20 Thread Dr Mephesto
On Mar 20, 6:23 pm, Philip Semanchuk wrote: > On Mar 20, 2009, at 12:36 PM, Dr Mephesto wrote: > > > windows? well, I thought that maybe the location of the "usb.h" thing > > was relevant, and I didnt see it mentioned on the linux instructions. > > Oh, OK. Wi

Re: Compiling modules in OSX, eg PyUSB?

2009-03-20 Thread Dr Mephesto
windows? well, I thought that maybe the location of the "usb.h" thing was relevant, and I didnt see it mentioned on the linux instructions. find /usr -name usb.h -ls gives me: 3545683 24 -rw-r--r--1 root wheel8360 Mar 20 16:37 /usr/include/usb.h 3538549 24 -rw-rw-r--

Re: Compiling modules in OSX, eg PyUSB?

2009-03-20 Thread Dr Mephesto
Thanks. I found some more info that might help, if I understood it :)From the main PyUSB page, at http://pyusb.berlios.de/ , its says: "PyUSB uses the libusb to do its work, so, any system which has Python and libusb should work for PyUSB." I have installed the OSX version of libusb, and it puts

Compiling modules in OSX, eg PyUSB?

2009-03-20 Thread Dr Mephesto
Hi, I am using Leopard and MacPython, and I would like to access a USB device. I have installed libusb, and now I have tried to compile PyUSB from: http://sourceforge.net/projects/pyusb/ But when I compile I get lots of errors, ie: pcfr147:pyusb-0.4.1 david$ python setup.py install running insta

quick beginners List comprehension question

2009-01-21 Thread Dr Mephesto
Hi, Im new to python, and OOP, and am trying to get a handle on list comprehension. Say I have a class Foo with a property called bar: class Foo: def __init__(self): self.bar = random.randint(1,100) and then I make a list of these objects: Newlist = [] for x in range(10): Newlis

Re: App idea, Any idea on implementation?

2008-02-04 Thread Dr Mephesto
thanks for the pointers! I just found a program that does more or less what I want, but I would still like to have a go myself. The link is: http://www.akoff.com/music-composer.html I gave the program a go, as there is a free trial. I found that it had a hard time doing the conversion (or I am a

App idea, Any idea on implementation?

2008-02-04 Thread Dr Mephesto
Hi Guru's, As a python newb, I was thinking about trying to implement a program that converts whistled music into midi; the idea coming from a proposed application in the Mydreamapp competition hosted last year, more details here: http://stratfordisland.com/whistler/ So, does anyone have a sugge

Re: creating really big lists

2007-09-11 Thread Dr Mephesto
On Sep 8, 8:06 pm, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Dr Mephesto a écrit : > > > Hi! > > > I would like to create a pretty big list of lists; a list 3,000,000 > > long, each entry containing 5 empty lists. My application will append > > data

Re: creating really big lists

2007-09-08 Thread Dr Mephesto
On Sep 8, 3:33 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Fri, 07 Sep 2007 16:16:46 -0300, Dr Mephesto <[EMAIL PROTECTED]> > escribi?: > > > hey, that defaultdict thing looks pretty cool... > > > whats the overhead like for using a dict

Re: creating really big lists

2007-09-07 Thread Dr Mephesto
On 6 Sep., 09:30, Paul McGuire <[EMAIL PROTECTED]> wrote: > On Sep 6, 12:47 am, Dr Mephesto <[EMAIL PROTECTED]> wrote: > > > > > I need some real speed! a database is waaay to slow for the algorithm > > im using. and because the sublists are of varying size,

Re: creating really big lists

2007-09-05 Thread Dr Mephesto
On 6 Sep., 01:34, "Delaney, Timothy (Tim)" <[EMAIL PROTECTED]> wrote: > Hrvoje Niksic wrote: > > Dr Mephesto <[EMAIL PROTECTED]> writes: > > >> I would like to create a pretty big list of lists; a list 3,000,000 > >> long, each entry containing

Re: creating really big lists

2007-09-05 Thread Dr Mephesto
yep, thats why I'm asking :) On Sep 5, 12:22 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Paul Rudin wrote: > > Dr Mephesto <[EMAIL PROTECTED]> writes: > > >> Hi! > > >> I would like to create a pretty big list of lists; a list

creating really big lists

2007-09-05 Thread Dr Mephesto
Hi! I would like to create a pretty big list of lists; a list 3,000,000 long, each entry containing 5 empty lists. My application will append data each of the 5 sublists, so they will be of varying lengths (so no arrays!). Does anyone know the most efficient way to do this? I have tried: list =