[issue1001] 2to3 crashes on input files with no trailing newlines

2007-09-06 Thread Adrian Holovaty

Adrian Holovaty added the comment:

I just checked, and, yes, it's been fixed.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1001
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1034] [patch] Add 2to3 support for displaying warnings as Python comments

2007-08-26 Thread Adrian Holovaty

New submission from Adrian Holovaty:

Per a Python-3000 mailing list discussion here --
http://mail.python.org/pipermail/python-3000/2007-August/009835.html --
I have implemented an addition to the 2to3 utility that enables warnings
to be output as comments in Python source code instead of being logged
to stdout.

See the attached patch and a description of the changes here:
http://mail.python.org/pipermail/python-3000/2007-August/009881.html

--
components: Demos and Tools
files: 2to3_insert_comment.diff
messages: 55331
nosy: adrianholovaty
severity: normal
status: open
title: [patch] Add 2to3 support for displaying warnings as Python comments

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1034
__

2to3_insert_comment.diff
Description: Binary data
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1034] [patch] Add 2to3 support for displaying warnings as Python comments

2007-08-26 Thread Adrian Holovaty

Adrian Holovaty added the comment:

I'm also attaching 2to3_comment_warnings.diff, which is an example of
how we could integrate the insert_comment() method from the first patch
to replace the current functionality of fixes.basefix.BaseFix.warning().

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1034
__

2to3_comment_warnings.diff
Description: Binary data
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1001] 2to3 crashes on input files with no trailing newlines

2007-08-23 Thread Adrian Holovaty

Changes by Adrian Holovaty:


--
components: Demos and Tools
severity: normal
status: open
title: 2to3 crashes on input files with no trailing newlines
type: crash

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1001
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1001] 2to3 crashes on input files with no trailing newlines

2007-08-23 Thread Adrian Holovaty

New submission from Adrian Holovaty:

The 2to3 Python 3k migration utility crashes with the following
traceback on any input file that does *not* have a trailing newline. It
doesn't seem to matter whether the input file needs modifications or not.


RefactoringTool: Can't parse /path/to/testing2.py: ParseError: bad
input: type=0, value='', context=('\n', (2, 0))
RefactoringTool: No files need to be modified.
RefactoringTool: There was 1 error:
RefactoringTool: Can't parse /path/to/testing2.py: ParseError: bad
input: type=0, value='', context=('\n', (2, 0))

--
nosy: +adrianholovaty

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1001
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1001] 2to3 crashes on input files with no trailing newlines

2007-08-23 Thread Adrian Holovaty

Adrian Holovaty added the comment:

(Sorry, the previous error snippet isn't a traceback as I had said. It's
the error text.)

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1001
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



ANN: Python interface to Microsoft Outlook Web Access

2006-02-10 Thread Adrian Holovaty
Hi all,

Because I telecommute, I'm limited to using my company's webmail
interface, Microsoft Outlook Web Access, rather than having direct POP
or IMAP access to e-mail. This isn't ideal, for several reasons:

* Outlook Web Access has a horrendous user interface in any browser
other than Internet Explorer. (And I'm on Linux, so I can't use
Internet Explorer.) It's hard to search, the icons are unintuitive, it
encourages top-posting and doesn't have the basic benefits of a desktop
e-mail app, such as spell-checking and address auto-completion.
* Using webmail forces me to keep a browser window/tab open to
check messages. And Outlook Web Access doesn't auto-refresh, so I have
to remember to click Inbox every so often to get the latest messages.
This is a huge disruption.
* It's just simpler and more efficient to have all my e-mail in one
place.

So I figured I'd do a bit of programming to make my life easier. The
result: weboutlook, a Python library that screen-scrapes Outlook Web
Access. It can:

* Log into a Microsoft Outlook Web Access account on a given server
with a given username and password.
* Retrieve all e-mail IDs from the first page of your Inbox.
* Retrieve all e-mail IDs from the first page of any folder in your
webmail (such as Sent Items).
* Retrieve the full, raw source of the e-mail with a given ID.
* Delete an e-mail with a given ID (technically, move it to the
Deleted Items folder).

Also, I've included a Python implementation of a POP server that
provides a POP interface to the scraper. This means I can point my
desktop e-mail client at the script, my e-mail client will think it's a
normal POP server, and my e-mails will download nicely into my desktop
app, with the screen-scraper running silently behind the scenes.

