Re: Pros/Cons of Turbogears/Rails?

2006-09-01 Thread paron

[EMAIL PROTECTED] wrote:

 I was initially leaning towards Rails due to maturity,
 but the most recent version of TurboGears seem to have
 fixed a lot of the ad hoc feeling I got from previous
 versions. But I'm still very much up in the air.

 Thanks,
 Ken

I've found that familiarity with Windows in the Ruby/Rails community is
less than in the Python/TG community. Ruby/Rails seems to have been
mainly *nix until fairly recently.

Sometimes the Windows version of a module or tutorial will lag
significantly. (ldap comes to mind.) Sometimes Windows-oriented
questions get pretty short shrift along the lines of: Perish the
thought! or Why would you? instead of serious treatment.

It's not a deal-breaker and neither community is perfect in this
respect. I now work mostly with Ruby/Rails, but I did Python/CherryPy
for quite a while, and that's my impression.

Ron

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


Re: MS word document generator

2006-03-16 Thread paron
You might also consider OpenOffice, which writes to ODF. That way,
you're working to a standard. You can script OpenOffice in Python
(http://udk.openoffice.org/python/python-bridge.html) . OpenOffice can
save in .doc, and does a pretty good job of making a file that most MS
Word versions will render properly.

According to http://opendocumentfellowship.org/Devel/LibOpenDocument,
there is a Python API in development, but I don't know how far along
they are. ODF isn't too bad to hack, if you need to do that.

Ron

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


Re: Please, I Have A Question before I get started

2006-03-14 Thread paron
Well, Nicholas Chase just posted an OpenLaszlo tutorial/app that shows
how OpenLaszlo handles sounds. Try
http://www-128.ibm.com/developerworks/edu/os-dw-os-php-openlaszlo1-i.html
You have to register, but it's free, and they don't bug you. It's PHP
driven, but that part's easily ported to Python.

Anyway, there's the basis of an all open-source or freeware application
that animates with sounds.

Ron

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


Re: Please, I Have A Question before I get started

2006-03-13 Thread paron
Since you are comfortable with HTML, you could use the browser as your
GUI, and use a lightweight python server like Karrigell (or CherryPy,
or Turbogears) to serve the pages. A little javascript to move the
highlighting around, and . . .

Well, frankly, it's still harder than it ought to be. (I agree with
Steven, it sure seems like it has been long enough.) It's not totally
dreadful, though, and it is free.

Ron

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


Re: Please, I Have A Question before I get started

2006-03-13 Thread paron
Well, there's OpenLaszlo, which handles the sounds/animation for
http:www.pandora.com, I understand. It may be overkill for a desktop
app, but it's free. It was originally written in Python, I think, but
it uses ECMAScript for scripting.

It's free, and reportedly handles sounds and animations, and isn't too
hard to program.

Ron

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


Re: Write a GUI for a python script?

2006-03-06 Thread paron
If you are already familiar with html, you might consider using the
browser for the UI. It's pretty much cross-platform, if you ever need
that, and users are accustomed to browser look/feel.

If your installation doesn't already have a python-enabled http server
running, there are several options (python CGI scripts, cherrypy,
kerrigell), any one of which is easier to learn and more
generally-applicable (I think) than any of the gui toolkits.

Ron

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


Re: Embedding an Application in a Web browser

2006-02-16 Thread paron
From the OP:
snipAs for the application it has to be able display simple animated
graphics such as circles, lines and squares. However if someone clicks
on a shape it should open up another application, such as Word. Thanks,

Rod

Python Newbie /snip

snipThe application itself can sit on the local
users computer, rather than actually being downloaded via the web. It
will be retrieving data from a variety of sources./snip

I was thinking that the security provisions might make it difficult for
the script in the browser to interact with the OS. If that is simple
to get around, then I agree, Karrigell is overkill.

OTOH, Karrigell makes it simple to interact with the local machine's
OS, and especially if you are a beginner at Python. YMMV, of course.
Thanks for offering your opinion.

Ron

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


Re: Embedding an Application in a Web browser

2006-02-15 Thread paron
You may already know this, but I don't think anyone has mentioned it
explicitly.

You can run a Python web server (I like CherryPy) on the local machine,
and serve pages to localhost. Everything else is just plain old
Python, and talking to the OS is no problem.

Ron

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


Re: Embedding an Application in a Web browser

2006-02-15 Thread paron
I forgot -- I like the idea of Kerrigell, too. It runs on top of
CherryPy, and lets you use python either in the server (which is just a
little program on your local machine) or embedded in the html pages, or
in a Kerrigell service, which is an application server based on Python.

So, a script to print the squares of numbers from 1 to 9 looks like:

Python script +

print h1Squares/h1
for i in range(10):
print %s :b%s/b %(i,i*i)


Karrigell service 

def index():
print h1Squares/h1
for i in range(10):
print %s :b%s/b %(i,i*i)

HTML Inside Python +++

h1Squares/h1
for i in range(10):
%s :b%s/b %(i,i*i)

