[ANN] PyYAML-5.1b1: YAML parser and emitter for Python

2019-02-24 Thread Ingy dot Net
=== Announcing PyYAML-5.1b1 (First beta release) === The first beta release of PyYAML-5.1 has been uploaded to pypi.org. The final release is expected to land in the next 2 weeks. Normally we would only announce the final release, but this one has been a lo

Re: how to setup for localhost:8000

2019-02-24 Thread Cameron Simpson
On 24Feb2019 19:00, 0x906 wrote: I am working on window 7 and Python 3.5 to setup a localhost:8000 but it did not get through as shown below: python -m http.server Serving HTTP on 0.0.0.0 port 8000 ... But it did not show the results. Can someone help me how to setup the localhost? There is

Re: how to setup for localhost:8000

2019-02-24 Thread 0x906 via Python-list
There is a chance that I missed something with the 0.0.0.0. but I am pretty sure that the localhost IP is 127.0.0.1. > On Feb 24, 2019, at 6:13 PM, nathanntkou...@gmail.com wrote: > > On Thursday, April 14, 2016 at 1:47:03 PM UTC-4, wrh...@gmail.com wrote: >> Hi, >> >> I am working on window

Re: how to setup for localhost:8000

2019-02-24 Thread nathanntkou123
On Thursday, April 14, 2016 at 1:47:03 PM UTC-4, wrh...@gmail.com wrote: > Hi, > > I am working on window 7 and Python 3.5 to setup a localhost:8000 but it did > not get through as shown below: > > python -m http.server > Serving HTTP on 0.0.0.0 port 8000 ... > > But it did not show the results.

Re: How to format a datetime MySQL database field to local using strftime()

2019-02-24 Thread DL Neil
Vergos, On 25/02/19 11:53 AM, vergos.niko...@gmail.com wrote: Τη Δευτέρα, 25 Φεβρουαρίου 2019 - 12:38:43 π.μ. UTC+2, ο χρήστης vergos@gmail.com έγραψε: Τη Κυριακή, 24 Φεβρουαρίου 2019 - 8:52:03 μ.μ. UTC+2, ο χρήστης DL Neil έγραψε: Vergos, Please provide more information and show how you

Re: How to format a datetime MySQL database field to local using strftime()

2019-02-24 Thread vergos . nikolas
Τη Δευτέρα, 25 Φεβρουαρίου 2019 - 12:38:43 π.μ. UTC+2, ο χρήστης vergos@gmail.com έγραψε: > Τη Κυριακή, 24 Φεβρουαρίου 2019 - 8:52:03 μ.μ. UTC+2, ο χρήστης DL Neil > έγραψε: > > Vergos, > > > > Please provide more information and show how you've debugged the code so > > far... > > > > > >

Re: How to format a datetime MySQL database field to local using strftime()

2019-02-24 Thread vergos . nikolas
Τη Κυριακή, 24 Φεβρουαρίου 2019 - 8:52:03 μ.μ. UTC+2, ο χρήστης DL Neil έγραψε: > Vergos, > > Please provide more information and show how you've debugged the code so > far... > > > On 25/02/19 7:03 AM, vergos.niko...@gmail.com wrote: > > pymydb.execute( '''SELECT host, ref, location, useros, b

Re: Dictionary

2019-02-24 Thread MRAB
On 2019-02-24 04:21, Himanshu Yadav wrote: fibs={0:0,1:1} def rfib(n): global fibs if not fibs.get(n): fibs[n]=rfib(n-2)+rfib(n-1) return fibs[n] Why it is gives error?? What error? -- https://mail.python.org/mailman/listinfo/python-list

Re: Dictionary

2019-02-24 Thread Peter Otten
Himanshu Yadav wrote: > fibs={0:0,1:1} > def rfib(n): > global fibs >if not fibs.get(n): > fibs[n]=rfib(n-2)+rfib(n-1) > return fibs[n] Please use cut and paste to make sure you are not introducing new errors like the inconsistent indentation above. > Why

Dictionary

2019-02-24 Thread Himanshu Yadav
fibs={0:0,1:1} def rfib(n): global fibs if not fibs.get(n): fibs[n]=rfib(n-2)+rfib(n-1) return fibs[n] Why it is gives error?? -- https://mail.python.org/mailman/listinfo/python-list

Re: How to format a datetime MySQL database field to local using strftime()

2019-02-24 Thread DL Neil
Vergos, Please provide more information and show how you've debugged the code so far... On 25/02/19 7:03 AM, vergos.niko...@gmail.com wrote: pymydb.execute( '''SELECT host, ref, location, useros, browser, visits, hits, downloads, authuser FROM guests

Re: tkinter: variable width widgets in a grid?

2019-02-24 Thread Rich Shepard
On Sun, 24 Feb 2019, Wildman via Python-list wrote: The height and width can be specified in the command that creates the wedget. Wildman, I thought so, but these were not mentioned in Alan Moore's book which is my reference for learning tkinter. Thus, my second question: What's a good reso

Re: tkinter: variable width widgets in a grid?

2019-02-24 Thread Rich Shepard
On Sun, 24 Feb 2019, Paul Sutton wrote: Not sure if this is helpful. I wrote a small application in python-tk, and you can indeed do this ... Paul, Thank you. Regards, Rich -- https://mail.python.org/mailman/listinfo/python-list

Re: tkinter: variable width widgets in a grid?

2019-02-24 Thread Wildman via Python-list
On Sun, 24 Feb 2019 09:09:22 -0800, Rich Shepard wrote: > When placing widgets (e.g., Entry, Spinbox) in a grid layout can a length > (visible width) be specified? For example, a telephone extension is a shorter > string than the number itself. The height and width can be specified in the command

How to format a datetime MySQL database field to local using strftime()

2019-02-24 Thread vergos . nikolas
pymydb.execute( '''SELECT host, ref, location, useros, browser, visits, hits, downloads, authuser FROM guests WHERE pagesID = (SELECT ID FROM pages WHERE url = %s) ORDER BY visits DESC''', page ) data = pymydb.fetchall() for visit in visits:

Re: tkinter: variable width widgets in a grid?

2019-02-24 Thread Paul Sutton
On 24/02/2019 17:09, Rich Shepard wrote: > When placing widgets (e.g., Entry, Spinbox) in a grid layout can a length > (visible width) be specified? For example, a telephone extension is a > shorter > string than the number itself. > > What's a good resource (other than this mail list) for such qu

tkinter: variable width widgets in a grid?

2019-02-24 Thread Rich Shepard
When placing widgets (e.g., Entry, Spinbox) in a grid layout can a length (visible width) be specified? For example, a telephone extension is a shorter string than the number itself. What's a good resource (other than this mail list) for such questions? TIA, Rich -- https://mail.python.org/mail

Re: Best way to (re)load test data in Mongo DB

2019-02-24 Thread Nagy László Zsolt
  Hello! We have a system where we have to create an exact copy of the original database for testing. The database size is over 800GB. We have found that using zfs snapshots and zfs clone is the best option. In order to do this, you have to enable journaling in mongodb. Then you can take a snap

Re: Best way to (re)load test data in Mongo DB

2019-02-24 Thread Martin Sand Christensen
breamore...@gmail.com writes: > I was going to suggest mocking. I'm no expert so I suggest that you > search for "python test mock database" and go from there. Try to run > tests with a real db and you're likely to be at it until domesday. Mocking is definitely the order of the day for most tests,