fopen() and open() in cpython

2019-08-13 Thread Windson Yang
After my investigation, I found Since Python maintains its own buffer when read/write files, the build-in python open() function will call the open() system call instead of calling standard io fopen() for caching. So when we read/write a file in Python, it would not call fopen(), fopen() only use

Re: MySQLdb for 3.6 on RHEL7

2019-08-13 Thread Inada Naoki
On Wed, Aug 14, 2019 at 4:10 AM Larry Martell wrote: > > > > And I was not able to get that from pip either, > > > as the install failed. I had to download the source, edit the site.cfg > > > file and build it. But I just found python36-mysql.x86_64 as a package > > > so I uninstalled mysqlclient

Re: Opening Python 3.8 in Visual Studio 2019

2019-08-13 Thread MRAB
On 2019-08-13 20:31, Moe Vyas wrote: Greetings. Can anyone please, tell me how to open Python 3.8 Interpreter in the Visual Studio 2019. I have downloaded both of these on my Windows laptop and now am struggling to make them work together!!? Have a read here: https://docs.microsoft.com/en-us/v

Re: Create multiple sqlite tables, many-to-many design

2019-08-13 Thread Rich Shepard
On Wed, 14 Aug 2019, MRAB wrote: The actual code is different. htbl, ttbl, jtbl, etc. Too short? Definitely! :-) Another thing you might want to avoid is naming something with what it is, e.g. "Trails_Table" (why not just "Trails"). Another reason to read Celko's 'SQL Programming Style.'

Re: Create multiple sqlite tables, many-to-many design

2019-08-13 Thread MRAB
On 2019-08-13 22:11, Dave via Python-list wrote: On 8/13/19 4:45 PM, MRAB wrote: On 2019-08-13 19:59, Chris Angelico wrote: On Wed, Aug 14, 2019 at 4:50 AM Dave via Python-list wrote: Some of the tables are related.  For example: Hiking_Table Trails_Table    Joining_Table

Re: Web framework for static pages

2019-08-13 Thread Morten W. Petersen
Hi "DL Neil". I find your argumentation combative and provoking. I have an ex that has made my life difficult for the last 6 years, blocking me from seeing my kids, she acts in a similar way. I don't have the time, energy or the will to bring more of that stuff into my life, so I won't reply to

Re: MySQLdb for 3.6 on RHEL7

2019-08-13 Thread Chris Angelico
On Wed, Aug 14, 2019 at 9:27 AM DL Neil wrote: > > On 14/08/19 6:14 AM, Chris Angelico wrote: > > That seems very odd. The mysqlclient binary might be just under a > > different name? I'm not familiar with RHEL, but on my Debian, there > > are packages like "mysql-server-5.7" and corresponding > >

Re: MySQLdb for 3.6 on RHEL7

