Re: Object Models - decoupling data access - good examples ?

2012-08-07 Thread Adam Tauno Williams
On Sat, 2012-08-04 at 20:26 -0700, shearich...@gmail.com wrote: > > > > Just out of curiosity, why do you eschew ORMs? > Good question ! > I'm not anti-ORM (in fact in many circs I'm quite pro-ORM) but for > some time I've been working with a client who doesn't want ORMs used > (they do have quit

Re: pycups

2012-08-20 Thread Adam Tauno Williams
On Thu, 2012-08-09 at 04:30 -0700, loial wrote: > I am looking to monitor print jobs on linux via python. > pycups looks a possibility, but I cannot find any useful tutorial, examples > of how to use it. > Can anyone help? Modern CUPs can provide event notifications via RSS; perhaps that would w

Re: Looking for an IPC solution

2012-09-22 Thread Adam Tauno Williams
On Fri, 2012-08-31 at 21:04 +0200, Laszlo Nagy wrote: > I have seen a stand alone cross platform IPC server before that could > serve "channels", and send/receive messages using these channels. But I > don't remember its name and now I cannot find it. Can somebody please help? I strongly recomm

Re: Basic JSON question: Do I really need the quotes

2012-10-12 Thread Adam Tauno Williams
On Fri, 2012-10-12 at 19:27 +0200, Roel Schroeven wrote: > moo...@yahoo.co.uk schreef: > > Hi, > > I need to define some configuration in a file that will be manually created. > > Internally, the data will be stored as a dict, which contains various > > properties related to a design > > e.g. Desi

Escaping from the tedium of naive datetime objects.

2012-10-26 Thread Adam Tauno Williams
ns. <http://www.whitemiceconsulting.com/2012/10/setting-course-for-utc.html> [constructive] Feedback and other suggestions appreciated. -- Adam Tauno Williams -- http://mail.python.org/mailman/listinfo/python-list

Re: date and time comparison how to

2012-11-02 Thread Adam Tauno Williams
On Mon, 2012-10-29 at 16:13 -0700, noydb wrote: > All, > I need help with a date and time comparison. > Say a user enters a date-n-time and a file on disk. I want to compare > the date and time of the file to the entered date-n-time; if the file > is newer than the entered date-n-time, add the fil

Re: changing process name

2012-12-30 Thread Adam Tauno Williams
On Mon, 2012-11-19 at 10:39 +, andrea crotti wrote: > I have very long processes to spawn which I want to lauch as separate > processes (and communicate with ZeroMQ), but now the problem is that the > forked process appears in "ps" with the same name as the launcher > process. > This is a simpl

Re: New to python, do I need an IDE or is vim still good enough?

2012-12-31 Thread Adam Tauno Williams
really need a real IDE, as the windows guys around me say I do, You don't need one. You are crazy if you don't WANT one. Check out geany <http://www.geany.org/> -- Adam Tauno Williams -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading Adobe PDF File

2012-01-30 Thread Adam Tauno Williams
<http://www.whitemiceconsulting.com> OpenGroupware Developer <http://www.opengroupware.us> Adam Tauno Williams -- http://mail.python.org/mailman/listinfo/python-list

Can't get around HTTP/401 response using SUDS

2012-03-08 Thread Adam Tauno Williams
en(self, request) File "/usr/local/lib/python2.7/site-packages/suds-0.4-py2.7.egg/suds/transport/http.py", line 64, in open raise TransportError(str(e), e.code, e.fp) suds.transport.TransportError: HTTP Error 401: Unauthorized -- System & Network Administrator [ LPI & NCLA ] <http://www.whitemiceconsulting.com> OpenGroupware Developer <http://www.opengroupware.us> Adam Tauno Williams -- http://mail.python.org/mailman/listinfo/python-list

Re: GUI components in python

2012-03-08 Thread Adam Tauno Williams
t a more useful answer? -- System & Network Administrator [ LPI & NCLA ] <http://www.whitemiceconsulting.com> OpenGroupware Developer <http://www.opengroupware.us> Adam Tauno Williams signature.asc Description: This is a digitally signed message part -- http://mail.python.org/mailman/listinfo/python-list

Re: Can't get around HTTP/401 response using SUDS [SOLVED]

2012-03-10 Thread Adam Tauno Williams
On Fri, 2012-03-09 at 00:03 +0100, Rafael Durán Castañeda wrote: > El 08/03/12 16:44, Adam Tauno Williams escribió: > > SUDS version 0.4 pn x86_64 Python 2.7 > > I'm having a bear of a time getting HTTP Basic Authentication to work > > for a SOAP request via suds. Also

Re: Is it technically possible to give Python option of naming process of running script?

2012-03-24 Thread Adam Tauno Williams
On Wed, 2012-03-14 at 07:43 -0700, xliiv wrote: > Like the topic.. . > I use Python a lot, both Windows and Linux, and it's little weird to > have many python process without fast distinction which is what. I'm not sure of my interpretation of your problem but if you want to set the name of the ru

Re: Overlayong PDF Files

2012-04-26 Thread Adam Tauno Williams
/hgweb/coils/coils/file/9d6c304dd405/src/coils/logic/workflow/actions/doc/watermark.py> -- Adam Tauno Williams <http://www.whitemiceconsulting.com> System Administrator, OpenGroupware Developer, LPI / CNA Fingerprint 8C08 209A FBE3 C41A DD2F A270 2D17 8FA4 D95E D383 signature.asc Descripti

Re: Communication between C++ server and Python app

2012-05-01 Thread Adam Tauno Williams
On Sat, 2012-04-28 at 17:45 -0700, kenk wrote: > I've got a server process written in C++ running on Unix machine. > On the same box I'd like to run multiple Python scripts that will > communicate with this server. > Can you please suggest what would be best was to achieve this ? Time to start us

Re: indexed property? Can it be done?

2012-05-08 Thread Adam Tauno Williams
On Mon, 2012-05-07 at 20:15 -0700, Charles Hixson wrote: > class Node: > def__init__(self, nodeId, key, value, downRight, downLeft, parent): > dirty=True > dlu=utcnow() > self.node=[nodeId, downLeft, [key], [value], > [downRight], parent

Re: Questions on __slots__

2012-05-19 Thread Adam Tauno Williams
On Fri, 2012-05-18 at 09:53 -0700, Charles Hixson wrote: > Does __slots__ make access to variables more efficient? Absolutely, yes. > If one uses property() to create a few read-only pseudo-variables, does > that negate the efficiency advantages of using __slots__? > (Somehow I feel the documen

Re: cPython, IronPython, Jython, and PyPy (Oh my!)

2012-05-19 Thread Adam Tauno Williams
On Thu, 2012-05-17 at 11:13 +1000, Chris Angelico wrote: > On Thu, May 17, 2012 at 9:01 AM, Ethan Furman wrote: > > A record is an interesting critter -- it is given life either from the user > > or from the disk-bound data; its fields can then change, but those changes > > are not reflected on

Re: cmd2, an extenstion of cmd that parses its argument list

2012-05-31 Thread Adam Tauno Williams
On Thu, 2012-04-26 at 12:16 -0700, anntzer@gmail.com wrote: > On Sunday, March 18, 2012 10:12:24 PM UTC-7, anntz...@gmail.com wrote: > > Dear all, > > I would like to announce the first public release of cmd2, an extension of > > the standard library's cmd with argument parsing, here: > > ht

Re: cmd2, an extenstion of cmd that parses its argument list

2012-05-31 Thread Adam Tauno Williams
On Thu, 2012-05-31 at 15:21 -0400, Adam Tauno Williams wrote: > On Thu, 2012-04-26 at 12:16 -0700, anntzer@gmail.com wrote: > > On Sunday, March 18, 2012 10:12:24 PM UTC-7, anntz...@gmail.com wrote: > > > Dear all, > > > I would like to announce the first public re

Re: Unshelving the data?

2011-06-02 Thread Adam Tauno Williams
On Wed, 2011-06-01 at 19:49 -0700, Uncle Ben wrote: > Shelving is a wonderfully simple way to get keyed access to a store of > items. I'd like to maintain this cache though. +1 > Is there any way to remove a shelved key once it is hashed into the > system? I could do it manually by removing the

Re: smtp - python

2011-06-09 Thread Adam Tauno Williams
import message_from_file message = message_from_file(stream) The best way to serialize a Message to a stream seems to be from email.generator import Generator tmp = BLOBManager.ScratchFile() # Create a stream g = Generator(tmp, mangle_from_=False, maxheaderlen=60) g.flatten(message)

Re: Python Card alternatives?

2011-06-12 Thread Adam Tauno Williams
On Sat, 2011-06-11 at 13:07 +, rzed wrote: > Desktop apps don't seem to be the wave of the future, but they still > serve a useful purpose today. They can be ideal for a quick database > table management screen, +1, they are perfect for that, and will be around for a *long* *long* time. An

Re: HTTPConncetion - HEAD request

2011-06-17 Thread Adam Tauno Williams
On Thu, 2011-06-16 at 15:43 -0700, gervaz wrote: > Hi all, can someone tell me why the read() function in the following > py3 code returns b'' > >>> h = http.client.HTTPConnection("www.twitter.com") > >>> h.connect() > >>> h.request("HEAD", "/", "HTTP 1.0") > >>> r = h.getresponse() > >>> r.read()

Re: User Authentication

2011-06-22 Thread Adam Tauno Williams
On Wed, 2011-06-22 at 06:34 -0700, Anurag wrote: > Hi All, > > I am working on application which needs to do a authentication against > LDAP, if LDAP not installed then local system account (administrator > user in windows and root user in Linux). This should work on both > Windows and Linux. See

Re: Want to build an app for linux

2011-06-24 Thread Adam Tauno Williams
On Fri, 2011-06-24 at 15:55 +0530, saurabh verma wrote: > Hi all , > May be I'm just asking a silly/old question . > I have some open web APIs which i can use , on it I want to develop an > desktop application , probably cross platform but mostly I'm aiming at > *unix platforms . > I've got no

Re: Does hashlib support a file mode?

2011-07-06 Thread Adam Tauno Williams
On Tue, 2011-07-05 at 22:54 -0700, Phlip wrote: > Pythonistas > Consider this hashing code: > import hashlib > file = open(path) > m = hashlib.md5() > m.update(file.read()) > digest = m.hexdigest() > file.close() > If the file were huge, the file.read() would allocate a big string and >

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-10 Thread Adam Tauno Williams
On Sun, 2011-07-10 at 15:50 -0700, Ivan Kljaic wrote: > Ok Guys. I know that most of us have been expiriencing the need for a > nice Gui builder tool for RAD and most of us have been googling for it > a lot of times. But seriously. Why is the not even one single RAD tool > for Python. I mean what h

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-10 Thread Adam Tauno Williams
>Because RAD tools are for GUI toolkits, not for languages. If you're >using GTK, Glade works fine. Same with QT and QTDesigner. If you're >using WPF with IronPython, t These [Glade, etc...] are *NOT* RAD tools. They are GUI designers. A RAD tool provides a GUI designer that can be bound to a b

Re: How to get or set the text of a textfield?

2011-07-11 Thread Adam Tauno Williams
On Mon, 2011-07-11 at 03:44 +, John Gordon wrote: > In Anthony Papillion > writes: > > So I've built a UI with Glade and have loaded it using the standard > > Python code. In my UI, I have a textfield called txtUsername. How do I > > get and set the text in this field from my Python code? f

Re: Code hosting services

2011-07-13 Thread Adam Tauno Williams
On Wed, 2011-07-13 at 01:54 -0500, Andrew Berg wrote: > I know this isn't specific to Python, but it is somewhat on topic. Way > back when I had a simple project, SourceForge was by far the most > prominent place to host (and it still is, though to a lesser extent > now). SourceForge is still an op

Re: I am fed up with Python GUI toolkits...

2011-07-20 Thread Adam Tauno Williams
On Tue, 2011-07-19 at 19:12 -0700, sturlamolden wrote: > What is wrong with them > 1. Designed for other languages, particularly C++, tcl and Java. > 2. Bloatware. Qt and wxWidgets are C++ application frameworks. (Python > has a standard library!) I've no idea what this means. I happily use pygtk

Re: I am fed up with Python GUI toolkits...

2011-07-20 Thread Adam Tauno Williams
On Wed, 2011-07-20 at 11:59 +0200, Thomas Jollans wrote: > On 20/07/11 04:12, sturlamolden wrote: > > 5. No particular GUI thread synchronization is needed -- Python has a > > GIL. > That's where you're wrong: the GIL is not a feature of Python. It is an > unfortunate implementation detail of curr

Re: string to unicode

2011-08-15 Thread Adam Tauno Williams
.open(filename, mode[, encoding[, errors[, buffering]]]) <http://docs.python.org/library/codecs.html#codec-objects> -- Adam Tauno Williams LPIC-1, Novell CLA <http://www.whitemiceconsulting.com> OpenGroupware, Cyrus IMAPd, Postfix, OpenLDAP, Samba -- http://mail.python.org/mailman/listinfo/python-list

Re: Purely historic question: VT200 text graphic programming

2011-03-10 Thread Adam Tauno Williams
On Thu, 2011-03-10 at 00:38 -0600, GrayShark wrote: > Once, many, many, years ago, I programmed some type of 'graphical' > interface on a VT200 terminal (only DEC VAX/VMS programmers are going to > know what this is). Question. What was the library I linked against? > Yes, you remember, painting

Re: What do you use with Python for GUI programming and why?

2011-03-12 Thread Adam Tauno Williams
On Fri, 2011-03-11 at 09:34 -0800, Rafe Kettler wrote: > On Mar 10, 9:25 pm, Robert wrote: > > Is there a push to one toolkit or the other? I use PyGtk. It is robust, fast, and integrates well into the desktop. Also the documentation is very good and the forum very helpful. My PyGtk app is Imbo

Re: Python script xml-rpc to C# xml-rpc script

2011-03-15 Thread Adam Tauno Williams
On Tue, 2011-03-15 at 08:00 -0700, Ymtrader wrote: > If anyone is fluent in python as well as C# using the cook computing > xml-rpc.net library I could really use some help. I have been trying > to write a C# program to access upcdatabase.com without much luck. Yes, I've used both. > have a w

Re: Print to an IPP printer (pkipplib?)

2011-03-16 Thread Adam Tauno Williams
On Fri, 2010-10-15 at 15:28 -0400, Adam Tauno Williams wrote: > I've found the module pkipplib which seems to work well for things like > interrogating an IPP (CUPS) server. But is there a way to send a print > job to an IPP print queue? [and no, the local system knows nothing abo

PDF To Postscript

2011-03-17 Thread Adam Tauno Williams
PyPDF (and others) provide a very nice mechanism for creating and manipulating PDF documents. Is there any *Python* module or technique to turn a PDF document into Postscript [to print, for example]? -- http://mail.python.org/mailman/listinfo/python-list

Re: PDF To Postscript

2011-03-17 Thread Adam Tauno Williams
On Thu, 2011-03-17 at 08:53 -0700, Chris Rebert wrote: > On Thu, Mar 17, 2011 at 6:55 AM, Adam Tauno Williams > wrote: > > PyPDF (and others) provide a very nice mechanism for creating and > > manipulating PDF documents. Is there any *Python* module or technique > > to

Re: value of pi and 22/7

2011-03-18 Thread Adam Tauno Williams
On Fri, 2011-03-18 at 14:16 +, Grant Edwards wrote: > On 2011-03-18, peter wrote: > > The Old Testament (1 Kings 7,23) says ... "And he made a molten sea, > > ten cubits from the one brim to the other: it was round all about, and > > his height was five cubits: and a line of thirty cubits did

Re: Writing to a file

2011-03-25 Thread Adam Tauno Williams
On Fri, 2011-03-25 at 15:07 +, jyoun...@kc.rr.com wrote: > Just curious how others view the 2 examples below for creating and > writing to a file in Python (in OS X). Is one way better than the other? > If it was a large amount of text, would the 'os.system' call be a bad > way to do it?

Re: how to create a virtual printer

2011-03-28 Thread Adam Tauno Williams
On Mon, 2011-03-28 at 04:12 -0700, kalop...@gmail.com wrote: > Hi, > > Does anybody know how to create a virtual > printer with python (on both windows and linux)? I don't. Not on Windows anyway. There is no single mechanism that will work for both. On LINUX this is trivial - define a printer

Re: [OT] Free software versus software idea patents

2011-04-07 Thread Adam Tauno Williams
On Thu, 2011-04-07 at 11:50 -0400, Benjamin Kaplan wrote: > On Thu, Apr 7, 2011 at 11:31 AM, harrismh777 wrote: > > Steven D'Aprano wrote: > ...n Mono, which > is an open source implementation of the ECMA-334 and ECMA-335 > standards. The only difference between it and Python is that Python > was

Re: OOP only in modules

2011-04-12 Thread Adam Tauno Williams
On Tue, 2011-04-12 at 08:33 -0700, newpyth wrote: > """ call tree w/o classes and objects: > E() #~15 called from #~35 > +-- F() #~1816 > |+-- raw_input('Addressed to ') # called from 19 > +-- G()

Re: Python IDE/text-editor

2011-04-16 Thread Adam Tauno Williams
On Sat, 2011-04-16 at 08:04 -0500, John Bokma wrote: > Alec Taylor writes: > > Thanks, but non of the IDEs so far suggested have an embedded python > > interpreter > Emacs has. Well, it's not embedded as *in* Emacs, but I don't think > there are many editors that have that besides the ones writte

Re: Python IDE/text-editor

2011-04-16 Thread Adam Tauno Williams
On Sat, 2011-04-16 at 06:40 -0700, flebber wrote: > On Apr 16, 3:43 pm, Alec Taylor wrote: > > Thanks, but non of the IDEs so far suggested have an embedded python > > interpreter AND tabs... a few of the editors (such as Editra) have > > really nice interfaces, however are missing the embedded >

Re: Problem receiving UDP broadcast packets.

2011-04-20 Thread Adam Tauno Williams
ur/1.1.1> at least you may be able to lift code from them (License is non-viral MIT) > Might be interesting to see how it does announcement/discovery. Or maybe > just use it directly, if this happens to be a case of "gee, I didn't > know that wheel had already been invented.&qu

Re: How to build an application in Django which will handle Multiple servers accross network

2011-04-29 Thread Adam Tauno Williams
On Thu, 2011-04-28 at 23:47 -0700, Anurag (anu) Agarwal wrote: > Hi All, > I want to build an application for one of my client which has > following features > 1. Client has some driver software which can be installed on Windows > and Linux based systems. This driver software is fetching some > ope

Re: How to build an application in Django which will handle Multiple servers accross network

2011-04-29 Thread Adam Tauno Williams
On Fri, 2011-04-29 at 13:24 +0200, Paul Kölle wrote: > Am 29.04.2011 12:01, schrieb Adam Tauno Williams: > >> 3. The web based application will be used internally in the network to > >> moniter servers in that network only. > > You mean like OpenNMS or ZenOSS? > >&

Re: string formatting

2011-05-06 Thread Adam Tauno Williams
On Fri, 2011-05-06 at 15:58 +0100, MRAB wrote: > On 06/05/2011 08:18, Jabba Laci wrote: > > Which is the preferred way of string formatting? > > (1) "the %s is %s" % ('sky', 'blue') > > (2) "the {0} is {1}".format('sky', 'blue') > > (3) "the {} is {}".format('sky', 'blue') > > As I know (1) is old

Re: checking if a list is empty

2011-05-06 Thread Adam Tauno Williams
On Fri, 2011-05-06 at 14:49 -0500, harrismh777 wrote: > Terry Reedy wrote: > >>> (2) if not li: > >> This is fine. > > This is the intended way. Anything in addition is extra noise and wasted > > calculation. In other words, let Python do the boilerplate work for you. > I agree, but I don't lik

Re: Overuse of try/except/else?

2011-05-10 Thread Adam Tauno Williams
On Mon, 2011-05-09 at 19:40 -0500, Kyle T. Jones wrote: > It has been hard for me to determine what would constitute overuse. The chronic problem is under use; so I wouldn't worry much about it. try/except should occur as often as is required for the application to either deal gracefully with the

Re: Multiprocessing: don't push the pedal to the metal?

2011-05-23 Thread Adam Tauno Williams
On Mon, 2011-05-23 at 10:32 +1000, Chris Angelico wrote: > On Mon, May 23, 2011 at 7:06 AM, John Ladasky wrote: > > If I spawn N worker sub-processes, my application in fact has N+1 > > processes in all, because there's also the master process itself. > > I'd still appreciate hearing from anyone e

Re: Multiprocessing: don't push the pedal to the metal?

2011-05-23 Thread Adam Tauno Williams
On Mon, 2011-05-23 at 12:51 -0700, John Ladasky wrote: > On May 23, 2:50 am, Adam Tauno Williams > wrote: > > I develop an app that uses multiprocessing heavily. Remember that all > > these processes are processes - so you can use all the OS facilities > > regarding

pyodbc -> MS-SQL Server Named Instance ?

2019-07-01 Thread Adam Tauno Williams
JDBC client (DbVisualizer) by specifying the instance name and port 1434. -- Adam Tauno Williams <mailto:awill...@whitemice.org> GPG D95ED383 OpenGroupware Developer <http://www.opengroupware.us/> -- https://mail.python.org/mailman/listinfo/python-list

Re: pyodbc -> MS-SQL Server Named Instance ?

2019-07-02 Thread Adam Tauno Williams
On Tue, 2019-07-02 at 07:36 +0200, Frank Millman wrote: > On 2019-07-01 10:13 PM, Adam Tauno Williams wrote: > > I am trying to connect to a Named Instance on an MS-SQL server > > using pyODBC. > This is what I use - > >  conn = pyodbc.connect( >

Re: pyodbc -> MS-SQL Server Named Instance ?

2019-07-02 Thread Adam Tauno Williams
On Tue, 2019-07-02 at 09:41 -0400, Adam Tauno Williams wrote: > On Tue, 2019-07-02 at 07:36 +0200, Frank Millman wrote: > > On 2019-07-01 10:13 PM, Adam Tauno Williams wrote: > > > I am trying to connect to a Named Instance on an MS-SQL server > > > using pyODBC. I

Re: pyodbc -> MS-SQL Server Named Instance ?

2019-07-02 Thread Adam Tauno Williams
On Tue, 2019-07-02 at 11:00 -0400, Adam Tauno Williams wrote: > On Tue, 2019-07-02 at 09:41 -0400, Adam Tauno Williams wrote: > > On Tue, 2019-07-02 at 07:36 +0200, Frank Millman wrote: > > > On 2019-07-01 10:13 PM, Adam Tauno Williams wrote: > > > > I am trying to

Re: Share Code: Laptop Lid State

2013-12-05 Thread Adam Tauno Williams
On Tue, 2013-07-30 at 17:00 +0100, Chris Angelico wrote: > On Tue, Jul 30, 2013 at 3:06 PM, Devyn Collier Johnson > wrote: > > Aloha everyone! > >I attached a script that I thought I could share with everyone for your > > help. This Python3 script only works on Unix systems. It prints the cur

Re: better and user friendly IDE recommended?

2013-09-11 Thread Adam Tauno Williams
On Wed, 2013-09-11 at 07:14 -0700, mnish1...@gmail.com wrote: > Hey i am a programmer but new to python. Can anyone guide me in knowing which > is a better IDE used to develop web related apps that connect to DB using > python? geany; it's awesome. <http://www.geany.org/

Re: Database statements via python but database left intact

2013-10-06 Thread Adam Tauno Williams
to commit - and that is a back end implementation detail. DO NOT USE AUTOCOMMIT. The newer engine is expecting you to do things the right way. The old engine was sloppy and does serialization wrong - the reason there is a new engine. -- Adam Tauno Williams -- https://mail.python.org/mailman

Re: Database statements via python but database left intact

2013-10-06 Thread Adam Tauno Williams
t makes it to read the code and understand the units of work. >Well, have you changed anything in your database configuration? a big downside of autocommit - backend changes can break you app -- Adam Tauno Williams -- https://mail.python.org/mailman/listinfo/python-list

Re: Is it normal to cry when given XML?

2015-05-05 Thread Adam Tauno Williams
"format". It solves problems, much better than everyone trying to re-engineer their needs INTO a format [like JSON]. -- Adam Tauno Williams <mailto:awill...@whitemice.org> GPG D95ED383 Systems Administrator, Python Developer, LPI / NCLA -- https://mail.python.org/mailman/listinfo/python-list

Re: parse xml

2011-10-03 Thread Adam Tauno Williams
Quoting 守株待兔 <1248283...@qq.com>: please click the http://www.secinfo.com/d14qfp.q9j.htm then ,click the following: 44: XML IDEA: Condensed Consolidating Statements of Income XML 5.11M (Details)--R158 there is the citigroup's annual financial report --statements of income,xml file.

Re: Python library for generating SQL queries [selects, alters, inserts and commits]

2011-10-11 Thread Adam Tauno Williams
Quoting Alec Taylor They look good, but I'm looking for something which can "compile" down to normal SQL code. So that I can just plug that .sql file into any environment [i.e. non-python env] SQLalchemy will happily give you statements and argument lists if that is what you want. query =

Re: xml-rpc server on wine

2011-11-07 Thread Adam Tauno Williams
On Sat, 2011-11-05 at 05:50 -0700, pacopyc wrote: > Hi, I have a XML-RPC server python running on VM Windows (on Linux) > and a XML-RPC client python on Linux. Server and client have different > IP address. I'd like migrate server on wine. How can communicate > server and client? IP address is diff

Re: RSS feed creation?

2011-11-07 Thread Adam Tauno Williams
On Mon, 2011-11-07 at 08:22 +0100, Stefan Behnel wrote: > Dan Stromberg, 06.11.2011 21:00: > > Is there an opensource Python tool for creating RSS feeds, that doesn't > > require large dependencies? > > I found feedformatter.py on pypi, but it seems a little old, and its sole > > automated test giv

etree/lxml/XSLT and dynamic stylesheet variables

2012-01-20 Thread Adam Tauno Williams
s? -- System & Network Administrator [ LPI & NCLA ] <http://www.whitemiceconsulting.com> OpenGroupware Developer <http://www.opengroupware.us> Adam Tauno Williams -- http://mail.python.org/mailman/listinfo/python-list

Re: Extending PyGTK widgets with Glade

2012-01-20 Thread Adam Tauno Williams
Quoting Richard Carlson : I'm working on a program using PyGTK and Glade. I create a glade XML file using Glade Designer and then load widgets like this: class MyDialog: def __init__(self): self.dialog = gtk.glade.XML(self.GLADEFILE).get_widget ("dialog.xml") I think it would be bett

Re: LibreOffice with Python

2012-01-20 Thread Adam Tauno Williams
On Tue, 2012-01-10 at 19:04 -0500, Terry Reedy wrote: > On 1/10/2012 5:29 PM, Ben Finney wrote: > > LibreOffice supports scripting with several languages, including Python > > http://help.libreoffice.org/Common/Scripting> > So that page says. But it only tells how to attach a Python script once >

Re: etree/lxml/XSLT and dynamic stylesheet variables

2012-01-21 Thread Adam Tauno Williams
On Sat, 2012-01-21 at 05:56 +0100, Stefan Behnel wrote: > Adam Tauno Williams, 20.01.2012 21:38: > > I'm using etree to perform XSLT transforms, such as - > > from lxml import etree > > source = etree.parse(self.rfile) > > xslt = etree.fromstring(self._xslt)

Re: lxml to parse html

2012-01-23 Thread Adam Tauno Williams
ulting.com> OpenGroupware Developer <http://www.opengroupware.us> Adam Tauno Williams signature.asc Description: This is a digitally signed message part -- http://mail.python.org/mailman/listinfo/python-list

Re: Python scheduler

2013-02-21 Thread Adam Tauno Williams
y 5 mins, 10 secs, 20 secs, 1 min and so forth. I > was wondering what is the best way to do this? If you need a scheduler - use a scheduler! :) <https://pypi.python.org/pypi/APScheduler/> Works great, and very flexible. -- Adam Tauno Williams GPG D95ED383 Systems Administrator, Python

Re: Why are timezone aware and naive datetimes not distinct classes?

2013-03-11 Thread Adam Tauno Williams
itemiceconsulting.com/2012/10/setting-course-for-utc.html> > Well, it turns out, one of them was a timezone-aware datetime, and all > the others were naive! I finally figured it out when I tried Welcome! -- Adam Tauno Williams GPG D95ED383 Systems Administrator, Python Developer, LP

Windows Deployment Of Python Modules

2013-03-21 Thread Adam Tauno Williams
. Is there some trick to getting modules installed on Windows workstations en masse [in an automated fashion]? It seems like I must be missing something. For example, I want Python installed, and the iniparse module. -- Adam Tauno Williams GPG D95ED383 Systems Administrator, Python Developer,

Re: Windows Deployment Of Python Modules

2013-03-21 Thread Adam Tauno Williams
David Robinow wrote: >On Thu, Mar 21, 2013 at 4:14 PM, Adam Tauno Williams > wrote: >> >> Python itself is easy to deploy on Windows; just toss the MSI in >your >> local update server and away it goes. >> >> That's slick; LSUS is awesome. >>

Re: Print to an IPP printer (pkipplib?)

2013-04-10 Thread Adam Tauno Williams
On Wed, 2010-10-20 at 14:45 +, Martin Gregorie wrote: > On Fri, 15 Oct 2010 15:28:10 -0400, Adam Tauno Williams wrote: > > I've found the module pkipplib which seems to work well for things like > > interrogating an IPP (CUPS) server. But is there a way to send a print >

"Bad file descriptor" in HTTPServer using Multiprocessing.

2010-01-10 Thread Adam Tauno Williams
I have a Python multiprocessing application where a master process starts server sub-processes and communicates with them via Pipes; that works very well. But one of the subprocesses, in turn, starts a collection of HTTPServer 'workers' (almost exactly as demonstrated in the docs). This works pe

BaseHTTPServer get_request not called till first request

2010-01-12 Thread Adam Tauno Williams
Looking at and as examples I've attempted to create a BaseHTTPServer class that times-out accept() ever X seconds to check some other work. This seems to work well, but only once the HTTPServer object has r

Re: "Bad file descriptor" in HTTPServer using Multiprocessing.

2010-01-15 Thread Adam Tauno Williams
On Sun, 2010-01-10 at 14:45 -0500, Adam Tauno Williams wrote: > I have a Python multiprocessing application where a master process > starts server sub-processes and communicates with them via Pipes; that > works very well. But one of the subprocesses, in turn, starts a > collection o

Re: Blocking code

2010-01-15 Thread Adam Tauno Williams
On Fri, 2010-01-15 at 10:12 -0800, eric.frederich wrote: > I am trying to write something that will watch directories without > poling them. > This is what FAM is fore. Gamin is a re-implementation of FAM and it > has python bindings. > The problem is that when I call handle_one_event() it blocks

Re: Changing var names

2010-01-15 Thread Adam Tauno Williams
On Fri, 2010-01-15 at 13:27 -0400, Victor Subervi wrote: > Hi; > Well it took me *less than a day* to fix the following problems: > -- bare excepts (accidentally left a couple I think) > -- sql injection attacks > -- recreating tables to make them more reasonable > Now, I believe someone once menti

Re: xml.sax parsing elements with the same name

2010-01-15 Thread Adam Tauno Williams
On Mon, 2010-01-11 at 13:24 -0800, amadain wrote: > On Jan 11, 9:03 pm, John Bokma wrote: > > amadain writes: > > I was thinking about something like: > > self.filterIndex = 0 > > in startElement: > > if name == 'filter': > >self.filterIndex += 1 > >return > > if name == '

Re: BaseHTTPServer get_request not called till first request

2010-01-17 Thread Adam Tauno Williams
On Sat, 2010-01-16 at 18:35 -0800, yousay wrote: > On Jan 13, 1:38 am, Adam Tauno Williams > wrote: > > Looking at <http://code.activestate.com/recipes/425210/> and > > <http://code.activestate.com/recipes/499376/> as examples I've attempted > > to cre

Closing a Curses Window???

2010-01-19 Thread Adam Tauno Williams
I'm uses the curses module of Python to create a TUI. I can create windows, and subwindows, but I can't find anything on deleting or disposing of a a subwindow. How do I get rid of a subwindow? --

Re: multiprocessing problems

2010-01-19 Thread Adam Tauno Williams
> I decided to play around with the multiprocessing module, and I'm > having some strange side effects that I can't explain. It makes me > wonder if I'm just overlooking something obvious or not. Basically, I > have a script parses through a lot of files doing search and replace > on key strings

Re: Create object name from string value?

2010-01-21 Thread Adam Tauno Williams
> > but for the record, the way to use exec is like this: > > exec("object1 = classname()") > I failed to make that work. So back to the original question. How to > make an instance named according to a string inside a variable? I > guess it should be in the top-level namespace, not inside a list o

Re: multiprocessing as batch system

2010-01-21 Thread Adam Tauno Williams
On Thu, 2010-01-21 at 07:13 -0500, Neal Becker wrote: > I'm using multiprocessing as a poor man's batch system. It is working OK, > except that it doesn't seem to do load balancing quite right. > I have a 8-cpu machine. If I start, using multiprocessing pool, calling map > with more than 8 elem

Re: simple pub/sub

2010-01-21 Thread Adam Tauno Williams
On Thu, 2010-01-21 at 08:54 -0800, Steve Howell wrote: > Hi, I'm looking for ideas on building a simple architecture that > allows a bunch of independent Python processes to exchange data using > files and perform calculations. > One Python program would be collecting data from boat instruments on

Re: python 3's adoption

2010-01-27 Thread Adam Tauno Williams
On Wed, 2010-01-27 at 18:52 +0100, Alf P. Steinbach wrote: > * Steve Holden: > > Alf P. Steinbach wrote: > > [...] > >> The main problem with the incompatibility is for porting code, not for > >> writing code from scratch. It's also a problem wrt. learning the > >> language. And I see no good reaso

Re: myths about python 3

2010-01-27 Thread Adam Tauno Williams
On Wed, 2010-01-27 at 12:56 -0800, John Nagle wrote: > Daniel Fetchinson wrote: > > Hi folks, > > I was going to write this post for a while because all sorts of myths > > periodically come up on this list about python 3. I don't think the > > posters mean to spread false information on purpose, th

Re: myths about python 3

2010-01-27 Thread Adam Tauno Williams
On Wed, 2010-01-27 at 16:25 -0500, Benjamin Kaplan wrote: > On Wed, Jan 27, 2010 at 3:56 PM, John Nagle wrote: > Give the package maintainers time to update. There were some pretty > big changes to the C API. Most of the major 3rd party packages like > numpy and MySQLdb have already commited to ha

Re: SimpleXMLRPCServer daemon

2010-01-29 Thread Adam Tauno Williams
On Fri, 2010-01-29 at 07:54 -0800, Thomas Allen wrote: > I have a script that runs an instance of SimpleXMLRPCServer and in > general it works as expected. In its __del__, it is supposed to clean > up its PID file (written on boot). I have two problems with this > server instance: The first is that

Re: Processing XML File

2010-01-29 Thread Adam Tauno Williams
On Fri, 2010-01-29 at 09:25 -0800, jakecjacobson wrote: > I need to take a XML web resource and split it up into smaller XML > files. I am able to retrieve the web resource but I can't find any > good XML examples. I am just learning Python so forgive me if this > question has been answered many

Re: Processing XML File

2010-01-29 Thread Adam Tauno Williams
On Fri, 2010-01-29 at 10:34 -0800, jakecjacobson wrote: > On Jan 29, 1:04 pm, Adam Tauno Williams > wrote: > > On Fri, 2010-01-29 at 09:25 -0800, jakecjacobson wrote: > > > I need to take a XML web resource and split it up into smaller XML > > > files. I am able to

Re: OT: Instant Messenger Clients

2010-01-31 Thread Adam Tauno Williams
On Sun, 2010-01-31 at 13:15 -0800, Victor Subervi wrote: > Hi; > I need to record my IM conversations. I'm using Gmal's IM client and I > can't figure out how to do it, nor do I find any help googling it. Is > it possible with Gmail? If so, how? If not, is there a good IM client > that will allow m

Re: Dreaming of new generation IDE

2010-02-03 Thread Adam Tauno Williams
On Wed, 2010-02-03 at 14:10 +0300, Vladimir Ignatov wrote: > Hello, > I am sitting here for quite some time, but usually keep silent ;-) I > use Python since 2003 both "professionally" and for my hobby projects > and love it a much. > I notice however, that "maintaining" existing/older python code

Re: Dreaming of new generation IDE

2010-02-03 Thread Adam Tauno Williams
On Wed, 2010-02-03 at 16:23 +0100, Stef Mientki wrote: > Yes, it certainly does. Not that you'll get many Pythonistas > to confess > to that fact. Somehow those who brag about the readability > and > expressiveness of source code just cannot admit that: >

Re: Dreaming of new generation IDE

2010-02-03 Thread Adam Tauno Williams
On Wed, 2010-02-03 at 10:05 -0800, Phlip wrote: > On Feb 3, 3:10 am, Vladimir Ignatov wrote: > > Finally I develop a feeling that strong instrumentation / tools can > > bring us the best of two worlds. That I am dreaming on is an absolute > > new type/class of IDE suitable for Python and potential

  1   2   3   >