I put this together in my free time, and it's been working nicely for a
week, so I'm open-sourcing it for other poor souls who've been
sentenced to use Outlook Web Access. I presented this at yesterday's
Chicago Python Users Group meeting and was surprised to see that, even
in a group of only 30 people, 5 or 6 people used Outlook Web Access
through their company. I hope somebody finds this useful.

http://www.holovaty.com/code/weboutlook/

Please send comments and improvements to [EMAIL PROTECTED]

Adrian

--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org

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


Re: New Python.org website ?

2006-01-22 Thread Adrian Holovaty
Fredrik Lundh wrote:
 (or maybe the entire site should be a run via a web framework with good
 support for caching, such as

 http://www.djangoproject.com/documentation/cache/

 any django hackers around with some cycles to spare ? )

Yeah, I or other Django folks would be quite happy to set that up. Just
let me know!

Adrian

-- 
Adrian Holovaty
holovaty.com | chicagocrime.org | djangoproject.com

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


Re: Being unjust

2006-01-18 Thread Adrian Holovaty
Fuzzyman wrote:
 web.py has the great advantage that (allegedly) you can migrate apps
 from CGI to FastCGI, mod_python, WSGI.

This isn't an advantage of web.py over other frameworks. You can do the
same thing with Django, because it has a WSGI backend; people run
Django with mod_python, FastCGI, etc. I believe the same flexibility
applies to TurboGears.

 There are a few fundamental philosophy differences in web apps which
 makes it a bit of a religious war. This means getting something into
 the standard library is likely to be the cause of intractable
 discussions. *sigh*

As much as I'd like to see the core bits of Django (which wouldn't
require a database or include other fancy high-level features) included
in the standard library, I do think it'd devolve into a religious war
inevitably. A better goal, I think, would be to add some WSGI code to
the standard library -- for instance, code that runs a development
server for a WSGI-compliant framework, etc.  Perhaps wsgiref:
http://svn.eby-sarna.com/wsgiref/

Just my two cents,
Adrian

-- 
Adrian Holovaty
holovaty.com | chicagocrime.org | djangoproject.com

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


Re: Help me in this please--is Python the answer?

2006-01-13 Thread Adrian Holovaty
Ray wrote:
 Does the comparison between dynamic and static language carry over to
 comparison between Django and Turbogear too? Is this what is meant by
 Turbogear is much more flexible than Django?

Nah, the difference is more than Django is a complete product whereas
TurboGears is a collection of unrelated parts glued together. For more
on this topic, see here:

http://www.oreillynet.com/pub/wlg/8986

Adrian

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


Re: Help me in this please--is Python the answer?

2006-01-12 Thread Adrian Holovaty
Ray wrote:
 Yes, but this is more of a web application though--something that I've
 never developed in Python before, so... I'll be evaluating Django
 shortly--let me see how it compares to Tomcat.