2019-08-13 Thread DL Neil
On 14/08/19 6:14 AM, Chris Angelico wrote: On Wed, Aug 14, 2019 at 1:48 AM Larry Martell wrote: On Tue, Aug 13, 2019 at 9:59 AM Chris Angelico wrote: On Tue, Aug 13, 2019 at 11:33 PM Larry Martell wrote: I am trying to install MySQLdb (https://pypi.org/project/mysqlclient/) for python3.6

Re: Web framework for static pages

2019-08-13 Thread DL Neil
On 13/08/19 10:54 PM, Morten W. Petersen wrote: I was hoping to avoid testing a lot of different systems, spending time there. Sooner or later you have to make a decision - and be responsible for it to your clients. So that's why I'm asking here. People here are helpful. The more time yo

Re: Fwd: Startup problems

2019-08-13 Thread Cameron Simpson
On 13Aug2019 19:05, Vinayak Gopakumar wrote: dear developer, I'm having problems while starting IDLE 3.7.4. With this problem, I cannot finish my studies properly. The screenshot of the problem is attached to this mail. This list discards all attachments. A cut/paste of e

Re: How to plot a data including date and time?

2019-08-13 Thread Chris Angelico
On Wed, Aug 14, 2019 at 8:17 AM Rich Shepard wrote: > > On Tue, 13 Aug 2019, amirrezaheidary...@gmail.com wrote: > > > I have a .csv file, in first column I have date and hour, and in the > > second column I have energy use data. How can I make a bar chart with Date > > and time as the x axis and

Re: How to plot a data including date and time?

2019-08-13 Thread Rich Shepard
On Tue, 13 Aug 2019, amirrezaheidary...@gmail.com wrote: I have a .csv file, in first column I have date and hour, and in the second column I have energy use data. How can I make a bar chart with Date and time as the x axis and the energy use as the Y axis? First, find yourself a plotting prog

Re: Create multiple sqlite tables, many-to-many design

2019-08-13 Thread Dave via Python-list
On 8/13/19 5:46 PM, Rich Shepard wrote: On Tue, 13 Aug 2019, Rich Shepard wrote: Read Joe Celko's books, starting with his SQL Programming Guide, then SQL That should be SQL Programming Style Rich Rich, On my next trip to BN I'll see if they have them. That is long term though. Right n

How to plot a data including date and time?

2019-08-13 Thread amirrezaheidarysbu
I have a .csv file, in first column I have date and hour, and in the second column I have energy use data. How can I make a bar chart with Date and time as the x axis and the energy use as the Y axis? Thanks -- https://mail.python.org/mailman/listinfo/python-list

Re: Create multiple sqlite tables, many-to-many design

2019-08-13 Thread Rich Shepard
On Tue, 13 Aug 2019, Rich Shepard wrote: Read Joe Celko's books, starting with his SQL Programming Guide, then SQL That should be SQL Programming Style Rich -- https://mail.python.org/mailman/listinfo/python-list

Re: Create multiple sqlite tables, many-to-many design

2019-08-13 Thread Chris Angelico
On Wed, Aug 14, 2019 at 7:26 AM Dave via Python-list wrote: > Thanks for the note. I get the theory of MTM and the join table. It is > the implementation I don't get. Let me see if I can demonstrate my > confusion using pseudo code. > > def dbDataInsert(): > > sql_HikeInsert = """ INSERT I

Re: Create multiple sqlite tables, many-to-many design

2019-08-13 Thread Rich Shepard
On Tue, 13 Aug 2019, Dave via Python-list wrote: I do indeed. I did that so it was easy for everyone to follow. Having started with assm. and C, I have to remind myself to be more explanatory in naming. Guess I over-did it. The actual code is different. htbl, ttbl, jtbl, etc. Too short? Dave,

Re: Create multiple sqlite tables, many-to-many design

2019-08-13 Thread Dave via Python-list
On 8/13/19 2:59 PM, Chris Angelico wrote: On Wed, Aug 14, 2019 at 4:50 AM Dave via Python-list wrote: Some of the tables are related. For example: Hiking_Table Trails_TableJoining_Table -- hike_id PK

Re: Create multiple sqlite tables, many-to-many design

2019-08-13 Thread Dave via Python-list
On 8/13/19 4:45 PM, MRAB wrote: On 2019-08-13 19:59, Chris Angelico wrote: On Wed, Aug 14, 2019 at 4:50 AM Dave via Python-list wrote: Some of the tables are related.  For example: Hiking_Table Trails_Table    Joining_Table -       

Re: Create multiple sqlite tables, many-to-many design

2019-08-13 Thread MRAB
On 2019-08-13 19:59, Chris Angelico wrote: On Wed, Aug 14, 2019 at 4:50 AM Dave via Python-list wrote: Some of the tables are related. For example: Hiking_Table Trails_TableJoining_Table -- hike_id PK

Opening Python 3.8 in Visual Studio 2019

2019-08-13 Thread Moe Vyas
Greetings. Can anyone please, tell me how to open Python 3.8 Interpreter in the Visual Studio 2019. I have downloaded both of these on my Windows laptop and now am struggling to make them work together!!? Thanks in advance. *Regards* *Moe Vyas* -- https://mail.python.org/mailman/listinfo/python-

Re: Web framework for static pages

2019-08-13 Thread Joel Goldstick
On Tue, Aug 13, 2019 at 4:12 PM Morten W. Petersen wrote: > > Hi Joel. > > I don't disagree with what you're saying, but is there a documented way of > making Django produce a neat set of static pages? > > It would be nice to use a web application framework to create pages, because > it would af

Re: Web framework for static pages

2019-08-13 Thread Morten W. Petersen
Hi Joel. I don't disagree with what you're saying, but is there a documented way of making Django produce a neat set of static pages? It would be nice to use a web application framework to create pages, because it would after that be easy to add a little bit of logic if a customer wants it. A con

Re: MySQLdb for 3.6 on RHEL7

2019-08-13 Thread Larry Martell
On Tue, Aug 13, 2019 at 2:16 PM Chris Angelico wrote: > > On Wed, Aug 14, 2019 at 1:48 AM Larry Martell wrote: > > > > On Tue, Aug 13, 2019 at 9:59 AM Chris Angelico wrote: > > > > > > On Tue, Aug 13, 2019 at 11:33 PM Larry Martell > > > wrote: > > > > > > > > I am trying to install MySQLdb (h

Re: Web framework for static pages

2019-08-13 Thread Joel Goldstick
On Tue, Aug 13, 2019 at 2:46 PM DL Neil wrote: > > On 14/08/19 2:26 AM, Grant Edwards wrote: > > On 2019-08-13, Jon Ribbens via Python-list wrote: > > > >> If it's really that small then it sounds like what you are looking for > >> is known as a "text editor". > > > > Bah. Kids these days. > > >

Re: Create multiple sqlite tables, many-to-many design

2019-08-13 Thread Chris Angelico
On Wed, Aug 14, 2019 at 4:50 AM Dave via Python-list wrote: > Some of the tables are related. For example: > > Hiking_Table Trails_TableJoining_Table > -- > hike_id PK trail_id PKhik

Create multiple sqlite tables, many-to-many design

2019-08-13 Thread Dave via Python-list
Oops! Just posted this to the wrong newsgroup. Sorry!!! I'm doing a Python app that uses SQLite, and am stumbling on a few questions. I've read a lot of books and documentation, but two questions still allude me. Hope someone that

Re: Web framework for static pages

2019-08-13 Thread DL Neil
On 14/08/19 2:26 AM, Grant Edwards wrote: On 2019-08-13, Jon Ribbens via Python-list wrote: If it's really that small then it sounds like what you are looking for is known as a "text editor". Bah. Kids these days. $ cat > index.hmtl [roaring with laughter] Oh come now. Surely a per

Re: MySQLdb for 3.6 on RHEL7

2019-08-13 Thread Chris Angelico
On Wed, Aug 14, 2019 at 1:48 AM Larry Martell wrote: > > On Tue, Aug 13, 2019 at 9:59 AM Chris Angelico wrote: > > > > On Tue, Aug 13, 2019 at 11:33 PM Larry Martell > > wrote: > > > > > > I am trying to install MySQLdb (https://pypi.org/project/mysqlclient/) > > > for python3.6 on RHEL7. > > >

Re: Web framework for static pages

2019-08-13 Thread Brian Oney via Python-list
On August 13, 2019 4:00:30 PM GMT+02:00, "Morten W. Petersen" wrote: >Ok. Isn't it a bit splitting of hairs to talk about static site >generators >and their templates? > >Wouldn't a static site generator that can create a good, usable website >with little input be desirable? > >I could pick an

Re: MySQLdb for 3.6 on RHEL7

2019-08-13 Thread Larry Martell
On Tue, Aug 13, 2019 at 9:59 AM Chris Angelico wrote: > > On Tue, Aug 13, 2019 at 11:33 PM Larry Martell > wrote: > > > > I am trying to install MySQLdb (https://pypi.org/project/mysqlclient/) > > for python3.6 on RHEL7. > > > > When I import it, it fails: > > > > # python3.6 > > Python 3.6.8 (d

Re: Web framework for static pages

2019-08-13 Thread Jon Ribbens via Python-list
On 2019-08-13, Morten W. Petersen wrote: > Ok. Isn't it a bit splitting of hairs to talk about static site generators > and their templates? No, not even slightly. You appear to be thinking that static site generators come with a pre-made set of design templates, and as far as I am aware they gen

Re: Web framework for static pages

2019-08-13 Thread Morten W. Petersen
HMTL? Good you weren't in cat input after a newline. 😁 -Morten Blogging at http://blogologue.com Tweeting at https://twitter.com/blogologue On Instagram https://instagram.com/morphexx tir. 13. aug. 2019, 16.28 skrev Grant Edwards : > On 2019-08-13, Jon Ribbens via Python-list wrote: > > > If i

Fwd: Startup problems

2019-08-13 Thread Vinayak Gopakumar
-- Forwarded message - From: Vinayak Gopakumar Date: Tue, Aug 13, 2019 at 5:53 AM Subject: Startup problems To: dear developer, I'm having problems while starting IDLE 3.7.4. With this problem, I cannot finish my studies properly. The screenshot of the prob

Research Invitation for OSS Community. Many thanks!

2019-08-13 Thread Sophy Guo
Dear Python Community Members, I am a master student based in the University of Leeds (UK), currently conducting a research in regards to investigating how open source software community culture, governance and structure, motivation of participation influence the innovation capability of OSS com

Re: Web framework for static pages

2019-08-13 Thread Grant Edwards
On 2019-08-13, Jon Ribbens via Python-list wrote: > If it's really that small then it sounds like what you are looking for > is known as a "text editor". Bah. Kids these days. $ cat > index.hmtl -- Grant Edwards grant.b.edwardsYow! My vaseline is

Re: Web framework for static pages

2019-08-13 Thread Morten W. Petersen
Ok. Isn't it a bit splitting of hairs to talk about static site generators and their templates? Wouldn't a static site generator that can create a good, usable website with little input be desirable? I could pick and choose CSS templates, HTML templates and write some of my own, but that takes qu

Re: Web framework for static pages

2019-08-13 Thread Morten W. Petersen
Ok, will take a look at those. -Morten Blogging at http://blogologue.com Tweeting at https://twitter.com/blogologue On Instagram https://instagram.com/morphexx tir. 13. aug. 2019, 14.39 skrev Jan Erik Moström : > On 13 Aug 2019, at 12:54, Morten W. Petersen wrote: > > > I was hoping to avoid te

Re: MySQLdb for 3.6 on RHEL7

2019-08-13 Thread Chris Angelico
On Tue, Aug 13, 2019 at 11:33 PM Larry Martell wrote: > > I am trying to install MySQLdb (https://pypi.org/project/mysqlclient/) > for python3.6 on RHEL7. > > When I import it, it fails: > > # python3.6 > Python 3.6.8 (default, Jun 11 2019, 15:15:01) > [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on li

Re: MySQLdb for 3.6 on RHEL7

2019-08-13 Thread Larry Martell
On Tue, Aug 13, 2019 at 9:43 AM Inada Naoki wrote: > > Why do you use RHEL? That is not my choice. > I believe people use RHEL to get support from Red Hat, instead of community > support. I do not believe Red Hat supports this package. > > 2019年8月13日(火) 22:32 Larry Martell : >> >> I am trying

Re: MySQLdb for 3.6 on RHEL7

2019-08-13 Thread Inada Naoki
Why do you use RHEL? I believe people use RHEL to get support from Red Hat, instead of community support. 2019年8月13日(火) 22:32 Larry Martell : > I am trying to install MySQLdb (https://pypi.org/project/mysqlclient/) > for python3.6 on RHEL7. > > When I import it, it fails: > > # python3.6 > Pytho

MySQLdb for 3.6 on RHEL7

2019-08-13 Thread Larry Martell
I am trying to install MySQLdb (https://pypi.org/project/mysqlclient/) for python3.6 on RHEL7. When I import it, it fails: # python3.6 Python 3.6.8 (default, Jun 11 2019, 15:15:01) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux Type "help", "copyright", "credits" or "license" for more informati

Re: About the #python irc channel on freenode.

2019-08-13 Thread Calvin Spealman
The #python channel only allows registered Freenode users in. You can learn about registration on Freenode here: https://freenode.net/kb/answer/registration Once you've got a registered account you can join #python and should find many helpful people ready to help you. On Mon, Aug 12, 2019 at 8:0

Re: Web framework for static pages

2019-08-13 Thread Jon Ribbens via Python-list
On 2019-08-13, Morten W. Petersen wrote: > Ideally I'd want a static site generator that makes it easy and quick to > create a website which is pretty, accessible, works across browsers and > standards compliant and doesn't freeze the browser on a low-end phone. That isn't what they do. All those

Re: Web framework for static pages

2019-08-13 Thread Morten W. Petersen
I was hoping to avoid testing a lot of different systems, spending time there. So that's why I'm asking here. I don't need a guide to create a website, maybe a refresher on some topics. Ideally I'd want a static site generator that makes it easy and quick to create a website which is pretty, acc

Re: Web framework for static pages

2019-08-13 Thread Morten W. Petersen
Yes. Well, one of the ideas of the web is being able to create a website using simple tools like that. And I like that idea. And for one site, either small or very specialized and well-funded, that would be an OK choice. However, I want to offer customers websites that cover their needs, without

Re: Web framework for static pages

2019-08-13 Thread Morten W. Petersen
Right. That was a useful term, I've got some things to look at there. -Morten Blogging at http://blogologue.com Tweeting at https://twitter.com/blogologue On Instagram https://instagram.com/morphexx tir. 13. aug. 2019, 00.29 skrev Cameron Simpson : > On 13Aug2019 00:01, Morten W. Petersen wrot

Re: Web framework for static pages

2019-08-13 Thread DL Neil
On 13/08/19 10:01 AM, Morten W. Petersen wrote: On 12.08.2019 18:13, Brian Oney wrote: On August 12, 2019 9:14:55 AM GMT+02:00, morphex wrote: Hi. What frameworks are there for generating static web pages in Python? I have used: https://github.com/Frozen-Flask/Frozen-Flask It's pretty simple.