Cleaning up repeated whitespaces and newlines

2007-05-01 Thread mobiledreamers

Hi guys i m trying out newline characters and to clean them up
a\n\n\n\n\n\n\n\n\nsss\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvsa\n\n\n\nasf\n\nafs

hello guys

im trying to replace
\n\n\n\n\n\n\n\n\n with \n

thanks for help

\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n also with \n as the browser gives \r
carrriage returns

thanks for any help or pointers
-- 
http://mail.python.org/mailman/listinfo/python-list

barcode generation

2007-02-13 Thread mobiledreamers

Hi
I want to generate barcode based on an input which can be numbers or
numbers+alphabets.
How do I do this? Is there any library that will doo this?
thanks
mark
-- 
http://mail.python.org/mailman/listinfo/python-list

image rendering in python

2007-11-25 Thread mobiledreamers
http://cdnll.i.imagechef.com/ic/templimg2/Shaved%20Head.jpg
Do u know how to make such images using PIL

or other tools in python
thanks a lot for your kind help
-- 
http://mail.python.org/mailman/listinfo/python-list

Spaces and tabs messing up code

2008-01-08 Thread mobiledreamers
 my friend uses vim
and i use xemacs
so our shared python code is a mix of tabs and spaces and it is hard for him
to edit it in vim

any idea on how to make it clean
convert it all to 4 spaces?

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

Re: [Tutor] Pyflakes pre-commit hook in subversion

2008-01-08 Thread mobiledreamers
yes the link is broken and hence i sent it in
since it is a conf file for svn pre-commit hook
so pyflakes is run of your tree and it emits an error if python files have
any error preventing bad commits poisoning svn tree so dev can fix the bug
and recommit

On Jan 8, 2008 8:08 PM, Kent Johnson <[EMAIL PROTECTED]> wrote:

> Mark wrote:
>
> > The small "configuration" file for enforce can be found here
> > 
> >.
>
> That link is broken.
> >
> > Can you share enforcer file? or a means to ensure safe code in python
> repo
>
> I don't understand what you are asking.
>
> Kent
>
>
-- 
http://mail.python.org/mailman/listinfo/python-list

Pyflakes pre-commit hook in subversion

2008-01-09 Thread mobiledreamers
http://tarekziade.wordpress.com/2006/11/01/protecting-a-python-svn-code-base-with-the-pre-commit-hook/

Is it possible to check code in python before committing to svn

using pyflakes, pythontidy

*Pyflakes and Subversion*

Pyflakes  is a nice little utility
that checks your Python code for errors. The main advantage over PyChecker
and PyLint is that it is much faster and gives almost no false positives.
Today I wrote a little hack on top of the
enforcerpre-commit
script which forces the code you check in to pass pyflakes. Eg,
the users of svn will see the following output if they try to check in code
which has errors pyflakes can detect:

$ svn ci -m "fix" completion.py
Sendingcompletion.py
Transmitting file data .svn: Commit failed (details follow):
svn: 'pre-commit' hook failed with error output:
Pyflakes found 1 error(s)/warning(s):
kiwi/trunk/examples/completion.py:1: undefined name 'test'

The small "configuration" file for enforce can be found
here.

Can you share enforcer file? or a means to ensure safe code in python repo
-- 
http://mail.python.org/mailman/listinfo/python-list

paypal python library

2008-01-13 Thread mobiledreamers
I m trying to program the paypal for accepting payments

Aret there python libraries for the same
thanks
-- 
http://mail.python.org/mailman/listinfo/python-list

Recieving emails in python

2008-01-13 Thread mobiledreamers
I m trying to create something simple a mailing list similar to yahoo groups
I m stumbling at the part where the python recieves messages via say
[EMAIL PROTECTED]

how to make python recieve emails and process it
after that it is straight forward processing in python inserting in db etc
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Recieving emails in python

2008-01-13 Thread mobiledreamers
ok i dont want to write an mta
i want to use another mta
to recieve emails on say -

[EMAIL PROTECTED]

so can i start reading the emails to python from that mta

How to set this up to read messages from the mta

sending out email
we are using sendmail so we ll continue using that for now
thanks
It depends.

If you're trying to write a MTA, think about looking at and stealing
parts of mailmain and smtpd.py

Mailman: http://www.gnu.org/software/mailman/index.html
Smtpd:http://barry.warsaw.us/software/Code/smtpd.py

