Re: problems with smtplib

2005-09-02 Thread Jon Hewer
I'm running Fedora Core 3, and I assume thats useing sendmail...

On 2 Sep 2005 04:25:41 -0700, Harlin Seritt [EMAIL PROTECTED] wrote:
 What are you getting in your smtpd logs? Are you using postfix?
 sendmail? or are you running this against a Windows stmp service?
 
 Harlin Seritt
 Internet Villa: www.seritt.org
 
 --
 http://mail.python.org/mailman/listinfo/python-list

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


Re: problems with smtplib

2005-09-02 Thread Jon Hewer
just got home and i've tried my script on windows with my isp's smtp
server, and found that my code wasn't getting past the s.connect()

changed me code to:

s = smtplib.SMTP('smtp.lineone.net')
s.sendmail(me, to, msg.as_string())
s.quit()

and now it works fine

On 9/2/05, Steve Holden [EMAIL PROTECTED] wrote:
 Peter Hansen wrote:
  Steve Holden wrote:
 
 n00m wrote:
 
 
 I also can't get my SMTP (win2k) working with Python.
 But... funnily this works fine:
 
 import smtplib
 s = smtplib.SMTP('smtp.mail.ru')
 s.sendmail('[EMAIL PROTECTED]', '[EMAIL PROTECTED]', 'hi
 there!')
 s.quit()
 
 
 That's pretty strange: the second argument should be a list. Are you
 *sure* it worked?
 
 
  No longer required (as of at least Python 2.3 if not earlier).
 
  to_addrs : A list of addresses to send this mail to.  A bare string
  will be treated as a list with 1 address.  (from smtplib.py sendmail()
  docstring)
 
 Oops. Documentation bug. Fortunately it  looks like it's been fixed in
 response to bug 1217513. Thanks for the tip, Peter.
 
 regards
   Steve
 --
 Steve Holden   +44 150 684 7255  +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


Re: command line arguments

2005-09-01 Thread Jon Hewer
What's the purpose of this utility?  Is it to do something with the URL?
And the URL must always be specified?  What about the name?  Also
mandatory, or optional?  The relationship between the two?

its just a simple rss reader.  i'm writing it almost purely just to
get me using language (i'm learning python)  it lets you save rss
feeds, and to do this one would specify a name and url (ie you have to
specify both), but there are other things it can do (remove a rss
feed, view a feed) hence i thought it was best to using command line
options

You also could opt for the OptionParser in optparse..

Thanks, i'll take a look

On 8/31/05, Michael Hoffman [EMAIL PROTECTED] wrote:
 [EMAIL PROTECTED] wrote:
 
  pyparser.add_option(-n, --name, dest=name, action=store,
  py   help=enter a name)
   pyparser.add_option(-u, --url, action=store, dest=url,
   help = enter an url)
 
 It's worth noting that this will have the same effect and involves less
 repetitive typing:
 
 parser.add_option(-n, --name, help=enter a name)
 parser.add_option(-u, --url, help=enter a url)
 
 Discovering this has made optparse usage much more painless for me, and
 also reduces the incidence of those nasty multiple line option additions.
 
 Although I should note for the record that I agree with Peter Hansen
 that if the arguments are not *optional* then they should not be made
 options in this manner.
 --
 Michael Hoffman
 --
 http://mail.python.org/mailman/listinfo/python-list

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


command line arguments

2005-08-31 Thread Jon Hewer
hi

i am writing a little script and currently implementing command line
arguments following the guide by mark pilgrim from dive into python;

http://diveintopython.org/scripts_and_streams/command_line_arguments.html

thats all fine, however i am not sure of the BEST way to handle
multiple command line arguments

for my script, i want to be able to accept two arguments, a name and a
url, but i am not sure if its best to use one command line option/flag
(eg -n to specify name) and then grab the url from the extra data
which will be in 'args':

opts, args = getopt.getopt(sys.argv[1:], n:, [name=])

or to have two command line options/flags, -n and -u, and checking
that these have both been specified and then proceeding (this might be
a little messier)

any tips would be much appreciated

thanks in advance
jon
-- 
http://mail.python.org/mailman/listinfo/python-list


ideas for university project ??

2005-08-26 Thread Jon Hewer
Hi

I'm about to start my third, and final, year in computer science at
cambridge uni, and i need to come up with an idea for a software
project, but i'm really struggling for ideas, and i was wondering
whether anyone here had any suggestions.

I'd say i'm probably most experienced in Java, but I have started
learning Python, and although i haven't got very far yet, I plan on
doing some more in the next few weeks.

Areas of interested include AI, distributed systems.  Most of all i
want something that is interesting, and actually useful (thats
probably stating the obvious!)

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


Re: ideas for university project ??

2005-08-26 Thread Jon Hewer
On 8/26/05, bruce [EMAIL PROTECTED] wrote:
 1st question, can this be part of a startup?
 2nd question, does your university expect to own the rights/IP of your
 efforts
 3rd question, are you serious, or just looking for a 'project' for a grade

I am pretty sure the university will hold any rights.

I am not just looking for a project for a grade, I want to do
something interesting and useful, and I also need to start thinking
about the future, and if I really enjoy my project then maybe it's
something I'd consider focusing on in the future.

 if you're serious, we can use your help! we're starting a project to create
 a business dealing with used texbooks for universities on US/Canadian
 college campuses. think ebay/craigslist meets the college campus.

 the project will invlove a great deal of distributed/parallel processing as
 we build the grid/spidering functionality to create the underlying
 databases..

I don't think my university would be too keen on this, because any
work I do will, I expect, largely depend on the work of othersif
something falls through then I'd be a bit screwed.  But thanks anyway
for the suggestion.


It would, however, be perfectly acceptable to build upon a well
established piece of open source software - this is very common.


Thanks for all of the other suggestions, I'll research them a little
bit more, and I may email some of you directly for more info if that's
ok.


Keep the ideas rolling :-)
-- 
http://mail.python.org/mailman/listinfo/python-list


Database of non standard library modules...

2005-08-19 Thread Jon Hewer
Is there an online database of non standard library modules for Python?

Quite often people who email this list are after a module to do a certain task.

If it doesn't exist I think that an online database, to which people
could add details of modules, and which people could search, would be
an extremely valuable resource.

Just wondering if anyone could tell me if something like this exists
(probably does), and if not, I'll get to work :)

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


Re: Python for Webscripting (like PHP)

2005-08-19 Thread Jon Hewer
I like the look of cheeryPy - snyone know if its easy to get it
running on top of Apache?

Thanks

On 19 Aug 2005 04:10:23 -0700, paron [EMAIL PROTECTED] wrote:
 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

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


Re: Python for Webscripting (like PHP)

2005-08-19 Thread Jon Hewer
'cherryPy' even

On 8/19/05, Jon Hewer [EMAIL PROTECTED] wrote:
 I like the look of cheeryPy - snyone know if its easy to get it
 running on top of Apache?
 
 Thanks
 
 On 19 Aug 2005 04:10:23 -0700, paron [EMAIL PROTECTED] wrote:
  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
 

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


Re: Python for Webscripting (like PHP)

2005-08-19 Thread Jon Hewer
Ah cool, thanks, i hadn't spotted that page

:)

