Re: system call that is killed after n seconds if not finished

2012-04-17 Thread Adam Skutt
heating, as I believe the general solution is pretty ugly and doesn't exist in ready form. I certainly could not find it. Adam -- http://mail.python.org/mailman/listinfo/python-list

Re: Python randomly exits with Linux OS error -9 or -15

2012-04-09 Thread Adam Skutt
exception while running and masking the original error. I would seriously advise taking it out, at least temporarily. This is why catch-all handlers tend to be a poor idea, as they're rarely robust in the cases you didn't consider. Adam -- http://mail.python.org/mailman/listinfo/python-list

Re: Python randomly exits with Linux OS error -9 or -15

2012-04-09 Thread Adam Skutt
; > and -15 Block device required. > > How do you get -9 and -15? Exit status is supposed to be between 0 and > 127. 0-255 are perfectly legal in UNIX. Chances are that something is interpreting the unsigned integer as a signed integer accidentally. Of course, without any output, th

Re: Interrupting a blocking function frolm another thread.

2012-04-08 Thread Adam Skutt
On Apr 8, 5:52 pm, superhac...@gmail.com wrote: > On Sunday, April 8, 2012 3:55:41 PM UTC-5, Adam Skutt wrote: > > On Apr 8, 2:45 pm, "superhac...@gmail.com" > > wrote: > > > I am using the python module nfqueue-bindings which is a nfqueue > > > packet

Re: Interrupting a blocking function frolm another thread.

2012-04-08 Thread Adam Skutt
ely in your asynchronous I/O handler. However, simply ignoring the nfqueue socket while doing other processing might be acceptable too. I would read the documentation and ask questions carefully before taking that approach, as it may lead to lost data or other problems. The viability of this app

Re: multithreading

2012-04-07 Thread Adam Skutt
ython modules. Non-thread-safe object instances is usually fine. Object construction needs to be thread-safe, but that's also the default behavior. You need not worry about it unless you're doing very unusual things. Plainly, most of the time you shouldn't need to do anything to

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: 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: 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

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: 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

Re: Determining version of OpenSSL linked against python?

2012-01-25 Thread Adam Mercer
t; openssl_version = libssl.SSLeay() > print "%.9X" % openssl_version > > This gives me 0009080FF which corresponds to 0.9.8o release which is > what I have installed in Debian Squeeze. Thanks, that looks useful. Cheers Adam -- http://mail.python.org/mailman/listinfo/python-list

Re: Determining version of OpenSSL linked against python?

2012-01-25 Thread Adam Mercer
s that ssh and python would use the same version of openssl: > not guaranteed, but seems like a "reasonable" assumption to me. Hmm, I like that idea. Thanks for the suggestion. Cheers Adam -- http://mail.python.org/mailman/listinfo/python-list

Re: Determining version of OpenSSL linked against python?

2012-01-25 Thread Adam Mercer
...' constructs with > 'try ... except...' constructs. My code already has a try... except block that tries the ssl.OPENSSL_VERSION approach first but I wanted to have a fallback method that works with python-2.6. Looks like I may need to hardcode certain things. Cheers Adam -- h

Re: Determining version of OpenSSL linked against python?

2012-01-25 Thread Adam Mercer
Hi Is this possible at all? Cheers Adam On Mon, Jan 23, 2012 at 14:01, Adam Mercer wrote: > Hi > > I'm trying to write a script that determines the version of OpenSSL > that python is linked against, using python-2.7 this is easy as I can > use: > >    import ss

Determining version of OpenSSL linked against python?

2012-01-23 Thread Adam Mercer
buteError: 'module' object has no attribute '__file__' >>> Can anyone offer any suggestions as to what is going wrong with the above code or offer an alternative way of determining the OpenSSl version using python-2.6? Cheers Adam -- http://mail.python.org/mailman/listinfo/python-list

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: 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: 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: 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

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: UnicodeEncodeError when piping stdout, but not when printing directly to the console

2012-01-06 Thread Adam Funk
On 2012-01-06, Peter Otten wrote: > Adam Funk wrote: > >> On 2012-01-04, Peter Otten wrote: >> >>> Adam Funk wrote: >> >>>> How can I force python (preferably within my python program, rather >>>> than having to set something externally)

Re: UnicodeEncodeError when piping stdout, but not when printing directly to the console