Python Inside HTML +++

h1Squares/h1
%
for i in range(10):
print %s :b%s/b %(i,i*i)
%

It's certainly flexible.

As far as your animated shapes go, you have a number of unattractive
options!

Flash (my preference, if you already have the authoring software,)
openLazslo (maybe the best bet for free),
SVG (which requires a plug-in for IE,) or
creating them and making them interactive with Javascript ( see
http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm )

Ron

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


Re: Embedding an Application in a Web browser

2006-02-15 Thread paron
I forgot -- I like the idea of Kerrigell, too. It runs on top of
CherryPy, and lets you use python either in the server (which is just a
little program on your local machine) or embedded in the html pages, or
in a Kerrigell service, which is an application server based on Python.

So, a script to print the squares of numbers from 1 to 9 looks like:

Python script +

print h1Squares/h1
for i in range(10):
print %s :b%s/b %(i,i*i)


Karrigell service 

def index():
print h1Squares/h1
for i in range(10):
print %s :b%s/b %(i,i*i)

HTML Inside Python +++

h1Squares/h1
for i in range(10):
%s :b%s/b %(i,i*i)

Python Inside HTML +++

h1Squares/h1
%
for i in range(10):
print %s :b%s/b %(i,i*i)
%

It's certainly flexible.

As far as your animated shapes go, you have a number of unattractive
options!

Flash (my preference, if you already have the authoring software,)
openLazslo (maybe the best bet for free),
SVG (which requires a plug-in for IE,) or
creating them and making them interactive with Javascript ( see
http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm )

Ron

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


Re: Embedding an Application in a Web browser

2006-02-15 Thread paron
Thanks, Kent -- you're right. That'll teach me to work from memory!

Ron

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


Re: How to generate graphics dynamically on the web using Python CGI script?

2006-01-23 Thread paron
Steve Holden wrote:
 Debashis Dey wrote:
  Hello,
 
  I have a python CGI program. I would like to show a graph within a HTML
  plage. I would like to dynamically generate the graph using the python
  CGI script on the web server side and send it to the browser.
 
  My question is how can I do this in python? Is there a free tool to do
  this? Can someone please send me some simple python code to draw simple
  graphics within HTML (e.g. draw a line or a circle).
 
 Unfortunately HTML does not include graphics facilities, simply the
 ability to refer to graphical resources.

 The typical way to include a created graphic would be:

   1. Create a (.png, .jpg, .gif) file showing the
  image you want

   2. Store it in a temporary file whose name will be
  unique to the current session

   3. Generate an HTML response including an IMG ...
  tag referring to the newly created graphic

SVG might be suitable; Firefox supports a reasonable subset of SVG out
of the box, and even IE supports it through an Adobe plugin.

If the OP is intending the page for a specific group of users, it could
be a very simple solution.

Ron

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


Re: Which Python web framework is most like Ruby on Rails?

2005-12-20 Thread paron
Wow! You´re right, at least at first reading. It looks REALLY simple,
and almost anything you can dream up will work. Python scripts,
python-in-html, html-in-python, and karrigell services ( based on
CherryPy). Seems to support smart urls, sessions, authentication, and
internationalization out-of-the-box. Documentation seems clean, short,
and to the point.

Has anyone other than Kerrigell himself used it? I think I will use it
around the shop for a desktop project just to get the feel of it. I am
not sure about the Gadfly db -- fine as a default for development; but
I'd need other options for production.

My answer to the perennial Python newbie question, What do I use for a
GUI (please-please-please-I-hope NOT Tkinter or any derivative
thereof)? may change to, Just say 'Kerrigell' and do it in the
browser. 

Ron

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


Re: Which Python web framework is most like Ruby on Rails?

2005-12-20 Thread paron
Oops! Second line on the home page:

snipWith Karrigell you have

. . .
* a pure-Python database engine : KirbyBase

Karrigell can also work with . . . all the databases for which a Python
API exists (sqlite, mySql, PostGreSQL, ZODB, etc). /snip

Well, off to reread and work the tut! My apologies!

Ron

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


Re: How to get started in GUI Programming?

2005-11-28 Thread paron
I think the best route is through the browser. Good cross-platform, has
a reasonable toolkit, and it's familiar for users.

You could look at TurboGears.

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


Re: Creating Pie Chart from Python

2005-09-16 Thread paron
If you can wait a week or two, you can use svg and it will work for  IE
or Firefox.

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


Re: PyGTK or wXPython?

2005-09-14 Thread paron
Just a thought -- you might consider using a HTTP/browser UI. It's
graphically ugly, but it's familiar for users, and it goes
cross-platform very well.

Plus, if you decide to move the app to a Web server, you're already
done.

Ron

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


Re: What XML lib to use?

2005-09-14 Thread paron
One more vote for Amara! I think it's unmatched for ease of use, if you
already know Python.

Ron

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


Re: Python for Webscripting (like PHP)

