Re: [Tutor] Python and DB
On 27/06/2019 22:20, Brave Heart via Tutor wrote: > I would like python to write to DB so I can from DB write on a webpage with > PHP... Yes, that's easy enough. Python supports access to many databases, do you have one in mind? If not the SQLite module that comes in the standard library is probably more than adequate for your needs. PHP has modules for reading SQLite too. If you are familiar with using databases in any other language the Python DBAPI should be easy to pick up. If you don;t know SQL then you might like the database topic in my tutorial(see below) -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Python and DB
On 27Jun2019 23:20, Brave Heart wrote: I have a little RSS program , I current the out are basically outputted on my screen, but I would like python to write to DB so I can from DB write on a webpage with PHP... Kinda like I want to run a news website .. See the "sqlite3" module with ships with Python. It creates a database in a local file and provides an SQL interface: https://docs.python.org/3/library/sqlite3.html#module-sqlite3 SQLite3 also has a command line tool for interactive access to the database; you might need to install that separately. For the web side you'd need an SQLite library for PHP, but I cannot believe that one does not exist. (Or you could also write your web application in Python instead of PHP.) Cheers, Cameron Simpson ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Python and DB
On 6/27/19 3:20 PM, Brave Heart via Tutor wrote: > I have a little RSS program , I current the out are basically outputted on my > screen, but I would like python to write to DB so I can from DB write on a > webpage with PHP... > > Kinda like I want to run a news website .. There doesn't seem to be a question here. Does this help in any way? https://docs.python.org/3.7/library/sqlite3.html ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
[Tutor] Python and DB
I have a little RSS program , I current the out are basically outputted on my screen, but I would like python to write to DB so I can from DB write on a webpage with PHP... Kinda like I want to run a news website .. Sent from Mail for Windows 10 ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Python WATable & DB
On 11/07/16 10:18, nitin chandra wrote: > Any body got experience in WATable + passing data from DB to JS / json > ... and if it is stretching it a bit .. has done it with python. Given that WATable is a (very impressive) JQuery table it's really pretty far off topic for this group(core Python language and library). You are far more likely to get responses on a JS/JQuery forum. I notice the WATable web site has a comment board, they can probably advise on the best sites to ask stuff. As for using one from Python, that's going to be in the web server domain and the json module in the standard library should be helpful, so if you have specific questions about json then feel free to ask more here. > Also, how do I pass link of employee images/photos. Assuming you have a json data structure containing employee data I'd expect there to be a link to an image file in there. Then when you want to display that it's just a matter of creating an tag somewhere on your page/table. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
[Tutor] Python WATable & DB
Hi All, Any body got experience in WATable + passing data from DB to JS / json ... and if it is stretching it a bit .. has done it with python. Also, how do I pass link of employee images/photos. I just posted the part of JS , which I believe is concerned with data to be displayed in the table. Really appreciate ... so close and still some way to go to insert DB. Thanks Nitin ==