From: Lance H. <lh...@ha...> - 2006-06-15 19:00:13
|
Any ideas for a newbie? Just looking for something that will help grow my skills. Thanks Lance -- *Lance Haig* Director *Work:* 07967967108 *Mobile:* 07967967108 *Email:* lh...@ha... <mailto:lh...@ha...> *http://www.linkedin.com/in/lancehaig * * * *HaigMail dot Com* <http://www.haigmail.com> See who we know in common <http://www.linkedin.com/e/wwk/6074413/> Want a signature like this? <http://www.linkedin.com/e/sig/6074413/> |
From: Andy T. <an...@ha...> - 2006-06-15 21:31:32
|
Lance Haig wrote: > Any ideas for a newbie? > > Just looking for something that will help grow my skills. > > Thanks > > Lance > > -- > *Lance Haig* > Director > [snip] The usual answer is to scratch your own itch. If you're looking to improve your knowledge and ability with PythonCard then I'd suggest starting with a small application that helps you out. For me it was an address book (which I'm not releasing because it wasn't very good) and then I moved on to a database query tool which became the dbBrowser sample. If you're building something that you want and/or need then it becomes much more than a learning exercise and you'll be better for the experience. Regards, Andy -- -------------------------------------------------------------------------------- From the desk of Andrew J Todd esq - http://www.halfcooked.com/ |
From: Ashley E. <as...@si...> - 2006-06-15 22:26:18
|
Hi all I am new to python and just getting to grips with it, although i have many years experience with PHP anyway, my question is, I want to create a small script, or later an exe that shows the MySQL db processes with SHOW PROCESSLIST in the style of linux 'top' app which refreshes the display every x seconds, initially, i want to display this process list in a 'DOS' or shell type window, or run directly from DOS or the command prompt. now, ive created a feww lines of code that fetch the rows from the db and print out a simple list of columns (in tuples?) import MySQLdb db = MySQLdb.connect(host="10.0.0.3",user="root",passwd="",db="mysql") cursor = db.cursor() cursor.execute("SHOW PROCESSLIST") res = cursor.fetchall() for row in result: print row cursor.close() db.close() i just need to know how to turn this isto a looping affair, which refrshes the display, rather than kicking out the info every time and information on how to achieve this so my questions are: are there any libs i need which i can import into my script to make this easier, i already have wxpython and pythonCard installed? would i be able to put this code inside a function and loop the function somehow: def ShowProc(): cursor.execute("SHOW PROCESSLIST") res = cursor.fetchall() for row in result: print row # some code here to refresh the display eg while True: ShowProc() i eventually want to create a GUI that does all this for me so i can run the small app on my desktop while working, to keep an eye on the db servers i have to manage but im happy to just get this running command line for now as its the first thing ive tried in python finally, am i even on the right track with this?? kind regards Ash ----- Original Message ----- From: "Andy Todd" <an...@ha...> To: "Lance Haig" <lh...@ha...> Cc: "PythonCard" <pyt...@li...> Sent: Thursday, June 15, 2006 10:23 PM Subject: Re: [Pythoncard-users] What Project is a good one to start on? > Lance Haig wrote: >> Any ideas for a newbie? >> >> Just looking for something that will help grow my skills. >> >> Thanks >> >> Lance >> >> -- >> *Lance Haig* >> Director >> > [snip] > > The usual answer is to scratch your own itch. If you're looking to > improve your knowledge and ability with PythonCard then I'd suggest > starting with a small application that helps you out. For me it was an > address book (which I'm not releasing because it wasn't very good) and > then I moved on to a database query tool which became the dbBrowser > sample. > > If you're building something that you want and/or need then it becomes > much more than a learning exercise and you'll be better for the > experience. > > Regards, > Andy > -- > -------------------------------------------------------------------------------- > From the desk of Andrew J Todd esq - http://www.halfcooked.com/ > > > _______________________________________________ > Pythoncard-users mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncard-users > > > > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.394 / Virus Database: 268.8.4/364 - Release Date: 14/06/2006 > > |
From: Alex T. <al...@tw...> - 2006-06-15 23:08:40
|
Andy Todd wrote: > The usual answer is to scratch your own itch. If you're looking to > >improve your knowledge and ability with PythonCard then I'd suggest >starting with a small application that helps you out. For me it was an >address book (which I'm not releasing because it wasn't very good) and >then I moved on to a database query tool which became the dbBrowser sample. > >If you're building something that you want and/or need then it becomes >much more than a learning exercise and you'll be better for the experience. > > Also, it's generally more difficult to learn too many different things at the same time, so try to pick an area where you already know some of the other parts, so it's (mostly) PythonCard that you are learning (and/or Python and/or wxPython). For instance, if you have already written some apps that analyze some data without a GUI - is there some aspect of the data that would benefit from being visualized ? - so you could re-use your knowledge of how to read and handle the data. Or - if you really want some suggestions "out of the blue" - pick some simple game and try that. (e.g. minesweeper - not Chess !!) - do something with a database (I never touch them myself, so have no specific suggestions :-) - spell checker (i.e. a PythonCard front-end to an existing checker) (or a spell checker for PythonCard resource files ??) - extend the findfiles tool to find and replace -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.8.4/364 - Release Date: 14/06/2006 |
From: Lance H. <lh...@ha...> - 2006-06-17 07:59:51
|
Alex, Thanks for the suggestions. I am new to Python and Pythoncard so anything I do will be new to me. As Andy suggested I have started to scratch and itch with an app that I found lacking and want to improve. I am sure you will all get used to me asking questions :-) Thanks Lance Alex Tweedly wrote: > Andy Todd wrote: > >> The usual answer is to scratch your own itch. If you're looking to >> >> improve your knowledge and ability with PythonCard then I'd suggest >> starting with a small application that helps you out. For me it was >> an address book (which I'm not releasing because it wasn't very good) >> and then I moved on to a database query tool which became the >> dbBrowser sample. >> >> If you're building something that you want and/or need then it >> becomes much more than a learning exercise and you'll be better for >> the experience. >> >> > Also, it's generally more difficult to learn too many different things > at the same time, so try to pick an area where you already know some > of the other parts, so it's (mostly) PythonCard that you are learning > (and/or Python and/or wxPython). > > For instance, if you have already written some apps that analyze some > data without a GUI - is there some aspect of the data that would > benefit from being visualized ? - so you could re-use your knowledge > of how to read and handle the data. > > Or - if you really want some suggestions "out of the blue" > > - pick some simple game and try that. (e.g. minesweeper - not Chess !!) > - do something with a database (I never touch them myself, so have no > specific suggestions :-) > - spell checker (i.e. a PythonCard front-end to an existing checker) > (or a spell checker for PythonCard resource files ??) > - extend the findfiles tool to find and replace > |
From: Lance H. <lh...@ha...> - 2006-06-17 07:56:34
|
Andy, I am new to Python and Pythoncard and have just finished working through Alan Gauld's book "Learn to Program Using Python". It has been a great way to learn about python and programming. I was going to build an app that generates a webpage to display server status for Novell servers from a list of IP addresses and names. I have been looking at the examples and I have seen your db browser and also the custdb sample. The custdb sample has helped me to create the GUI and also to populate the fields from a csv file. I have a problem that the app does not refresh the list properly and was wondering if I should use sqllite instead. Anyway thanks a million for the suggestion Lance Andy Todd wrote: > Lance Haig wrote: > >> Any ideas for a newbie? >> >> Just looking for something that will help grow my skills. >> >> Thanks >> >> Lance >> >> -- >> *Lance Haig* >> Director >> >> > [snip] > > The usual answer is to scratch your own itch. If you're looking to > improve your knowledge and ability with PythonCard then I'd suggest > starting with a small application that helps you out. For me it was an > address book (which I'm not releasing because it wasn't very good) and > then I moved on to a database query tool which became the dbBrowser sample. > > If you're building something that you want and/or need then it becomes > much more than a learning exercise and you'll be better for the experience. > > Regards, > Andy > |
From: Alex T. <al...@tw...> - 2006-06-17 08:58:24
|
No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.9.0/368 - Release Date: 16/06/2006 |
From: Lance H. <lh...@ha...> - 2006-06-17 09:25:23
|
Hi Alex, This is how the original app works. You enter all the server names and ipaddress for every Novell server on your network. then you click the generate button and it creates a webpage that you can host anywhere. ( I add it to my desktop ) This page show the latest status of the servers with traffic lights that are linked to the servers web management interface. What the old app could not do was 1. run on anything but windows ( I use Linux and Mac) written in VB 2. import old pages to make changes (you had to recreate the page every time or edit the html) 3. allow automatic upload to a Intranet. (we have junior types that monitor the systems and let us know when things go wrong) These are the three things that prompted me to start looking for a language that I could use to improve it. I tried PHP-GTK, PHP and then found PythondCard. At a later stage I want to look at perhaps doing a network scan (Using NMAP) to find servers so that you don't have to manually enter each server. For small sites it is easy to do this but for us we have over 150 servers. So basically my new app should accomplish all this and be portable :-) Not to optimistic I hope. Lance Alex Tweedly wrote: > Lance Haig wrote: >> >> I was going to build an app that generates a webpage to display >> server status for Novell servers from a list of IP addresses and names. >> I have been looking at the examples and I have seen your db browser >> and also the custdb sample. >> >> The custdb sample has helped me to create the GUI and also to >> populate the fields from a csv file. I have a problem that the app >> does not refresh the list properly and was wondering if I should use >> sqllite instead. > Lance, > > a "dumb curiosity" question, if I may. Why would you use sqlite (or > any database) for this app ? > If what you are doing is displaying the current status, you shouldn't > need a db at all. > > On the other hand, if you have some other app filling in the db with > current status, while this one displays it - then it still sounds a > bit of an indirect path to use a db; if you want to explain the "big > picture" a bit more, we might be able to suggest a more direct technique. > > -- > Alex Tweedly http://www.tweedly.net > > > > -- > This message has been scanned for viruses and > dangerous content by *Red Armour MailScanner* > <http://www.redarmour.co.uk>, and is > believed to be clean. > > ------------------------------------------------------------------------ > > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.394 / Virus Database: 268.9.0/368 - Release Date: 16/06/2006 > > ------------------------------------------------------------------------ > > _______________________________________________ > Pythoncard-users mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncard-users > |
From: Bernie H. <ber...@ut...> - 2006-06-18 20:10:42
|
Hi Lance et al,=20 Your project sounds interesting and appears to be useful. Its a clear itch worth scratching. =20 But I have to =8Cpoll the audience=B9 on this one (particularly in reference to portability). I have a couple of applications that I use on windows and mac= . The wxWidgets are not the same size on both platforms, and no doubt they ar= e sized slightly differently on linux (gnome / kde) as well. This is okay if = I have lots of space to play with, but one of the apps was a data entry application where I had to fit a LOT on one page. So basically, I ended up making a different resource file for windows or mac. This leads to 2 things: 1. how difficult is it to specify a different resource file (i.e. Does the resource file always have to be fileName.rsrc.py where fileName.py is the script).=20 2. Are there any general guidelines as to sizing? e.g. If you have enough space horizontally for a mac, you should be fine for windows (or vice versa).=20 I mean the app is portable in terms of function, but for me its still tied to the OS because of layout issues. Take care, BERNiE I received a message from Lance Haig at approximately 6/17/06 5:25 AM. Abov= e is my reply. > Hi Alex, >=20 > This is how the original app works. You enter all the server names and > ipaddress for every Novell server on your network. > then you click the generate button and it creates a webpage that you can = host > anywhere. ( I add it to my desktop ) This page show the latest status of = the > servers with traffic lights that are linked to the servers web management > interface. >=20 > What the old app could not do was > 1. run on anything but windows ( I use Linux and Mac) written in VB > 2. import old pages to make changes (you had to recreate the page every t= ime > or edit the html) > 3. allow automatic upload to a Intranet. (we have junior types that monit= or > the systems and let us know when things go wrong) >=20 > These are the three things that prompted me to start looking for a langua= ge > that I could use to improve it. I tried PHP-GTK, PHP and then found > PythondCard. >=20 > At a later stage I want to look at perhaps doing a network scan (Using NM= AP) > to find servers so that you don't have to manually enter each server. > For small sites it is easy to do this but for us we have over 150 servers= . >=20 > So basically my new app should accomplish all this and be portable :-) >=20 > Not to optimistic I hope. >=20 > Lance >=20 > Alex Tweedly wrote: >> Lance Haig wrote: >>> =20 >>> I was going to build an app that generates a webpage to display server >>> status for Novell servers from a list of IP addresses and names. >>> I have been looking at the examples and I have seen your db browser and= also >>> the custdb sample. >>> =20 >>> The custdb sample has helped me to create the GUI and also to populate = the >>> fields from a csv file. I have a problem that the app does not refresh = the >>> list properly and was wondering if I should use sqllite instead. >>> =20 >> Lance, >> =20 >> a "dumb curiosity" question, if I may. Why would you use sqlite (or any >> database) for this app ? >> If what you are doing is displaying the current status, you shouldn't ne= ed a >> db at all. >> =20 >> On the other hand, if you have some other app filling in the db with cur= rent >> status, while this one displays it - then it still sounds a bit of an >> indirect path to use a db; if you want to explain the "big picture" a bi= t >> more, we might be able to suggest a more direct technique. >> =20 >> =20 --=20 |
From: Alex T. <al...@tw...> - 2006-06-18 22:42:24
|
No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.9.0/368 - Release Date: 16/06/2006 |