what's difference usage?

2008-09-27 Thread momobear
while as I try to wrap a function using boost-python, I find a strange situation. #include #include #include #include #include using namespace boost::python; int printlist(list &l){ std::vector a; a.push_back("c++"); a.push_back("javascript"); for (std::vector

what's wrong with www.planetpython.org?

2008-08-20 Thread momobear
hi, Does anyone know why the www.planetpython.org could not be connected recently? thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Balloon Taskbar Popup for Windows XP

2007-09-30 Thread momobear
On Sep 29, 6:40 pm, makko <[EMAIL PROTECTED]> wrote: > Greetings, > I need to create a function that will produce a balloon popup in the > taskbar when called. Whats the shortest and easiest way to do this? > Thanks. > > regards, > Makko look at the website, maybe helpful to you. http://xoomer.ali

Re: Help: GIS

2007-08-04 Thread momobear
On Aug 3, 11:46 am, zxo102 <[EMAIL PROTECTED]> wrote: > Hi, > I am new in GIS area and need your suggestions for where I can > start from. I have a python based web application with a database. > Now I would like to add a GIS map into my application. When a user > clicks a certain area in the

Re: Any way to monitor windows network connection?

2007-08-01 Thread momobear
On Aug 1, 12:22 pm, Jay Loden <[EMAIL PROTECTED]> wrote: > momobear wrote: > > hi, Is there any way to show me detailed listings of all TCP and UDP > > endpoints in my microsoft windows XP in python way? > > thanks. > > Not sure if it's exactly what you'

Re: Any way to monitor windows network connection?

2007-08-01 Thread momobear
On Aug 1, 1:47 pm, Gordon Airporte <[EMAIL PROTECTED]> wrote: > momobear wrote: > > hi, Is there any way to show me detailed listings of all TCP and UDP > > endpoints in my microsoft windows XP in python way? > > thanks. > > Unless you're look

Any way to monitor windows network connection?

2007-07-31 Thread momobear
hi, Is there any way to show me detailed listings of all TCP and UDP endpoints in my microsoft windows XP in python way? thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: monitoring the filesystem for changes

2007-06-03 Thread momobear
> You could use the ReadDirectoryChangesW in overlapped > mode. I've never tried it, so I don't know how > robust it would be. Why is it a problem to have > "multiple programs" running? And is that simply > multiple threads, or multiple processes? I used overlapped in my program, it runs about 1 we

Re: monitoring the filesystem for changes

2007-06-02 Thread momobear
> i have designed a desktop search utility in python and a file system > monitoring using readdirectorychangesw from win32api but for eg. it > has a high cpu utilization (using a 2GHz processor). I don't think so. I just build a service to monitor a directory changes using readdirectorychangesw, t

Re: Periodic tasks.

2007-05-30 Thread momobear
On May 29, 2:33 pm, Ramashish Baranwal <[EMAIL PROTECTED]> wrote: > Hi, > > I am trying to execute some tasks periodically, those familiar with > unix can think of it as equivalent to cron jobs. I have tried looking > around, but couldn't find a way. Would appreciate any pointers or > clues.. > > T

Re: How to print this character u'\u20ac' to DOS terminal

2007-05-30 Thread momobear
On May 30, 3:05 pm, 人言落日是天涯,望极天涯不见家 <[EMAIL PROTECTED]> wrote: > On 5月30日, 下午1时23分, "Martin v. Lo"wis" <[EMAIL PROTECTED]> wrote: > > > > > 人言落日是天涯,望极天涯不见家 schrieb: > > > > Who could explain the follow issue ? > > print u'\u0394' > > > Δ > > print u'\u20ac' > > > Traceback (most recent ca

Re: How to print this character u'\u20ac' to DOS terminal

2007-05-30 Thread momobear
On May 30, 3:05 pm, 人言落日是天涯,望极天涯不见家 <[EMAIL PROTECTED]> wrote: > On 5月30日, 下午1时23分, "Martin v. Lo"wis" <[EMAIL PROTECTED]> wrote: > > > > > 人言落日是天涯,望极天涯不见家 schrieb: > > > > Who could explain the follow issue ? > > print u'\u0394' > > > Δ > > print u'\u20ac' > > > Traceback (most recent ca

Re: Key Listeners

2007-05-30 Thread momobear
On May 30, 10:14 am, Mike <[EMAIL PROTECTED]> wrote: > Are there key listeners for Python? Either built in or third party? try "pykeylogger", that's maybe u want. -- http://mail.python.org/mailman/listinfo/python-list

Re: Speex bindings for python 2.5

2007-05-29 Thread momobear
> I forgot to give the url :http://www.freenet.org.nz/python/pySpeex/ I Couldn't Open the website. -- http://mail.python.org/mailman/listinfo/python-list

Re: a bug in python windows service?

2007-05-28 Thread momobear
On May 27, 11:25 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Sun, 27 May 2007 09:07:36 -0300, momobear <[EMAIL PROTECTED]> escribió: > > >> Instead of extending join(), write a specific method to signal the > >> quitEvent or just let

Re: a bug in python windows service?

