Re: [Tutor] mailing list

2008-09-16 Thread Evans
Hi, if it's Python tutorial you're after, then start from here http://docs.python.org/tut/ or do a search for 'Python tutorial' on any search engine. Good luck! -- Evans - Original Message - From: Phite Marano To: tutor@python.org Sent: Tuesday, September 16, 2008 7:40 AM S

Re: [Tutor] problem with building dict w/ SQlite SELECTS in loop

2008-09-16 Thread Tim Golden
Che M wrote: (struggling to make an informative subject line) [ struggling to understand exactly what the problem is... :) ] I'm quite willing to help on this, but it's just not quite clear enough what's happening. Can I suggest that you post a *really small, self-contained* example which demo

Re: [Tutor] mailing list

2008-09-16 Thread Alan Gauld
"Phite Marano" <[EMAIL PROTECTED]> wrote hi please send me all tutorials There are many Python tutorials on the web which you can find using any search engine or the links on the Python web site. The one that suits you bestwill depend on your own preferred style of learning. The tutor maili

[Tutor] WMI

2008-09-16 Thread Spencer Parker
Has anyone here had any experience with WMI extensions in Python? I am trying to remotely change the IP, Subnet, and gateway of a windows machine, but I cannot figure out what it needs to change this. -- Spencer Parker ___ Tutor maillist - Tutor@pyth

[Tutor] Creating a chat system Server

2008-09-16 Thread Richard Lovely
Does anyone have any links and or know of any good libraries for writing chat servers similar to IRC? I'm looking to add chat facilities to a game I'm working on. Thanks. -- Richard "Roadie Rich" Lovely, part of the JNP|UK Famile www.theJNP.com ___ Tut

Re: [Tutor] Creating a chat system Server

2008-09-16 Thread W W
A lot of people referenced me to twisted whenever I asked about sockets/threading. HTH, Wayne On Tue, Sep 16, 2008 at 12:14 PM, Richard Lovely <[EMAIL PROTECTED]>wrote: > Does anyone have any links and or know of any good libraries for > writing chat servers similar to IRC? I'm looking to add c

Re: [Tutor] WMI

2008-09-16 Thread Tim Golden
Spencer Parker wrote: Has anyone here had any experience with WMI extensions in Python? I am trying to remotely change the IP, Subnet, and gateway of a windows machine, but I cannot figure out what it needs to change this. You'll need the Win32_NetworkAdapterConfiguration class and, for ease

Re: [Tutor] WMI

2008-09-16 Thread Spencer Parker
This is the code that I currently have: import wmi con =wmi.WMI() ip = "10.1.10.20" subnet = "255.255.255.0" gateway = "10.1.10.1" wql = "SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = TRUE" for adapter in con.query(wql): ReturnValue = adapter.EnableStatic(IPAddress=ip, S

Re: [Tutor] WMI

2008-09-16 Thread Spencer Parker
It does of course help to spell IPAddress correctly to get this to work in the first place. LOL. It is working...thanks again for the help and the wonderful module! On Tue, Sep 16, 2008 at 1:36 PM, Spencer Parker <[EMAIL PROTECTED]>wrote: > This is the code that I currently have: > > import wmi

Re: [Tutor] Creating a chat system Server

2008-09-16 Thread Winfried Tilanus
On 09/16/2008 W W wrote: Hi, > A lot of people referenced me to twisted whenever I asked about > sockets/threading. You might want to use xmpp (the protocol of jabber). Twisted can speak that, but there are other options. It is a quite versatile protocol: beside 'just chatting', about anything

Re: [Tutor] problem with building dict w/ SQlite SELECTS in loop

2008-09-16 Thread Che M
> I'm quite willing to help on this, but it's just not quite > clear enough what's happening. Can I suggest that you > post a *really small, self-contained* example which demonstrates > the problem you're having. You might actually realise what's > wrong as you do that, or if not someone like me

Re: [Tutor] WMI

2008-09-16 Thread Tim Golden
Spencer Parker wrote: It does of course help to spell IPAddress correctly to get this to work in the first place. LOL. It is working...thanks again for the help and the wonderful module! Glad it was useful. Thanks for the update. TJG ___ Tutor ma

Re: [Tutor] problem with building dict w/ SQlite SELECTS in loop

2008-09-16 Thread Tim Golden
Che M wrote: [... snip solution around mis-handling a string split ...] Glad you solved it. Thanks for coming back with an update. Depending on your circs, you might want to try a more general solution to that problem, like: s = "This, is,a, string, with, varying, amounts, of,space" print

Re: [Tutor] problem with building dict w/ SQlite SELECTS in loop

2008-09-16 Thread Tim Golden
Che M wrote: [... snip solution around mis-handling a string split ...] Glad you solved it. Thanks for coming back with an update. Depending on your circs, you might want to try a more general solution to that problem, like: s = "This, is,a, string, with, varying, amounts, of,space" print

Re: [Tutor] problem with building dict w/ SQlite SELECTS in loop

2008-09-16 Thread Che M
> I can't see any obvious reasons for your problems, I'm afraid, but I > do have a comment on your SQL: the sqlite module supports using ? to > indicate parameters. So you could rewrite your select statements as: > > cur.execute("select code from codes where code != '' and style = ? and > start

Re: [Tutor] problem with building dict w/ SQlite SELECTS in loop

2008-09-16 Thread John Fouhy
2008/9/17 Che M <[EMAIL PROTECTED]>: >> (heck, you could select code, start, style form codes -- pull all the >> information you need in a single query, and skip the loop >> altogether..) > I think I need the loop because the style will be multiple styles and > I need to take the codes that go with

Re: [Tutor] problem with building dict w/ SQlite SELECTS in loop

2008-09-16 Thread Alan Gauld
"Che M" <[EMAIL PROTECTED]> wrote The reason is merely lack of experience and because of how I was using the fetchall() in one list comprehension to build each list... > (heck, you could select code, start, style form codes -- pull all > the > information you need in a single query, and skip