Re: SPAM-LOW: (PyGTK) Disabling ToolButton when no TreeView item is selected?
cypher543 skrev: > I have a TreeView and a ToolButton. The ToolButton should only be > active if the user has selected an item in the TreeView. What signal > should I use to achieve this? > > Thanks, > David > Hey I use the "curselection()" function. Example: id = self.listbox.curselection() id = id[0] rf = self.listbox.get(id) print id It is on a listbox, but a think you also can use it on TreeViews. Hope it helped! :) -- _.____ __ / _/ ___|__|__/ |_ ___ / | \__ \ \_ \_/ ___\_ __ \ \ \ __\/ __ \_ __ \/ | |_ // /\ \___| | \/ | |_> > | \ ___/| | \/^ / // /___ /\___ >__| |__| __/|__| \___ >__| \ | // \/ \/ |__| \/ |__| -- http://mail.python.org/mailman/listinfo/python-list
Reverse of SendKeys??
Hey! I know there is a module named SendKeys. SendKeys module it can type strings as you where typing it, on the keyboard. But is there a module that does the reverse. A module that gets _anything_ what the keyboard writes. For example. If i type "hey" on my keyboard. Will the program get the string even if the program not is on focus.. Thanks :) Sorry for bad English... -- _.____ __ / _/ ___|__|__/ |_ ___ / | \__ \ \_ \_/ ___\_ __ \ \ \ __\/ __ \_ __ \/ | |_ // /\ \___| | \/ | |_> > | \ ___/| | \/^ / // /___ /\___ >__| |__| __/|__| \___ >__| \ | // \/ \/ |__| \/ |__| -- http://mail.python.org/mailman/listinfo/python-list
pythoncom module
Hey, I need a module called "pythoncom" anyone that knows where a can find that module??? thanks! -- http://mail.python.org/mailman/listinfo/python-list
Ip address
How do i get my ip address? in cmd.exe i just type "ipconfig" then it prints: ... IP-address . . . . . . . . . . . . . . . . . : 192.168.1.10 ... how can i do that in python?? -- http://mail.python.org/mailman/listinfo/python-list
Re: Mulig SPAM: Re: IP address
Klaus Alexander Seistrup skrev:
> Scripter47 wrote:
>
>> How do i get my ip address?
>>
>> in cmd.exe i just type "ipconfig" then it prints:
>> ...
>> IP-address . . . . . . . . . . . . . . . . . : 192.168.1.10
>> ...
>> how can i do that in python??
>
> #v+
>
> python -c 'import re, urllib; print re.findall("Your IP:
> (.+?)", urllib.urlopen("http://myip.dk/";).read())[0]'
>
> #v-
>
> Cheers,
>
Hmm then you need Internet connecting. can i do it without that? ยด
and it doesn't work either :(
--
http://mail.python.org/mailman/listinfo/python-list
Re: IP address
Beej skrev:
> On Jan 28, 2:26 am, Klaus Alexander Seistrup <[EMAIL PROTECTED]> wrote:
>> Scripter47 wrote:
>>> How do i get my ip address?
>>> in cmd.exe i just type "ipconfig" then it prints:
>>> ...
>>> IP-address . . . . . . . . . . . . . . . . . : 192.168.1.10
>>> ...
>>> how can i do that in python??#v+
>> python -c 'import re, urllib; print re.findall("Your IP:
>> (.+?)", urllib.urlopen("http://myip.dk/";).read())[0]'
>
> This is extremely unlikely to return 192.168.1.10. :-)
>
> (It will give you the address of your firewall or whatever is your
> gateway to the outside world... which is a cool thing to know, but
> I'm not sure it's what the op's after.)
>
> -Beej
>
Exactly i wnat my local ip. sorry if i din't tell that ;)
--
http://mail.python.org/mailman/listinfo/python-list
SQL connecting
Hey
It got a problem with python to connect to my SQL DBs, that's installed
on my apache server. how do i connect to sql? Gettting data? Insert into it?
it is a localserver with php if that means something
here is a *REALLY* dirty solution that a have used:
[CODE]
from urllib import *
# sql query
s = 'INSERT INTO `test` (`test`) VALUES ("1");'
# encode and insert into db
params = urlencode({'sql': sql})
urlopen("http://localhost/in/sql.php?%s"; % params)
[/CODE]
--
_.____ __
/ _/ ___|__|__/ |_ ___ / | \__ \
\_ \_/ ___\_ __ \ \ \ __\/ __ \_ __ \/ | |_ //
/\ \___| | \/ | |_> > | \ ___/| | \/^ / //
/___ /\___ >__| |__| __/|__| \___ >__| \ | //
\/ \/ |__| \/ |__|
--
http://mail.python.org/mailman/listinfo/python-list
Re: SQL connecting
John Nagle skrev: > Scripter47 wrote: >> Hey >> >> It got a problem with python to connect to my SQL DBs, that's installed >> on my apache server. how do i connect to sql? Gettting data? Insert into >> it? > > You need a third-party open source package called "MySQLdb". > > John Nagle Yeah look great but im using python 2.5, and it only support 2.3-2.4 :(, but thanks :) Any better solutions :) -- http://mail.python.org/mailman/listinfo/python-list
Re: SQL connecting
Dennis Lee Bieber skrev: > On Mon, 29 Jan 2007 19:45:47 GMT, John Nagle <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > >> Scripter47 wrote: >>> Hey >>> >>> It got a problem with python to connect to my SQL DBs, that's installed >>> on my apache server. how do i connect to sql? Gettting data? Insert into >>> it? >> You need a third-party open source package called "MySQLdb". >> > Call me a nit, but did the original poster mean "MySQL" databases, > or only that he uses SQL to access "my databases". The spelling is > unclear as to what DBMS engine is actually being used. If it is /not/ > MySQL, then MySQLdb is futile. Sry i didn't said it. it is a MySQL DB on a apache server -- http://mail.python.org/mailman/listinfo/python-list
Array delete
Hey, Can someone plz make a function for that takes a array, and then search in it for duplicates, if it finds 2 or more items thats the same string then delete all except 1. Short: it deletes all duplicates in a array thanks -- http://mail.python.org/mailman/listinfo/python-list
