Re: Linux users: please run gui tests

2015-08-07 Thread David Bolen
Terry Reedy writes: > and report here python version, linux system, and result. > Alteration of environment and locale is a known issue, skip that. Using source builds on my slave (bolen-ubuntu): Linux buildbot-ubuntu 4.1.0-x86_64-linode59 #1 SMP Mon Jun 22 10:39:23 EDT 2015 x86_64 x86_64 x86_

Re: Python FTP timeout value not effective

2013-09-02 Thread David Bolen
John Nagle writes: > Here's the relevant code: > > TIMEOUTSECS = 60 ## give up waiting for server after 60 seconds > ... > def urlopen(url,timeout=TIMEOUTSECS) : > if url.endswith(".gz") : # gzipped file, must decompress first > nd = urllib2.urlopen(url,timeout=timeout) # ge

Re: Migrate from Access 2010 / VBA

2012-11-27 Thread David Bolen
kgard writes: > I am the lone developer of db apps at a company of 350+ > employees. Everything is done in MS Access 2010 and VBA. I'm > frustrated with the limitations of this platform and have been > considering switching to Python. I've been experimenting with the > language for a year or so,

Re: logging time format millisecond precision decimalsign

2012-07-20 Thread David Bolen
"Alex van der Spek" writes: > I use this formatter in logging: > > formatter = logging.Formatter(fmt='%(asctime)s \t %(name)s \t %(levelname)s > \t %(message)s') > > Sample output: > > 2012-07-19 21:34:58,382 root INFO Removed - C:\Users\ZDoor\Documents > > The time stamp has millisecond pr

Re: Sandboxed Python: memory limits?

2011-04-07 Thread David Bolen
Chris Angelico writes: >So I'm hoping to restrict the script's ability to > consume all of memory, without (preferably) ulimit/rlimiting the > entire process (which does other things as well). But if it can't be, > it can't be. Just wondering, but rather than spending the ene

Re: Date Parsing Question

2010-09-03 Thread David Bolen
Gavin writes: > python-dateutil seems to work very well if everything is in English, > however, it does not seem to work for other languages and the > documentation does not seem to have any information about locale > support. Probably because I don't think there is much built in. You'll want t

Re: time between now and the next 2:30 am?

2010-07-23 Thread David Bolen
Neil Cerutti writes: > On 2010-07-23, Jim wrote: >> How can I calculate how much time is between now and the next >> 2:30 am? Naturally I want the system to worry about leap >> years, etc. > > You need the datetime module. Specifically, a datetime and > timedelta object. Although it sounds lik

Re: About problems that I have with learning wxPython in Macintosh

2010-07-16 Thread David Bolen
"ata.jaf" writes: > import wx > > class MainWindow(wx.Frame) : > def __init__(self, parent, title) : >wx.Frame.__init__(self, parent, title=title, size=(200, 100)) >self.control = wx.TextCtrl(self, style=wx.TE_MULTILINE) >self.CreateStatusBar() > >filemenu = wx.Menu() > >file

Re: Python 2.7 released

2010-07-05 Thread David Bolen
Martineau writes: > Some clarification. I meant installed 2.7 on top of 2.6.x. Doing so > would have interfered with the currently installed version because I > always install Python in the same directory, one named just "Python", > to minimize the number of changes I have to make to to other par

Re: What's the matter with docs.python.org?

2010-05-20 Thread David Bolen
Christian Mertes writes: > On Mi, 2010-05-19 at 16:42 -0700, Aahz wrote: >> Also, I think you need to pass the host HTTP header to access >> docs.python.org > > Look, I don't really want to read Python docs via telnet. I basically > wanted to point out that there is strange behaviour and someone

Re: Extract a bordered, skewed rectangle from an image

2010-05-07 Thread David Bolen
"Paul Hemans" writes: > I am wondering whether there are any people here that have experience with > openCV and Python. If so, could you either give me some pointers on how to > approach this, or if you feel so inclined, bid on the project. There are 2 > problems: Can't offer actual services,

Re: Impersonating a Different Logon

2010-04-07 Thread David Bolen
Kevin Holleran writes: > Thanks, I was able to connect to the remote machine. However, how do > I query for a very specific key value? I have to scan hundreds of > machines and need want to reduce what I am querying. I would like to > be able to scan a very specific key and report on its value

Re: Recommend Commercial graphing library

