"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
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,
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
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
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
"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
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
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
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
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
[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'
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
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
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
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
[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
[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
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
Christos "TZOTZIOY" Georgiou <[EMAIL PROTECTED]> writes:
> A set seems more appropriate in this case:
>
> color_count = len(set(izip(r, g, b))) # untested code
Well, while potentially premature optimization, I was trying for
performance in this case. In Python 2.3, the sets module is coded in
P
gregory lielens <[EMAIL PROTECTED]> writes:
(...)
> Yes I was affraid this would be the conclusion: embedding instead of
> inheritance...But this means that not only the method that need to be
> modified need to be rewritten in python, all the other ones also just
> to delegate to the embedded ins
Brad Tilley <[EMAIL PROTECTED]> writes:
> When memory usage is a concern, is it better to do:
>
> from X import Y
>
> or
>
> import X
Depending on "Y", the latter can technically use less memory, but it's
likely to be fairly small and depends on how many symbols from that
module you want to ha
Jp Calderone <[EMAIL PROTECTED]> writes:
> def nonBlockingReadAll(fileObj):
> bytes = []
> while True:
> b = fileObj.read(1024)
> bytes.append(b)
> if len(b) < 1024:
> break
> return ''.join(bytes)
Wouldn't this still
Timothy Hume <[EMAIL PROTECTED]> writes:
> I want to ensure that all my time calculations are done in UTC. This is
> easy with Python on UNIX machines. I simply set the TZ environment
> variable to "UTC", and it ensures that the time functions use UTC.
>
> My question is, how do I get similar
"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"
...
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
"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
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
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
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
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
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
"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
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
"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
[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?
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
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
"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
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:
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
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_
"[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
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
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
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
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
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
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
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
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
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
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)
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
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
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
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
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
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
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
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
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
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
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
"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
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
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
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
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
>
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
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.
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
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
"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
"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
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
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
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
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
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
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
>
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
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
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
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
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
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 = []
>
> -
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
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
"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,
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
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
"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
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
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...
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
"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
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.
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
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.
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
1 - 100 of 105 matches
Mail list logo