Re: Developement Question?

2010-04-01 Thread KB
On Apr 1, 3:34 am, Wayne wrote: > My town office uses Microsoft operating system. They have a proprietary > accounting system that uses excel for their accounting reports. > I would like to read these report and reproduce the report so that > the report can be seen on the web. I was thinking about

Re: CGI templating with python

2010-04-01 Thread KB
> Django will probably get you where you want to go the fastest: > >    http://www.djangoproject.com/ > > In particular, its admin interface will probably automatically generate a > usable > UI for you without your having to write many templates at all. Robert, Thank you very very much. I had a

CGI templating with python

2010-03-31 Thread KB
Hi there, Years ago I wrote a LAMP app using python. I find I need a simple web data entry tool to store records (stock research) and when I enter a stock ticker, to pull up all the past research I have done. I am imagining fields like ticker, date, pulldown menus for various options, long text fo

Re: pythoncom.CoInitialize() not recognised in Eclipse

2010-03-29 Thread KB
On Mar 28, 10:59 pm, "Dieter Verfaillie" wrote: > Quoting KB : > > > I am getting an error from the IDE saying it does not recognise > > CoInitialize(): > > > > > import pythoncom > > > pythoncom.CoInitialize() > > pythoncom.CoUnin

Re: pythoncom.CoInitialize() not recognised in Eclipse

2010-03-29 Thread KB
On Mar 28, 8:16 pm, Jason Scheirer wrote: > On Mar 28, 7:14 pm, KB wrote: > > > > > Hi there, > > > I have in the past used PythonWin to write python for COM, and > > switched to Eclipse. > > > I am getting an error from the IDE say

pythoncom.CoInitialize() not recognised in Eclipse

2010-03-28 Thread KB
Hi there, I have in the past used PythonWin to write python for COM, and switched to Eclipse. I am getting an error from the IDE saying it does not recognise CoInitialize(): import pythoncom pythoncom.CoInitialize() pythoncom.CoUninitialize() (red X next to the two bottom lines sayin

Re: Utility to screenscrape sites using javascript ?

2010-01-30 Thread KB
> On Sat, 30 Jan 2010 06:21:01 -0800, KB wrote: > > I have a service I subscribe to that uses javascript to stream news. > There's a Python interface to SpiderMonkey (Mozilla's JavaScript > interpreter): > > http://pypi.python.org/pypi/python-spidermonkey Than

Utility to screenscrape sites using javascript ?

