[issue40800] asyncio.sleep(0) should "yield" back to the event loop, but it doesn't behave as expected

2020-05-27 Thread Davy Durham
New submission from Davy Durham : I was searching for a way to "yield" from task/coroutinue back to the event loop (not yielding a value in terms of a generator) and not finding anything documented, I found this bug report and PR: https://github.com/python/asyncio/issues/284

[issue31923] Misspelled "loading" in Doc/includes/sqlite3/load_extension.py

2017-11-02 Thread Davy Wybiral
Change by Davy Wybiral <davy.wybi...@gmail.com>: -- keywords: +patch pull_requests: +4197 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue31923] Misspelled "loading" in Doc/includes/sqlite3/load_extension.py

2017-11-02 Thread Davy Wybiral
New submission from Davy Wybiral <davy.wybi...@gmail.com>: Line #14 of Doc/includes/sqlite3/load_extension.py reads: # disable extension laoding again -- assignee: docs@python components: Documentation messages: 305423 nosy: davywtf, docs@python priority: normal severity: normal

[issue25340] libraries variable in setup.py ignore for multiprocessing module

2015-10-08 Thread Guillaume DAVY
New submission from Guillaume DAVY: Around line 1455 in setup.py the "libraries" variable is assigned but seems to be ignored when the Extension object for multiprocessing is created. This leads to a linking error on my system : "undefined symbol: clock_gettime" -

ImportError: DLL load failed: The specified module could not be found, SWIG, life, etc

2010-07-05 Thread Bill Davy
I am struggling :-( I have used SWIG to build a module called SHIP. So I have a directory containing SHIP.py and _SHIP.pyd, as follows: H:\Viper\HostPC\V1\SHIP\Releasedir Volume in drive H has no label. Volume Serial Number is B83B-76F2 Directory of H:\Viper\HostPC\V1\SHIP\Release

Re: ImportError: DLL load failed: The specified module could notbe found, SWIG, life, etc

2010-07-05 Thread Bill Davy
Thomas Jollans tho...@jollans.com wrote in message news:mailman.265.1278342154.1673.python-l...@python.org... On 07/05/2010 04:35 PM, Bill Davy wrote: I am struggling :-( smile! I have used SWIG to build a module called SHIP. So I have a directory containing SHIP.py and _SHIP.pyd

Re: python source code - win/dos executable (on linux)

2010-07-01 Thread Bill Davy
Stephen Hansen me+list/pyt...@ixokai.io wrote in message news:mailman.2344.1277821469.32709.python-l...@python.org... On 6/29/10 12:27 AM, Lawrence D'Oliveiro wrote: In message4c286d71$0$18654$4fafb...@reader3.news.tin.it, superpollo wrote: Lawrence D'Oliveiro ha scritto: Is it really such

Python failed to load the default activation context - should I worry?

2010-06-08 Thread Bill Davy
Loading Python 2.6.5 (built using VC6) in a VC6 application. This appears in my debug log. Am I worried? Should I be? And I am stuck with VC6 (customers, don't ya know). -- http://mail.python.org/mailman/listinfo/python-list

[issue8764] logging RotatingFileHandler cause too long to fininsh

2010-05-19 Thread davy zhang
New submission from davy zhang davyzh...@gmail.com: the function below is used to determine the proper file name of the next log file. But the question is if I set a large number of self.backupCount like 1000, it will take too long to calculate the right file name. I think it could

[issue8764] logging RotatingFileHandler cause too long to fininsh

2010-05-19 Thread davy zhang
Changes by davy zhang davyzh...@gmail.com: -- components: +Library (Lib) type: - performance ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8764

Re: Read C++ enum in python

2009-08-19 Thread Bill Davy
Mark Tolonen metolone+gm...@gmail.com wrote in message news:mailman.89.1250666942.2854.python-l...@python.org... MRAB pyt...@mrabarnett.plus.com wrote in message news:4a8b3e2d.7040...@mrabarnett.plus.com... Ludo wrote: Hello, I work in a very large project where we have C++ packages and

Re: regex: multiple matching for one string

2009-07-23 Thread Bill Davy
Mark Lawrence breamore...@yahoo.co.uk wrote in message news:mailman.3588.1248355389.8015.python-l...@python.org... scriptlear...@gmail.com wrote: For example, I have a string #a=valuea;b=valueb;c=valuec;, and I will like to take out the values (valuea, valueb, and valuec). How do I do that

Re: missing 'xor' Boolean operator

2009-07-15 Thread Bill Davy
MRAB pyt...@mrabarnett.plus.com wrote in message news:mailman.3158.1247667680.8015.python-l...@python.org... Steven D'Aprano wrote: On Tue, 14 Jul 2009 11:25:08 -0700, Dr. Phillip M. Feldman wrote: Current Boolean operators are 'and', 'or', and 'not'. It would be nice to have an 'xor'

Re: time.sleep() and Tkinter after()?

2008-12-04 Thread Davy
On Dec 5, 3:05 am, Hendrik van Rooyen [EMAIL PROTECTED] wrote: Davy [EMAIL PROTECTED] wrote: I have used Tkinter after() to do loop update GUI in my previous post. And I tried to change after() to time.sleep(), but it seems doesn't work at all, the Queue send and receive data properly

Thread Tkinter problem

2008-12-03 Thread Davy
. Any suggestion will be appreciated :-) Best regards, Davy //-Code below--- from Tkinter import * import thread import Queue ##import time x = 3 ## vertical y = 5 ## horizontal block_width = 10 block_height = 10 canvas_width = x * block_width canvas_height = y * block_height

Re: Thread Tkinter problem

2008-12-03 Thread Davy
On Dec 4, 11:13 am, Hendrik van Rooyen [EMAIL PROTECTED] wrote:  Davy [EMAIL PROTECTED] wrote:     while(data_queue.full() == False): This will fill the queue and stop. Use while true and if queue not full... Hi Hendrik, It works, thank you:) Davy - Hendrik -- http://mail.python.org

time.sleep() and Tkinter after()?

2008-12-03 Thread Davy
() draw_canvas(board, canvas_b, x, y, block_width, block_height) canvas_b.after(300, lambda:draw_canvas_loop(canvas_b)) //- Best regards, Davy -- http://mail.python.org/mailman/listinfo/python-list

Re: Thread Tkinter problem

2008-12-03 Thread Davy
On Dec 4, 9:08 am, Davy [EMAIL PROTECTED] wrote: On Dec 4, 11:13 am, Hendrik van Rooyen [EMAIL PROTECTED] wrote:  Davy [EMAIL PROTECTED] wrote:     while(data_queue.full() == False): This will fill the queue and stop. Use while true and if queue not full... Hi Hendrik, It works

Re: concurrency program design stackless python tasklet or python thread?

2008-11-12 Thread davy zhang
for concurrent program, but the context switching could be very costy so here comes stackless way? On Wed, Nov 12, 2008 at 12:10 AM, Aleksandar Radulovic [EMAIL PROTECTED] wrote: Hi there, On Tue, Nov 11, 2008 at 5:57 AM, davy zhang [EMAIL PROTECTED] wrote: first here is my basic idea is every

concurrency program design stackless python tasklet or python thread?

2008-11-10 Thread davy zhang
first here is my basic idea is every actor holds their own msg queue, the process function will handle the message as soon as the dispatcher object put the message in. This idea naturally leads me to place every actor in a separate thread waiting for msg but the rumor has it, stackless python

Re: concurrency program design stackless python tasklet or python thread?

2008-11-10 Thread davy zhang
thanks very much for the hint, circuits is a very good event-driven frame work just like twisted but currently my project is in a pretty much complex way see, I'm designing a so called Game Server, every client has their own task execution order, see like below: 1.clientA wants to sale his

Is there a way to step debug the multiprocessing python program?

2008-11-07 Thread davy zhang
I mean every process attach like thread in wingide like thread or tasklet in wingide :) maybe I asked t much:D -- http://mail.python.org/mailman/listinfo/python-list

Re: is there a way to access postgresql in python3.0rc1

2008-10-30 Thread davy zhang
thanks, I'll wait a month and see, in the mean time I can use 2.x for my prototyping, hope python3.0 final can drop a nuke on the ground :D On Thu, Oct 30, 2008 at 12:31 PM, Steve Holden [EMAIL PROTECTED] wrote: Terry Reedy wrote: davy zhang wrote: I'm currently on a project, it could last

how to use logging module to log an object like print()

2008-10-29 Thread davy zhang
mport logging import pickle # create logger logger = logging.getLogger(simple_example) logger.setLevel(logging.DEBUG) # create console handler and set level to debug ch = logging.StreamHandler() ch.setLevel(logging.DEBUG) # create formatter formatter = logging.Formatter(%(asctime)s - %(name)s -

Re: how to use logging module to log an object like print()

2008-10-29 Thread davy zhang
thanks so much , I ganna check the formatter str for more info:) On Wed, Oct 29, 2008 at 5:10 PM, Diez B. Roggisch [EMAIL PROTECTED] wrote: davy zhang schrieb: mport logging import pickle # create logger logger = logging.getLogger(simple_example) logger.setLevel(logging.DEBUG) # create

is there a way to access postgresql in python3.0rc1

2008-10-29 Thread davy zhang
I'm currently on a project, it could last for at least 1 or 2 years. so I choose python3 as server side programing language. All I found on are python2.x ready libraries, Is there any library is python3.0 ready? or just under alpha ,beta or something, I don't much features, just basic functions

why asynchat's initiate_send() get called twice after reconnect ?

2008-10-25 Thread davy zhang
Python3.0rc1 windowsxp in the lib\asynchat.py def handle_write (self): self.initiate_send() def push (self, data): sabs = self.ac_out_buffer_size if len(data) sabs: for i in range(0, len(data), sabs):

Re: Will Python 3 be stackless?

2008-10-24 Thread davy zhang
multiprocessing is good enough for now, On Fri, Oct 24, 2008 at 4:30 AM, Diez B. Roggisch [EMAIL PROTECTED] wrote: Phillip B Oldham schrieb: On Thu, Oct 23, 2008 at 9:20 PM, Chris Rebert [EMAIL PROTECTED] wrote: No, it will definitely not. From your statement (and I'm terribly sorry if

new to python network programming is async_chat.push thread-safe? python3.0

2008-10-23 Thread davy zhang
I wrote this server to handle incoming messages in a process using multiprocessing named handler, and sending message in a Thread named sender, 'cause I think the async_chat object can not pass between processes. My project is a network gate server with many complex logic handler behind, so I

Re: why this server can not run in python30

2008-10-22 Thread davy zhang
thanks so much for fixing the problems!! On Wed, Oct 22, 2008 at 2:56 PM, Gabriel Genellina [EMAIL PROTECTED] wrote: En Wed, 22 Oct 2008 03:45:31 -0200, davy zhang [EMAIL PROTECTED] escribió: import asyncore, asynchat import os, socket, string PORT = 8000 class HTTPChannel

Could anyone give a working example using asynchat in Python3.0?

2008-10-21 Thread davy zhang
I tried to use them but the terminator option seems no effect I search the google but all the code is Python2.x format, I modified them but I get no luck. thanks for any advice -- http://mail.python.org/mailman/listinfo/python-list

why this server can not run in python30

2008-10-21 Thread davy zhang
import asyncore, asynchat import os, socket, string PORT = 8000 class HTTPChannel(asynchat.async_chat): def __init__(self, server, sock, addr): asynchat.async_chat.__init__(self, sock) self.set_terminator(\r\n) self.request = None self.data =

Pass same parameter in Recursive function

2008-09-02 Thread Davy
change in the first layer function call, but did not change in recursive call if (...): func(x, y, A, B, C) else(...): func(x, y, A, B, C) Best regards, Davy -- http://mail.python.org/mailman/listinfo/python-list

Re: Pass same parameter in Recursive function

2008-09-02 Thread Davy
and accessable in one class. def func(self, x, y, A, B, C):     def _func(x,y):         return _func(g(A,B,C,x), h(A,B,C,y)) #recurse     return _func(x, y) I'm unsure as to the performance impact of this though. - Chris On Tue, Sep 2, 2008 at 8:20 PM, Davy [EMAIL PROTECTED] wrote: Hi all

Re: win32com.client (Howto edit Contacts in Outlook)

2008-07-12 Thread Bill Davy
Tim Golden [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Bill Davy wrote: Traceback (most recent call last): File H:/Personal/OutlookIF1/t2.py, line 18, in module outlook = win32com.client.gencache.EnsureDispatch (Outlook.Application) File C:\Python25\Lib\site-packages

..\..\Python-2.5.2\Include\pyport.h(117) : fatal error C1189: #error : Python needs a typedef for Py_ssize_t in pyport.h.

2008-07-12 Thread Bill Davy
When I try and compile using VS2003 for Release. Compiles fine for Debug. In a hurry (should be gardening). Any solution? TIA Bill -- http://mail.python.org/mailman/listinfo/python-list

Re: win32com.client (Howto edit Contacts in Outlook)

2008-07-11 Thread Bill Davy
Tim Golden [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Bill Davy wrote: I'm not sure OL2003 can read news. I think perhaps some later OL can (added tot he View menu, perhaps?). So I use OL Express to read news. The OL with which I wish to communicate is: Application name

Re: win32com.client (Howto edit Contacts in Outlook)

2008-07-11 Thread Bill Davy
Tim Golden [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Bill Davy wrote: and since then have been busy with work, and my other job, and the garden. Aha! So you're English, are you? Looks like you're in the West Country. Weather map suggests you're not short of rain over

Re: win32com.client (Howto edit Contacts in Outlook)

2008-07-10 Thread Bill Davy
Tim Roberts [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Bill Davy [EMAIL PROTECTED] wrote: I am trying to edit Contacts in Outlook. This is so I can transfer numbers from my address book which is an Excel spreadsheet to my mobile phone. Are you actually running Outlook? Your

win32com.client (Howto edit Contacts in Outlook)

2008-07-04 Thread Bill Davy
I am trying to edit Contacts in Outlook. This is so I can transfer numbers from my address book which is an Excel spreadsheet to my mobile phone. I came across the following snippet of code which enabled me to the contacts at least list. I had to root around to discover

Re: win32com.client (Howto edit Contacts in Outlook)

2008-07-04 Thread Bill Davy
Tim Golden [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Bill Davy wrote: I am trying to edit Contacts in Outlook. This is so I can transfer numbers from my address book which is an Excel spreadsheet to my mobile phone. I came across the following snippet of code --- hey

Re: win32com.client (Howto edit Contacts in Outlook)

2008-07-04 Thread Bill Davy
Bill Davy [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Tim Golden [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Bill Davy wrote: I am trying to edit Contacts in Outlook. This is so I can transfer numbers from my address book which is an Excel spreadsheet to my

SWIG/C++

2008-04-10 Thread Bill Davy
Is there a better place to post such questions? Anyway, in the hope it is something simple, I would appreciate some help. I am adding some C++ code to Python. From Python I want to be able to read data from a target device, over USB. My software does all the hard work and I have a class:

Re: Cannot understand error message

2008-02-14 Thread Bill Davy
Chris [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] It doesn't like all that text in the previous one... Just before s = '' you have 4 double quotes to close to doc-string instead of 3. Doh. I had put in the s = '' to see if I could force IDLE to say something more, and

Re: Cannot understand error message

2008-02-14 Thread Bill Davy
Bruno Desthuilliers [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Bill Davy a écrit : (snip) Doh. (snip) Interesting that some colourers work better than others. It must be quite a challenge. IDLE did not offer a full traceback just a pop-up. Mmm... That sure is bad

Cannot understand error message

2008-02-13 Thread Bill Davy
The following code produces an error message (using Idle with Py 2.4 and 2.5). There's an error in your program: EOL while scanning single-quoted string. It comes just after s = '' (put there to try and isolate the broken string). It would be good if the error message pointed me to the start

Re: Python equivt of __FILE__ and __LINE__

2008-02-12 Thread Bill Davy
thebjorn [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Feb 11, 4:55 pm, Gary Herron [EMAIL PROTECTED] wrote: Bill Davy wrote: Writing a quick and dirty assembler and want to give the user the location of an error. The assembly language is Python. If the user wants

Python equivt of __FILE__ and __LINE__

2008-02-11 Thread Bill Davy
Writing a quick and dirty assembler and want to give the user the location of an error. The assembly language is Python. If the user wants to generat some object code they write something like: Label(LoopLable) Load(R4) Dec() JNZ(LoopLabel) I can use Python to do all the

re.sub() problem (regular expression)

2007-12-13 Thread Davy
Hi all, I have read a re.sub() that confused me. s = 'P Q' s = re.sub(r'([a-zA-Z0-9_.]+)', r'Expr(\1)', s) What's \1 and the whole re.sub() mean? Best regards, Davy -- http://mail.python.org/mailman/listinfo/python-list

Python Profiler GUI like Matlab?

2007-12-06 Thread Davy
Hi all, Is there any Python Profiler GUI like Matlab? I found the Matlab Profiler is very intuitive and easy to use. Best regards, Davy -- http://mail.python.org/mailman/listinfo/python-list

Why use Slot? from Peter Norvig's AI code

2007-12-04 Thread Davy
and Object. return False Best regards, Davy -- http://mail.python.org/mailman/listinfo/python-list

How to debug Python program with GUI (Tkinter)?

2007-11-28 Thread Davy
, Davy -- http://mail.python.org/mailman/listinfo/python-list

Is there pointer * in Python?

2007-11-22 Thread Davy
Hi all, When I read programming python, I found there is a code like def parse(self, *text): while text is a string. What's * mean?(Does it mean pointer like in C?) And I recall there is **args in Python, what's ** mean? Best regards, Davy -- http://mail.python.org/mailman/listinfo/python

Introspect the class name of object?

2007-11-21 Thread Davy
Hi all, How to get the class name of an object from an introspect way? For example, Class cls:pass obj = cls() I want to get function(obj) = 'cls' Best regards, Davy -- http://mail.python.org/mailman/listinfo/python-list

(Tkinter) Can I bind a key to Canvas?

2007-11-20 Thread Davy
Hi all, I have a canvas and a rectangle draw on it. Can I bind a key(e.g. UP) to the canvas and make the rectangle move up? Or shall I bind the key to rectangle(I don't think so, because it is not a widget)? Any suggestions are welcome! Best regards, Davy -- http://mail.python.org/mailman

Re: (Tkinter) Can I bind a key to Canvas?

2007-11-20 Thread Davy
._onClick) ## work Any suggestion? Best regards, Davy -- http://mail.python.org/mailman/listinfo/python-list

How to make a standalone Python/Tk program?

2007-11-20 Thread Davy
Hi all, How to make a standalone Python/Tk program(e.g. exe file on Windows)? Any suggestions are welcome! Best regards, Davy -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter Problem?

2007-11-20 Thread Davy
Hi all, I have solved the problem after read some code. Because Tk.Canvas do not have a focus, it does not receive a key input. The solution is bind key input to the highest level 'root' root.bind('Up',self._onUpKey) Davy On Nov 20, 10:13 am, Davy [EMAIL PROTECTED] wrote: Hi all, I have

Tkinter Problem?

2007-11-19 Thread Davy
._onUpKey) self.canv.bind('Return', self._onReturnKey) def _onUpKey(self,event): self.canv.move(tagOrId,xAmount=0,yAmount=10) def _onReturnKey(self,event): print 'Hello world' root = Tk() myapp = MyApp(root) root.mainloop() ##-- Best regards, Davy

Re: function call problem in class?

2007-11-14 Thread Davy
On Nov 14, 4:10 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: En Wed, 14 Nov 2007 04:51:57 -0300, Davy [EMAIL PROTECTED] escribió: I have write a simple class, I want the function two() to call private function __one(), but there is an error : NameError: global name '_simple__one

Loop three lists at the same time?

2007-11-13 Thread Davy
Hi all, I have three lists with the same length. Is there any method to loop the three lists without a loop counter? Best regards, Davy -- http://mail.python.org/mailman/listinfo/python-list

function call problem in class?

2007-11-13 Thread Davy
() print world if __name__ == '__main__': s = simple() s.two() Any suggestion is welcome! Best regards, Davy -- http://mail.python.org/mailman/listinfo/python-list

How to get a set of keys with largest values?

2007-11-12 Thread Davy
fast way to implement this algorithm? Any suggestions are welcome! Best regards, Davy -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get a set of keys with largest values?

2007-11-12 Thread Davy
:{4:6,8:9}}. And I want to get m key with the largest values in each row? Any good ideas? Best regards, Davy -- http://mail.python.org/mailman/listinfo/python-list

Define key in nlargest() of heapq?

2007-11-12 Thread Davy
this by nlargest() of heapq? I have tried nlargest(2,dic,key), the interpreter give out: Traceback (most recent call last): File interactive input, line 1, in module NameError: name 'key' is not defined Best regards, Davy -- http://mail.python.org/mailman/listinfo/python-list

Re: Define key in nlargest() of heapq?

2007-11-12 Thread Davy
Hi Raymond, Your code work well, thank you :) Best regards, Davy On Nov 13, 11:33 am, Raymond Hettinger [EMAIL PROTECTED] wrote: On Nov 12, 6:56 pm, Davy [EMAIL PROTECTED] wrote: I have a dictionary with n elements, and I want to get the m(m=n) keys with the largest values. For example

How to link different site-packages to different Python?

2007-11-09 Thread Davy
\numpy \__init__.py, line 39, in module import core File C:\Program Files\nupic-1.4\lib\python2.4\site-packages\numpy \core\__init__.py, line 5, in module import multiarray ImportError: Module use of python24.dll conflicts with this version of Python. Best regards, Davy -- http

defaultdict and dict?

2007-11-09 Thread Davy
and when use dict? Any suggestions are welcome! Best regards, Davy -- http://mail.python.org/mailman/listinfo/python-list

Re: How to use list as key of dictionary?

2007-11-06 Thread Davy
, Davy On Nov 6, 3:09 pm, Matimus [EMAIL PROTECTED] wrote: On Nov 5, 10:53 pm, Davy [EMAIL PROTECTED] wrote: Hi all, We know that list cannot be used as key of dictionary. So, how to work around it? For example, there is random list like l=[1,323,54,67]. Any suggestions are welcome

Re: How to use list as key of dictionary?

2007-11-06 Thread Davy
And there may be more complex list(vector like 3 or 4 dimentional data structure), is there any easy method to tackle this problem? Any suggestions are welcome! Best regards, Davy On Nov 6, 4:50 pm, Davy [EMAIL PROTECTED] wrote: Hi Matimus and Boris, Thank you :) And a further question

List to Tuple and Tuple to List?

2007-11-06 Thread Davy
regards, Davy -- http://mail.python.org/mailman/listinfo/python-list

How to use list as key of dictionary?

2007-11-05 Thread Davy
Hi all, We know that list cannot be used as key of dictionary. So, how to work around it? For example, there is random list like l=[1,323,54,67]. Any suggestions are welcome! Best regards, Davy -- http://mail.python.org/mailman/listinfo/python-list

Re: How to parse this line of code manually

2007-08-29 Thread Davy
On Aug 28, 7:28 pm, Dustan [EMAIL PROTECTED] wrote: On Aug 28, 2:59 am, A.T.Hofkamp [EMAIL PROTECTED] wrote: On 2007-08-28, Davy [EMAIL PROTECTED] wrote: On Aug 28, 11:00 am, Davy [EMAIL PROTECTED] wrote: Hi all, It is well known that Python is appreciated for its merit

Re: How to parse this line of code manually

2007-08-27 Thread Davy
On Aug 28, 11:00 am, Davy [EMAIL PROTECTED] wrote: Hi all, It is well known that Python is appreciated for its merit of concise. However, I found the over concise code is too hard to understand for me. Consider, for instance, def known_edits2(word): return set(e2 for e1 in edits1(word

How to parse this line of code manually

2007-08-27 Thread Davy
possibilities) Any suggestions are welcome! The code is a simple spell checker from http://www.norvig.com/spell-correct.html Best regards, Davy -- http://mail.python.org/mailman/listinfo/python-list

PythonWin's Check (any other Lint tool) ?

2006-05-09 Thread Davy
will be appreciated! Best regards, Davy -- http://mail.python.org/mailman/listinfo/python-list

Why 3.0/5.0 = 0.59999...

2006-05-09 Thread Davy
Hi all, I used to be a Matlab user. And want to use Python to replace some Matlab work. When I type 3.0/5.0, the result is 0.5... Is there some precision loss? And how to overcome it? Any suggestions will be appreciated! Best regards, Davy -- http://mail.python.org/mailman/listinfo

Python's regular expression?

2006-05-08 Thread Davy
Hi all, I am a C/C++/Perl user and want to switch to Python (I found Python is more similar to C). Does Python support robust regular expression like Perl? And Python and Perl's File content manipulation, which is better? Any suggestions will be appreciated! Best regards, Davy -- http

Re: Python's regular expression?

2006-05-08 Thread Davy
Hi Mirco, Thank you! More similar than Perl ;-) And what's 'integrated' mean (must include some library)? I like C++ file I/O, is it 'low' or 'high'? Regards, Davy -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's regular expression?

2006-05-08 Thread Davy
By the way, is there any tutorial talk about how to use the Python Shell (IDE). I wish it simple like VC++ :) Regards, Davy -- http://mail.python.org/mailman/listinfo/python-list

Re: Python/IDLE - text in different colours

2005-06-29 Thread Bill Davy
so the user can see it Nathan Pinno [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Bill. The way is the click on view, then click script checker, or something like that. It will color code the text for you. Nathan Bill Davy [EMAIL PROTECTED] wrote in message news:[EMAIL

Re: Python/IDLE - text in different colours

2005-06-29 Thread Bill Davy
VT100? Hey ho, but many thanks. My user will just have to strain his eyes. Bill PS Thanks for the URL. Interesting. TouTaTis [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Bill Davy [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: To make life easier for my users, I'd like

Python/IDLE - text in different colours

2005-06-28 Thread Bill Davy
To make life easier for my users, I'd like to colour my prompt string (as handed to raw_input()) a different colour to that produced by print. I'm using Python 2.4.1 and IDLE 1.1.1 on Windows XP. Is it possible, and if so, how? tia, Bill --

Re: DLL load failed: The specified procedure could not be found

2005-06-01 Thread Bill Davy
John Machin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] a) What specified procedure b) SHIP was made by SWIG and so presumably was _SHIP ... therefore it appears that you might be better off asking for help on the SWIG mailing list. I will too. c) Is there some way to

DLL load failed: The specified procedure could not be found

2005-05-31 Thread Bill Davy
sys.path: H:\Husky\HostPC\V1\SHIP\Debug H:\Husky\HostPC\V1\SHIP E:\Bill\Python-2.4.1\PCbuild\python24_d.zip C:\Python24\Lib C:\Python24\DLLs C:\Python24\Lib\lib-tk H:\Husky\HostPC\V1\RunSHIP H:\Husky\HostPC\V1\Debug C:\Python24 C:\Python24\lib\site-packages Traceback (most recent call

SWIG/Python2.4.1: ImportError: dynamic module does not define init function (initSHIP)

2005-05-04 Thread Bill Davy
Hello, I am using SWIG-1.3.24 to make an extension (called SHIP) to Python2.4.1 and then running under IDLE (if that makes any difference) but when I import SHIP I get: import SHIP Traceback (most recent call last): File pyshell#0, line 1, in -toplevel- import SHIP ImportError: dynamic

Re: (Python newbie) Using XP-SP2/MSVC6: No Python24_d.lib, winzip barfs on Python-2.4.1.tar, cannot download bzip2

2005-04-22 Thread Bill Davy
Traceback (most recent call last): File stdin, line 1, in ? ImportError: No module named SHIP Two common problems here: 1) There is no file *\SHIP.pyd where * is one entry of sys.path 2) The capitalization is not correct. The file lookup will succeed, but then, when initSHIP(void) is

IDLE: How to point it to the Python executables I want it to see on Windows

2005-04-22 Thread Bill Davy
Assuming they run as a separate thread, I want to point IDLE to .../Debug/Python_d.exe one day and .../Release/Python.exe for the next. Also, is there any easy way to run the .../Debug/Python_d.exe so started under the MSVC debugger? tia, Bill --

Re: (Python newbie) Using XP-SP2/MSVC6: No Python24_d.lib, winzip barfs on Python-2.4.1.tar, cannot download bzip2

2005-04-21 Thread Bill Davy
in message news:[EMAIL PROTECTED] Bill Davy wrote: Thanks Jaime, I'm making gradual progress and am finding it quite satisfying. Resorted to tracing Python in MSVC6 to see what it was trying to IMPORT, which is a bit heavy but thank heavens for the sources. You might try running python from

Re: (Python newbie) Using XP-SP2/MSVC6: No Python24_d.lib, winzip barfs on Python-2.4.1.tar, cannot download bzip2

2005-04-20 Thread Bill Davy
Thank you Khalid, OK. (4) (compile using MSVC6) worked. Now working through various issues to do with paths and naming (_d suffix to root for DEBUG, _ prefix to root for SWIG, and I had not spotted that SWIG makes Module.py that imports _Module.pyd but not _Module_d.pyd for DEBUG

Re: (Python newbie) Using XP-SP2/MSVC6: No Python24_d.lib, winzip barfs on Python-2.4.1.tar, cannot download bzip2

2005-04-20 Thread Bill Davy
magically get the python24_d.lib library. hth, jw On 4/18/05, Bill Davy [EMAIL PROTECTED] wrote: I downlaoded and installed http://www.python.org/ftp/python/2.4.1/python-2.4.1.msi I'm trying to build an extension using SWIG 1.3.24 and the linker needs python24_d.lib (I do not have the DLL either

Re: (Python newbie) Using XP-SP2/MSVC6: No Python24_d.lib, winzip barfs on Python-2.4.1.tar, cannot download bzip2

2005-04-19 Thread Bill Davy
to do anything out of the way for the python source. -Jim On 4/18/05, Bill Davy [EMAIL PROTECTED] wrote: A.B., Khalid [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Bill Davy wrote: I downlaoded and installed http://www.python.org/ftp/python/2.4.1/python-2.4.1.msi I'm trying

RE: (Python newbie) Using XP-SP2/MSVC6: No Python24_d.lib, winzip barfs on Python-2.4.1.tar, cannot download bzip2

2005-04-19 Thread Bill Davy
compatibility firts (I have tried to edge them on but without success). Many thanks Bill -Original Message- From: James Carroll [mailto:[EMAIL PROTECTED] Sent: 18 April 2005 18:10 To: Bill Davy; python-list@python.org Subject: Re: (Python newbie) Using XP-SP2/MSVC6: No Python24_d.lib

(Python newbie) Using XP-SP2/MSVC6: No Python24_d.lib, winzip barfs on Python-2.4.1.tar, cannot download bzip2

2005-04-18 Thread Bill Davy
I downlaoded and installed http://www.python.org/ftp/python/2.4.1/python-2.4.1.msi I'm trying to build an extension using SWIG 1.3.24 and the linker needs python24_d.lib (I do not have the DLL either). I've not found it in any of the downloads. So I tried to download the source to build it