Performance is one of the key features of Django. For example, I'm
using Django at washingtonpost.com for the U.S. Congress Votes
Database, which has more than 4 million records and is linked-to from
the washingtonpost.com home page whenever there's a key congressional
vote. (http://projects.washingtonpost.com/congress/)

The server doesn't break a sweat, thanks to Django's
very-convenient-and-powerful cache system:
http://www.djangoproject.com/documentation/cache/

Also, the developers at grono.net, a Polish social networking site with
more than half a million users, have converted various bits of their
Java code to Python/Django. They've found that Django is not only much
quicker (and more fun) to develop in, it's also *faster* than Java and
requires less hardware. E-mail me personally if you want their contact
information for direct testimonials; we'll be publishing some more
testimonials publically as we get closer to Django 1.0.

I would never use TurboGears or Ruby on Rails over Django for any
performance-intensive Web app. In my opinion, both frameworks make some
poor design decisions regarding the importance of performance.

Adrian
--
Adrian Holovaty
holovaty.com | chicagocrime.org | djangoproject.com

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


ANN: Django 0.91 released

2006-01-11 Thread Adrian Holovaty
We're pleased to announce Django 0.91, the result of a month and a half
of feature additions, bug fixes, usability changes and other
improvements to the Django Web framework.

http://www.djangoproject.com/

There are literally hundreds of improvements since version 0.90 -- but
some of the most notable are:

* Merged the new-admin branch, which heavily refactored the way
the admin works, to make it more extensible.

* Changed passwords to be stored with a salt, and with a tighter
(and swappable) encryption algorithm.
http://www.djangoproject.com/weblog/2005/nov/20/passwordchange/

* URLconfs no longer require named groups; you can use simple
parentheses. http://www.djangoproject.com/weblog/2005/nov/28/urls/

* Changed the default project layout to add a manage.py utility,
which avoids frustration with DJANGO_SETTINGS_MODULE.

* Added a gorgeous template-debugging error page in the case of
template syntax errors.
http://www.djangoproject.com/weblog/2005/nov/23/template_errors/

* Added an {% include %} template tag.
http://www.djangoproject.com/documentation/templates/#include

* Added a framework for template context processors.
http://www.djangoproject.com/documentation/templates_python/#subclassing-context-djangocontext

* Improved the e-mail library to prevent header injections.
http://www.djangoproject.com/documentation/email/#preventing-header-injection

* Added OR lookups to the database API.
http://www.djangoproject.com/weblog/2005/nov/30/or/

* Made the template system scoped to the parser instead of the
template module. Also changed the way tags/filters are registered and
added support for multiple arguments to the {% load %} tag.

In addition to the many, many changes, we've reworked the tutorial to
simplify things -- namely using the new manage.py utility instead of
futzing with the Python path and environment variables.
http://www.djangoproject.com/documentation/tutorial1/

Many thanks to all the great people who've contributed to this project.
You can check them out in the AUTHORS file:
http://code.djangoproject.com/browser/django/trunk/AUTHORS


About Django


Django is a high-level Python Web framework that encourages rapid
development and clean, pragmatic design. It lets you write high-quality
Web apps very quickly, with very little code.

It gives you:

* An object-relational mapper, which currently works with PostgreSQL,
MySQL and SQLite. (Oracle and MS-SQL support are coming.) This lets you
query databases in Python; there's no need to write SQL if you don't
want to.

* A template system.

* A beautiful, production-ready admin interface -- for free.

* Full internationalization (i18n) support.

* A super-cool community!

* An RSS/Atom-producing framework.

* Tons of other niceties, such as generic views (which abstract common
Web-development patterns), based on several years' worth of solving
Real Problems in the Real World.

Enjoy!

The Django team

--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org

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


Re: RoR like (was : SPE 0.8.1.b Python IDE...)

2005-12-16 Thread Adrian Holovaty
bruno at modulix wrote:
 Adrian, what you describe here is *exactly* what I call no Ajax
 support: you have to handle the whole thing manually, the framework
 doesn't provide anything by itself. Would you say the CGI module offers
 support for templating, data persistance and Ajax as well ?-)

Hey Bruno,