2012-01-06 Thread Adam Funk
On 2012-01-04, Peter Otten wrote: > Adam Funk wrote: >> How can I force python (preferably within my python program, rather >> than having to set something externally) to treat stdout as UTF-8? > > > $ cat force_utf8.py > # -*- coding: utf-8 -*- > import sys >

UnicodeEncodeError when piping stdout, but not when printing directly to the console

2012-01-04 Thread Adam Funk
ollowing (for example): UnicodeEncodeError: 'ascii' codec can't encode character u'\u0107' in position 21: ordinal not in range(128) How can I force python (preferably within my python program, rather than having to set something externally) to treat stdout as UTF-8? T

Re: Avoid race condition with Popen.send_signal

2012-01-03 Thread Adam Skutt
On Jan 3, 10:09 am, Jérôme wrote: > Tue, 3 Jan 2012 06:12:59 -0800 (PST) > Adam Skutt a écrit: > > > The conservative approach is to use another IPC mechanism to talk to > > the process, such as a pipe or a socket.  Why are you trying to send > > the child proces

Re: Avoid race condition with Popen.send_signal

2012-01-03 Thread Adam Skutt
quot;process doesn't exist" which both return ESRCH. This is certainly possible with careful coding but I'm not sure I would bother except in the simplest programs. Too many libraries do too many questionable things with signal handlers so I find it much safer and easier just to avoid the damn things whenever possible. Adam -- http://mail.python.org/mailman/listinfo/python-list

Re: Avoid race condition with Popen.send_signal

2012-01-03 Thread Adam Skutt
On Jan 2, 11:53 pm, Cameron Simpson wrote: > On 02Jan2012 19:16, Adam Skutt wrote: > | On Jan 2, 8:44 pm, Cameron Simpson wrote: > | > On 02Jan2012 20:31, Devin Jeanpierre wrote: > | > | > I think that catching the exception is probably the most Pythonic way. > | &

Re: Avoid race condition with Popen.send_signal

2012-01-03 Thread Adam Skutt
n your child processes becoming zombies and kill being called only when the child is alive or a zombie, then you should not be calling kill(2) at all. Killing an unrelated process will be considered as a bug by users. Hence why I find it easier just to avoid the problem altogether if I can. Adam -- http://mail.python.org/mailman/listinfo/python-list

Re: Avoid race condition with Popen.send_signal

2012-01-03 Thread Adam Skutt
On Jan 3, 3:44 am, Jérôme wrote: > Mon, 2 Jan 2012 19:16:50 -0800 (PST) > Adam Skutt a écrit: > > > No. It is possible (however unlikely) for EPERM to be legitimately > > returned in this case.  Anything other than EINVAL should be > > interpreted as "The child

Re: Avoid race condition with Popen.send_signal

2012-01-03 Thread Adam Skutt
On Jan 3, 7:31 am, Heiko Wundram wrote: > Am 03.01.2012 02:19, schrieb Adam Skutt: > > > On Jan 2, 6:09 pm, Jérôme  wrote: > >> What is the clean way to avoid this race condition ? > > > The fundamental race condition cannot be removed nor avoided. Ideally,

Re: Avoid race condition with Popen.send_signal

2012-01-02 Thread Adam Skutt
e child process is dead". Hence why you should avoid sending the signal in the first place: the situations where you don't run the risk of possibly killing an innocent bystander are pretty narrow. While unlikely on modern UNiX and Linux, IMO it's best to avoid the issue altogether when

Re: Avoid race condition with Popen.send_signal

2012-01-02 Thread Adam Skutt
ondition cannot be removed nor avoided. Ideally, avoid the need to send the subprocess a signal in the first place. If it cannot be avoided, then trap the exception. Adam -- http://mail.python.org/mailman/listinfo/python-list

Re: mutually exclusive arguments to a constructor

2011-12-31 Thread Adam Funk
On 2011-12-30, Günther Dietrich wrote: > Adam Funk wrote: > >>Suppose I'm creating a class that represents a bearing or azimuth, >>created either from a string of traditional bearing notation >>("N24d30mE") or from a number indicating the angle in degree

Re: mutually exclusive arguments to a constructor

2011-12-31 Thread Adam Funk
On 2011-12-30, Roy Smith wrote: > "But!", some C++/Java type bondage addicts might cry, "there's nothing > to prevent somebody from creating a DirectionIndicatingThingie directly, > bypassing the factory functions. There's no way to make the constructor > private!". To which the free-willed p

