Re: seeking the "Hello World" of Packages

2006-08-13 Thread dwhall
Kevin,

I just posted a small package to the python package index.  It has one
source file of interest and some unit tests.The remaining files are
either needed for or made by distutils.  Should be pretty easy to
follow if you've read the distutils docs.  Note that the package you
get does not have the MANIFEST.in file (the tool creates MANIFEST
automatically using info from MANIFEST.in).

http://cheeseshop.python.org/pypi/pycscope/0.2

share and enjoy,

!!Dean

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Is anyone using Python for embedded applications?

2006-12-16 Thread dwhall
Carl,

I'm the lead developer for PyMite (http://pymite.python-hosting.com).
I do quite a bit of embedded development with PyMite.  PyMite is for
much smaller target devices (8-bit and 32-bit microcontrollers) than
you plan to use.  I am currently writing a series of papers that will
attempt to draw attention to the growing demand to use Python in the
variety of embedded spaces.  A rough draft of the first part in the
series is seen here:

http://members.capmac.org/~deanhall/python/piesI.html

During research for the later parts of the series, I have found the
following links that relate to Python in embedded devices:

http://sourceforge.net/projects/pythonce
http://sourceforge.net/projects/dietpython
http://www.python.org/dev/summary/2006-09-16_2006-09-30/#shrinking-python
http://cs.gmu.edu/~eclab/projects/robots/flockbots/pmwiki.php?n=Main.Python
http://groups.google.com/group/comp.lang.python/browse_thread/thread/f3a8f9ac964d5b84/6922ac416664f002?lnk=gst&q=%22embedded+system%22&rnum=5#6922ac416664f002

regards,

!!Dean

Carl J. Van Arsdall wrote:
> Hendrik van Rooyen wrote:
> >
> >>
> >>
> >
> > It depends a *lot* on what is meant by "embedded" :
> >
> Ha, very true
>
> > This definition seems to cover everything from:
> > - a cut down PC in a non standard box, through
> > - a processor in a Washing Machine, to
> > - a bare PIC processor in a Burglar Alarm...
> >
> We are considering now are mobile phone and pocket pc-esque devices.  I
> know that several phones with arm processors are running an arm version
> of linux now, we're thinking how reasonable it might be to run python
> applications on a phone, and which python might best apply.  Is there a
> good way to determine the "minimum requirements" for a python
> application?  I'd imagine these might be something like the min
> requirements of python (cpython, pymite, etc) + additional requirements
> placed by the design of the application.  Is there a good way to study a
> python application and figure that type of thing out?
>
>
> > I think the main hassles are that you need something big enough
> > to run a reasonable OS in, and it must support being programmed in C,
> > (which most things do), and it must have some MegaBytes of RAM
> > loose for the Python. (where more is merrier)
> >
> > Trying to run this on say an AVR or 8031 with a 64k address space and
> > a scarcity of RAM, will, to say the least, be a bit of a challenge...
> >
> > As far as the OS goes, Linux is probably the best bet, if you can get it to
> > fit in your hardware - It has been ported to ARM type processors from
> > various companies (Atmel springs to mind), and is free, which is a help
> > in a personal project.  You could of course also roll your own kernel,
> > which will be good practice, as with a limited set of peripherals its not
> > THAT hard to do, but its a bit far away from Python -   :- )
> >
>
> Yea, we are thinking on the more robust end of the embedded side.  So a
> system capable of running Linux or Windows CE (or something similar)
> > What display device are you going to use, or is it going to be a webserver
> > sitting on a power over ethernet link?
> >
> > I haven't actually taken the plunge myself yet to put Python on any of the
> > hardware we make, as it seems to add a lot of overhead to a simple device
> > - but I come from the bottom up, as it were, and the idea is intriguing,
> > as I in fact discovered Python because it is embedded in a GPS module
> > we were evaluating for building into a device - so I will follow your
> > progress with interest...
> >
> >
>
>
> --
>
> Carl J. Van Arsdall
> [EMAIL PROTECTED]
> Build and Release
> MontaVista Software

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Is there a way to push data into Ical from Python ?

2006-12-17 Thread dwhall
You could save your calendar_ to a .ics file which is in the VCal_ file
format; but that requires the extra step of manually saving your
calendar to a file or accessing the files that iCal creates behind the
scenes in ~/Library/Application Support/iCal/Sources/ which is unclear
and potentially hazardous to your data.

