an hex number problem

2006-12-21 Thread could . net
Hello, I got a number 19968: 1. how can I change it to the hex form 0x4e00, 2. and how can I change 0x4e00 to a python unicode character u"\u4e00"? thank you! -- http://mail.python.org/mailman/listinfo/python-list

Re: a question on python dict

2006-12-20 Thread could . net
Thank you very much for your explanation! I made a mistake that I said the hash value should be recalculated each time the dict resize, what I wanted to say was that the position of each item should be recalculated. Maybe I should take a look at the source code of python dict some day. I'll some

a question on python dict

2006-12-20 Thread could . net
Python dict is a hash table, isn't it? I know that hashtable has the concept of "bucket size" and "min bucket count" stuff, and they should be configurable so I can set them to the proper value when I know how many items I'm going to handle. If these two values can't be set, the hashtable will gi

Re: How to turn of the monitor by python?

2006-12-12 Thread could . net
Thank you, that's exactly what I want. Sorry I didn't give my OS info. Leo Kislov wrote: > [EMAIL PROTECTED] wrote: > > I want to turn off my monitor from within python, How to do it? > > Thanks! > > Do you realize that hardware management and control is OS dependant? > When asking such questions

How to turn of the monitor by python?

2006-12-12 Thread could . net
I want to turn off my monitor from within python, How to do it? Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: YouTube written in Python

2006-12-12 Thread could . net
Really? It's awful! Terry Reedy wrote: > In a thread on the PyDev list, Guido van Rossum today wrote: > > And I just found out (after everyone else probably :-) that YouTube is > > almost entirely written in Python. (And now I can rub shoulders with > > the developers since they're all Googlers now

boost::python embedding example running error

2006-11-12 Thread could . net
I use boost 1.33_1, there's an example on boost::python named embedding.cpp. When I tried to build and run it in visual studio 2005, I got an error on this line: std::string hello() { return python::call_method(self, "hello"); } It's a back ptr error. I don't know where to ask this question so I

How to compare to directories?

2006-09-12 Thread could . net
I want to compare 2 directories: dir1 and dir2. What I want to do is to get these informations: 1. does they have the same number of files and sub-directories? 2. does each file with the same name have the same size and date information? So, how can I do it in python? Thank you! -- http://mail.p

Re: Python and STL efficiency

2006-08-22 Thread could . net
That's to say, python is still much faster? I am a c++ newbie but I think c++ should be faster here. Maybe someone can post this to the c++ maillist and they will tell how to accelerate it. Tim N. van der Leeuw wrote: > Mc Osten wrote: > > Fredrik Lundh <[EMAIL PROTECTED]> wrote: > > > > > Python'

How can I enumerate all windows services and disable some of them?

2006-08-22 Thread could . net
I know that Module win32service has some functions on manipulating win32 services. But I still have 2 questions: 1. how to enumerate all services? 2. how to disable a certain one? Thanks in advance! -- http://mail.python.org/mailman/listinfo/python-list