Re: [Tutor] Pinging a service
Greg Lindstrom wrote: Hello, I would like to write a routine to monitor services running on a remote box. My initial thought is to "ping" the remote box to monitor latency and then execute a query on the remote machine to monitor the database. What I would like is to gather data points and graph the delay to see if there are any patterns; A) Is this a sound strategy? B) Are there libraries for the "ping"ing aspect? If not, I can execute the ping using "command"...how can I capture the screen output to get the times? Pinging is actually a more complex beast than you might imagine. If you know what ports the services are running on, or at least if you know one service a box *should* be running, you could do worse than to attempt a socket connection to that port number. For example, seeing if a (not desperately secured) Windows box is up is a question of attempting a connection on port 445. Likewise, seeing if a web server (box) is running, you can try port 80. etc. TJG ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Dictionary within a dictionary
On Thu, Jun 12, 2008 at 7:56 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi, > I would like to understand how to generate dictionaries based on other > dictionaries. For example, I have a 3 tables in ym SQL database - > Groups, Categories and Sub-categories with a one-to-many relations > between each. Can you say more about what you are trying to do, and what the tables contain? Kent ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Dictionary within a dictionary
Hi, Following Alan's post, what I was trying to do is to understand how I can return the sub-item within the same space, if it makes sense ;) For example, in my 3 one-to-many lists, I want to generate this list: [{'id': , 'category': [{'id': , 'sub-category': [ {'id': , 'title': , 'is_selected': } ...] 'title': , 'is_selected': } ...] 'title': , 'is_selected': , } ...] Reason for this is that I want to create a navigational menu for a web template so that when you click on group_id the value is sent and this pulls the 'categories' and when you click on the category then the sub- categories are listed. Thanks David __ Find out what Tiscali can do for you - http://www.tiscali.co.uk/services ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
[Tutor] ooffice UNO to generate automatic powerpoint presentations
Hi, I want to be able to generate Windows powerpoint presentations by throwing text and images into a directory and running a Python script. I've seen some win32 modules online that manipulate powerpoint using COM but are not quite what I am looking for. Examples I've found http://mail.python.org/pipermail/python-win32/2006-March/004380.html http://www.activeinterface.com/b2003_4_12.html http://www.robertgsmith.com/2006/03/tech-tools-just-for-realtors-powerpoint-creation-script-for-cmabuyer-tour-etc.aspx Ideally, a file containing name=value pairs or XML would add title, text, and images. Has anyone done this with openoffice UNO? Thanks for your comments, Mark ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] ooffice UNO to generate automatic powerpoint presentations
Quicktime's Com API does something similar to this. But nothing with PPT files, no. --Michael On Fri, Jun 13, 2008 at 10:28 AM, Mark Alexiuk <[EMAIL PROTECTED]> wrote: > Hi, >I want to be able to generate Windows powerpoint presentations by > throwing >text and images into a directory and running a Python script. I've seen >some win32 modules online that manipulate powerpoint using COM but are > not >quite what I am looking for. >Examples I've found >http://mail.python.org/pipermail/python-win32/2006-March/004380.html >http://www.activeinterface.com/b2003_4_12.html > > > http://www.robertgsmith.com/2006/03/tech-tools-just-for-realtors-powerpoint-creation-script-for-cmabuyer-tour-etc.aspx >Ideally, a file containing name=value pairs or XML would add title, text, >and images. >Has anyone done this with openoffice UNO? >Thanks for your comments, >Mark > > ___ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor > > -- Michael Langford Phone: 404-386-0495 Consulting: http://www.RowdyLabs.com ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Dictionary within a dictionary
On Fri, June 13, 2008 7:23 am, [EMAIL PROTECTED] wrote: > Hi, > Following Alan's post, what I was trying to do is to understand how I > can return the sub-item within the same space, if it makes sense ;) > > For example, in my 3 one-to-many lists, I want to generate this list: When see nested builtin data structures, I always think it's time to think of making a few classes instead. Python tutors, is this a good suggestion? Marilyn Davis > > > [{'id': , > 'category': [{'id': , > 'sub-category': [ {'id': , > 'title': , > 'is_selected': > } > ...] > 'title': , > 'is_selected': > } > ...] > 'title': , > 'is_selected': , > } > ...] > > > Reason for this is that I want to create a navigational menu for a web > template so that when you click on group_id the value is sent and this > pulls the 'categories' and when you click on the category then the sub- > categories are listed. > > Thanks > David > > > > > __ > > > Find out what Tiscali can do for you - http://www.tiscali.co.uk/services > > > ___ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Dictionary within a dictionary
"Marilyn Davis" <[EMAIL PROTECTED]> wrote When see nested builtin data structures, I always think it's time to think of making a few classes instead. It could be, especially if you are about to write a bunch of functions to access those structures. But equally if the structures accurately reflect the problem and acess does not require any complex processing then I'm happy to use the structures. In a case like this I'd still tend to move to a database rather than an OOP solution, although I might use classes to hold the returned data. I'm still not clear why the OP wants to hold the data in memory. Alan G Python tutors, is this a good suggestion? Marilyn Davis [{'id': , 'category': [{'id': , 'sub-category': [ {'id': , 'title': , 'is_selected': } ...] 'title': , 'is_selected': } ...] 'title': , 'is_selected': , } ...] Reason for this is that I want to create a navigational menu for a web template so that when you click on group_id the value is sent and this pulls the 'categories' and when you click on the category then the sub- categories are listed. Thanks David __ Find out what Tiscali can do for you - http://www.tiscali.co.uk/services ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] python gui
Hi, Gabriela! that interesting dashboard can be done. At least you can divide your main window into several subwindows and do what you what you want. Each subwindows would have a dropdownlist to redefine another sub-subwindow inside of it. Tabs are also available in several windowing toolkits for Python. In wxPython you can have a panel and put your subwindows inside of it: http://wxpython.org Another alternative is pyGTK. All the best, hilton Em Quarta 11 Junho 2008 10:03, Gabriela Soares escreveu: > Greetings, > I want to make a dynamic dashboard, something like: > http://examples.adobe.com/flex3/labs/dashboard/main.html# > but using python. Is it possible ? > > Thanks in advance. > > Best regards, > Gabriela Soares. > > -- > Gabriela Soares > > "I learned that courage was not the absence of fear, but the triumph over > it. The brave man is not he who does not feel afraid, but he who > conquers that fear." > Nelson Mandela _ -- Hilton Garcia Fernandes Nucleo de Tecnologias sem Fio (NTSF) -- Wireless Technologies Team Lab de Sistemas Integraveis Tecnologico (LSI) -- Integrable Systems Lab Escola Politecnica (Poli) -- Engineering School Univ S Paulo (USP) Tel: (5511)3091-5676 (work) (5511)8131-5213 (mobile) Av. Prof. Luciano Gualberto,158 trav.3 CEP 05508-900 S. Paulo -- SP -- Brazil Pagina inicial: http://www.lsi.usp.br/~hgfernan ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
[Tutor] [Fwd: Re: Dictionary within a dictionary]
On Fri, June 13, 2008 4:09 pm, Alan Gauld wrote: > "Marilyn Davis" <[EMAIL PROTECTED]> wrote > > >> When see nested builtin data structures, I always think it's time to >> think of making a few classes instead. > > It could be, especially if you are about to write a bunch of > functions to access those structures. But equally if the structures > accurately reflect the problem and acess does not require any complex > processing then I'm happy to use the structures. > > In a case like this I'd still tend to move to a database rather > than an OOP solution, although I might use classes to hold the returned > data. That sounds like the best plan. > > I'm still not clear why the OP wants to hold the data in > memory. I don't know either. Maybe s/he wants to use shelve or something; maybe s/he has not yet learned classes and databases. So thank you for the reality check. Marilyn Davis > > Alan G > >> >> Python tutors, is this a good suggestion? >> >> >> Marilyn Davis >> >> >>> >>> >>> [{'id': , >>> 'category': [{'id': , >>> 'sub-category': [ {'id': , >>> 'title': , >>> 'is_selected': >>> } >>> ...] >>> 'title': , >>> 'is_selected': >>> } >>> ...] >>> 'title': , >>> 'is_selected': , >>> } >>> ...] >>> >>> >>> >>> Reason for this is that I want to create a navigational menu for a >>> web template so that when you click on group_id the value is sent and >>> this pulls the 'categories' and when you click on the category then >>> the sub- categories are listed. >>> >>> Thanks >>> David >>> >>> >>> >>> >>> >>> __ >>> >>> >>> >>> Find out what Tiscali can do for you - >>> http://www.tiscali.co.uk/services >>> >>> >>> >>> ___ >>> Tutor maillist - Tutor@python.org >>> http://mail.python.org/mailman/listinfo/tutor >>> >> >> >> >> >> ___ >> Tutor maillist - Tutor@python.org >> http://mail.python.org/mailman/listinfo/tutor >> >> > > > ___ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor