Re: "Static" python program

2005-03-05 Thread Stephen Thorne
th static libaries? Sure, have a look at cx_Freeze or py2exe. both are tools that allow you to create an executable without dependancies. Stephen. -- http://mail.python.org/mailman/listinfo/python-list

Re: function with a state

2005-03-06 Thread Stephen Thorne
out just using the function object directly? def myFun(): myFun.x += 1 return myFun.x myFun.x = 0 for test in range(10): assert myFun()+1 == myFun() assert myFun()*2+3 == myFun()+myFun() assert range(myFun(), myFun()+9) == [myFun() for x in range(10)] assert range(myFun()+2, myFun()+

Re: py2exe error: 2.4.2.4: No such file or directory

2005-03-07 Thread Stephen Thorne
4: No such file or directory > > The only thing that I can think of is that perhaps I've upgraded my > wxWindows version. I checked and 2.4.2.4 is the version, but I don't > know why py2exe is looking for such a directory. > > Anybody out there have a clue? it could have something to do ./site-packages/wx.pth Stephen -- http://mail.python.org/mailman/listinfo/python-list

Re: FW: list reduction

2005-03-10 Thread Stephen Thorne
t; > > > > Apologies if this is a bad question. > > > > > > > > Thanks > > -- > James Stroud, Ph.D. > UCLA-DOE Institute for Genomics and Proteomics > Box 951570 > Los Angeles, CA 90095 > -- > http://mail.python.org/mailman/listinfo/python-list > -- Stephen Thorne Development Engineer, NetBoxBlue.com -- http://mail.python.org/mailman/listinfo/python-list

Re: PyAsm

2005-03-10 Thread Stephen Thorne
tion is an issue. Have you seen PyPy? They already have the ability to turn a native python function into pyrex and compile it on the fly. Stephen. -- http://mail.python.org/mailman/listinfo/python-list

Re: modifiable config files in compiled code?

2005-03-10 Thread Stephen Thorne
sys.path.append(os.path.split(sys.path[0])) import config 3) Put in your setup.py setug( data=[('.', ['config.py'])]# Package config.py seperately. ) Regards, Stephen Thorne -- http://mail.python.org/mailman/listinfo/python-list

Re: injecting "set" into 2.3's builtins?

2005-03-10 Thread Stephen Thorne
y incompatibilities between the 2.3 and 2.4 versions of > set objects, but my use of them has been pretty straightforward. I have: try: set except NameError: from sets import Set as set in my code in a few places. Its not any worse than: try: True,False except NameError:

Re: Can't seem to insert rows into a MySQL table

2005-03-12 Thread Stephen Prinster
grumfish wrote: The rowcount of the cursor is 1 after the execute is 1 and the table's auto_increment value is increased for each insert done. If the auto_increment is increased, then it seems like the row was inserted. Are you sure the problem is not with your SELECT attempt? Just a guess, b

Re: Safe Local XMLRPC

2005-03-12 Thread Stephen Waterbury
Diez B. Roggisch wrote: ... corba is 10-100 times faster over the network than soap/xmlrpc. ... I'm not challenging these statistics (because I don't know), but I would be interested in the source. Are you referring to the results of an actual benchmark, or something more subjective? Steve -- http

Re: Convert python to exe

2005-03-13 Thread Stephen Thorne
On 13 Mar 2005 14:31:53 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi > > I have a python script under linux, I wonder if I can be converted to > an executable or not? Yes, you can use cx_Freeze. Regards, Stephen Thorne -- http://mail.python.org/mailman/listinfo/python-list

Re: Web framework

2005-03-15 Thread Stephen Thorne
On Sun, 13 Mar 2005 13:21:27 -0800, Venkat B <[EMAIL PROTECTED]> wrote: > > I'd say Nevow! For apache setup, you might be interested in my wsgi [1] > > implementation. > > Hi Sridhar, > > Are you aware of Nevow's "integrability" with the webservers (CGIHTTPServer > in particular) that come packag

Re: Deadlock detection

2004-12-06 Thread Stephen Kellett
ed send an email to support asking about the Python port. Stephen -- Stephen Kellett Object Media Limitedhttp://www.objmedia.demon.co.uk RSI Information:http://www.objmedia.demon.co.uk/rsi.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Deadlock detection

2004-12-07 Thread Stephen Kellett
In message <[EMAIL PROTECTED]>, Duncan Grisby <[EMAIL PROTECTED]> writes understood, and there are plenty of systems that do it. I just haven't been able to find one for Python. There is one at http://www.softwareverify.com as I mentioned in a previous posting. Stephen -- Steph

How to install tile (or any other tcl module)

2004-12-09 Thread Stephen Kennedy
nary package into python/tcl (i.e. python/tcl/tile0.5) with all the other tcl packages, but tcl can't find it. Any ideas? Traceback (most recent call last): File "Script1.py", line 5, in ? root.tk.call('package', 'require', 'tile') _tkinter.TclError: can't find package tile Stephen. -- http://mail.python.org/mailman/listinfo/python-list

Re: [Boa Constr] new open source project developing with Boa Constructor

2004-12-13 Thread Stephen Waterbury
sosman wrote: Just letting people know, I have launched a homebrew software package that is being developed with boa. http://sourceforge.net/projects/brewsta/ So, give us a hint ... does it make beer or what? :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python mascot proposal

2004-12-16 Thread Stephen Kellett
mate. Don't think all snakes are slow - they aren't. BTW. The suggestions - I like them, for what little that is worth. Stephen -- Stephen Kellett Object Media Limitedhttp://www.objmedia.demon.co.uk RSI Information:http://www.objmedia.demon.co.uk/rsi.html -- http://mail.python.org/mailman/listinfo/python-list

ElementTree.write() question

2004-12-16 Thread Stephen Waterbury
[If there is a separate list for elementtree, please someone clue me ... I didn't see one.] Fredrik or other xml / elementtree gurus: I see from the source that ElementTree.write() writes at the beginning of the xml output if an encoding other than utf-8 or us-ascii is selected. Shouldn't it also

Re: Html or Pdf to Rtf (Linux) with Python

2004-12-16 Thread Stephen Thorne
browser (load this url, print this page, etc). I've been investigating doing the same feat using JS/XUL/etc in mozilla. It probably is possible. There's lots of documentation about the XPCOM api available from http://xulplanet.com/ As for converting to RTF, someone has already pointed

Re: Html or Pdf to Rtf (Linux) with Python

2004-12-17 Thread Stephen Thorne
;m using htmloc (http://www.htmldoc.org/). I found htmldoc and every other open source purpose built html->pdf converter to be deficient enough to discourage us from using them. For our requirements only web-browsers had the quality of rendering required. Stephen. -- http://mail.python.org/mailman/listinfo/python-list

Re: Is this a good use for lambda

2004-12-17 Thread Stephen Thorne
olution than a lambda in the above situations? That is the exact thing that lambdas is best used for. I would name them and put them somewhere only if those formulas were used more than exactly once. I *am* a little woried about functions named 'd' and 'v' however. Stephen. -- http://mail.python.org/mailman/listinfo/python-list

[OT] Re: [Boa Constr] new open source project developing with Boa Constructor

2004-12-14 Thread Stephen Waterbury
Stephen Waterbury wrote: sosman wrote: Just letting people know, I have launched a homebrew software package that is being developed with boa. http://sourceforge.net/projects/brewsta/ So, give us a hint ... does it make beer or what? :) Oops! Sorry gang. Sent my wise-ass reply to the wrong

[ANNOUNCE] Python Thread Validator software tool

2004-12-19 Thread Stephen Kellett
Python Thread Validator. A thread analysis, lock analysis and deadlock detection tool for Python. Tool is now in beta. http://www.softwareverify.com/pythonThreadValidator/index.html Stephen -- Stephen Kellett Object Media Limitedhttp://www.objmedia.demon.co.uk RSI Information:http

Re: Boo who? (was Re: newbie question)

2004-12-20 Thread Stephen Waterbury
Luis M. Gonzalez wrote: Steve, I didn't want to be agressive at all. Although now that I read again my post, it seems a little bit harsh... But I see that very often in this list, some replies show much of intolerance and very little politeness. And in my oppinion, this is one of these cases. I don

Re: newbie question

2004-12-20 Thread Stephen Thorne
ik Lundh. Is this a Sig? What is this referring to? You've said it in reply to more than one post in the last week. Got a url I can read about the Fredrik Lundh Python Syntax Manglation Consulting Service? Stephen. -- http://mail.python.org/mailman/listinfo/python-list

Re: editing XML via DOM

2004-12-20 Thread Stephen Thorne
ample of that - but I do recommend it if you have a situation where you need to parse crappy xml. A quick google comes up with: http://www.acooke.org/andrew/writing/python-xml.html which shows how to use xml.dom.ext.reader.Sax.FromXmlFile and then doing some stuff with createElement, appendChil

Re: memory leak

2004-12-21 Thread Stephen Kellett
In message <[EMAIL PROTECTED]>, Daniel Wheeler <[EMAIL PROTECTED]> writes However, I would like to understand first if pure python can leak without the reference count increasing? How are you determining that used memory is increasing? Stephen -- Stephen Kellett Object Media Lim

Re: memory leak

2004-12-21 Thread Stephen Kellett
it. Linux is not my main thing these days (it was in '94 :-). Stephen -- Stephen Kellett Object Media Limitedhttp://www.objmedia.demon.co.uk RSI Information:http://www.objmedia.demon.co.uk/rsi.html -- http://mail.python.org/mailman/listinfo/python-list

Re: word to digit module

2004-12-21 Thread Stephen Thorne
: items = s.replace(',', '').split() numbers = [translation.get(item.strip(), -1) for item in items if item.strip()] if -1 in numbers: raise ValueError("Invalid string '%s'" % (s,)) if 1000 in numbers: idx = numbers.index(1000) hundreds = numbers[:idx] numbers = numbers[idx+1:] + [1000*x for x in hundreds] if 100 in numbers: idx = numbers.index(100) hundreds = numbers[:idx] numbers = numbers[idx+1:] + [100*x for x in hundreds] return sum(numbers) Stephen Thorne -- http://mail.python.org/mailman/listinfo/python-list

Re: Garbage collector strategy

2004-12-22 Thread Stephen Kellett
es shows the implementation, plus the code for this is well documented. Stephen -- Stephen Kellett Object Media Limitedhttp://www.objmedia.demon.co.uk RSI Information:http://www.objmedia.demon.co.uk/rsi.html -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie question

2004-12-22 Thread Stephen Waterbury
Luis M. Gonzalez wrote: Amyway, I wouldn't want to use this list to talk about Boo, because I think that the best place to do it is comp.lang.boo. However, since I think it is definetely python related (I know you disagree, but others don't) I see no harm in mentioning it here occasionally. Luis, t

Re: What is on-topic for the python list [was "Re: BASIC vs Python"]

2004-12-22 Thread Stephen Waterbury
Erik Max Francis wrote: Doug Holton wrote: I'm not going to dignify that or the rest of your note with a response. Please stop dignifying the whole group, then. Amen! -- http://mail.python.org/mailman/listinfo/python-list

Re: word to digit module

2004-12-22 Thread Stephen Thorne
On Wed, 22 Dec 2004 11:41:26 -0800, Scott David Daniels <[EMAIL PROTECTED]> wrote: > John Machin wrote: > > Stephen Thorne wrote: > > .def toNumber2(s): > > . items = s.replace(',', '').split() > > . numbers = [translation.get(

PHP vs. Python

2004-12-22 Thread stephen . mayer
Anyone know which is faster? I'm a PHP programmer but considering getting into Python ... did searches on Google but didn't turn much up on this. Thanks! Stephen -- http://mail.python.org/mailman/listinfo/python-list

Re: PHP vs. Python

2004-12-22 Thread Stephen Thorne
re-write any sections of code that are too slow in C, in pyrex, optimise them with psyco, or just plain fix your efficiency problems. Profiling in php isn't as easy as import profile profile.run("main()") Regards, Stephen Thorne. [1] I have written php commerically for over 3 yea

Re: regular expression: perl ==> python

2004-12-22 Thread Stephen Thorne
convert('abc') except: pass else: assert None,"Should Raise on invalid input" Of course, I wrote the tests first. I used your regexp's but I was confused as to why you were always using .group(1), but decided to leave it. I would pro

Lambda going out of fashion

2004-12-22 Thread Stephen Thorne
eful in this kind of context? Are there alternatives I have not considered? merrily-yr's Stephen. -- http://mail.python.org/mailman/listinfo/python-list

Re: Lambda going out of fashion

2004-12-23 Thread Stephen Thorne
a single expression myself (if it's more complex than "lambda x:baz(x.foo(y))", I would prefer to write a named function). ultimate-ly yr's. Stephen Thorne. -- http://mail.python.org/mailman/listinfo/python-list

Re: Lambda going out of fashion

2004-12-23 Thread Stephen Thorne
ully the frustration you must experience when you see map(lambda x:f(x). I think it is important to voice concern, and I recieved not a few 'me-too's in reply to this thread. But at the end of the day, I'm not against removing lambda in py3k. slightly-less-concerned-ly yr's Stephen Thorne. -- http://mail.python.org/mailman/listinfo/python-list

Re: list Integer indexing dies??

2004-12-23 Thread Stephen Thorne
ould > > >>>035[0] > 3 # my own opinion. TypeError: unsubscriptable object > > cough up the same as 29[0]. > > >>>29[0] > 2 #again my own opinion TypeError: unsubscriptable object Just-in-my-own-opinion-ly y'rs Stephen Thorne -- http://mail.python.org/mailman/listinfo/python-list

Re: Optional Static Typing

2004-12-24 Thread Stephen Thorne
On 24 Dec 2004 21:35:24 -0800, Luis M. Gonzalez <[EMAIL PROTECTED]> wrote: > I don't understand why this discussion on optional static typing came > up right at this moment. Because Guido made some notes on it. http://www.artima.com/weblogs/viewpost.jsp?thread=85551 merry c

Re: C pointers/Python

2005-03-21 Thread Stephen Thorne
data = 'somedata' if code == CODE1: return data In C, you pass a memory location to copy the result into. In Python, we return the result as an object. As for pointers, we don't need them. -- Stephen Thorne Development Engineer, NetBoxBlue.com -- http://mail.python.org/mailman/listinfo/python-list

Re: C pointers/Python

2005-03-21 Thread Stephen Thorne
gt; example, you could use a list here.) > def testit( buffer ): >for i in range( len ): > buffer[A+i]=data[B+i] > for some constants A,B That's unpythonic. The correct solution is to return the result. Anything else is trying to squeeze a C idiom into python for no gain.

Re: C pointers/Python

2005-03-22 Thread Stephen Thorne
e that would love to show you the pythonic way of achieving your goal. -- Stephen Thorne -- http://mail.python.org/mailman/listinfo/python-list

Re: (noob alert) why doesn't this work?

2005-03-22 Thread Stephen Thorne
int out, there's a bug here. If any flac file is missing any one of these tags, but a previous one does have the tag, (i.e. 'Genre'), then the previous tag will be used, because you don't reset the variables each time around the loop. -- Stephen Thorne Development Engineer, NetBoxBlue.com -- http://mail.python.org/mailman/listinfo/python-list

Re: comparison puzzle? bug?

2005-03-22 Thread Stephen Thorne
going on? > print"item[0] > lvl = %d > %d = " %(item[0], lvl), bool(item[0] == lvl) you have an == there, it should be a > also, consider using %r instead of %d in your print statements. -- Stephen Thorne Development Engineer, NetBoxBlue.com -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie help

2005-03-23 Thread Stephen Thorne
ot; % x) @f.close() (The @ marks are to preserve the indentation on usenet, I believe google strips them). I hope that helps you. -- Stephen Thorne Development Engineer -- http://mail.python.org/mailman/listinfo/python-list

Re: Python for a 10-14 years old?

2005-03-23 Thread Stephen Thorne
> small problems? http://www.livewires.org.uk/ run use python to teach programming at their camp. They have their course material on their website under a Free license. -- Stephen Thorne Development Engineer -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython: accessing wxFrame methods in __del__ fails

2005-03-23 Thread Stephen Thorne
iated. Don't use __del__, use EVT_CLOSE i.e. self.Bind(wx.EVT_CLOSE, self.OnClose) and def OnClose(self, evt): x, y = self.GetPositionTuple() -- Stephen Thorne Development Engineer -- http://mail.python.org/mailman/listinfo/python-list

Re: Weird...

2005-04-11 Thread Stephen Thorne
On Apr 11, 2005 7:57 AM, Joshua Ginsberg <[EMAIL PROTECTED]> wrote: > >>> {'a':1,'b':'2','c':[3,4]}.keys() > ['a', 'c', 'b'] > > How come? :-) Dicts are not ordered. See note (3) on this page :

Re: NSInstaller Vs. Inno Setup

2005-04-12 Thread Stephen Kellett
I for what I need. Stephen -- Stephen Kellett Object Media Limitedhttp://www.objmedia.demon.co.uk RSI Information:http://www.objmedia.demon.co.uk/rsi.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Supercomputer and encryption and compression @ rate of 96%

2005-04-14 Thread Stephen Kellett
In message <[EMAIL PROTECTED]>, Will McGugan <[EMAIL PROTECTED]> writes Please implement this as a Python module. I would like to compress my mp3 collection to single bits. Just think you could have better than broadband download speeds, on your old 300bps modem! -- Stephen Kellett

Re: Question about python code distribution...

2005-04-28 Thread Stephen Prinster
[EMAIL PROTECTED] wrote: > Hi, > > I am sure that this question might have come up repeatedly. Companies > may not want to distribute their python code in source form. Even > though pyc files are one option, it gets inconvenient to distribute > bunch of them . If there is some way to bundle pyc fi

input() on python 2.7.5 vs 3.3.2

2013-12-12 Thread stephen . boulet
Can someone explain? Thanks. Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:06:53) [MSC v.1600 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> x = input() Hello there >>> print(x) Hello there Python 2.7.5 (default, May 15 2013, 22:43:36) [M

Re: Challenge: optimizing isqrt

2014-11-23 Thread Stephen Tucker
t be used in those situations. Stephen Tucker. On Thu, Nov 20, 2014 at 6:00 PM, Serhiy Storchaka wrote: > On 01.11.14 03:29, Steven D'Aprano wrote: > >> There is an algorithm for calculating the integer square root of any >> positive integer using only integer oper

Re: Challenge: optimizing isqrt

2014-11-26 Thread Stephen Tucker
Another _possible_ performance improvement that is staring us in the face is that 2*b could be replaced with b<<1. Given that b+b (an earlier suggestion of mine) involves two table look-ups for b, whereas b<<1 only involves one, it seems that the scope here for improvement is significant. By the w

Help configuring visual studio to compile python extensions

2015-01-09 Thread stephen . boulet
I've installed Microsoft Visual Studio 10.0. Here are the steps I've been taking. My python version is Python 3.4.2 (v3.4.2:ab2c023a9432, Oct 6 2014, 22:16:31) [MSC v.1600 64 bit (AMD64)] on win32. (Sorry for the long output.) >cd "c:\Program Files (x86)\Microsoft Visual Studio 10.0"\vc >vcva

Re: Help configuring visual studio to compile python extensions

2015-01-09 Thread stephen . boulet
This page helped me sort everything out: http://www.falatic.com/index.php/120/a-guide-to-building-python-2-x-and-3-x-extensions-for-windows. -- https://mail.python.org/mailman/listinfo/python-list

Re: [ANN] EasyGUI_Qt version 0.9

2015-01-09 Thread stephen . boulet
On Wednesday, December 31, 2014 at 4:24:50 PM UTC-6, André Roberge wrote: > EasyGUI_Qt version 0.9 has been released. This is the first announcement > about EasyGUI_Qt on this list. > > Like the original EasyGUI (which used Tkinter), > EasyGUI_Qt seeks to provide simple GUI widgets > that can b

Re: Help configuring visual studio to compile python extensions

2015-01-09 Thread stephen . boulet
On Friday, January 9, 2015 at 8:58:59 AM UTC-6, stephen...@gmail.com wrote: > I've installed Microsoft Visual Studio 10.0. Here are the steps I've been > taking. > > My python version is Python 3.4.2 (v3.4.2:ab2c023a9432, Oct 6 2014, > 22:16:31) [MSC v.1600

Re: [ANN] EasyGUI_Qt version 0.9

2015-01-13 Thread stephen . boulet
I found a solution that I'm happy with. from datetime import datetime from easygui_qt import * datestring = get_date() mydate = datetime.strptime(datestring, '%b %d %Y') On Saturday, January 10, 2015 at 1:02:30 AM UTC, André Roberge wrote: > On Friday, 9 January 2015 19:09

Help understanding list operatoins inside functions in python 3

2015-01-13 Thread stephen . boulet
I'm a bit confused why in the second case x is not [1,2,3]: x = [] def y(): x.append(1) def z(): x = [1,2,3] y() print(x) z() print(x) Output: [1] [1] -- https://mail.python.org/mailman/listinfo/python-list

Re: [ANN] EasyGUI_Qt version 0.9

2015-01-14 Thread stephen . boulet
On Tuesday, January 13, 2015 at 8:30:13 PM UTC, André Roberge wrote: > On Tuesday, 13 January 2015 08:23:30 UTC-4, stephen...@gmail.com wrote: > > I found a solution that I'm happy with. > > > > from datetime import datetime > > from easygui_qt import

Re: Trees

2015-01-20 Thread Stephen Hansen
On Tue, Jan 20, 2015 at 1:45 AM, Marko Rauhamaa wrote: > Terry Reedy : > > > Others have answered as to why other special-purpose > > constrained-structure trees have not been added to the stdlib. > > Ordered O(log n) mappings are not special-purpose data structures. I'd > say strings and floats

Open file in default app and exit in Windows

2015-01-28 Thread stephen . boulet
I am using the following to open a file in its default application in Windows 7: from subprocess import call filename = 'my file.csv' call('"%s"' % filename, shell=True) This still leaves a python process hanging around until the launched app is closed. Any idea how to get around? -- https://m

Re: Open file in default app and exit in Windows

2015-01-28 Thread stephen . boulet
On Wednesday, January 28, 2015 at 10:07:25 AM UTC-6, Tim Golden wrote: > On 28/01/2015 15:50, stephen...@gmail.com wrote wrote: > > I am using the following to open a file in its default application in > > Windows 7: > > > > from subprocess import call > > >

Re: Command prompt not shown when running Python script with subprocess on Windows

2014-05-27 Thread Stephen Hansen
You need to call python.exe path-to-script.py, I think, not just path-to-script.py. See sys.executable (though that depends on if you're a frozen app or not). I can't be sure though because there's no code. Show code when asking questions, it helps frame the discussion and get a better answer ;)

Stripping characters from windows clipboard with win32clipboard from excel

2013-09-12 Thread stephen . boulet
I have an excel file. When I select cells, copy from excel, and then use win32clipboard to get the contents of the clipboard, I have a 131071 character string. When I save the file as a text file, and use the python 3.3 open command to read its contents, I only have 80684 characters. Excel (an

Re: Stripping characters from windows clipboard with win32clipboard from excel

2013-09-12 Thread stephen . boulet
Hi Steven. Here is my code: import win32clipboard, win32con def getclipboard(): win32clipboard.OpenClipboard() s = win32clipboard.GetClipboardData(win32con.CF_TEXT) win32clipboard.CloseClipboard() return s I use this helper function to grab the text on the clipboard and do useful

Re: Stripping characters from windows clipboard with win32clipboard from excel

2013-09-13 Thread stephen . boulet
On Thursday, September 12, 2013 10:43:46 PM UTC-5, Neil Hodgson wrote: > Stephen Boulet: > > > > > From the clipboard contents copied from the spreadsheet, the characters > > s[:80684] were the visible cell contents, and s[80684:] all started with > > "

Re: Stripping characters from windows clipboard with win32clipboard from excel

2013-09-13 Thread stephen . boulet
On Friday, September 13, 2013 9:31:45 AM UTC-5, stephen...@gmail.com wrote: > On Thursday, September 12, 2013 10:43:46 PM UTC-5, Neil Hodgson wrote: > > > Stephen Boulet: > > > > > > > > > > > > > From the clipboard contents copied f

Re: Stripping characters from windows clipboard with win32clipboard from excel

2013-09-17 Thread stephen . boulet
On Thursday, September 12, 2013 6:01:20 PM UTC-5, stephen...@gmail.com wrote: > I have an excel file. When I select cells, copy from excel, and then use > win32clipboard to get the contents of the clipboard, I have a 131071 > character string. > > > > When I save the fil

Re: Stripping characters from windows clipboard with win32clipboard from excel

2013-09-18 Thread stephen . boulet
Thanks to everyone for their help. Using everyone's suggestions, this seems to work: import win32clipboard, win32con def getclipboard(): win32clipboard.OpenClipboard() s = win32clipboard.GetClipboardData(win32con.CF_UNICODETEXT) win32clipboard.CloseClipboard() if '\0' in s:

Unicode Objects in Tuples

2013-10-11 Thread Stephen Tucker
objects in tuples get their characters sent to the file as escape sequences. Why is this the case? 4. As for question 1 above, I ask here also: What is the neatest way to get round this? Stephen Tucker. -- https://mail.python.org/mailman/listinfo/python-list

Re: Unicode Objects in Tuples

2013-10-11 Thread Stephen Tucker
e "non-geekiness" of a string is, itself, far too geeky for my liking. The distinction seems to be an utterly spurious - even artificial or arbitrary one to me. (Sorry about the rant.) On Fri, Oct 11, 2013 at 10:22 AM, Ned Batchelder wrote: > On 10/11/13 4:16 AM, Stephen Tucker wro

Re: find all multiplicands and multipliers for a number

2015-04-10 Thread Stephen Tucker
Dario Alpern has written a program that uses the Elliptic Curve Method (ECM) for factorising a number. ECM is one of the _very_ fast methods for finding the prime factors of a number. He has even offered the code for his program. You could have a go at using or converting his code to do what you ar

Re: Python.exe has stopped working

2015-06-05 Thread Stephen Hansen
On Fri, Jun 5, 2015, at 02:03 AM, Alexis Dubois wrote: > Anyone else for an idea on that? Sorry, I have no idea. Have you tried asking on the PyQT mailing list where there is likely more of a concentration of PyQT expertise? http://www.riverbankcomputing.com/mailman/listinfo/pyqt -- Step

Pruning with os.scandir?

2015-08-06 Thread Stephen Kennedy
be a strange case). I can't see how to do this with os.scandir. I hope I am missing something? Don't make me walk the entire contents of .git, tmp and build folders please. Stephen. -- https://mail.python.org/mailman/listinfo/python-list

Re: Pruning with os.scandir?

2015-08-06 Thread Stephen Kennedy
eing used in its implementation. Thanks, Stephen. -- https://mail.python.org/mailman/listinfo/python-list

Re: Suggested coding style

2011-10-03 Thread Stephen Hansen
ople can use to accomplish simple, fairly common needs. -- Stephen Hansen ... Also: Ixokai ... Mail: me+list/python (AT) ixokai (DOT) io ... Blog: http://meh.ixokai.io/ signature.asc Description: OpenPGP digital signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7

2011-11-18 Thread Stephen Hansen
e it has nothing to do with 32 or 64-bitness at all and my guess is wrong. Maybe your profile has gone wonky. But it doesn't matter. You can add the Edit association yourself. Its a one-time fix. -- Stephen Hansen ... Also: Ixokai ... Mail: me+list/python (AT) ixokai (DOT) io .

Re: Weird memory consumption problem.

2005-12-20 Thread Stephen Kellett
Memory Validator would have helped you identify that bug. Its in beta at the moment if you want to try it. http://www.softwareverify.com Stephen -- Stephen Kellett Object Media Limitedhttp://www.objmedia.demon.co.uk/software.html Computer Consultancy, Software Development Windo

Re: expect-like package

2005-12-20 Thread Stephen Thorne
return success > "^HTTP/1\.0 4\d\d.*" then return warning > else return error Have a look at these: http://www.idyll.org/~t/www-tools/twill.html http://pbp.berlios.de/ http://www.openqa.org/selenium/ -- Stephen Thorne Development Engineer -- http://mail.python.org/mailman/listinfo/python-list

Re: memory usage of a specific function

2006-01-04 Thread Stephen Kellett
hat function node in the tree. http://www.softwareverify.com Stephen -- Stephen Kellett Object Media Limitedhttp://www.objmedia.demon.co.uk/software.html Computer Consultancy, Software Development Windows C++, Java, Assembler, Performance Analysis, Troubleshooting -- http://mail.python.org/mailman/listinfo/python-list

Re: memory usage of a specific function

2006-01-05 Thread Stephen Kellett
u want callstacks for all objects created and stats for the memory allocated at these locations, no problem. If you want stats for each generation of objects (a generation being the group allocated between GC invocations), no problem. Plus a whole load of analysis and query functions to allow you to

Re: Memory Profiler

2006-01-11 Thread Stephen Kellett
In message <[EMAIL PROTECTED]>, Dave <[EMAIL PROTECTED]> writes >Is there any memory profiler for Python programs? I Python Memory Validator http://www.softwareverify.com/pythonMemoryValidator/index.html Stephen -- Stephen Kellett Object Media Limitedhttp://www.objme

Re: forced spaces when inserting a variable between strings

2006-01-17 Thread Stephen Illingworth
mjteigen wrote: > My goal is print out ''. However, when I view the > source on the generated html page, I see this: > > > > In other words, that "5" has a space tacked on either side of it, and > of course a browser can't find the file. Is there a way I can avoid the > tacking of spaces on

project ideas

2006-01-18 Thread Stephen Aichele
I'm looking for ideas for an intermediate-level python project that would allow me to touch on the following: (a) use of oo design patterns in python (b) threading (c) socket programming (d) wxPython gui interface (e) possibly integrate with MySQL To date I've acquired some experience with (b) thro

Re: MySQLdb - Query/fetch don't return result when it *theorically* should

2006-01-18 Thread Stephen Prinster
Have you tried doing a "connection.commit()" after each query attempt? I believe mysqldb also has a connection.autocommit feature. -- http://mail.python.org/mailman/listinfo/python-list

Re: do people really complain about significant whitespace?

2006-08-08 Thread Stephen Kellett
ed to document their code because its self documenting - no hire. I've been writing and selling software for 23 years now and I still keep hearing this bull about self documenting code. Sigh. Stephen -- Stephen Kellett Object Media Limitedhttp://www.objmedia.demon.co.uk/software.

Re: do people really complain about significant whitespace?

2006-08-09 Thread Stephen Kellett
of indentation Python fails compared to languages that use braces or END or end; etc. Stephen -- Stephen Kellett Object Media Limitedhttp://www.objmedia.demon.co.uk/software.html Computer Consultancy, Software Development Windows C++, Java, Assembler, Performance Analysis, Troubleshootin

Re: do people really complain about significant whitespace?

2006-08-09 Thread Stephen Kellett
23 years you know what I >mean. If you mean, should code be well written, thought about, well formatted, sensible class/variable names, redesigned if you find a better way, sure no problem with that. Stephen -- Stephen Kellett Object Media Limitedhttp://www.objmedia.demon.co.uk/software

Re: do people really complain about significant whitespace?

2006-08-10 Thread Stephen Kellett
world anyway. Stephen -- Stephen Kellett Object Media Limitedhttp://www.objmedia.demon.co.uk/software.html Computer Consultancy, Software Development Windows C++, Java, Assembler, Performance Analysis, Troubleshooting -- http://mail.python.org/mailman/listinfo/python-list

Re: do people really complain about significant whitespace?

2006-08-10 Thread Stephen Kellett
good. Just found this on c.l.ruby. Seems kind of relevant. My apologies if someone has posted this already -- I just received it: http://www.americanscientist.org/template/AssetDetail/assetid/51982 The Semicolon Wars Every programmer knows there is one true programming language. A new one every

Re: do people really complain about significant whitespace?

2006-08-10 Thread Stephen Kellett
In message <[EMAIL PROTECTED]>, Carl Banks <[EMAIL PROTECTED]> writes >Stephen Kellett wrote: >I don't really understand how a closing brace helps here. Care to >explain why it helps you? >(Deeply nested long functions are evil anyways. If you have such a I didn&#

Re: do people really complain about significant whitespace?

2006-08-10 Thread Stephen Kellett
language. Appears to use whitespace indentation for grouping. http://fullpliant.org/pliant/language/parser/default_syntax.html Stephen -- Stephen Kellett Object Media Limitedhttp://www.objmedia.demon.co.uk/software.html Computer Consultancy, Software Development Windows C++, Java, Assembler, P

MemoryError - IMAP retrieve self._sock.recv(recv_size)

2006-10-18 Thread Stephen G
ot;C:\Python25\lib\imaplib.py", line 236, in read return self.file.read(size) File "C:\Python25\lib\socket.py", line 308, in read data = self._sock.recv(recv_size) Is this a know bug or is there something I can do to work around this? Thanks, Stephen -- http://mail.python.org/mailman/listinfo/python-list

Re: MemoryError - IMAP retrieve self._sock.recv(recv_size)

2006-10-18 Thread Stephen G
Fredrik, Thanks for the response. I did see that, but having been dated 2005 I thought that it might have been patched. I am also sometimes getting the same problem with the urllib.py module. T his may have to do with the interaction between Python and the mobile optimization client that I

Python Memory Leak Detector

2006-10-19 Thread Stephen Kellett
) http://www.softwareverify.com/python/memory/index.html The website provides 30 day evaluation versions of the software as well as full product versions of the software. The evaluation versions are fully functional with only the 30 day limit on usage. Stephen -- Stephen Kellett Object Media

Re: A suggestion/request for IDEs

2006-10-19 Thread Stephen Eilert
ditors/IDEs may have similar functionality... > > -tkc The best IDE's can do is a minor form of autocomplete, considering the dynamic nature of Python programs. Stephen -- http://mail.python.org/mailman/listinfo/python-list

Rapid desktop application development

2006-10-19 Thread Stephen Eilert
the presentation is GUI-based, instead of Web-based. MVC architecture too and so on. Are there any frameworks like those, for GUI applications? It would be interesting to abstract away that repetitive work. Thanks, Stephen -- http://mail.python.org/mailman/listinfo/python-list

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