2010-04-07 Thread David Bolen
AlienBaby writes: > I'd be grateful for any suggestions / pointers to something useful, Ignoring the commercial vs. open source discussion, although it was a few years ago, I found Chart Director (http://www.advsofteng.com/) to work very well, with plenty of platform and language support, includ

Re: Generic singleton

2010-03-04 Thread David Bolen
Duncan Booth writes: > It is also *everywhere* in the Python world. Unlike Java and C++, Python > even has its own built-in type for singletons. > > If you want a singleton in Python use a module. > > So the OP's original examples become: > > --- file singleton.py --- > foo = {} > bar = [] > > -

Re: listing existing windows services with python

2010-02-16 Thread David Bolen
alex23 writes: > News123 wrote: >> What is the best way with python to get a list of all windows services. >> >> As a start I would be glad to receive only the service names. >> >> However it would be nicer if I could get all the properties of a service >> as well. > > I highly recommend Tim Gol

Re: Executing Commands From Windows Service

2010-02-09 Thread David Bolen
David Bolen writes: > Not from my past experience - the system account (LocalSystem for > services) can be surprising, in that it's pretty much unlimited access > to all local resources, but severely limited in a handful of cases, > one of which is any attempt to access the

Re: Executing Commands From Windows Service

2010-02-09 Thread David Bolen
T writes: > The more testing I do, I think you may be right..I was able to get it > to work under a local admin account, and it worked under debug mode > (which would also have been running as this user). I'm a bit > surprised though - I was under the assumption that LocalSystem had > rights to

Re: Executing Commands From Windows Service

2010-02-09 Thread David Bolen
T writes: > I have a script, which runs as a Windows service under the LocalSystem > account, that I wish to have execute some commands. Specifically, the > program will call plink.exe to create a reverse SSH tunnel. Right now > I'm using subprocess.Popen to do so. When I run it interactively

Re: Which version of MSVC?90.DLL's to distribute with Python 2.6 based Py2exe executables?

2009-12-29 Thread David Bolen
Jonathan Hartley writes: > I guess I really need an installer. Oh well. This need not be that much of a hurdle. Several solutions exist such as Inno Setup (my personal preference), NSIS, etc... which are not hard to create a solid installer with. I suspect your end users will appreciate it too

Re: Python PIL and Vista/Windows 7 .. show() not working ...

2009-11-30 Thread David Bolen
Esmail writes: > I dug around in the docs and found a named parameter that I can set > when I > call show. > > Definition: im.show(self, title=None, command=None) > > I installed irfanview and specified it/its path in the parameter, > but that didn't work either. It's really quite puzzling in

Re: python gui builders

2009-11-18 Thread David Bolen
Simon Hibbs writes: > I've had this problem for a few years. I've tried PythonCard, > WxWidgets with WxDesigner, BoaConstructor, etc. None of them come > anywhere close to PyQT/QTDesigner. For me, the killer feature missing from of all of the wx-based designers is that they require sizer based d

Re: A "terminators' club" for clp

2009-11-15 Thread David Bolen
Terry Reedy writes: > r wrote: >> On Nov 14, 4:59 am, kj wrote: >>> But, as I already showed, I'm out of my depth here, >>> so I'd better shut up. >> >> Don't give up so easy! The idea is great, what Paul is saying is that >> most people who read this group use newsreaders and that has nothing >

Re: Need cleanup advice for multiline string

2009-08-12 Thread David Bolen
Robert Dailey writes: > Hey guys. Being a C++ programmer, I like to keep variable definitions > close to the location in which they will be used. This improves > readability in many ways. However, when I have a multi-line string > definition at function level scope, things get tricky because of t

Re: Networked Broadcast Messaging

2009-08-11 Thread David Bolen
"squishywaf...@gmail.com" writes: > * Machines can come and go. Since messages are not directly sent to a > specific IP address from our Python script, the messages are simply > broadcasted to those who are there to listen. If nobody is subscribed > to the message type being sent, nothing happens

Re: fast video encoding

2009-07-31 Thread David Bolen
gregorth writes: > I am a novice with video encoding. I found that few codecs support > gray scale images. Any hints to take advantage of the fact that I only > have gray scale images? I don't know that there's any good way around the fact that video encoding is simply one of the heavier CPU-bou

Re: Semaphore Techniques