2005-08-19 Thread paron
Yes the stdlib offers all the basic functions, but why work so hard?
Get CherryPy (http://www.cherrypy.org) and relax a bit. You'll be able
to concentrate on Python for the backend, HTML for the frontend,
without a lot of directory-diddling.

Also, check out
http://www-128.ibm.com/developerworks/opensource/library/os-cherrypy/index.html#main
for a nice, fresh slice.

Ron

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


Re: Python for Webscripting (like PHP)

2005-08-19 Thread paron
Yes, there's a tutorial about that -- there are several options
depending on the URL structure you want to expose, and your version of
Apache. None of them are torturous, though.

Start at http://www.cherrypy.org/wiki/CherryPyProductionSetup and
follow the links down.

Ron

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


Re: GUI - Windows: Where to get started

2005-07-27 Thread paron


Ernesto wrote:
 Hi all,

 Would anyone know a good place to start for learning how to build
 simple GUI's in Windows XP?  I just want users to be able to select a
 few parameters from a pull-down menu, then be able to run some batch
 files using the parameters from the pull down menus.  I would also need
 a Browse menu, so users could point to a place on the local disc (ie
 C:\PointSystemHere).  Can anyone give a noob some tips?  THANKS!!!

You probably already know HTML. You might use CherryPy and put the GUI
in a browser. See http://www.cherrypy.org/wiki/SingleClickAndRun for
demo code.

I think it's the simplest GUI going for python, plus your users already
know a lot about how to use a browser.

Ron

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


Re: What is your favorite Python web framework?

2005-07-18 Thread paron
Admin:

I have kept the following:


  - PyWork - http://pywork.sourceforge.net (Not sure if it's mature)
  - Django - http://www.djangoproject.com (Looks interesting)
  - CherryPy - http://www.cherrypy.org (Unsure)


I have also found a more comprehensive list here:
http://wiki.python.org/moin/WebProgramming
But I'd like to know your opinion on what you think is best.
.
.
.
I favor speed of development, intensive OO development, performance under
heavy load, short learning curve, good documentation and community.

I settled on CherryPy:

Performance under load -- can't say one way or the other. I do know
it's lightweight -- 40kb download, I recall.

Good documentation -- yeah, if you are using the mainstream features.
It's pretty extensible, too, so there are some secondary functions
and features that are not as well documented. I know that the
documentation is a major concern of the oommunity, and that they are
pretty quick to respond when the docs are unclear.

I give CherryPy very high marks for: speed of development, intensive OO
development, short learning curve (if you already know Python), and
community. And, as I said, for extensibility.

I found I had working apps running on my machine with CherryPy in less
time than I needed to read the installation docs on some other
frameworks. It's just like writing Python, but with one extra object
(cpg (2.0) or cherrypy (2.1) and one extra setting (exposed = True).
That's it. I'd say give it a try -- you can have it running apps and go
through the tutorials in a morning, so why not get first-hand with it?

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


Re: f*cking re module

2005-07-08 Thread paron
That is so handy!! Thanks!

Ron

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


Re: Looking For Geodetic Python Software

2005-06-24 Thread paron
Howard Butler http://hobu.biz/ has some nice Python wrappers for gdal
and Frank Warmerdam's other tools. I have to say, though, that geodesy
is inherently complicated. Python makes it easy to program, but not
easy to understand. http://maps.hobu.net:7080/RPC2 is an XMLRPC service
that he exposes that will transform various coordinate systems: take a
look at http://hobu.biz/index_html/projection_service/blogentry_view to
see what I mean.

Ron Phillips

Tim Daneliuk wrote:
 Is anyone aware of freely available Python modules that can do any of
 the following tasks:

 1) Given the latitude/longitude of two locations, compute the distance
 between them.  Distance in this case would be either the straight-line
 flying distance, or the actual over-ground distance that accounts for
 the earth's curvature.

 2) Given n latitude/longitude coordinates, compute the
 geocenter.  That is, return the lat/long of the location that
 is most central to all n initial coordinates.

 3)  Given n lat/long coordinates, compute a Kruskal-type spanning
  tree.

 4) Given n lat/long coordinates, compute an optimal (shortest or longest)
 visitation path that reaches each node exactly once.  Better still would
 be something that had pluggable heuristic engines so we could try
 different approaches like greedy, shortest-path, hill climbing, and
 so forth.  It would be even nicer if one could also simulate different
 routing schemes (Monte Carlo?).

 In effect, I'm looking for something that mates traditional graph traversal
 heuristics with operations research tools working on a geodetic
 coordinate system.   This is *way* outside my field of expertise so
 I'm hoping someone has taken the pain of it for dummies like me ;)

 TIA,
 --
 
 Tim Daneliuk [EMAIL PROTECTED]
 PGP Key: http://www.tundraware.com/PGP/

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


Re: Python, Perl PDF files

2005-04-27 Thread paron
Hopefully, Adobe will choose to support SVG as a response to
Microsoft's Metro, and take us all off the hook with respect to
cracking open their proprietary format.

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