Re: Striving for PEP-8 compliance

2010-04-07 Thread Tom Evans
On Wed, Apr 7, 2010 at 4:10 PM, geremy condra wrote: > On Wed, Apr 7, 2010 at 10:53 AM, Tom Evans wrote: >> [ Please keep me cc'ed, I'm not subscribed ] >> >> Hi all >> >> I've written a bunch of internal libraries for my company, and they >&

Problem Creating NewLines in PDF

2010-08-18 Thread Andrew Evans
Hello I am generating a PDF in web2py but its ignoring my line breaks. randname = random.randrange(1, 10001) styles = getSampleStyleSheet() title = "My Title" doc = SimpleDocTemplate("primer.pdf") story = [] story.append(Paragraph(strftime("%a, %d %b %Y %H:

Re: Problem Creating NewLines in PDF

2010-08-18 Thread Andrew Evans
Hello yes This line doesn't seem to want to accept a list for some strange reason story.append(Paragraph(str(result_list), para)) *cheers -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem Creating NewLines in PDF

2010-08-18 Thread Andrew Evans
Hello ty for the fast replies This is the string I am using for the PDF I was able to create new lines using the HTML "br" tag which is what I wanted a method to create new lines search_str="Position: (%d) - Keyword: (%s) - Domain (%s) " % (idx+1, target_keyword, session.target_domain)

Re: Unsupported Format Character '&' (0x26)

2010-08-18 Thread Andrew Evans
nvm I got it by adding s and d respectively after each value eg %(query)s thank you all On Wed, Aug 18, 2010 at 4:35 PM, Andrew Evans wrote: > I get an error message "Unsupported Format Character '&' (0x26)" I narrowed > it down to these two variab

Unsupported Format Character '&' (0x26)

2010-08-19 Thread Andrew Evans
I get an error message "Unsupported Format Character '&' (0x26)" I narrowed it down to these two variables any idea how to fix it? SEARCH_URL_0 = " http://search.yahoo.com/search;_ylt=A0oGdEf1XGxMJRoAUdml87UF;_ylc=X1MDMjE0MjQ3ODk0OARfcgMyBGZyA3NmcARuX2dwcwMxMARvcmlnaW4Dc3ljBHF1ZXJ5A3Rlc3QEc2FvA

Python module Code returns empty list any ideas how to fix

2010-08-19 Thread Andrew Evans
Hello I am trying to modify Python xgoogle module to use yahoo I have hit a road block where I receive no error messages the code I use to test just returns an empty list. and I don't know how to trouble shoot it the module code is here http://pastebin.com/iTibRs1R and the code I am using to t

2.3 missing on OSX

2009-07-23 Thread Laran Evans
I just tried to run MacVim on OSX 10.5. It crashed with this: Dyld Error Message: Library not loaded: /System/Library/Frameworks/Python.framework/ Versions/2.3/Python Referenced from: /Users/laran/Downloads/MacVim-7_2-stable-1_2/ MacVim.app/Contents/MacOS/Vim Reason: image not found I poste

Mail Merge from python data

2010-11-02 Thread Dylan Evans
I'm setting up a database for an organisation who want to do mail merges in office 2010. I know i can use the MySQL ODBC driver for the mail merge but i have set up the database with lots of relations and many-to-many links which i'm sure will lead to a huge amount of confusion (I think, i don't re

Re: Mail Merge from python data

2010-11-03 Thread Dylan Evans
On Wed, Nov 3, 2010 at 3:20 PM, Tim Harig wrote: > This page didn't make it to through to my nntp server so I appologize if I > miss something that was covered. > > On 2010-11-03, Dennis Lee Bieber wrote: > > On Tue, 2 Nov 2010 20:32:13 +1000, Dylan Evans > &g

Re: [ANN]:JSONStream

2013-07-17 Thread Clark C. Evans
Looks interesting. In YAML we used three dashes as the "stream separator". So already a YAML processor could handle a JSON stream ... >>> for doc in yaml.load_all(""" ... --- {"one": "value"} ... --- {"two": "another"} ... --- ... {"three": "a third item in the stream", ... "with": "more

feature request / max size limit on StringIO

2005-10-25 Thread Clark C. Evans
str) if self.cursize > self.maxsize: raise IOError("allocated buffer space exceeded") return StringIO.write(self,str) Kind Regards, Clark Evans -- http://mail.python.org/mailman/listinfo/python-list

file uploading via urllib2 (multipart/form-data)

2005-01-13 Thread Clark C. Evans
Hello. I was wondering if anyone has built a module that works with urllib2 to upload file content via POST multipart/form-data. I'm aware of ASPN 146306, however, I need to use urllib2 beacuse I'm using HTTP Digest over SSL. Cheers, Clark -- http://mail.python.org/mailman/listinfo/python-list

More questions on Python strings

2014-08-31 Thread Dennis E. Evans
Hi I have a function that reads some meta data from a database and builds a default order by and where clause for a table. some details, rows is a list of pyOdbc.Row and will look like this [1, 'ColumnName', 3, 5] there will be one to n elements EmptyString, defaultColumn, default

Re: Wx Python - Code Structure & Event Handling

2008-09-09 Thread Stephen D Evans
Lee, have you considered using the Model-View-Presenter pattern? There is a nice example on the wxPython wiki: http://wiki.wxpython.org/ModelViewPresenter This scales well to complex GUIs. Grasping the concept and writing the initial code is the difficult part. Code is then much easier to deve

Re: Any python HTML generator libs?

2006-03-09 Thread Stephen D Evans
templates and css are easy to maintain. Whereas some code/markup written with a python HTML generator is difficult to maintain. Stephen D Evans -- http://mail.python.org/mailman/listinfo/python-list

HTSQL 2.0 RC1 -- a Query Language for the Accidental Programmer

2011-01-21 Thread Clark C. Evans
Kirill Simonov and myself would like to introduce HTSQL, a novel approach to relational database access which is neither an ORM nor raw SQL. HTSQL is a URI-based high-level query language for relational databases. It's implemented as a Python WSGI application. Currently it supports PostgreSQL an

Re: HTSQL 2.0 RC1 -- a Query Language for the Accidental Programmer

2011-01-22 Thread Clark C. Evans
On Fri, 21 Jan 2011 21:25 -0800, "rusi" wrote: > On Jan 22, 2:45 am, "Clark C. Evans" wrote: > > Kirill Simonov and myself would like to introduce HTSQL, a novel > > approach to relational database access which is neither an ORM > > nor raw SQL. >

Writing a C extension - borrowed references

2018-03-20 Thread Tom Evans via Python-list
Hi all I'm writing my first C extension for Python here, and all is going well. However, I was reading [1], and the author there is advocating Py_INCREF 'ing *every* borrowed reference. Now, I get that if I do something to mutate and perhaps invalidate the PyObject that was borrowed I can get unp

Re: Writing a C extension - borrowed references

2018-03-20 Thread Tom Evans via Python-list
On Tue, Mar 20, 2018 at 4:38 PM, Chris Angelico wrote: > BTW, have you looked into Cython? It's smart enough to take care of a > lot of this sort of thing for you. I did a bit; this work is to replace our old python 2 SAML client, which used python-lasso and python-libxml2, both packages that are

[OT] Re: Style Q: Instance variables defined outside of __init__

2018-03-20 Thread Tom Evans via Python-list
On Tue, Mar 20, 2018 at 5:25 PM, Grant Edwards wrote: > On 2018-03-20, Neil Cerutti wrote: > >> My automotive course will probaly divide cars into Automatic >> Transmission, and Front Wheel Drive. > > I get your point: the two characteristics are, in theory, orthogonal. > But, in the US, the two

Re: Writing a C extension - borrowed references

2018-03-20 Thread Tom Evans via Python-list
On Tue, Mar 20, 2018 at 5:36 PM, Rob Gaddi wrote: > If all you're doing is a thin-wrapper around a C library, have you thought > about just using ctypes? Yep; the C library whose API I'm using uses macros to cast things to the right structure, and (similar to Cython), as I already _have_ the code

<    1   2