2009-07-28 Thread David Bolen
John D Giotta writes: > I'm looking to run a process with a limit of 3 instances, but each > execution is over a crontab interval. I've been investigating the > threading module and using daemons to limit active thread objects, but > I'm not very successful at grasping the documentation. > > Is i

Re: Why not enforce four space indentations in version 3.x?

2009-07-17 Thread David Bolen
Nobody writes: > On Thu, 16 Jul 2009 09:18:47 -0500, Tim Chase wrote: > >> Yes, the dictatorial "a tab always equals 8 spaces" > > Saying "always" is incorrect; it is more accurate to say that tab stops > are every 8 columns unless proven otherwise, with the burden of proof > falling on whoever w

Re: Why not enforce four space indentations in version 3.x?

2009-07-15 Thread David Bolen
Miles Kaufmann writes: > On Jul 14, 2009, at 5:06 PM, David Bolen wrote: >> Are you sure? It seems to restrict them in the same block, but not in >> the entire file. At least I was able to use both space and tab >> indented blocks in the same file with Python 3.0 and 3.

Re: Why not enforce four space indentations in version 3.x?

2009-07-14 Thread David Bolen
John Nagle writes: >Python 3 enforces the rule that you can't mix tabs and spaces > for indentation in the same file. That (finally) guarantees that > the indentation you see is what the Python parser sees. That's > enough to prevent non-visible indentation errors. Are you sure? It seems

Re: PDF: finding a blank image

2009-07-13 Thread David Bolen
DrLeif writes: > What I would like to do is have python detect a "blank" pages in a PDF > file and remove it. Any suggestions? The odds are good that even a blank page is being "rendered" within the PDF as having some small bits of data due to scanner resolution, imperfections on the page, etc.

Re: Suppressing Implicit Chained Exceptions (Python 3.0)

2009-07-02 Thread David Bolen
"andrew cooke" writes: > However, when printed via format_exc(), this new exception still has the > old exception attached via the mechanism described at > http://www.python.org/dev/peps/pep-3134/ (this is Python 3.0). If you're in control of the format_exc() call, I think the new chain keyword

Re: Off-topic: Usenet archiving history

2009-06-14 Thread David Bolen
Ben Finney writes: > David Bolen writes: > >> Individual messages could include an Expires: header if they wished, > > Since we're already well off-topic: NNTP, HTTP, and email, and probably > other protocols as well, all deal with messages. They are all consistent

Re: Off-topic: Usenet archiving history

2009-06-14 Thread David Bolen
Dennis Lee Bieber writes: > Either way -- it was still a change from "expiration at some > date"... Though since (Netcom/Mindspring)Earthlink seems to have > subcontracted NNTP service to Giganews (or some such) it wouldn't > surprise me to learn that service also keeps a mammoth archive...

Re: Ah, ctypes

2009-06-01 Thread David Bolen
Nick Craig-Wood writes: > ctypes could potentially note that function types don't have enough > references to them when passed in as arguments to C functions? It > might slow it down microscopically but it would fix this problem. Except that ctypes can't know the lifetime needed for the callbac

Re: AOPython Question

2009-05-28 Thread David Bolen
Roastie writes: > I installed the AOPython module: > >% easy_install aopython > > That left an aopython-1.0.3-py2.6.egg at > C:\mystuff\python\python_2.6.2\Lib\site-packages. An egg is basically a ZIP file with a specific structure (you can inspect it with common ZIP tools). Depending on th

Re: A fast way to read last line of gzip archive ?

2009-05-25 Thread David Bolen
"Barak, Ron" writes: > I couldn't really go with the shell utilities approach, as I have no > say in my user environment, and thus cannot assume which binaries > are install on the user's machine. I suppose if you knew your target you could just supply the external binaries to go with your appli

Re: A fast way to read last line of gzip archive ?

2009-05-24 Thread David Bolen
"Barak, Ron" writes: > I thought maybe someone has a way to unzip just the end portion of > the archive (instead of the whole archive), as only the last part is > needed for reading the last line. The problem is that gzip compressed output has no reliable intermediate break points that you can j

Re: Thread-killing, round 666 (was Re: Lisp mentality vs. Python mentality)

2009-04-28 Thread David Bolen
Vsevolod writes: > On Apr 27, 11:31 pm, David Bolen wrote: >> I'm curious - do you know what happens if threading is implemented as >> a native OS thread and it's stuck in an I/O operation that is blocked? >> How does the Lisp interpreter/runtime gain control a

