"Thomas Jollans" 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
>>
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\Release>dir
Volume in drive H has no label.
Volume Serial Number is B83B-76F2
Directory of H:\Viper\HostPC\V1\SHIP\Release
"Stephen Hansen" wrote in message
news:mailman.2344.1277821469.32709.python-l...@python.org...
> On 6/29/10 12:27 AM, Lawrence D'Oliveiro wrote:
>> In message<4c286d71$0$18654$4fafb...@reader3.news.tin.it>, superpollo
>> wrote:
>>
>>> Lawrence D'Oliveiro ha scritto:
Is it really such a
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
"Mark Tolonen" wrote in message
news:mailman.89.1250666942.2854.python-l...@python.org...
>
> "MRAB" 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 pieces of
>>> python code.
>>>
>>
"Mark Lawrence" 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 in Python? Th
"MRAB" 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' operator as well.
>
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
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 q
27;get', data_queue.qsize()
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
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,
ached.
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_h
h 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:
>
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 ar
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 wit
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
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
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 ar
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 = log
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
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):
self.producer_fifo.append(data[i:i+sabs
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 te
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
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, str
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 = ""
self
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
keep the parameter constant 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.
>
>
B, C 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
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
"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
>> outlook = win32com.client.gencache.EnsureDispatch
>&g
"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.
"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.
>>
"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
"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 transfe
"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
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 CdoDefaultFolderContac
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:
cla
"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.
>>
>&g
"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
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 st
"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
>>
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 expres
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
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
;""Returns True if this agent can grab this object.
Override for appropriate subclasses of Agent and Object."""
return False
Best regards,
Davy
--
http://mail.python.org/mailman/listinfo/python-list
,
Davy
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
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('',self._onUpKey)
Davy
On Nov 20, 10:13 am, Davy <[EMAIL PROTECTED]> w
;, self._onClick) ## work
Any suggestion?
Best regards,
Davy
--
http://mail.python.org/mailman/listinfo/python-list
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/ma
nd('',self._onUpKey)
self.canv.bind('', 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()
##---
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
self):
__one()
print "world"
if __name__ == '__main__':
s = simple()
s.two()
Any suggestion is welcome!
Best regards,
Davy
--
http://mail.python.org/mailman/listinfo/python-list
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
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)
>
do this by nlargest() of heapq? I have tried
nlargest(2,dic,key),
the interpreter give out:
Traceback (most recent call last):
File "", line 1, in
NameError: name 'key' is not defined
Best regards,
Davy
--
http://mail.python.org/mailman/listinfo/python-list
{1:{2:1,3:4},2:{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
any fast way to implement this algorithm?
Any suggestions are welcome!
Best regards,
Davy
--
http://mail.python.org/mailman/listinfo/python-list
and when use dict? Any suggestions are
welcome!
Best regards,
Davy
--
http://mail.python.org/mailman/listinfo/python-list
on2.4\site-packages\numpy
\__init__.py", line 39, in
import core
File "C:\Program Files\nupic-1.4\lib\python2.4\site-packages\numpy
\core\__init__.py", line 5, in
import multiarray
ImportError: Module use of python24.dll conflicts with this version of
Python.
Best regards,
regards,
Davy
--
http://mail.python.org/mailman/listinfo/python-list
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 :)
&g
use an error?
Best regards,
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?
>
> >
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
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 PROTECT
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):
other 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
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
nt tool?
Any suggestions will be appreciated!
Best regards,
Davy
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
--
the last two lines. Does the window Idle sets up
emulate 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" <
he result is in Green 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
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
--
http://mail.python.org/mailman/listinfo/pytho
"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
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 la
I am working with MSVC6 on Windows XP.
I have created an MSVC project called SHIP
I have a file SHIP.i with "%module SHIP" as the first line (file is below).
I run SHIP.i through SWIG 1.3.24 to obtain SHIP_wrap.cpp and SHIP.py; the
latter contains the line "import _SHIP".
I compile SHIP_wrap.c
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 "", line 1, in -toplevel-
import SHIP
ImportError: dynamic mo
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
--
http://mail.python.org/mailman/listinfo/py
> Traceback (most recent call last):
>> File "", 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(
Traceback (most recent call last):
File "", line 1, in ?
NameError: name '_SHIP_d' is not defined
>>>
"Scott David Daniels" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Bill Davy wrote:
>> Thanks Jaime,
>>
>> I'
iler which library to link the object files against. Because
you're building a _DEBUG build, you 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
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
builds).
tomer 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_
sion, but I don't remember having 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:
> >>
"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 to build an extension using SWIG 1.3.24 and the
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 mys
90 matches
Mail list logo