2007-05-27 Thread momobear
> Instead of extending join(), write a specific method to signal the > quitEvent or just let the caller signal it. And I don't see in this > example why do you need two different events (one on the thread, another > on the service controller), a single event would suffice. I don't think a single

Re: a bug in python windows service?

2007-05-27 Thread momobear
> No, this is not a bug. You must not call Thread.run(), use Thread.start() > instead - else your code won't run in a different thread of execution. See > http://docs.python.org/lib/thread-objects.htmlon how to use Thread > objects - and note that you should *only* override __init__ and run, if

a bug in python windows service?

2007-05-26 Thread momobear
I feel really puzzled about fellowing code, please help me finger out what problem here. import threading class workingthread(threading.Thread): def __init__(self): self.quitEvent = threading.Event() self.waitTime = 10 threading.Thread.__init__(self)

Re: How to tell when a file is opened

2007-04-07 Thread momobear
> Will look into NTFS change journals when I get some spare time. How can we get NTFS change journals? Is there any API for this purpose or we could implement our own? there're an api in windows help us montior file changes. win32file.ReadDirectoryChangesW -- http://mail.python.org/mailman/list

Re: How can I find out the size of a file

2007-03-28 Thread momobear
On Mar 29, 6:09 am, [EMAIL PROTECTED] wrote: > Hi, > > How can I find out the size of a file in a disk in python? > > i try this, but it does not work: > size = open(inputFileNameDir + "/" + file, 'r').size() > > Thank for any help. os.stat(filename), see stat manual for detail.(st_size ) -- ht

draw like windows performance Graph

2007-03-24 Thread momobear
Type the "taskmgr", Windows performance Graph give a really nice dynamic history curve, It will be wonderful If I could use the same kind of graph to represent the network flow in my python program. Is there a windows api for this graph drawing? -- http://mail.python.org/mailman/listinfo/pytho

Re: how can I invoke a Java code?

2007-03-22 Thread momobear
> If you're wanting to interact with the code, your best option may be > Jython, an implementation of Python in Java. I do have to interact with Java module, and when talk about Jython, since I use third parts of python modules I am puzzled about it. -- http://mail.python.org/mailman/listinfo/py

how can I invoke a Java code?

2007-03-22 Thread momobear
A friend of my write a Java program, and I want use it in my python program as a module. I searched the topic in Google and find maybe the better way is use GCJ to compile it. Is there any other way for me? the simple and speediness choice the better. thanks. -- http://mail.python.org/mailman/lis

Re: any ways to judge whether an object is initilized or not in a class

2007-03-19 Thread momobear
On Mar 19, 4:50 pm, Duncan Booth <[EMAIL PROTECTED]> wrote: > "momobear" <[EMAIL PROTECTED]> wrote: > > in C++ language we must initilized a variable first, so there is no > > such problem, but in python if we don't invoke a.boil(), we will not >

Re: any ways to judge whether an object is initilized or not in a class

2007-03-19 Thread momobear
On Mar 19, 4:19 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > momobear schrieb: > > > > > hi, I am puzzled about how to determine whether an object is > > initilized in one class, anyone could give me any instructions? > > here is an example co

any ways to judge whether an object is initilized or not in a class

2007-03-18 Thread momobear
hi, I am puzzled about how to determine whether an object is initilized in one class, anyone could give me any instructions? here is an example code: class coffee: def boil(self): self.temp = 80 a = coffer() if a.temp > 60: print "it's boiled" in C++ language we mus

Re: wxpython in action book

2006-04-04 Thread momobear
Butternut squash wrote: > any recommendations? any opinions? > > I want to learn to program in python and need a gui reference. I'll be > updating various mysql tables. I have most of the code ready to roll by > using a command line. I need put some lipstick on my project. > > pyQT seems viable bu

Re: does python could support sequence of short or int?

2006-03-30 Thread momobear
thanks for help. formerly I only know to use the struct like bellow: >>> unpack('hhl', '\x00\x01\x00\x02\x00\x00\x00\x03') Great, python can work like this: >>> l = list(struct.unpack('h'*(len(s)/2), s)) I will try to use the numarray also >>>there are some good exensions for Python, >>>numarray an

Re: does python could support sequence of short or int?

2006-03-30 Thread momobear
then how can I convert it to a int list? I read about struct and array, I think they are not suitable, since I don't know how long will the buffer is. I know if I write a plugins modules in C should works, but that's really upset to tell to myself there is no way in Python. -- http://mail.python.

Re: does python could support sequence of short or int?

2006-03-30 Thread momobear
but what about buffer is not be declared in python program, it comes from a C function. and what about I want to treat a string as a short list? buffer = foobur() // a invoke from C function, it is encapsulated as a string but I want to treat it as a short list. how can I? -- http://mail.python.

does python could support sequence of short or int?

2006-03-29 Thread momobear
hi, is there a way to let python operate on sequence of int or short? In C, we just need declare a point, then I could get the point value, just like: short* k = buffer, //k is a point to a sequence point of short. short i = *k++, but python is a dynamic language, a = buffer i = ? I don't know how