2010-01-30 Thread KB
Hi there, I have a service I subscribe to that uses javascript to stream news. Ideally I would like to use python to parse the information for me. Note there is an option to take a static snapshot of the current stream but that is still done via Javascript. (I can reference the snapshot with a uni

Re: Using jython to call python procedures/methods

2010-01-20 Thread KB
Hmmm, XML is an interesting angle... I'll noodle it... -- http://mail.python.org/mailman/listinfo/python-list

Using jython to call python procedures/methods

2010-01-20 Thread KB
Hi there, I have an application that only publishes a Java API. I can use jython to access java classes, but jython currently (to the best of my knowledge) does not support numpy/scipy. Ideally I would like to have jython call a "native" python routine where I have the numpy/scipy procedures alre

Re: jython and java application

2009-11-30 Thread KB
Kutlu, I already have a first born, else I would name her after you. You are brilliant. That's what it was. Kudos. For future ref for fellow boneheads like me, in Eclipse, under Project properties, Jython Class Path, Add External JAR... Thanks a million! -- http://mail.python.org/mailman/listi

Re: jython and java application

2009-11-25 Thread KB
Hmmm, for some reason my follow up post didn't make it. Modified jython script to: # Eclipse package name for java application import krbtest import java.lang as lang from java.lang import String from jarray import array myargs=array([],String) krbtest.SimpleHistoricTutorial().main(myargs) **

jython and java application

2009-11-25 Thread KB
Hi there, Apologies if this is on the wrong group, this is a jython question. Please redirect me to the correct group if this is in error. I have a java application that takes no arguements. When I run it, it spits out output, and finishes. I am trying to run this java application from jython 2.

Re: Parsing a large number of parms to a print statement.

2009-10-22 Thread KB
Excuse the top-post, but thanks to all, the tuple was the way to go. On Oct 22, 2:16 pm, KB wrote: > Hi, > > I have to pass over 150 parameters to a print statement ala: > > print "%s %s %s <150'th unique text> %s" % (v > [0], v[1], ... v[150]) >

Parsing a large number of parms to a print statement.

2009-10-22 Thread KB
Hi, I have to pass over 150 parameters to a print statement ala: print "%s %s %s <150'th unique text> %s" % (v [0], v[1], ... v[150]) I can't use a for loop like I normally would over the list "v" due to the different text fragments between each var. Is there a lambda function I can use i

Re: Problem with reading CSV file from URL, last record truncated.

2009-08-03 Thread KB
On Aug 3, 3:54 pm, KB wrote: > Hi, > > I am trying to download from a URL, a CSV using the following: > > import re > import urllib, urllib2, cookielib > import mechanize > import csv > import numpy > import os > > def return_ranking(): > >         c

Problem with reading CSV file from URL, last record truncated.

2009-08-03 Thread KB
Hi, I am trying to download from a URL, a CSV using the following: import re import urllib, urllib2, cookielib import mechanize import csv import numpy import os def return_ranking(): cj = mechanize.MSIECookieJar(delayload=True) cj.load_from_registry() # finds cookie index fil

Re: Use existing IE cookie

2009-07-31 Thread KB
Winner, winner, chicken dinner... resolved. http://wwwsearch.sourceforge.net/mechanize/doc.html import mechanize cj = mechanize.MSIECookieJar(delayload=True) cj.load_from_registry() # finds cookie index file from registry Thanks Mr Lee! -- http://mail.python.org/mailman/listinfo/python-list

Re: Use existing IE cookie

2009-07-30 Thread KB
On Jul 30, 9:23 am, "Diez B. Roggisch" wrote: > KB wrote: > > >> What does you full example look like, including the > >> cookie-acquisition-stuff? > > >> Diez > > > I ran them seperately, hoping for a clue as to what my "co

Re: Use existing IE cookie

2009-07-30 Thread KB
> What does you full example look like, including the > cookie-acquisition-stuff? > > Diez I ran them seperately, hoping for a clue as to what my "cookiejar" was. The cookie-acquisition stuff returns "screener.ashx?v=151" when I search with my domain I am interested in. I have tried urllib2.HTTP

Re: Use existing IE cookie

2009-07-30 Thread KB
> > Using:http://code.activestate.com/recipes/80443/ > Thanks for the prompt reply, Diez! Using the above I have found the name of the cookie (I did google how to use IE cookies in python and that was the best match) but it only tells me the name of the cookie, not how to use it. Any clues? TIA

Use existing IE cookie

2009-07-30 Thread KB
Hi there, Relevant versions: Python 2.5, Vista Home, IE7 I am trying to scrape a website I have browsed manually in the past, and also manually selected my options, and now want python to use my existing cookie from the manual browse when downloading data. Using: http://code.activestate.com/reci

Re: How to quit a Windows GUI program gracefully with Python under Cygwin?

2005-08-12 Thread KB
Of course, I downloaded the source of 'SendKeys' and installed it under both Cygwin and Python Windows with $ python setup.py install although this did not help me. KB -- http://mail.python.org/mailman/listinfo/python-list

Re: How to quit a Windows GUI program gracefully with Python under Cygwin?

2005-08-12 Thread KB
time if I do not know the execution time of an application? Thanks in advance. KB -- http://mail.python.org/mailman/listinfo/python-list

How to quit a Windows GUI program gracefully with Python under Cygwin?

2005-08-11 Thread KB
e program finishes normal execution? Thanks, KB -- http://mail.python.org/mailman/listinfo/python-list

Re: How to convert a string like '777' to an octal integer like 0777?

2005-07-31 Thread KB
> The leading zero only exists in a particular string > representation. os.chmod() needs an integer, not a string. 0777 == 511. Thanks, Robert. What you said is exactly what I did not understand clearly, because I am just a beginner in Python programming. KB -- http://mail.python.org/m

Re: How to convert a string like '777' to an octal integer like 0777?

2005-07-31 Thread KB
Thanks, John. But my point is how to keep the leading zero in 0777, in order to be used in os.chmod('myfile', 0777)? -- http://mail.python.org/mailman/listinfo/python-list

How to convert a string like '777' to an octal integer like 0777?

2005-07-30 Thread KB
Hi, This may be a rudimentary question: How to convert a string like '777' to an octal integer like 0777, so that it can be used in os.chmod('myfile',0777)? I know the leading zero is important in os.chmod. KB -- http://mail.python.org/mailman/listinfo/python-list