Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Trouble with a context manager class made with dunders
Post: Trouble with a context manager class made with dun...

I am running Python 3.6.3 in Spyder 3.2 and getting Error:TypeError: object() takes no parameters at with ManagedFile('hello.txt') as f:class ManagedFile: def _init_(self, name): self.name...
Regulus General Coding Help 1 2,663 Jan-28-2018, 02:40 PM
    Thread: SyntaxError: EOL while scanning string literal on with open() statement
Post: RE: SyntaxError: EOL while scanning string literal...

Ah, thank you! Just needed to increase the font size in Spyder with Ctrl+.
Regulus General Coding Help 3 7,342 Jan-28-2018, 02:06 PM
    Thread: SyntaxError: EOL while scanning string literal on with open() statement
Post: SyntaxError: EOL while scanning string literal on ...

Hi! I am getting this error message in Python 3.6.3, using Spyder 3.2 in Anaconda 5.0.1 on Windows 7. ^ SyntaxError: EOL while scanning string literal The interpreter...
Regulus General Coding Help 3 7,342 Jan-28-2018, 02:41 AM
    Thread: Python book recommendations?
Post: Python book recommendations?

Hello, I am in search of a good Python book for a 6th grade student who knows Python basics. He knows how to make a function and pass variables into it, how to create variables, make a list, etc... An...
Regulus Tutorial Requests and Submissions 4 3,509 Jan-22-2018, 10:52 AM
    Thread: Is ::= a typo or actually an operator?
Post: Is ::= a typo or actually an operator?

I am running python 3.4, and trying to learn how to use the keyword assert. It's featured on the Pythong docs page https://docs.python.org/3/reference/simp...-statement, section 7.3. This line is giv...
Regulus General Coding Help 1 2,300 Jan-22-2018, 03:35 AM
    Thread: print floating point number
Post: RE: print floating point number

(Aug-14-2017, 12:01 AM)Larz60+ Wrote: Quote:My Windows 7 doesn't install anything I download from the internet. Why? What are your permissions? This sounds like a very restricted, or worse yet, corr...
Regulus General Coding Help 19 11,166 Aug-14-2017, 01:12 AM
    Thread: print floating point number
Post: RE: print floating point number

(Aug-12-2017, 11:07 PM)Regulus Wrote: Could the problem be my python environment? I code in Notepad++ and run the program at a DOS prompt. Here are the last few lines of my output with the new print...
Regulus General Coding Help 19 11,166 Aug-13-2017, 09:26 PM
    Thread: print floating point number
Post: RE: print floating point number

Quote:hbkmjr wrote: In cmd use the full path to the python 3.4 exe. C:\Users\path to\python3\python.exe yourpythonfile.py This works! But going to >>> by entering 'python3', then entering t...
Regulus General Coding Help 19 11,166 Aug-13-2017, 03:42 PM
    Thread: print floating point number
Post: RE: print floating point number

Well this is embarrassing. I installed Python 3.4 long ago and added its path to the Path Environment variable so I thought that was the version that was being used. When the program printed 2.7.5 as ...
Regulus General Coding Help 19 11,166 Aug-13-2017, 05:40 AM
    Thread: print floating point number
Post: RE: print floating point number

Could the problem be my python environment? I code in Notepad++ and run the program at a DOS prompt. Here are the last few lines of my output with the new print command you kindly provided: n = 496 an...
Regulus General Coding Help 19 11,166 Aug-12-2017, 11:07 PM
    Thread: print floating point number
Post: print floating point number

my question here I use python 3 and trying to print a floating point number. But python is giving me the number to only one decimal place. What do I need to do to get a number to at least 6 decimal pl...
Regulus General Coding Help 19 11,166 Aug-12-2017, 10:29 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020