Re: Unicode filenames

2019-12-07 Thread Peter Otten
Bob van der Poel wrote: > I have some files which came off the net with, I'm assuming, unicode > characters in the names. I have a very short program which takes the > filename and puts into an emacs buffer, and then lets me add information > to that new file (it's a poor man's DB). > > Next, I c

Re: Zipapp can't find sqlite db

2019-12-07 Thread dieter
Abdur-Rahmaan Janhangeer writes: > I'm using zipapp to include a gui + db > > __main__.py > dbs/ > file.db > > When packaging, the db is there. When querying through sqlalchemy, it says > can't open db file. Help appreciated! I am unsure what you mean with "packaging". If you mean "create a p

Vim settings for Python (was: tab replace to space 4)

2019-12-07 Thread Peter J. Holzer
On 2019-11-29 13:46:38 +0900, 황병희 wrote: > usally i write python code in gnu emacs on ubuntu 18.04 sometimes i > re-edit the code vim in same machine so often when i do run the code in > shell like as ./test.py i meet consol error -- which line wrong! > > so i am considering how can i replace all

Re: Vim settings for Python (was: tab replace to space 4)

2019-12-07 Thread Bev In TX
> On Dec 7, 2019, at 4:16 AM, Peter J. Holzer wrote: > > As an aside, to prevent vim from inserting tabs in the first place, set >expandtab >sw=4 > and maybe also >ts=4 > (The latter is very much a matter of taste. I don't unless I have to > edit code which already contains tabs inte

Re: Error getting data from website

2019-12-07 Thread Peter Otten
Michael Torrie wrote: > On 12/6/19 5:31 PM, DL Neil via Python-list wrote: >> If you read the HTML data that the REPL has happily splattered all over >> your terminal's screen (scroll back) (NB "soup" is easier to read than >> is "content"!) you will observe that what you saw in your web-browser i

Re: array and struct 64-bit Linux change in behavior Python 3.7 and 2.7

2019-12-07 Thread Peter J. Holzer
On 2019-12-05 09:27:43 +, Barry Scott wrote: > On 3 Dec 2019, at 01:50, Richard Damon wrote: > > On 12/2/19 4:25 PM, Barry Scott wrote: > > x=struct.pack('L',0x102030405) > > x > >> b'\x05\x04\x03\x02\x01\x00\x00\x00' > >> > >> Given I have exact control with b, h, i, and q but L is n

Re: array and struct 64-bit Linux change in behavior Python 3.7 and 2.7

2019-12-07 Thread Peter J. Holzer
On 2019-12-02 09:55:16 -0800, Rob Gaddi wrote: > The struct situation is, as you said, a bit different. I believe that with > the default native alignment @, you're seeing 4-byte data padded to an > 8-byte alignment, not 8-byte data. Nope. That's really an 8 byte long: Python 3.7.3 (default,

Re: Zipapp can't find sqlite db

2019-12-07 Thread Barry Scott
> On 7 Dec 2019, at 10:07, dieter wrote: > > Abdur-Rahmaan Janhangeer writes: >> I'm using zipapp to include a gui + db >> >> __main__.py >> dbs/ >>file.db >> >> When packaging, the db is there. When querying through sqlalchemy, it says >> can't open db file. Help appreciated! > > I am

Re: Unicode filenames

2019-12-07 Thread Barry Scott
> On 6 Dec 2019, at 18:17, Bob van der Poel wrote: > > I have some files which came off the net with, I'm assuming, unicode > characters in the names. I have a very short program which takes the > filename and puts into an emacs buffer, and then lets me add information to > that new file (it's

JavaScript Calculator Program

2019-12-07 Thread ferzan saglam
Hi People, I am working on a simple calculator which uses operands (+-*/). The program allows me to choose an operand and enter the first two values, but when it gets to doing the maths, it gives me an error on "console.log ("The result is ", res);" under the + operand. (error code reads: Println

Re: JavaScript Calculator Program

2019-12-07 Thread Chris Angelico
On Sat, Dec 7, 2019 at 11:21 PM ferzan saglam wrote: > > Hi People, I am working on a simple calculator which uses operands (+-*/). > The program allows me to choose an operand and enter the first two values, > but when it gets to doing the maths, it gives me an error on > "console.log ("The resu

Re: ImportError: No module named Adafruit_SSD1306 Update

2019-12-07 Thread Peter J. Holzer
On 2019-12-05 19:30:31 +, Rhodri James wrote: > On 05/12/2019 18:49, RobH wrote: > > TabError: inconsistent use of tabs and spaces in indentation > > The problem will be that you have a mix of tabs and spaces in your > indentation. This causes problems because some people don't think that the

Re: Vim settings for Python

2019-12-07 Thread 황병희
Hello Peter^^^ > As an aside, to prevent vim from inserting tabs in the first place, set > expandtab > sw=4 > and maybe also > ts=4 > (The latter is very much a matter of taste. I don't unless I have to > edit code which already contains tabs intended to be at a certain width.) Becaus

IOError: cannot open resource

2019-12-07 Thread RobH
When I run a python project with an oled display on a rasperry pi zero, it calls for the Minecraftia.ttf font. I have the said file in home/pi/.fonts/ I get this error: pi@raspberrypi:~/Downloads $ python interdisplay.py Traceback (most recent call last): File "interdisplay.py", line 220, in

Re: IOError: cannot open resource

2019-12-07 Thread Peter Otten
RobH wrote: > When I run a python project with an oled display on a rasperry pi zero, > it calls for the Minecraftia.ttf font. I have the said file in > home/pi/.fonts/ > > I get this error: > > pi@raspberrypi:~/Downloads $ python interdisplay.py > Traceback (most recent call last): >File "i

Re: IOError: cannot open resource

2019-12-07 Thread Dan Sommers
On 12/7/19 9:43 AM, RobH wrote: When I run a python project with an oled display on a rasperry pi zero, it calls for the Minecraftia.ttf font. I have the said file in home/pi/.fonts/ Do you mean /home/pi/.fonts (with a leading slash, an absolute path rather than a relative one)? Dan -- https:/

Re: Error getting data from website

2019-12-07 Thread Michael Torrie
On 12/7/19 3:53 AM, Peter Otten wrote: > > ... because Amazon doesn' like what you do. You can cheat or play by their > rules and use the API. Yup and although I have no love for Amazon, I can understand why they don't want bots on the site. Already they have enough trouble with bots buying up m

Re: IOError: cannot open resource

2019-12-07 Thread RobH
On 07/12/2019 16:04, Peter Otten wrote: RobH wrote: When I run a python project with an oled display on a rasperry pi zero, it calls for the Minecraftia.ttf font. I have the said file in home/pi/.fonts/ I get this error: pi@raspberrypi:~/Downloads $ python interdisplay.py Traceback (most rece

Re: IOError: cannot open resource

2019-12-07 Thread RobH
On 07/12/2019 16:00, Dan Sommers wrote: On 12/7/19 9:43 AM, RobH wrote: When I run a python project with an oled display on a rasperry pi zero, it calls for the Minecraftia.ttf font. I have the said file in home/pi/.fonts/ Do you mean /home/pi/.fonts (with a leading slash, an absolute path rat

Re: Unicode filenames

2019-12-07 Thread Bob van der Poel
On Sat, Dec 7, 2019 at 4:00 AM Barry Scott wrote: > > > > On 6 Dec 2019, at 18:17, Bob van der Poel wrote: > > > > I have some files which came off the net with, I'm assuming, unicode > > characters in the names. I have a very short program which takes the > > filename and puts into an emacs buf

Re: IOError: cannot open resource

2019-12-07 Thread Michael Torrie
On 12/7/19 9:48 AM, RobH wrote: > On 07/12/2019 16:00, Dan Sommers wrote: >> On 12/7/19 9:43 AM, RobH wrote: >>> When I run a python project with an oled display on a rasperry pi zero, >>> it calls for the Minecraftia.ttf font. I have the said file in >>> home/pi/.fonts/ >> >> Do you mean /home/pi/

Re: IOError: cannot open resource

2019-12-07 Thread RobH
On 07/12/2019 16:58, Michael Torrie wrote: On 12/7/19 9:48 AM, RobH wrote: On 07/12/2019 16:00, Dan Sommers wrote: On 12/7/19 9:43 AM, RobH wrote: When I run a python project with an oled display on a rasperry pi zero, it calls for the Minecraftia.ttf font. I have the said file in home/pi/.fon

stuck on time

2019-12-07 Thread RobH
I am trying to do this project on a pi zero: http://frederickvandenbosch.be/?p=1365 After overcoming a few errors, I now have the display working and the start of the code showing on the display, that being the time. It doesn't move on to the next part of the code ie, no rectangle drawn def d

Re: stuck on time

2019-12-07 Thread Karsten Hilbert
On Sat, Dec 07, 2019 at 05:48:00PM +, RobH wrote: What happens if your run this line: > current_time = time.strftime("%I:%M")<<< stays at this line in an interactive Python interpreter ? (after you define "time" appropriately) Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3B

Re: Developers are advised to purge these malicious packages

2019-12-07 Thread David Lowry-Duda
On Wed, Dec 04, 2019 at 07:17:58PM +0100, Christian Heimes wrote: > > At least the first pages are packaging files for Debian, Fedora, and > other Linux distributions. Downstream distributions provide a Python > > > > Attackers abuse the fact and try to typo-squat packages in hope that > somebod

SQLObject 3.8.0

2019-12-07 Thread Oleg Broytman
Hello! I'm pleased to announce version 3.8.0, the first stable release of branch 3.8 of SQLObject. What's new in SQLObject === Features * Add driver ``supersqlite``. Not all tests are passing so the driver isn't added to the list of default drivers. Minor featur

Re: stuck on time

2019-12-07 Thread RobH
On 07/12/2019 17:54, Karsten Hilbert wrote: On Sat, Dec 07, 2019 at 05:48:00PM +, RobH wrote: What happens if your run this line: current_time = time.strftime("%I:%M")<<< stays at this line in an interactive Python interpreter ? (after you define "time" appropriately) K

Re: stuck on time

2019-12-07 Thread Karsten Hilbert
On Sat, Dec 07, 2019 at 06:56:17PM +, RobH wrote: > > What happens if your run this line: > > > > > current_time = time.strftime("%I:%M")<<< stays at this line > > > > in an interactive Python interpreter ? > > > > (after you define "time" appropriately) > > The python code is in a t

Re: Unicode filenames

2019-12-07 Thread DL Neil via Python-list
On 8/12/19 5:50 AM, Bob van der Poel wrote: On Sat, Dec 7, 2019 at 4:00 AM Barry Scott wrote: On 6 Dec 2019, at 18:17, Bob van der Poel wrote: I have some files which came off the net with, I'm assuming, unicode characters in the names. I have a very short program which takes the filename and

Re: Vim settings for Python (was: tab replace to space 4)

2019-12-07 Thread Bill Campbell
On Sat, Dec 07, 2019, Peter J. Holzer wrote: >As an aside, to prevent vim from inserting tabs in the first place, set >expandtab >sw=4 >and maybe also >ts=4 Inserting a comment in the file like this makes thing easy. # vim: expandtab sw=4 ts=4 nows wm=0 Bill -- INTERNET: b...@cel

Re: stuck on time

2019-12-07 Thread RobH
On 07/12/2019 19:15, Karsten Hilbert wrote: On Sat, Dec 07, 2019 at 06:56:17PM +, RobH wrote: What happens if your run this line: current_time = time.strftime("%I:%M")<<< stays at this line in an interactive Python interpreter ? (after you define "time" appropriately)

Re: stuck on time

2019-12-07 Thread Karsten Hilbert
On Sat, Dec 07, 2019 at 08:38:20PM +, RobH wrote: > I have tried the code in Thonny and ran it Notice how I said "line", not "code". If you hope to debug anything you need to be precise. Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B -- https://mail.python.org/mailman/l

Re: Unicode filenames

2019-12-07 Thread Bob van der Poel
On Sat, Dec 7, 2019 at 12:47 PM DL Neil via Python-list < python-list@python.org> wrote: > On 8/12/19 5:50 AM, Bob van der Poel wrote: > > On Sat, Dec 7, 2019 at 4:00 AM Barry Scott > wrote: > >>> On 6 Dec 2019, at 18:17, Bob van der Poel wrote: > >>> > >>> I have some files which came off the n

Re: Unicode filenames

2019-12-07 Thread Chris Angelico
On Sun, Dec 8, 2019 at 8:33 AM Bob van der Poel wrote: > Yeah, heard all that before :) But, seriously, I wonder how many short > (less than 100 lines) programs there are out there written in py2 that will > not run in py3. Good thing py2 will still be available to be installed for > many, many ye

Re: stuck on time

2019-12-07 Thread RobH
On 07/12/2019 21:22, Karsten Hilbert wrote: On Sat, Dec 07, 2019 at 08:38:20PM +, RobH wrote: I have tried the code in Thonny and ran it Notice how I said "line", not "code". If you hope to debug anything you need to be precise. Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7

Re: IOError: cannot open resource

2019-12-07 Thread Python
RobH wrote: On 07/12/2019 16:04, Peter Otten wrote: RobH wrote: When I run a python project with an oled display on a rasperry pi zero, it calls for the Minecraftia.ttf font. I have the said file in home/pi/.fonts/ I get this error: pi@raspberrypi:~/Downloads $ python interdisplay.py Traceba

Re: stuck on time

2019-12-07 Thread Terry Reedy
On 12/7/2019 1:56 PM, RobH wrote:     current_time = time.strftime("%I:%M")<<< stays at this line in an interactive Python interpreter ? In IDLE on Windows with 3.7 and 3.9, time.strftime runs fine. >>> import time >>> time.strftime("%I:%M") '11:48' >>> current_time = time.strftime("%I:%