I'm guessing you would prefer to access the calendar data directly from
the script, like an Applescript would.  One way would be to use
Python's tie-ins to Applescript_ and apple events (AE).  As you will
read, this support isn't as strong as it used to be.

Another idea that would require more effort, but earn you some hacker
points, is to use PyObjC_ and access iCal's public programming
interface.

But by far the easiest is to google for what you want (my search was
for: "ical api"), find the iCalModule_ and try to make that work for
you.  Although that module appears to only read the data and is
targeted toward 3rd-party calendars that are stored in
~/Library/Calendars.

share and enjoy,

!!Dean

.. _calendar: http://en.wikipedia.org/wiki/ICalendar
.. _VCal: http://en.wikipedia.org/wiki/VCal
.. _Applescript: http://pythonmac.org/wiki/AppleScript
.. _PyObjC: http://pyobjc.sourceforge.net/
.. _iCalModule: http://www.devoesquared.com/Software/iCal_Module

The Night Blogger wrote:
> Is there a way to pull & push data into (Apple Mac OS X Calendar) Ical from
> Python ?

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: python-hosting.com projects: dead?

2006-12-20 Thread dwhall
My project was temporarily disabled as well even though I had taken
measures to block spam and had committed to svn and edited the trac
wiki one day before.  I was a bit concerned that maybe webfaction had
lost my trac and svn during their house cleaning.  But I emailed Remi
and he had it going again promptly.  They provide a great service for
free and they give back to the Python community.  They deserve our
thanks and our patronage.

With regard to how they handled it, I think they chose an effective
method.  Why should they support projects (for free) that aren't
active?  So just disable the project to see if anyone cares enough to
find out why it's gone.  Ever so slightly draconian, but good for
keeping a clean house.  I'm glad they have done this cleaning work, the
server seems much more responsive now; no more errors from trac.

!!Dean


[EMAIL PROTECTED] wrote:
> Fredrik Lundh wrote:
> > [EMAIL PROTECTED] wrote:
> >
> > > my svn repository and tickets again. I'm sure you can understand why I
> > > was dismayed by this and why, unfortunately, I'll never be comfortable
> > > trusting my data to them again.
> >
> > not really, but maybe I've just worked with computers and human beings
> > long enough not to treat every little hiccup as if it were the end of
> > the world as we know it.
>
> You're misreading me very badly, or I'm expressing myself very poorly.
> Either way, you've inferred some kind of spittle-flecked freakout where
> I did not mean to imply one. 
> 
> JP

-- 
http://mail.python.org/mailman/listinfo/python-list


Does RETURN_VALUE always result in an empty stack?

2007-05-09 Thread dwhall
I'm developing PyMite and would like to know a little detail about
Python 2.5's design.  Is it true that when the RETURN_VALUE executes
and pops its argument, that at that point the stack should *always* be
empty?  I mean just the argument stack for that execution frame.  I
want to use this knowledge to test if PyMite is working properly.

thanks,

!!Dean

-- 
http://mail.python.org/mailman/listinfo/python-list


Why does producer delay halt shell pipe?

2007-12-11 Thread dwhall
I have 2 python scripts: examples of a producer and a filter,
respectively:

#! /usr/bin/env python
import sys, time
if __name__ == "__main__":
while True:
sys.stdout.write("hello.\r\n")
time.sleep(0.01)

#! /usr/bin/env python
import sys
if __name__ == "__main__":
line = sys.stdin.readline()
while line:
sys.stdout.write(line.upper())
line = sys.stdin.readline()

I wish to use these programs in Bash, like so:

$ ./producer.py | ./filter.py

However, the producer's time delay makes this not work.  If I remove
or reduce the delay, it works.  In reality the producer has an
unavoidable one-second delay.  I do NOT want to use popen or its
cousins because I want flexibility from the command line; I have many
filters.  Is there any way to write the filter to make this work?

thanks,

!!Dean
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Why does producer delay halt shell pipe?

2007-12-12 Thread dwhall
Thanks, N, it works like a charm.

!!Dean

On Dec 11, 12:49 pm, Nanjundi <[EMAIL PROTECTED]> wrote:
> turn off python buffering & it should work.
> export PYTHONUNBUFFERED=t

-- 
http://mail.python.org/mailman/listinfo/python-list