mutually exclusive arguments to a constructor

2011-12-30 Thread Adam Funk
(Warning: this question obviously reflects the fact that I am more accustomed to using Java than Python.) Suppose I'm creating a class that represents a bearing or azimuth, created either from a string of traditional bearing notation ("N24d30mE") or from a number indicating the angle in degrees as

Re: suppressing bad characters in output PCDATA (converting JSON to XML)

2011-12-02 Thread Adam Funk
On 2011-11-29, Stefan Behnel wrote: > Adam Funk, 29.11.2011 13:57: >> On 2011-11-28, Stefan Behnel wrote: >>> If the name "big_json" is supposed to hint at a large set of data, you may >>> want to use something other than minidom. Take a look at the >

Re: suppressing bad characters in output PCDATA (converting JSON to XML)

2011-11-29 Thread Adam Funk
On 2011-11-28, Steven D'Aprano wrote: > On Fri, 25 Nov 2011 13:50:01 +0000, Adam Funk wrote: > >> I'm converting JSON data to XML using the standard library's json and >> xml.dom.minidom modules. I get the input this way: >> >> input_source =

Re: suppressing bad characters in output PCDATA (converting JSON to XML)

2011-11-29 Thread Adam Funk
On 2011-11-28, Stefan Behnel wrote: > Adam Funk, 25.11.2011 14:50: >> I'm converting JSON data to XML using the standard library's json and >> xml.dom.minidom modules. I get the input this way: >> >> input_source = codecs.open(input_file, 'rb',

suppressing bad characters in output PCDATA (converting JSON to XML)

2011-11-25 Thread Adam Funk
I'm converting JSON data to XML using the standard library's json and xml.dom.minidom modules. I get the input this way: input_source = codecs.open(input_file, 'rb', encoding='UTF-8', errors='replace') big_json = json.load(input_source) input_source.close() Then I recurse through the contents of

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

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: 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: recommend a graphics library for plotting by the pixel?

2011-10-07 Thread Adam Funk
On 2011-10-05, Westley Martínez wrote: > On Wed, Oct 05, 2011 at 02:29:38PM +0100, Adam Funk wrote: >> I only know PyGame because we did an exercise in recreating the old >> breakout game and messing around with it at a local Python group. >> >> I was under the mi

Re: recommend a graphics library for plotting by the pixel?

2011-10-07 Thread Adam Funk
On 2011-10-04, Ian Kelly wrote: > On Tue, Oct 4, 2011 at 3:56 AM, Adam Funk wrote: >> I'd like to create a window with a "pause" button and a large plotting >> area, in which I'd like to draw a polygon, detect the pixel >> coördinates of a mouse cl

Re: recommend a graphics library for plotting by the pixel?

2011-10-05 Thread Adam Funk
On 2011-10-04, Derek Simkowiak wrote: > If this is strictly for 2D pixel graphics, I recommend using PyGame > (aka SDL). Why do you not think it's the way to go? It was built for > this type of thing. I only know PyGame because we did an exercise in recreating the old breakout game and m

recommend a graphics library for plotting by the pixel?

2011-10-04 Thread Adam Funk
I'd like to create a window with a "pause" button and a large plotting area, in which I'd like to draw a polygon, detect the pixel coördinates of a mouse click, and then start setting the colors of pixels by (x,y) coördinates. (This is just for my own amusement, to play with some formulas for gene

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: Need A script to open a excel file and extract the data using autofilter

2011-10-03 Thread Adam Przybyla
/ Regards Adam Przybyla -- http://mail.python.org/mailman/listinfo/python-list

Re: Killing threads (was Re: Cancel or timeout a long running regular expression)

2011-09-18 Thread Adam Jorgensen
The point of the Java thread.stop() being deprecated seems to have very little to do with undeclared exceptions being raised and a lot to do with objects being left in a potentially damaged state. As Ian said, it's a lot more complex than just adding try/catches. Killing a thread in the middle of

Re: What do you guys think about adding a method "to_json"

2011-09-11 Thread Adam Jorgensen
Perhaps an actual use-case would clarify the need for this? 2011/9/12 Chris Rebert > 2011/9/11 Juan Pablo Romero Méndez : > > Hello, > > > > What do you guys think about adding a method "to_json" to dictionaries > > and sequence types? Perhaps through a module import? > > Why? We already have js

Re: [Python-ideas] relaxing keyword usage restrictions

2011-09-08 Thread Adam Jorgensen
About the only keyword I can think of this being even slightly useful for would be class and even then I think that clazz is a pretty acceptable substitute. -- http://mail.python.org/mailman/listinfo/python-list

Re: Functions vs OOP

2011-09-04 Thread Adam Jorgensen
Progranming with functions vs Progranming with objects sounds like C vs. C++ more than functional programming vs. OO programming On 4 September 2011 04:18, William Gill wrote: > On 9/3/2011 9:51 PM, Terry Reedy wrote: > >> >> It is possible that our doc was less than crystal clear. We are >> con

Re: Why doesn't threading.join() return a value?

2011-09-02 Thread Adam Skutt
On Sep 2, 4:14 pm, Chris Torek wrote: > In article > Adam Skutt   wrote: > > >No, it can only pass a void*, which isn't much better than passing an > >int. > > It is far better than passing an int, although it leaves you with > an annoying storage-management

Re: Why doesn't threading.join() return a value?

2011-09-02 Thread Adam Skutt
you are talking about here. Maybe you confuse threads > with processes? Windows threads have exit codes, just like processes. At least one code is reserved and cannot be used by the programmer. Adam -- http://mail.python.org/mailman/listinfo/python-list

Re: Why doesn't threading.join() return a value?

2011-09-02 Thread Adam Skutt
de or by the system. Even worse, some of those integer values are reserved by some operating systems. If your thread died via an exception, it still has an error code set by the operating system. How would you going to distinguish those codes from your own? Adam -- http://mail.python.org/mailman/listinfo/python-list

Re: Python thread

2011-09-01 Thread Adam Skutt
the operating system is responsible for scheduling the threads and managing their lifecycle. Adam -- http://mail.python.org/mailman/listinfo/python-list

Re: Python thread

2011-09-01 Thread Adam Skutt
ead to run at a time doesn't mean they'll always run on the same core. Adam -- http://mail.python.org/mailman/listinfo/python-list

Re: Python IDE/Eclipse

2011-08-30 Thread Adam Jorgensen
I recommend PyCharm. Best Python IDE ever :-) If you can't afford to pay for it in the long run, then PyDev is the next best bet. I would recommend downloading the most minimal Eclipse you can get (Usually the Eclipse RCP Runtime) and install the necessary plugins as you go. This prevents you from

Re: Weird interaction with nested functions inside a decorator-producing function and closuring of outer data...

2011-08-24 Thread Adam Jorgensen
Thanks :-) Sorry about the size, I wasn't sure what was relevant... On 24 August 2011 15:29, Peter Otten <__pete...@web.de> wrote: > Adam Jorgensen wrote: > >> Hi all, I'm experiencing a weird issue with closuring of parameters >> and some nested function

