How can I handle the char immediately after its input, without waiting an endline?

2008-10-22 Thread Lave
Hi, all.

I'm a new comer. So This question maybe sutpid.:)

I want to write something that handle every char immediately after its
input. Then tehe user don't need to type [RETURN] each time. How can I
do this?

Thanks in advance.


-- 
Regards

Lave
--
http://mail.python.org/mailman/listinfo/python-list


Re: How can I handle the char immediately after its input, without waiting an endline?

2008-10-22 Thread Lave
Yes, it's what i want. Many thanks.

BTW,python-list 's reply is so quick. I love it. I like you all guys.

On 10/22/08, rishi pathak <[EMAIL PROTECTED]> wrote:
> The below piece of code should give you some understanding
>
> import tty
> import sys
> tty.setraw(sys.stdin.fileno())
> char=''
> print "Press x to exit"
> while char != 'x' :
> char = sys.stdin.read(1)
> print "You entered : ",char
> # Your code here
>
>
> On Wed, Oct 22, 2008 at 2:34 PM, Lave <[EMAIL PROTECTED]> wrote:
>
>> Hi, all.
>>
>> I'm a new comer. So This question maybe sutpid.:)
>>
>> I want to write something that handle every char immediately after its
>> input. Then tehe user don't need to type [RETURN] each time. How can I
>> do this?
>>
>> Thanks in advance.
>>
>>
>> --
>> Regards
>>
>> Lave
>> --
>> http://mail.python.org/mailman/listinfo/python-list
>>
>
>
>
> --
> Regards--
> Rishi Pathak
> Pune-Maharastra
>


-- 
Regards

Lave
--
http://mail.python.org/mailman/listinfo/python-list


Re: Question about scope

2008-10-23 Thread Lave
Newbie too. I think you shoud qualify Global with the module name.

On 10/23/08, Pat <[EMAIL PROTECTED]> wrote:
> I have a Globals class.
>
> In it, I have a variable defined something like this:
>
> remote_device_enabled = bool
>
> In one module, I assign True/False to Globals.remote_device_enabled.
> Once set, this value never changes.
>
> In another module, at the top after the imports statements, I tried this:
>
> from Globals import *
>
from  import Globals ?
> RDE = Globals.remote_device_enabled
>
Here,

RDE = .Globals.remote_device_enabled

> This way, I thought that I could just use 'if RDE:'
>
> Within the functions, however, I get a different value.  What am I
> misunderstanding?
>
> I tried this at the top of the module (but it didn't word):
>
> global RDE
> RDE =  Globals.remote_device_enabled
>
> Of course, within a function, the variable using the same two lines of
> code assigns the correct value to RDE.
>
> Thank you,
>
> Total Newbie
> --
> http://mail.python.org/mailman/listinfo/python-list
>


-- 
Regards,
Lave
--
http://mail.python.org/mailman/listinfo/python-list


How to use win32com to convert a MS WORD doc to HTML ?

2008-08-19 Thread Lave
Hi, all !

I'm a totally newbie huh:)

I want to convert MS WORD docs to HTML, I found python windows
extension win32com can make this. But I can't find the method, and I
can't find any document helpful.

Can anyone help me? Thank in advance.
--
http://mail.python.org/mailman/listinfo/python-list


回复: How to use win32com to co nvert a MS WORD doc to HTML ?

2008-08-19 Thread Lave
HUH! :)

It's solved.

Thank you all! You saved my life! Thank you very much.

I love you! I love Python!

2008/8/20, Simon Brunning <[EMAIL PROTECTED]>:
> 2008/8/19 Lave <[EMAIL PROTECTED]>:
>> Hi, all !
>>
>> I'm a totally newbie huh:)
>>
>> I want to convert MS WORD docs to HTML, I found python windows
>> extension win32com can make this. But I can't find the method, and I
>> can't find any document helpful.
>
> This should be a useful starting point:
> <http://code.activestate.com/recipes/279003/>.
>
> --
> Cheers,
> Simon B.
> [EMAIL PROTECTED]
> http://www.brunningonline.net/simon/blog/
> GTalk: simon.brunning | MSN: small_values | Yahoo: smallvalues | Twitter:
> brunns
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
http://mail.python.org/mailman/listinfo/python-list