Re: Thread-killing, round 666 (was Re: Lisp mentality vs. Python mentality)

2009-04-27 Thread David Bolen
Vsevolod writes: > "This should be used with caution: it is implementation-defined > whether the thread runs cleanup forms or releases its locks first." > This doesn't mean deprecated. It means: implementation-dependent. For > example in SBCL: "Terminate the thread identified by thread, by > caus

Re: global name 'self' is not defined - noob trying to learn

2009-03-30 Thread David Bolen
mark.sea...@gmail.com writes: > class myclass(object): > # > # def __new__(class_, init_val, size, reg_info): > def __init__(self, init_val, size, reg_info): > > # self = object.__new__(class_) > self.reg_info = reg_info > print self.reg_info.message > self.

Re: finally successful in ods with python, just one help needed.

2009-03-14 Thread David Bolen
Krishnakant writes: > based on your code snippid I added a couple of lines to actually center > align text in the merged cell in first row. Sorry, guess I should have verified handling all the requirements :-) I think there's two issues: * I neglected to add the style I created to the document

Re: finally successful in ods with python, just one help needed.

2009-03-14 Thread David Bolen
Krishnakant writes: > However when I apply the same elements and attributes to the one I am > creating with odfpy, I get "attribute not allowed " errors. > If some one is interested to look at the code, please let me know, I can > send an attachment off the list so that others are not forced to >

Re: wxPython fast and slow

2009-03-12 Thread David Bolen
iu2 writes: > A question about CallAfter: As I understand, this function is intended > to be used from within threads, where it queues the operation to be > performed in the GUI queue. I agree with the second half of the sentence but not the first. CallAfter is intended to queue up a delayed cal

Re: wxPython fast and slow

2009-03-08 Thread David Bolen
iu2 writes: > Indeed, but I don't think the CallAfter is necessary. I could just as > well remove the time.sleep in the original code. I could also make a > tight loop to replace time.sleep > for i in range(100): pass > and tune it to fit the speed I need. Except that CallAfter passed contro

Re: Using clock() in threading on Windows

2009-02-21 Thread David Bolen
"Martin v. Löwis" writes: > As a consequence, the half-busy loops could go away, at least > on systems where lock timeouts can be given to the system. I know that in some cases in the past I've had to bypass a Queue's use of threading objects for waiting for a queue to unblock because of the inc

Re: is python Object oriented??

2009-01-31 Thread David Bolen
thmpsn@gmail.com writes: > I don't know how you would do it in C# (or Java for that matter). > > In C++ you can play with pointers to "get at" some memory location > somewhere in the object. The only portable way to know the exact > location between the beginning of the object and the desired

Re: Python Crashes

2009-01-15 Thread David Bolen
koranthala writes: > Could anyone guide me on this? I have been facing this issue for a > day, and cannot seem to solve it. We had a scheduling system that had a similar "once in a long while hard Windows-process crash" which after a bunch of work to try to track down the source, the most ro

Re: Implementing file reading in C/Python

2009-01-14 Thread David Bolen
Johannes Bauer writes: > Yup, I changed the Python code to behave the same way the C code did - > however overall it's not much of an improvement: Takes about 15 minutes > to execute (still factor 23). Not sure this is completely fair if you're only looking for a pure Python solution, but to be

Re: Python 3.0 automatic decoding of UTF16

2008-12-06 Thread David Bolen
Johannes Bauer <[EMAIL PROTECTED]> writes: > This is very strange - when using "utf16", endianness should be detected > automatically. When I simply truncate the trailing zero byte, I receive: Any chance that whatever you used to "simply truncate the trailing zero byte" also removed the BOM at th

Re: [py2exe] What to download when updating?

2008-04-27 Thread David Bolen
Gilles Ganault <[EMAIL PROTECTED]> writes: > Hello > > Out of curiosity, if I recompile a Python (wxPython) app with > py2exe, can I have customers just download the latest .exe, or are > there dependencies that require downloading the whole thing again? It will depend on what you changed i

Re: is there enough information?

2008-03-04 Thread David Bolen
Dennis Lee Bieber <[EMAIL PROTECTED]> writes: > On Mon, 3 Mar 2008 08:11:43 -0500, Jean-Paul Calderone > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > >> I'm not sure, but you seem to be implying that the only way to use Windows' >> asynchronous I/O APIs is with threads. Actu

