else:
f(i+1,sm+a[i])
Maybe because you are ignoring the return value of the when you recurse...
try this
else:
return f(i+1, sm+a[i])
-Dave
--
http://mail.python.org/mailman/listinfo/python-list
in order to view the results I need I need python to navigate to
this Javascript link:
javascript:__doPostBack('ctl00$cpMain$pagerTop','4') This basically
translates into go to page 4.
I read the posts on this group, and from what I understand, the
functionality I need is with simplejson?
I have a (web) development computer w/o an SMTP server and want to test
form generated e-mail using a dummy SMTP server that delivers the mail
message to a file, or better yet, to a text editor instead of actually
sending it.
Here's a quick and dirty script I use this for email testing
It would be very helpful when Python would warn you when there are tabs in
your source.
invoke python with the -t option for warnings about tabs or -tt for errors.
-Dave
--
http://mail.python.org/mailman/listinfo/python-list
I'm trying to figure out how to use FTP/SSL (FTPS) - just as a client. Can I
do this in Python? Is everything I need in ftplib? Where else do I look? And
- any good newbie references on using FTPS?
Hi, Nancy,
I'm not sure if ftplib can handle ssh or not, but googling for
python sftp turned up
How can I identify which button has been pressed. Do I need a
separate form for each button and hide all the relevant session fields
in each form or is there a way of identifying which button has been
pressed on the page.
Hi, Richard,
Just give each button (or input) tag a distinct name
I looked for a solution
with mimetools (the way I'd approach it for email) but found nothing.
...
[EMAIL PROTECTED]', 'Content-Type: Multipart/Mixed;', '
boundary=Boundary-00=_A5NJCP3FX6Y5BI3BH890', 'Date: Thu,
...
Playing with
data = n.article('116431')[3]
and
I'm trying to run the following query:
...
member_id=%s AND expire_date NOW() AND completed=1 AND (product_id
Shouldn't you be using the bind variable '?' instead of '%s' ?
(I'm asking because I'm not entirely sure how the execute command is
doing the substitution)
-Dave
--
After we are able to get a succussful login, i need a way that i can browse
my site always including this cookie, like if i went to open up a page, it
would use the cookie we got from logging in.
You need something like this:
import cookielib,urllib2
cookiejar = cookielib.CookieJar()
opener =
I need to build a special http post body that consists of :
name=value +\r\n strings.
Problem is that depending on operations the number of name,value
pairs can increase and decrease.
Values need to be initialized at runtime, so storing premade text
files is not possible.
I'm not
On 4 May 2007 07:21:49 -0700, Thomas Nelson [EMAIL PROTECTED] wrote:
I want to generate all the fractions between 1 and limit (with
limit1) in an orderly fashion, without duplicates.
Might I suggest the Stern-Brocot tree
(http://en.wikipedia.org/wiki/Stern-Brocot_tree)
It will eliminate the
Let's suppose
s='12345 4343 454'
How can I replace the last '4' character?
If the last '4' will not always be the last character in the string,
you could do:
'X'.join(s.rsplit('4',1))
-Dave
--
http://mail.python.org/mailman/listinfo/python-list
Whereas what I'd like to get is:
1,2,3,
10, 20, 30
(without trying this myself first...)
You might try setting up a csv dialect with a delimiter of ',\t' then
using a reader that can set tab stops for display.
-Dave
--
http://mail.python.org/mailman/listinfo/python-list
I want to write a python script which reads in data from the
excel sheet .Can any one help out in this ...any help will be
appreciated.
Try here: http://cheeseshop.python.org/pypi/xlrd/0.5.2
--
http://mail.python.org/mailman/listinfo/python-list
Since I want to upload the data programmatically, a form based
solution is not good.
Karsten,
Could you explain this statement? When I want to move data to a
server in a CGI environment, a form post is the easiest way I can
think of. What are the specific restrictions making forms a problem?
On 4/16/07, Robert Rawlins - Think Blue
[EMAIL PROTECTED] wrote:
I'm looking to write a Log file which will be CSV based, and there is a good
possibility that it'll get quite busy once its up and running, so I'm
looking for the most efficient way to achieve it. Whilst I'm sure i could do
On 4/16/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Dave Python has built in logging support. It's pretty flexible as far
Dave as formatting output. I can get a bit complicated to set up, but
Dave it will handle traffic well.
Really? I've found it to be a dog in heavy logging
On 26 Dec 2006 04:14:27 -0800, Leon [EMAIL PROTECTED] wrote:
I'm creating a python script that can take a string and print it to the
screen as a simple multi-columned block of mono-spaced, unhyphenated
text based on a specified character width and line hight for a column.
Hi, Leon,
For
Thanks, Paul. I didn't know about textwrap, that's neat.
Leon,
so in my example change
data1= [testdata[x:x+colwidth] for x in range(0,len(testdata),colwidth)]
to
data1 = textwrap.wrap(testdata,colwidth)
data1 = [x.ljust(colwidth) for x in data1]
oh and I made a mistake that double spaces it.
19 matches
Mail list logo