Weird interaction with nested functions inside a decorator-producing function and closuring of outer data...

2011-08-24 Thread Adam Jorgensen
ing referenced before they are defined... What's more interesting is that PyCharm seems to know this is going to happen as well because the code insight marks the problem versions as having unused parameters (Specifically, the *decode_args and sa_session_class_lambda parameter

Re: Why __slots__ slows down attribute access?

2011-08-23 Thread Adam Skutt
f the difference you show. A 70ns average difference between iterations is trivially attributable to noise on a modern machine. Run enough trials or just wait for the moon to move a bit, and I wouldn't be terribly surprised if you got difference results. Rebooting your machine might be e

Re: Python Windows Extensions for Mac

2011-08-19 Thread Adam Jorgensen
You mean pywin32? They sure don't install on linux so that should give you a clue... On 19 August 2011 22:02, johnny.venter wrote: > > Hello, I am looking for the Python Windows Extensions to see if they can be > installed on a Mac.THanks. > > -- > http://mail.python.org/mailman/listinfo/pyth

Re: Windows service in production?

2011-08-18 Thread Adam Jorgensen
Yeah, we run our Python App as a service under Windows. You can look at the open-souce part of our product using http://trac.sjsoft.com/browser If you look into the code you should be able to find some stuff to do with services. Specficially, look in trunk/j5/src/j5/OS/WinService.py On 19 August

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: 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: 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: How to get number of bytes written to nonblocking FIFO when EAGAIN is raised?