Re: Low-overhead GUI toolkit for Linux w/o X11?

2007-11-03 Thread David Bolen
David Bolen <[EMAIL PROTECTED]> writes: > When I was looking for an embedded graphics library for a prior > platform (ELAN 486, 2MB flash, 6MB RAM) under DOS, we took a look at > these: > > * GRX (http://grx.gnu.de/index.html) (...) > There aren't any Python wrapper

Re: Low-overhead GUI toolkit for Linux w/o X11?

2007-11-03 Thread David Bolen
Grant Edwards <[EMAIL PROTECTED]> writes: > I'm looking for GUI toolkits that work with directly with the > Linux frambuffer (no X11). It's an embedded device with > limited resources, and getting X out of the picture would be a > big plus. Sounds like a reasonably modern "embedded" system since

Re: Co-developers wanted: document markup language

2007-09-01 Thread David Bolen
Roy Smith <[EMAIL PROTECTED]> writes: > Anybody remember Scribe? (raising hand) OT, but I still have a bunch of Scribe source documents from college. Of course, as I attended CMU where it originated I suppose that's not unusual. Definitely pre-WYSIWYG, but one of the first to separate presenta

Re: HowTo Use Cython on a Windows XP Box?

2007-08-31 Thread David Bolen
David Lees <[EMAIL PROTECTED]> writes: > Yes, you are correct in understanding my question. I thought my post > was clear, but I guess not. I will go try the pyrex list. You might also try looking for references to distutils support for non-MS compilers, since Pyrex (and presumably Cython) uses

Re: Unzip: Memory Error

2007-08-30 Thread David Bolen
I wrote: > Here's a small example of a ZipFile subclass (tested a bit this time) > that implements two generator methods: Argh, not quite tested enough - one fix needed, change: if bytes[-1] not in ('\n', '\r'): partial = lines.pop() to: if bytes[-1] not

Re: Unzip: Memory Error

2007-08-30 Thread David Bolen
David Bolen <[EMAIL PROTECTED]> writes: > If you are going to read the file data incrementally from the zip file > (which is what my other post provided) you'll prevent the huge memory > allocations and risk of running out of resource, but would have to > implement your own

Re: Creating a multi-tier client/server application

2007-08-30 Thread David Bolen
Jeff <[EMAIL PROTECTED]> writes: > David: Sounds like a pretty interesting app. Thanks for the in-depth > description. I went and checked out Twisted PB, and it seems > awesome. I may very well go with that. How was writing code with > it? I may also end up using py2app, but I'm also going to

Re: Unzip: Memory Error

2007-08-30 Thread David Bolen
mcl <[EMAIL PROTECTED]> writes: > pseudo code > > zfhdl = zopen(zip,filename) # Open File in Zip Archive for > Reading > > while True: > ln = zfhdl.readline()# Get nextline of file > if not ln: # if EOF file > break > dealwithline(ln)

Re: Unzip: Memory Error

2007-08-29 Thread David Bolen
mcl <[EMAIL PROTECTED]> writes: > I am trying to unzip an 18mb zip containing just a single 200mb file > and I get a Memory Error. When I run the code on a smaller file 1mb > zip, 11mb file, it works fine. (...) > def unzip_file_into_dir(file, dir): > #os.mkdir(dir, 0777) > zfobj = zi

Re: Creating a multi-tier client/server application

2007-08-29 Thread David Bolen
Jeff <[EMAIL PROTECTED]> writes: > reasons, not the least of which is that I've been working almost > entirely on web apps for the past few years, and I am getting mighty > sick of it. A lot of that is due to the language (PHP, which I have > since grown to hate) I had to use. I've worked on a s

Re: Unable to read large files from zip

2007-08-29 Thread David Bolen
Nick Craig-Wood <[EMAIL PROTECTED]> writes: > Kevin Ar18 <[EMAIL PROTECTED]> wrote: >> >> I posted this on the forum, but nobody seems to know the solution: >> http://python-forum.org/py/viewtopic.php?t=5230 >> >> I have a zip file that is several GB in size, and one of the files inside >> o

Re: How properly manage memory of this PyObject* array?? (C extension)

2006-07-19 Thread David Bolen
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > > *WRONG*. The object exists in and of itself. There may be one *or more* > > references to it, via pointers, scattered about in memory; they are > > *NOT* components of the object. A reference count is maintained inside > > the object and manipula

Re: Replacing utf-8 characters

2005-10-05 Thread David Bolen
Mike <[EMAIL PROTECTED]> writes: > What you and I typed was ascii. The value of link came from importing > that utf-8 web page into that variable. That is why I think it is not > working. But not sure what the solution is. Are you sure you're asking what you think you are asking? Both the ampe

Re: Bug on Python2.3.4 [FreeBSD]?

2005-08-12 Thread David Bolen
Uwe Mayer <[EMAIL PROTECTED]> writes: > AFAICT there seems to be a bug on FreeBSD's Python 2.3.4 open function. The > documentation states: > > > Modes 'r+', 'w+' and 'a+' open the file for updating (note that 'w+' > > truncates the file). Append 'b' to the mode to open the file in binary > > mod

Re: debugger?

2005-07-06 Thread David Bolen
Qiangning Hong <[EMAIL PROTECTED]> writes: (...) > However, while I use pdb or inserting "print" statement to debug my > apps, sometimes it is a pain. I think I need a good GUI debugger to > help me. The debugger should meet _most_ of the following > requirements: > > 1. can debug wxPython appl

Re:

2005-07-05 Thread David Bolen
[EMAIL PROTECTED] (Roy Smith) writes: (...) > We've got code coveage tools. This is a testing tool. You keep > running tests and it keeps track of which lines of code are executed > (i.e. which logic branches are taken). One theory of testing says you > should keep writing test cases until you'

Re: py2exe + svn - the final drama

2005-05-06 Thread David Bolen
Timothy Smith <[EMAIL PROTECTED]> writes: > what i do is as soon as the update is complete i close the app, but it > still gives the error, i tried clear() after update and before it, it > still got the same error. it's be nice to not have to fiddle around > with the zip file, i really think makin

Re: py2exe + svn - the final drama

2005-05-06 Thread David Bolen
Just <[EMAIL PROTECTED]> writes: > the zipimport module has an attr called _zip_directory_cache, which is a > dict you can .clear(). Still, reloading modules is hairy at best, its > probably easiest to relaunch your app when the .zip file has changed. Except that he's getting an error during th

Re: py2exe + svn - the final drama

2005-05-06 Thread David Bolen
Timothy Smith <[EMAIL PROTECTED]> writes: > Timothy Smith wrote: (...) > >zipimport.ZipImportError: bad local file header in Z:\temp\library.zip > > > > not that once i have finished client.update(''), it has successfully > > updated the zipfile, i open a dialoge box saying "click ok and > > resta

Re: py2exe and library.zip

2005-05-05 Thread David Bolen
Timothy Smith <[EMAIL PROTECTED]> writes: > I've got this working now, and fyi it downloads the entire zip every > time. and svn appears to be very slow at it to. Hmm, not what I would have expected, and certainly unfortunate for your desired use case. I just tried some experiments with rsync (e

Re: py2exe and library.zip

2005-05-05 Thread David Bolen
Peter Hansen <[EMAIL PROTECTED]> writes: > Good point. When I wrote that I was picturing the form of compression > that a .tar.gz file would have, not what is actually used inside a > .zip file which is -- quite logically now that you point it out -- > done on a file-by-file basis. (Clearly to d

Re: py2exe and library.zip

2005-05-05 Thread David Bolen
Peter Hansen <[EMAIL PROTECTED]> writes: > Do you know that Subversion has (as I understand it) a fairly > intelligent binary file comparison routine, and it will (again, as I > understand it) not transmit the entire contents of the zip file but > would actually send only the portions that have ch

Re: email: Content-Disposition and linebreaks with long filenames

2005-04-19 Thread David Bolen
Martin Körner <[EMAIL PROTECTED]> writes: > I am using email module for creating mails with attachment (and then > sending via smtplib). > > If the name of the attachment file is longer than about 60 characters > the filename is wrapped in the Content-Disposition header: > > Content-Disposition:

Re: Queue.Queue-like class without the busy-wait

2005-04-01 Thread David Bolen
"Paul L. Du Bois" <[EMAIL PROTECTED]> writes: > Has anyone written a Queue.Queue replacement that avoids busy-waiting? > It doesn't matter if it uses os-specific APIs (eg > WaitForMultipleObjects). I did some googling around and haven't found > anything so far. This isn't a Queue.Queue replaceme

email.Message.set_charset and Content-Transfer-Encoding

2005-03-09 Thread David Bolen
I've noticed that using set_charset() on an email.Message instance will not replace any existing Content-Transfer-Encoding header but will install one if it isn't yet present. Thus, if you initially create a message without a charset, it defaults to us-ascii, and creates both Content-Type and Cont

Re: Gordon McMillan installer and Python 2.4

2005-03-04 Thread David Bolen
[EMAIL PROTECTED] (Svein Brekke) writes: > Has anyone else succeded in using McMillans installer on 2.4? > Thanks for any help. I have a feeling that it may be related to the fact that the starter modules (run*.exe) were built with VC6, which matches with Python builds up to 2.3, but not 2.4 (whi

Re: cannot open file in write mode, no such file or directory

2005-03-01 Thread David Bolen
[EMAIL PROTECTED] writes: > I'm having a problem where when trying to open a file in write mode, I > get an IOError stating no such file or directory. I'm calling an > external program which takes an input file and produces an output file > repeatedly, simulating the input file separately for eac

print and str subclass with tab in value

2005-02-23 Thread David Bolen
I ran into this strange behavior when noticing some missing spaces in some debugging output. It seems that somewhere in the print processing, there is special handling for string contents that isn't affected by changing how a string is represented when printed (overriding __str__). For example, g

Re: win32 service and sockets

2005-02-09 Thread David Bolen
Tom Brown <[EMAIL PROTECTED]> writes: > Well, I have found that it works if I launch the client on the same > machine as the service. It will not work from a remote machine. Any > ideas? Sounds like it might be an issue at the network layer rather than in your code - perhaps a routing or filterin

Re: Redirecting stdout/err under win32 platform

2005-02-03 Thread David Bolen
Pierre Barbier de Reuille <[EMAIL PROTECTED]> writes: > AFAIK, there is no working bidirectionnal pipes on Windows ! The > functions exists in order for them to claim being POSIX, but they're > not working properly. (...) Can you clarify what you believe doesn't work properly? The os.popen* func

Re: lambda

2005-01-18 Thread David Bolen
Antoon Pardon <[EMAIL PROTECTED]> writes: > Op 2005-01-18, Simon Brunning schreef <[EMAIL PROTECTED]>: > > On 18 Jan 2005 07:51:00 GMT, Antoon Pardon <[EMAIL PROTECTED]> wrote: > >> 3 mutating an item in a sorted list *does* *always* cause problems > > > > No, it doesn't. It might cause the list n

Re: extension module, thread safety?

2005-01-18 Thread David Bolen
Nick Coghlan <[EMAIL PROTECTED]> writes: > Pierre Barbier de Reuille wrote: > > Ok, I wondered why I didn't know these functions, but they are new > > to Python 2.4 ( and I didn't take the time to look closely at Python > > 2.4 as some modules I'm working with are still not available for > > Pytho

Re: extension module, thread safety?

2005-01-17 Thread David Bolen
Torsten Mohr <[EMAIL PROTECTED]> writes: > The question came up if this is by itself thread safe, > if some two or more threads try to change these data types, > are the C functions by themselves are "atomic" or can they > be interrupted be the perl interpreter and then (data types > are in some i

Re: Another PythonWin Excel question

2005-01-06 Thread David Bolen
"It's me" <[EMAIL PROTECTED]> writes: > Yes, I read about that but unfortunately I have no experience with VBA *at > all*. :=( You don't really have to know VBA, but if you're going to try to interact with COM objects from Python, you'll find it much smoother if you at least use any available re

Re: Securing a future for anonymous functions in Python

2004-12-31 Thread David Bolen
Scott David Daniels <[EMAIL PROTECTED]> writes: > David Bolen wrote: > > So for example, an asynchronous sequence of operations might be like: > > d = some_deferred_function() > > d.addCallback(lambda x: next_function()) > > d.addCallback(lambda bla

Re: Event-Driven Woes: making wxPython and Twisted work together

2004-12-30 Thread David Bolen
Daniel Bickett <[EMAIL PROTECTED]> writes: > My initial solution was, naturally, the wxPython support inside of the > twisted framework. However, it has been documented by the author that > the support is unstable at this time, and should not be used in > full-scale applications. Rather than the

Re: Securing a future for anonymous functions in Python

2004-12-30 Thread David Bolen
Ian Bicking <[EMAIL PROTECTED]> writes: > The one motivation I can see for function expressions is > callback-oriented programming, like: > >get_web_page(url, > when_retrieved={page | >give_page_to_other_object(munge_page(page))}) This is my primary use case for lambda's nowaday

Re: Is there a better way of listing Windows shares other than using "os.listdir"

2004-12-30 Thread David Bolen
[EMAIL PROTECTED] writes: > I'm currently using "os.listdir" to obtain the contents of some slow Windows > shares. I think I've seen another way of doing this using the win32 library > but I can't find the example anymore. Do you want the list of files on the shares or the list of shares itself?

Re: Problem in threading

2004-12-30 Thread David Bolen
"It's me" <[EMAIL PROTECTED]> writes: > It depends on what "help" means to you. Both Windows and Unix (and it's > variances) are considered "thread-weak" OSes. So, using thread will come > with some cost. The long gone IBM OS/2 is a classic example of a > "thread-strong" OS. (...) Interestin

Re: where's "import" in the C sources?

2004-12-29 Thread David Bolen
Torsten Mohr <[EMAIL PROTECTED]> writes: > i tried to find the file and line in the C sources of python > where the command "import" is implemented. Can anybody give > me some hint on this? Well, there are several levels, depending on what you are looking for. The literal "import" syntax in a so

Re: A completely silly question

2004-12-20 Thread David Bolen
"Fredrik Lundh" <[EMAIL PROTECTED]> writes: > >> Well, but that's true as well for getchar() (at least in many cases of > >> interactive input and line buffering), so in that respect I do think > >> it's a fairly direct replacement, depending on how the OP was going to > >> use getchar() in the ap

Re: threading priority

2004-12-20 Thread David Bolen
Peter Hansen <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] wrote: > > I googled as suggested, and the answer isn't crystal clear. My > > impression is that the problem is that a python thread must acquire the > > GIL in order to execute, and the strategy for deciding which thread > > should get

Re: A completely silly question

2004-12-17 Thread David Bolen
Mike Meyer <[EMAIL PROTECTED]> writes: > Steven Bethard <[EMAIL PROTECTED]> writes: > > > Amir Dekel wrote: > >> What I need from the program is to wait for a single character > >> input, something like while(getchar()) in C. All those Python > >> modules don't make much sence to me... > > > > sy

Re: Socket being garbage collected too early

2004-12-16 Thread David Bolen
Scott Robinson <[EMAIL PROTECTED]> writes: > I have been having trouble with the garbage collector and sockets. Are you actually getting errors or is this just theoretical? > Unfortunately, google keeps telling me that the problem is the garbage > collector ignoring dead (closed?) sockets instea

Re: Winge IDE Issue - an suggestions?

2004-12-16 Thread David Bolen
Mike Thompson writes: (...) > WingIDE bug seemed the only explanation, although it was puzzling me > that something so obvious could make it through their QA. Thanks again. I haven't used ElementTree, but if it includes an extension module (likely for performance), it's important to realize that

Re: New versions breaking extensions, etc.

2004-12-15 Thread David Bolen
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: > Can you elaborate? To me, that problem only originates from > the OS lack of support for deleting open files. If you could > delete a shared libary that is still in use (as you can on > Unix), the put the new version of the DLL in the place, (...) N

Re: uptime for Win XP?

2004-12-13 Thread David Bolen
Andrey Ivanov <[EMAIL PROTECTED]> writes: (...) > Writting this script was harder than I initially thought due to > a lack of documentation for win32all. And I still don't know what > that bizzare_int value stands for (an error/status code?). The pywin32 documentation tends not to duplicate infor

Re: pythonwin broke

2004-12-03 Thread David Bolen
Trent Mick <[EMAIL PROTECTED]> writes: > It is also possible that there is some little installer bug or detail > on your environment that is causing the problem. You could try > ActivePython. I regularly install and uninstall ActivePython 2.3 and > 2.4 installers and both installs are still workin

Re: installing 2.4

2004-12-02 Thread David Bolen
"Jive" <[EMAIL PROTECTED]> writes: > It's only getting worse. I went to Add/remove programs and removed 2.4. > Now Python 2.4 numarray and Python 2.4 pywin extensions are still listed as > installed, but I cannot remove them. You mentioned in your first post about "copying your site package" ...

  1   2   >