If you're going to use someone else as a MTA then just use IMAP or POP
to get the mail out, there are IMAP and POP libraries

imap: http://docs.python.org/lib/module-imaplib.html
pop: http://docs.python.org/lib/module-poplib.html

Else, if you're writing this all from scratch, whip out the RFC and
start hacking:
http://info.internet.isi.edu/in-notes/rfc/files/rfc821.txt

--Michael
On 1/13/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> I m trying to create something simple a mailing list similar to yahoo
> groups
> I m stumbling at the part where the python recieves messages via say
> [EMAIL PROTECTED]
>
> how to make python recieve emails and process it
> after that it is straight forward processing in python inserting in db etc
>
-- 
http://mail.python.org/mailman/listinfo/python-list

Socialsoft Startup Jobs

2008-03-26 Thread mobiledreamers
http://www.thesocialsoft.com/jobs.html
We

   - Build stuff that people love and use everyday
   - have a healthy disregard for the impossible
   - are not a conventional company and do not intend to be one
   - Think big, think fast and think ahead
   - set our goals high and work to exceed them, then we set our sights
   even higher
   - love our users more than anything else
   - launch early launch often
   - work on Web scale projects
   - believe that velocity matters
   - Care about interaction and user interface
   - grow by systematically removing bottlenecks - easy to know when
   something is a win
   - are experts in building scalable high performance clusters - scale
   horizontally
   - are scientific - collect data and understand it
   - start with "good enough" and iterate rapidly to reach perfection and
   critical mass
   - truly love the internet
   - see the elegance in simplicity
   - know what the user wants but listen to feedback
   - love to experiment with new fun viral ideas
   - are a really high energy team, it is not surprising for traffic to
   double overnight
   - aim to be better than the best
   - believe that we can change the world
   - This is a great company and we are moving quickly to make it even
   better
   - love fresh home made frozen yogurt across the street

Cutting edge Tools We use

   - we love love Python
   - cheetah
   - memcached
   - postgresql
   - berkeley db
   - starling
   - jquery
   - subversion
   - git
   - nginx
   - haproxy
   - php

We are the Most fun team in Silicon valley

   - beanbag plushies
   - Be in the driving seat of your project
   - Herman miller chairs
   - believe in developer productivity and happiness
   - live in downtown Palo Alto

You (exceptional)

   - are a brilliant web software hacker who can design, build, and ship
   interesting web products
   - are among the best at what you do and routinely solve hard technical
   problems
   - have an understanding of successful web properties
   - have some insight into what makes them resonate with users
   - want to reach millions if not billions of people through your code
   - Are pragmatic and flexible
   - Care deeply about users and the user experience
   - should be available to work full-time or more

Start your incredibly fun journey with the Socialsoft Team!

   - Join the Socialsoft dream, email [EMAIL PROTECTED] now
-- 
http://mail.python.org/mailman/listinfo/python-list

Using couchdb to build a EMAIL messaging solution with threaded inline replies

2009-01-07 Thread mobiledreamers
Using couchdb to build a EMAIL messaging solution with threaded inline
replies
http://pylab.blogspot.com/search/label/couchdb
--
http://mail.python.org/mailman/listinfo/python-list


Accessing callers context from callee method

2009-02-24 Thread mobiledreamers
when i call a method foo from another method func. can i access func context
variables or locals() from foo
so
def func():
  i=10
  foo()

in foo, can i access func's local variables on in this case i
Thanks a lot
-- 
Bidegg worlds best auction site
http://bidegg.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: [Tutor] Accessing callers context from callee method

2009-02-25 Thread mobiledreamers
i found the solution
This is my first attempt at memcaching html page using cheetah
since cheetah render needs locals() i use getCallerInfo() to get the
locals() and send to memcached
let me know if it is possible to better do this
*notice getCallerInfo
*

*utils.py*
@log_time_func
def renderpage(key, htmlfile, deleteafter=3600):
from globaldb import mc
try:page = mc.get(key)
except:
page=None
clogger.info('except error mc.get '+ key)
if not page:
clogger.info(key+ ' rendering cheetah page')
terms = getCallerInfo(1)
#print terms
page = str(web.render(htmlfile, asTemplate=True, terms=terms))
try:mc.set(key, page, deleteafter)
except:
clogger.info('except error mc.set '+ key)
return page

@log_time_func
@memcachethis
def mcrenderpage(key, htmlfile, deleteafter=3600):
terms = getCallerInfo(2)
#print terms
return str(web.render(htmlfile, asTemplate=True, terms=terms))

