Re: folder extraction

2009-01-01 Thread r . grimm
On Dec 30 2008, 4:30 pm, ibpe...@gmail.com wrote:
> how do i get along with this task of extracting multiples folder and
> generating their names individually in a their respective files as
> they were generated.

Hallo,
I hope, that I interpret your question in the right way.
You can use the following function as a starting point to get all
files ending with py or pyc from your working dir.
Invoke getAllFilesOfPatterns(".","*.py *.pyc")

import os
import fnmatch
def getAllFilesOfPatterns( dir ,patterns="*",  recursive=True  ):
""" patterns must be space separeted string of patterns
e.g: *.pdf *.ps *.html
"""
patterns= patterns.split()
retValue=[]
for path,dirs,files in os.walk(dir):
for file in files:
for pattern in patterns:
if fnmatch.fnmatch( file , pattern ):
retValue.append(os.path.join(path,file))
if not recursive: break
return retValue

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


Re: Creating an application for Linux

2009-01-01 Thread alex goretoy
I found a great video on how to do this last night. I wasn't even looking
for it. Check it out. It's really good. Makes me want to start making videos
as well. Thanks.

Ubuntu: Making a .deb package out of a python program (English) tutorial
video - Ubuntu: Making a .deb package out of a python program (English) -
Learn: python, deb, deb_package, publishing, package, english, ubuntu,
linux

On Wed, Dec 31, 2008 at 9:54 PM, Mike Driscoll  wrote:

> On Dec 31, 3:36 pm, lkcl  wrote:
> > hiya mike: where do i know you from?  i've heard your name somewhere
> > and for the life of me can't remember where!  anyway... onwards.
> >
>
> I don't know...while your username looks vaguely familiar, I don't
> think I've communicated with you recently. I spend most of my time on
> the wxPython list now...
>
>
> > your simplest bet is to take advantage of the .deb install system,
> > which, if you follow that, will allow you to pull in all of the
> > dependencies _without_ screwing around with the ubuntu distribution,
> > or requiring that you build "special" versions of the dependencies.
> >
> > so - your first port of call is to locate a similar app to your own
> > one:
> >
> > apt-cache  search wxwidgets
> > [rose-tinted filter on the results...]
> > cryptonit - A client side PKI (X.509) cryptographic tool
> > fontypython - A GUI tool to manage ttf fonts
> > jmdlx - jugglemaster deluxe using wxWidgets
> > wxmaxima - a wxWidgets GUI for the computer algebra system maxima
> > multiget - graphical download manager
> >
> > then, do apt-cache show , paying particular attention to
> > the dependencies.  apt-cache show fontypython looks like a good
> > candidate.
> >
> > so, do apt-get source fontypython (or other candidate)
> >
> > also do apt-get build-essential dh-make dpkg-dev debutils python-dev
> > devscripts python-setuptools juuust for fun, but the essential ones
> > are probably dh-make and dpkg-dev.
> >
> > then you have something to work from (an example - the source of the
> > deb-wrapped fontypython) and you will have most of the debian
> > developer utils etc. etc.
> >
> > _then_ you go to e.g.  this:
> http://www.pythonmark.com/python-library/debian/howto-build-a-debian-...
> > the preamble for which says "don't bother with that annoying ubuntu
> > python deb howto video, particularly on the basis that who gives a
> > stuff about _verbal_ instructions when you actually want stuff you can
> > READ!"
> >
> > :)
> >
> > the most important thing that _you_ need to remember is that you
> > _must_ identify the correct libraries (and their debian packagenames -
> > can't bring myself to say ubuntu packagenames) and make damn sure that
> > you add them into the dependencies in the debian/control file.
> >
> > do _not_ be tempted to "bundle" customised versions of python-
> > pysqlite, python-sqlalchemy etc. etc.
> >
> > testing: you should really use a debootstrap absolute "basic"
> > environment (set up a chroot, or a virtual KVM or other virtual PC,
> > qemu, whatever, or even a real machine) do NOT do a "full" install of
> > ubuntu, do an absolute minimalist install (netbook, businesscard,
> > whatever).
>
>
> I thought the general practice was to test on the closest software/
> hardware combo that your application was most likely to run on. I have
> heard of doing testing on the lowest common denominator before though.
> Unfortunately, I don't have time to set up a bare-bones VM since we're
> closing soon, but I may give this a go on Friday and report back.
>
> >
> > ... and _then_ install your .deb (with dpkg -i) followed by apt-get -f
> > install (to pull in all of the dependencies).
> >
> > then, use export DISPLAY=192.168.1.5:0.0 (adapt as necessary), run
> > xhost + on 192.168.1.5 (adapt as necessary), and _then_ fire up your
> > test app.
> >
> > if you get a python library not found runtime error, you know that you
> > got your dependencies wrong, in the debian/control file.
> >
> > if you install a "vanilla" ubuntu desktop, various other packages will
> > pull in the dependencies for you - and you will never find out if you
> > got all of the dependencies correct.
> >
> > that having been said, if you don't _care_ about correctness, skip the
> > above six sentences :)
> >
> > l.
> >
>
> Thanks for the instructions.
>
> Mike
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
А-Б-В-Г-Д-Е-Ё-Ж-З-И-Й-К-Л-М-Н-О-П-Р-С-Т-У-Ф-Х-Ц-Ч-Ш-Щ-Ъ-Ы-Ь-Э-Ю-Я
а-б-в-г-д-е-ё-ж-з-и-й-к-л-м-н-о-п-р-с-т-у-ф-х-ц-ч-ш-щ-ъ-ы-ь-э-ю-я
--
http://mail.python.org/mailman/listinfo/python-list