On 19 Aug 2005 04:51:06 -0700, paron [EMAIL PROTECTED] wrote:
 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

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


Re: up to date books?

2005-08-18 Thread Jon Hewer
mark pilgrim's dive into python is a good book if you're new to python

i also have python cookbook, and foundations of python network
programming - i haven't really had a chance to look at these in detail
yet but both of these look good

On 8/18/05, Paul Dale [EMAIL PROTECTED] wrote:
 
 I highly recommend the Safari library service from Oreilly (
 http://safari.oreilly.com ) you can check out all of the books listed
 below and about 10,000 more. The library contains much more than just
 Oreilly's books, but they are, of course, all in there.
 
 The first 2 weeks is free after that it's $20/month. You can check out
 10 books at a time and you have to keep them for a month. You can
 download chapters, print pages, and search all the books in the library,
 as well as search across books you've checked out.
 
 It's a great way to get access to a broad range of technical books.
 
 One thing to be careful of. As the old books are there too it's possible
 to grab a first version when you might want a second or third version.
 Always list by date and make sure you're looking at the new stuff.
 
 Cheers,
 
 Paul
 
 Adriaan Renting wrote:
 
 I learned Python from the Learning Python book that's first on Alessandros 
 list. If you have the Second Edition, that includes coverage for Python 2.3, 
 I think you have quite a nice introductory book.
 As a reference book Python in a Nutshell and of course the Python 
 documentation itself are quite good.
 
 Adriaan
 
 
 
 
 Alessandro Bottoni [EMAIL PROTECTED] 08/18/05 9:02 am 
 
 
 John Salerno wrote:
 
 
 
 hi all. are there any recommendations for an intro book to python that
 is up-to-date for the latest version?
 
 
 
 I do not know how much up-to-date they are but I have to suggest you these
 books:
 
 - Learning Python
 By Mark Lutz and David Ascher
 published by O'Reilly
 Most likely the best introductory book on Python
 
 - Python Cookbook
 By Alex Martelli and David Ascher
 published by O'Reilly
 By far the most useful book on Python after your first week of real use of
 this language
 
 Also, the fundamental
 - Programming Python (the 2nd edition ONLY)
 By Mark Lutz
 published by O'Reilly
 Is very useful for understanding the most inner details of Python
 
 
 
 would reading a book from a year or two ago cause me to miss much?
 
 
 
 No. Python did not changed too much since rel. 1.5. You can still use a book
 published in 2001 as a introductory book (as I do). The changes are
 exhaustively described both in the official documentation and in the very
 fine what's new in... articles written by Andrew Kuchlin for every new
 release (see www.python.org).
 
 CU
 
 ---
 Alessandro Bottoni
 
 
 --
 http://mail.python.org/mailman/listinfo/python-list

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


Re: Ideas for Python project?

2005-08-04 Thread Jon Hewer
Thanks i'll check it out.  I'm not very good yet tho!

On 8/4/05, Stuart Turner [EMAIL PROTECTED] wrote:
 Jon Hewer wrote:
 
  Hi
 
  I'm pretty new to Python, and recently been working my way through
  Dive Into Python, and I'm currently writing a really simple rss reader
  purely to get familiarised with the language.  I want to move onto
  something a little more challenging, but I'm stuck for ideas on what
  to do.
 
  I'm after a project that can start quite simple, but has lots of room
  for expansion when I get more confident with Python.  Ideally
  something which would start as a command line program, and then when I
  feel adventurous I could build a GUI for it.
 
  I have just bought the Foundations of Python Network Programming book,
  so maybe something network related would be good?
 
  Cheers
  Jon
 
 I saw a competition in Linux format - may be something to consider.
 
 - Stuart
 --
 http://mail.python.org/mailman/listinfo/python-list

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


Re: pygettext ?

2005-08-03 Thread Jon Hewer
Hi

I'm pretty new to Python, and recently been working my way through
Dive Into Python, and I'm currently writing a really simple rss reader
purely to get familiarised with the language.  I want to move onto
something a little more challenging, but I'm stuck for ideas on what
to do.

I'm after a project that can start quite simple, but has lots of room
for expansion when I get more confident with Python.  Ideally
something which would start as a command line program, and then when I
feel adventurous I could build a GUI for it.

I have just bought the Foundations of Python Network Programming book,
so maybe something network related would be good?

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


Re: pygettext ?

2005-08-03 Thread Jon Hewer
That was sent with the wrong title, doh!

On 8/3/05, Jon Hewer [EMAIL PROTECTED] wrote:
 Hi
 
 I'm pretty new to Python, and recently been working my way through
 Dive Into Python, and I'm currently writing a really simple rss reader
 purely to get familiarised with the language.  I want to move onto
 something a little more challenging, but I'm stuck for ideas on what
 to do.
 
 I'm after a project that can start quite simple, but has lots of room
 for expansion when I get more confident with Python.  Ideally
 something which would start as a command line program, and then when I
 feel adventurous I could build a GUI for it.
 
 I have just bought the Foundations of Python Network Programming book,
 so maybe something network related would be good?
 
 Cheers
 Jon

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


Ideas for Python project?

2005-08-03 Thread Jon Hewer
Hi

I'm pretty new to Python, and recently been working my way through
Dive Into Python, and I'm currently writing a really simple rss reader
purely to get familiarised with the language.  I want to move onto
something a little more challenging, but I'm stuck for ideas on what
to do.

I'm after a project that can start quite simple, but has lots of room
for expansion when I get more confident with Python.  Ideally
something which would start as a command line program, and then when I
feel adventurous I could build a GUI for it.

I have just bought the Foundations of Python Network Programming book,
so maybe something network related would be good?

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


Re: Python IDE's

2005-08-01 Thread Jon Hewer
I do use Vim a lot.  I am currently using it for some PHP development
i'm doing.  I'm been using it so much recently that i keep pressing
ESC and typing vi commands out of vi.

But, if i use Vi, then whenever i want to test some code i have to
open up python, import the necessary modules and run it - I like the
idea of developing python in an IDE and just hitting a run button.

Cheers
Jon

On 8/1/05, Caleb Hattingh [EMAIL PROTECTED] wrote:
 You know, for several years I was one of those people who simply ignored
 posts like this about Vi/Vim because I happened to come across it once on
 a sparc machine and thought it was ridiculous that I couldn't figure out
 how to type a simple note.   I thought that Vi (Vim) was some kind of
 weird and ancient legacy program that just never caught up with the times.
 
 About 3 or 4 months ago, I had a truly large amount of ascii text editing
 and formatting to do and in a plea for advice, I got the standard cliche
 replies to try Vim.   Having nothing to lose, I gave it a shot.  It took
 only about two weeks before I was competent, but it was probably the
 greatest time investment I have ever made.   I now use Vim for any text
 editing purpose, and especially python coding.
 
 No doubt, the majority of people who read your post will instantly ignore
 it - but I know from personal experience that it would take a very special
 IDE to compete with Vim for the manipulation of text (GUI design, of
 course, is another story altogether).
 
 regards
 Caleb
 
 
 On Mon, 01 Aug 2005 18:57:51 +0200, projecktzero [EMAIL PROTECTED]
 wrote:
 
  VIM or Emacs. I use VIM on Windows, Mac, and VMS. I'd consider it more
  of an editor than an IDE, but there are many IDE features available
  with plug ins.
 
 
 --
 http://mail.python.org/mailman/listinfo/python-list

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


Python IDE's

2005-07-31 Thread Jon Hewer








Hi



I am yet to find a Python IDE (for both Windows and Mac)
that I like. Any suggestions?



Thanks






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

psp php integration

2005-07-25 Thread Jon Hewer








Hello,



I am upgrading a PHP based site and want to use Python
(using mod_python and psp file) to achieve what is required. However, I
do not want to recode the navigation part of the site which is currently coded
using PHP. Somehow I need to merge the outputs of the PHP file and my PSP
file to create the HTML output which is sent to the browser. Can this be
done inside my PSP file? If not, is there any other way in Python (or PHP)
to achieve this?



Thanks

Jon






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