Sorry for the misunderstanding. Here's the Django code I use on the
Ajax bit of the chicagocrime.org Find your District page
(http://www.chicagocrime.org/districts/). See the Guess district
button on that page.


def rpc_guess_district(request, longitude, latitude):
try:
b = beats.guess_by_coordinates(float(longitude),
float(latitude))
except beats.BeatDoesNotExist:
return HttpResponse(Looks like you're not centered on a point
in Chicago.  + \
Please move the map to Chicago and try again.)
return HttpResponse(You're centered on %s %
b.get_name_and_district())


My point is, you don't need a huge serialization framework to do Ajax
easily. As long as a server can return snippets of code (or even plain
text), you can do it.

These pages work the same way:
http://www.chicagocrime.org/map/
http://www.chicagocrime.org/wards/
http://www.chicagocrime.org/route/

Hope that clears up my point of view,
Adrian

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


Re: RoR like (was : SPE 0.8.1.b Python IDE...)

2005-12-15 Thread Adrian Holovaty
bruno at modulix wrote:
 RoR is not an IDE, it's a web framework. The closest things in Python
 are TurboGears (good Ajax/js support via Mochikit), Subway (never
 tested), and Django (no Ajax support AFAIK).

Note that no Ajax support is misleading. Of course you can use Ajax
with Django, just as you can use it with *any* Web framework. That's
because Ajax is a browser-side technology (JavaScript), not a
server-side technology (Python). Django is just as capable of producing
JavaScript as it is of producing (X)HTML or whatever else.

Hope that clears things up!

Adrian

-- 
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org

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


Re: Ruby on Rails Job Site -- Is there a Python equivalent?

2005-12-01 Thread Adrian Holovaty
Ray wrote:
 I just found a job listing site for Ruby on Rails.

 http://jobs.rubynow.com/

 I wonder if there's an equivalent one for Django?

Here ya go:

http://code.djangoproject.com/wiki/DevelopersForHire

See the Django-powered jobs section. We could definitely advertise
this page more, as it's a bit hidden at the moment on the Django wiki.

There are three Django jobs on that page now, and I know of at least
two others. See
http://www.djangoproject.com/weblog/2005/nov/27/weekinreview/ .

Hope this helps!

Adrian

-- 
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org

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


ANN: Django 0.90

2005-11-16 Thread Adrian Holovaty
After a months-long pre-release period, we're pleased to announce the
first release of Django, the Web framework for perfectionists (with
deadlines).

Django is a high-level Python Web framework that encourages rapid
development and clean, pragmatic design. It lets you write high-quality
Web apps very quickly, with very little code.

It gives you:

* An object-relational mapper, which currently works with PostgreSQL,
MySQL and SQLite. (Oracle and MS-SQL support are coming.) This lets you
query databases in Python; there's no need to write SQL if you don't
want to.

* A template system.

* A beautiful, production-ready admin interface -- for free.

* Full internationalization (i18n) support.

* A super-cool community!

* An RSS/Atom-producing framework.

* Tons of other niceties, such as generic views (which abstract common
Web-development patterns), based on several years' worth of solving
Real Problems in the Real World.

Django has been used on production sites -- lawrence.com, ljworld.com,
6newslawrence.com, kusports.com, visitlawrence.com -- since late 2003.
It also powers chicagocrime.org and a host of other sites all over the
world. See http://code.djangoproject.com/wiki/DjangoPoweredSites .

This release is version 0.90. Our goal is to wrap up remaining changes
for 1.0 in the coming weeks/month, and release 1.0 with a guarantee of
backwards compatibility. There's not yet a guarantee of backwards
compatibility between releases.

http://www.djangoproject.com/
http://www.djangoproject.com/download/

Enjoy!

Adrian

-- 
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org

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


ANN: Django 0.90

2005-11-16 Thread Adrian Holovaty
After a months-long pre-release period, we're pleased to announce the
first release of Django, the Web framework for perfectionists (with
deadlines).

Django is a high-level Python Web framework that encourages rapid
development and clean, pragmatic design. It lets you write high-quality
Web apps very quickly, with very little code.

It gives you:

* An object-relational mapper, which currently works with PostgreSQL,
MySQL and SQLite. (Oracle and MS-SQL support are coming.) This lets you
query databases in Python; there's no need to write SQL if you don't
want to.

* A template system.

* A beautiful, production-ready admin interface -- for free.

* Full internationalization (i18n) support.

* A super-cool community!

* An RSS/Atom-producing framework.

* Tons of other niceties, such as generic views (which abstract common
Web-development patterns), based on several years' worth of solving
Real Problems in the Real World.

Django has been used on production sites -- lawrence.com, ljworld.com,
6newslawrence.com, kusports.com, visitlawrence.com -- since late 2003.
It also powers chicagocrime.org and a host of other sites all over the
world. See http://code.djangoproject.com/wiki/DjangoPoweredSites .

This release is version 0.90. Our goal is to wrap up remaining changes
for 1.0 in the coming weeks/month, and release 1.0 with a guarantee of
backwards compatibility. There's not yet a guarantee of backwards
compatibility between releases.

http://www.djangoproject.com/
http://www.djangoproject.com/download/

Enjoy!

Adrian

-- 
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org

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


ANN: Greasemonkey compiler

2005-04-26 Thread Adrian Holovaty
Greasemonkey (http://greasemonkey.mozdev.org/) is a Mozilla Firefox
extension that allows you to write scripts, in JavaScript, that alter
specific Web pages.

I've written a compiler for these scripts. It's a Python module that
takes a user script as input and creates a full-fledged Firefox extension.

This is useful if you're a script developer and want to distribute your
work to people without having to ask them to install Greasemonkey. It can
also be a helpful starting point if you want to write a more advanced
Firefox extension.

Python code (GPL):

http://www.letitblog.com/code/python/greasemonkey.py.txt

Web interface:

http://www.letitblog.com/greasemonkey-compiler/

Feel free to e-mail comments, bug fixes, etc.

Adrian Holovaty

[EMAIL PROTECTED]
http://www.holovaty.com/
-- 
http://mail.python.org/mailman/listinfo/python-list