Python module for the IPod shuffle ...

2007-01-31 Thread Analog Kid

Hi all:
Im looking for a python module thatll let me do simple reads/writes from and
to an iPod shuffle similar to iTunes ... I read about the gPod module ...
but Im not sure whether it will work in Windows ...

Any help is greatly appreciated.

Thanks in advance ...
-Ajay
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: What is the dummy statement that do nothing in Python?

2007-01-31 Thread Analog Kid

hey dongsheng:
not too sure what you are looking for ... but i guess a simple "pass"
statement should do it ...

if a > b: pass


hth,
-ajay


On 1/31/07, Dongsheng Ruan <[EMAIL PROTECTED]> wrote:


I remember that in python there is some kind of dummy statement that just
holds space and does nothing.

I want it to hold the place after a something like if a>b: do nothing

I can't just leave the space blank after if statement because there will
be
error message.

Does anybody know what to insert there?

Thanks!


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





--
BBQ - "Spare (My) Ribs" being contemplated
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Python module for the IPod shuffle ...

2007-02-01 Thread Analog Kid

hi simon:
thanks a lot for that resource ... i downloaded it and tried to use it ...
but when i try to import pypod, i get an error, which is as follows...

ImportError: No module named _gpod

I guess I have to do something more than merely putting the two files (
pypod.py and gpod.py) in my site-packages.

what am i missing?

thanks for your help.

-ajay


On 2/1/07, Simon Brunning <[EMAIL PROTECTED]> wrote:


On 1/31/07, Analog Kid <[EMAIL PROTECTED]> wrote:
> Hi all:
> Im looking for a python module thatll let me do simple reads/writes from
and
> to an iPod shuffle similar to iTunes ... I read about the gPod module
...
> but Im not sure whether it will work in Windows ...

This any good?

<http://superduper.net/?page=pypod>

--
Cheers,
Simon B
[EMAIL PROTECTED]
http://www.brunningonline.net/simon/blog/
--
http://mail.python.org/mailman/listinfo/python-list





--
BBQ - "Spare (My) Ribs" being contemplated
-- 
http://mail.python.org/mailman/listinfo/python-list

pyTTS question ...

2007-02-10 Thread Analog Kid

hi all:
i need to know how other voices besides MSMary, MSSam and MSMike can be
installed and used along with pyTTS. i tried downloading voices (PeterUK to
be precise) but looks like it has not been registered, since pyTTS doesn't
recognize it.
Do I have to manually register the voice in Windows?

TIA,
-Ajay
-- 
http://mail.python.org/mailman/listinfo/python-list

regex problem ..

2008-12-15 Thread Analog Kid
Hi All:
I am new to regular expressions in general, and not just re in python. So,
apologies if you find my question stupid :) I need some help with forming a
regex. Here is my scenario ...
I have strings coming in from a list, each of which I want to check against
a regular expression and see whether or not it "qualifies". By that I mean I
have a certain set of characters that are permissible and if the string has
characters which are not permissible, I need to flag that string ... here is
a snip ...

flagged = list()
strs = ['HELLO', 'Hi%20There', '123...@#@']
p =  re.compile(r"""[^a-zA-Z0-9]""", re.UNICODE)
for s in strs:
if len(p.findall(s)) > 0:
flagged.append(s)

print flagged

my question is ... if I wanted to allow '%20' but not '%', how would my
current regex (r"""[^a-zA-Z0-9]""") be modified?

TIA,
AK
--
http://mail.python.org/mailman/listinfo/python-list


Re: regex problem ..

2008-12-17 Thread Analog Kid
Hi guys:
Thanks for your responses. Points taken. Basically, I am looking for a
combination of the following ...
[^\w] and %(?!20) ... How do I do this in a single RE?

Thanks for all you help.
Regards,
AK

On Mon, Dec 15, 2008 at 10:54 PM, Steve Holden  wrote:

> Analog Kid wrote:
> > Hi All:
> > I am new to regular expressions in general, and not just re in python.
> > So, apologies if you find my question stupid :) I need some help with
> > forming a regex. Here is my scenario ...
> > I have strings coming in from a list, each of which I want to check
> > against a regular expression and see whether or not it "qualifies". By
> > that I mean I have a certain set of characters that are permissible and
> > if the string has characters which are not permissible, I need to flag
> > that string ... here is a snip ...
> >
> > flagged = list()
> > strs = ['HELLO', 'Hi%20There', '123...@#@']
> > p =  re.compile(r"""[^a-zA-Z0-9]""", re.UNICODE)
> > for s in strs:
> > if len(p.findall(s)) > 0:
> > flagged.append(s)
> >
> > print flagged
> >
> > my question is ... if I wanted to allow '%20' but not '%', how would my
> > current regex (r"""[^a-zA-Z0-9]""") be modified?
> >
> The essence of the approach is to observe that each element is a
> sequence of zero or more "character", where character is "either
> letter/digit or escape." So you would use a pattern like
>
> "([a-zA-Z0-9]|%[0-9a-f][0-9a-f])+"
>
>
> regards
>  Steve
> --
> Steve Holden+1 571 484 6266   +1 800 494 3119
> Holden Web LLC  http://www.holdenweb.com/
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
http://mail.python.org/mailman/listinfo/python-list