2011-07-19 Thread Adam Skutt
27;s no direct relationship between calling file.write() and how much data is written to the stream. In addition, file objects also simply raise the underlying OS error when it occurs. The UNIX write(2) syscall assumes that you have been keeping track of how many bytes you've successfully writ

Re: Python ++ Operator?

2011-07-16 Thread Adam Przybyla
le, but > it's a construct that I use practically on a daily basis. To someone > who's not familiar with Python, list comps could suffer from the same > issues - what does THIS do? oh. list_ptr=list_a list_ptr=list_ptr[1:] Regards Adam Przybyla -- http://mail.python.org/mailman/listinfo/python-list

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: 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: 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: 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: bash: testing whether anyone is or has recently been logged in?

2011-07-07 Thread Adam Funk
On 2011-04-20, Bill Marcum wrote: > On 2011-04-20, Adam Funk wrote: >> I'd appreciate any suggestions for testing (preferably from a bash >> script, although perl or python would be OK too) whether anyone is >> currently logged in, and whether anyone has been logge

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: 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: running an existing script

2011-06-22 Thread Adam Chapman
On Jun 22, 6:13 pm, Adam Chapman wrote: > On Jun 22, 5:51 pm, Adam Chapman > wrote: > > > > > > > > > > > On Jun 22, 5:51 pm, Ethan Furman wrote: > > > > Adam Chapman wrote: > > > > On Jun 22, 4:54 pm, Adam Chapman > >

Re: running an existing script

2011-06-22 Thread Adam Chapman
On Jun 22, 5:51 pm, Adam Chapman wrote: > On Jun 22, 5:51 pm, Ethan Furman wrote: > > > > > > > > > > > Adam Chapman wrote: > > > On Jun 22, 4:54 pm, Adam Chapman > > > wrote: > > >> On Jun 21, 9:12 pm, Adam Chapman > > &g

Re: running an existing script

2011-06-22 Thread Adam Chapman
On Jun 22, 5:51 pm, Ethan Furman wrote: > Adam Chapman wrote: > > On Jun 22, 4:54 pm, Adam Chapman > > wrote: > >> On Jun 21, 9:12 pm, Adam Chapman > >> wrote: > > >>> On Jun 21, 8:00 pm, Ethan Furman wrote: > >>>> Adam Chapman

Re: running an existing script

2011-06-22 Thread Adam Chapman
On Jun 22, 4:54 pm, Adam Chapman wrote: > On Jun 21, 9:12 pm, Adam Chapman > wrote: > > > > > > > > > > > On Jun 21, 8:00 pm, Ethan Furman wrote: > > > > Adam Chapman wrote: > > > > Thanks Ethan > > > > > No way coul

Re: running an existing script

2011-06-22 Thread Adam Chapman
On Jun 21, 9:12 pm, Adam Chapman wrote: > On Jun 21, 8:00 pm, Ethan Furman wrote: > > > > > > > > > > > Adam Chapman wrote: > > > Thanks Ethan > > > > No way could I have worked that out in my state of stress! > > > > Fo

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: running an existing script

2011-06-21 Thread Adam Chapman
On Jun 21, 8:00 pm, Ethan Furman wrote: > Adam Chapman wrote: > > Thanks Ethan > > > No way could I have worked that out in my state of stress! > > > For your second idea, would I need to type that into the python command > > line interface (the one that looks

running an existing script

2011-06-21 Thread Adam Chapman
Hi, I'm trying to put together a lot of pieces of source code in matlab, java, perl and python. Im an expert when it comes to matlab, but novice in all the others listed above. However, I have integrated the java and perl code so they can be called from matlab. I know that there is a toolbox out

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: 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: 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: Call python function from Matlab

2011-06-08 Thread Adam Przybyla
ace/code and get 9. > > Thanks for your feedback. ... try this: http://pypi.python.org/pypi/pymatlab Regards Adam Przybyla -- http://mail.python.org/mailman/listinfo/python-list

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: 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

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: 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: 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: string formatting

2011-05-06 Thread Adam Tauno Williams
blue') > > (3) "the {} is {}".format('sky', 'blue') > > As I know (1) is old style. (2) and (3) are new but (3) is only > > supported from Python 2.7+. > > Which one should be used? > I use Python 3, and I tend to use (3), unless I

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: 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: 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: 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: 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: 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: [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

<    1   2   3   4   5   6   7   8   9   10   >