Re: Videocapture in python

2009-01-01 Thread alex goretoy
Can you post your code or a code segment? I would be interested in seeing
how this works.

On Thu, Jan 1, 2009 at 3:29 AM,  wrote:

> I face issues in videocapture in python. Cant find anyplace where we
> can raise bug reports, so mentioning here. Also help required if
> somebody has solved it earlier.
>
> On using videocapture (python 2.4), I am facing the following issues
> while creating a video sort of application.
> -> Pull out the usb cable : Videocapture gets the data stored
> initially in the buffer and returns always. The images are not updated
> - but also there is no error returned.
> i.e. there is no information to the viewer that it is not working
> anymore. Especially because since the timestamp is updated everytime
> (it is done inside videocapture.py - wherein current time is
> overwritten on the received image), it gives a feeling that video is
> running.
>
> Currently I have done a workaround in that every 2 captures, i setup
> the camera again - but it takes too much time. Anyone has any
> suggestions on solving this?
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
А-Б-В-Г-Д-Е-Ё-Ж-З-И-Й-К-Л-М-Н-О-П-Р-С-Т-У-Ф-Х-Ц-Ч-Ш-Щ-Ъ-Ы-Ь-Э-Ю-Я
а-б-в-г-д-е-ё-ж-з-и-й-к-л-м-н-о-п-р-с-т-у-ф-х-ц-ч-ш-щ-ъ-ы-ь-э-ю-я
--
http://mail.python.org/mailman/listinfo/python-list


pygtkspell-help

2009-01-01 Thread S.Selvam Siva
Hello,
i am in a process of writing spell checker for my local language(Tamil).
I wrote a plugin for gedit with pygtk for gui.Recently i came to know about
pygtkspell ,that can be used for spell checking and suggestion offering.
I am bit congused about it and could not able to get useful info by
googling.It will be nice if someone can direct me in right way(may be by
giving appropriate links or example program)

-- 
Yours,
S.Selvam
--
http://mail.python.org/mailman/listinfo/python-list


Re: select.select and socket.setblocking

2009-01-01 Thread Francesco Bochicchio



Can you post an example program that exhibits the behavior you
describe?




I was forgetting about the MSG_WAITALL flag ...
When I started programming with sockets, it was on a platform (IIRC 
Solaris) that by default behaved like MSG_WAITALL was set by default
(actually, I don't remember it being mentioned at all in the man pages). 
This sort of biased my understanding of the matter. I actually used that
flag recently - on Linux - to get the same behavior I was used to, but 
forgot about that.


My bad :-)

Ciao
--
FB

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


idle 3.0 unicode

2009-01-01 Thread Pavel Kosina
As for unicode in Python 2.5 everything works fine in program running 
either in IDLE or under Command line:

# -*- coding: utf-8 -*-
print u"ěščřžýáíé"

In 3.0 there is an error.  The same program, moved to 3.0 syntax, in 
IDLE editor :

# -*- coding: utf-8 -*-
print ("ěščřžýáíé")

prints:
ěščřžýáíé

The same program running in Command line from PSPad editor works fine.  
Is it mistake of my misunderstanding or of IDLE?


-

The same program without coding declaration (but saved in utf8) :
print ("ěščřžýáíé")

even immediately destroyed my IDLE window without any error message.

--
geon
Pavel Kosina

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


Re: Why not Ruby?

2009-01-01 Thread Jason Rumney
On Jan 1, 3:12 pm, r  wrote:

> The man lives in a world driven by common sense

"Common" sense suggests that his views are shared among the general
populace. I don't see much evidence of that in the sometimes never-
ending threads that frequently follow his postings. But it is good to
start debates about making changes to the status quo, often the
debates will result in worthwhile changes, even if those changes are
not what he proposed. I just wish he would choose his venue a little
more carefully sometimes.
--
http://mail.python.org/mailman/listinfo/python-list


<    1   2