def getCallerInfo(decorators=0):
'''returns locals of caller using frame.optional pass number of
decorators\nFrom Dig deep into python internals
http://www.devx.com/opensource/Article/31593/1954'
''
f = sys._getframe(2+decorators)
args = inspect.getargvalues(f)
return args[3]

*Usage*
key=facebookstuff.APP_NAME+'newstart'+str(uid)
return utils.renderpage(key, 'pick.html')



-- 
Bidegg worlds best auction site
http://bidegg.com
--
http://mail.python.org/mailman/listinfo/python-list


problems with Cheetah base class being in templates directory

2009-05-28 Thread mobiledreamers
*How do we setup Cheetah so it runs with all templates in the templates
directory and all code in the .. directory

code.py*
production=True
if not production:
try:web.render('mafbase.tmpl', None, True, 'mafbase')
except:pass
else:
from templates import mafbase


templates/mafbase.tmpl
templates/mafbase.py


try:web.render('mafbase.tmpl', None, True, 'mafbase')
This works but is very slow to load and causes timeout errors


from templates import mafbase

This doesnt work
   return self._delegate(fn, self.fvars, args)
  File "/home/mark/work/common/web/application.py", line 411, in _delegate
return handle_class(cls)
  File "/home/mark/work/common/web/application.py", line 386, in
handle_class
return tocall(*args)
  File "user.py", line 262, in proxyfunc
return func(self, *args, **kw)
  File "/home/mark/work/pop/code.py", line 1796, in GET
return web.render('subclass.html')
  File "/home/mark/work/common/web/cheetah.py", line 104, in render
return str(compiled_tmpl)
  File
"/usr/lib/python2.5/site-packages/Cheetah-2.0.1-py2.5-linux-i686.egg/Cheetah/Template.py",
line 982, in __str__
def __str__(self): return getattr(self, mainMethName)()
  File "mafbase.py", line 634, in respond
  File
"/usr/lib/python2.5/site-packages/Cheetah-2.0.1-py2.5-linux-i686.egg/Cheetah/Template.py",
line 1512, in _handleCheetahInclude
nestedTemplateClass = compiler.compile(source=source,file=file)
  File
"/usr/lib/python2.5/site-packages/Cheetah-2.0.1-py2.5-linux-i686.egg/Cheetah/Template.py",
line 693, in compile
fileHash = str(hash(file))+str(os.path.getmtime(file))
  File "/usr/lib/python2.5/posixpath.py", line 143, in getmtime
return os.stat(filename).st_mtime
OSError: [Errno 2] No such file or directory:
'/home/mark/work/pop/widgetbox.html'



-- 
Bidegg worlds best auction site
http://bidegg.com
-- 
http://mail.python.org/mailman/listinfo/python-list


How do you serve Cheetah in production? webpy+cheetah

2009-05-29 Thread mobiledreamers
How do you serve *Cheetah* in *production*?

Guys can you share the setup on how to precompile and serve cheetah in
production

Since we dont compile templates in webpy it is getting upstream time out
errors. If you could share a good best practise it would help

*

Jeremy jeremy.ja...@gmail.com wrote: For a production site, I use Cheetah
with pre-compiled templates - it's very fast (the templates import
especially quickly when python compiled and optimised). A bit of magic with
the imp module takes a template name and a base directory (configured in a
site-specific config) and loads up that template, taking care of #extends
and
import directives as appropriate. I don't use the built-in support for

Cheetah, however. The new template library is also only imported to display
the debugerror page


-- 
Bidegg worlds best auction site
http://bidegg.com
-- 
http://mail.python.org/mailman/listinfo/python-list


unified way or cookbook to access cheetah from other frameworks django/webpy/pylons

2009-06-05 Thread mobiledreamers
can you or tavis or one of the cheetah masters please show us how to use
cheetah from webpy
the only useful thing webpy cheetah.py does is replace the #include with the
content of the files

Can you share a simple snippet/cookbook example on how to hook up cheetah
from other frameworks such as django/webpy/pylons, if there is a unified way
to access the cheetah template  then the problems will be easier to fix?

Thanks a lot... for trying to help...

-- 
Bidegg worlds best auction site
http://bidegg.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: GUI programming with python

2008-08-27 Thread mobiledreamers
http://delicious.com/url/4adfb8d4a16eb4e2a9884298e0af1784
people are starting to save :)
--
http://mail.python.org/mailman/listinfo/python-list

Re: looper

2008-09-22 Thread mobiledreamers
Great thanks

On 9/22/08, Dan Stromberg <[EMAIL PROTECTED]> wrote:
>
>
> I was asked by my employer to publish this a bit ago, so here it is:
>
> http://stromberg.dnsalias.org/~dstromberg/looper/
>
> It's a multithreaded script for running n POSIX shell commands m at a
> time with good error checking.  It allows for things like stashing in ssh
> $hostname or rsync $hostname in a convenient way - with pretty complete
> shell quoting so that your command comes out on the other side of the ssh
> command the same way it went into looper.  It also allow
>
> I hope someone finds it useful.  I know I have.
>
> Followups have been directed to comp.unix.shell.
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



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

Re: Python based barcode readers

2008-09-22 Thread mobiledreamers
This is something I have looked for too
but I have not come across a decent barcode reader?

On 9/22/08, Robocop <[EMAIL PROTECTED]> wrote:
>
> Does anyone know of any python based barcode readers?  I'm looking for
> something (commercial or open source) that will use some OCR algorithm
> to read barcodes from an image or ps/pdf file, and ideally will be
> something along the lines of a callable python script.  I have some
> pretty simple needs, i'm only trying to read code 93 barcodes, so i
> don't need it to be able to identify multiple symbologies or
> anything.  Any suggestions would be greatly appreciated.
>
> Thanks!
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



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

Re: Ann: Google releases Python-based open-source NX server

2009-07-15 Thread mobiledreamers
On Wed, Jul 15, 2009 at 2:25 PM, jkn  wrote:

> Google quietly releases open-source NX server ...written in Python,
> apparently
>
>  Google_quietly_releases_open_source_NX_server?taxonomyId=88>
>
> Neatx can be downloaded from Google's code repository:
>
> 
>
>Regards
>J^n
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
Bidegg worlds best auction site
http://bidegg.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: [Baypiggies] Egnyte: hiring

2009-07-27 Thread mobiledreamers
Seems interesting
http://fotoroll.com/searchvideo?q=vineet%20jain,%20ceo%20of%20egnyte&id=0&type=video



On Mon, Jul 27, 2009 at 7:46 PM, Aahz  wrote:

> My new company (I just started today) closed a big venture capital round
> (also today) and is looking to hire more people, preferably with Python
> experience:
>
> Senior Linux Engineer:
> http://sfbay.craigslist.org/pen/sof/1292008176.html
>
> Senior Platforms Engineer:
> http://sfbay.craigslist.org/pen/sof/1291776907.html
>
> Venture announcement:
> http://blogs.zdnet.com/BTL/?p=21777
>
> I can't say a lot about the company myself yet, but I've gotten a good
> impression of the team and the business plan.  Find out more here:
> http://www.egnyte.com/
> --
> Aahz (a...@pythoncraft.com)   <*>
> http://www.pythoncraft.com/
>
> "Many customs in this life persist because they ease friction and promote
> productivity as a result of universal agreement, and whether they are
> precisely the optimal choices is much less important." --Henry Spencer
> ___
> Baypiggies mailing list
> baypigg...@python.org
> To change your subscription options or unsubscribe:
> http://mail.python.org/mailman/listinfo/baypiggies
>



-- 
Bidegg worlds best auction site
http://bidegg.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Natural Language Processing in Python

2009-08-15 Thread mobiledreamers
Try this out

Fotoroll does term extraction http://bit.ly/HCPDi

So to get json output of list of terms post to
http://fotoroll.com/findterms?json=true&text=Content+to+extract terms from

Hope this helps

Fotoroll Term extraction No limit on number of queries per day Yahoo 5000
queries a day Zemanta 1000 queries a day with regn

On Fri, Aug 14, 2009 at 11:26 AM, Vlastimil Brom
wrote:

> 2009/8/14 Prateek :
> > Hi,
> >
> > Can somebody please provide me link to a good online resource or e-
> > book for doing natural language processing programming in Python.
> >
> > Thanks,
> > Prateek
> > --
> > http://mail.python.org/mailman/listinfo/python-list
> >
>
> Maybe you could start with NLTK
> http://www.nltk.org/
> Check the toolkit as well as the documentation.
>
> hth
>  vbr
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
Bidegg worlds best auction site
http://bidegg.com
-- 
http://mail.python.org/mailman/listinfo/python-list