Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Syntax Highlighting in Text Editor
Post: RE: Syntax Highlighting in Text Editor

(Jun-09-2020, 06:45 PM)Larz60+ Wrote: use VSCode, it's automtic with extension. see: VS Code from start I think you have misunderstood my question?
ShakeyPakey GUI 4 2,125 Jun-09-2020, 06:47 PM
    Thread: Syntax Highlighting in Text Editor
Post: Syntax Highlighting in Text Editor

I am wondering if there is a way using the Python module tkinter to colour text, or do "syntax highlighting". I am making my own text editor using tkinter, and I want to check if the user types one of...
ShakeyPakey GUI 4 2,125 Jun-09-2020, 06:43 PM
    Thread: Indentation for Tkinter-made Text Editor
Post: RE: Indentation for Tkinter-made Text Editor

(Jun-08-2020, 11:42 AM)MianDoesCoding Wrote: Hey, So firstly i think that this is really cool for a project, but i found an error when running. With Box_title you put an = but with box_message there...
ShakeyPakey GUI 4 1,655 Jun-08-2020, 11:59 AM
    Thread: Indentation for Tkinter-made Text Editor
Post: Indentation for Tkinter-made Text Editor

Hello, there. I am writing my own programming language in Python, and along with it, my own text editor, made with the Tkinter module. I already have basic functionality set up, and it is very simila...
ShakeyPakey GUI 4 1,655 Jun-08-2020, 10:05 AM
    Thread: Change Text Size in Console?
Post: RE: Change Text Size in Console?

(Jun-03-2020, 07:49 AM)buran Wrote: (Jun-03-2020, 07:38 AM)ShakeyPakey Wrote: So, please, may you answer the question I had originally?Nope, I don't like when developers think they know better tha...
ShakeyPakey General Coding Help 8 3,475 Jun-03-2020, 08:18 AM
    Thread: Change Text Size in Console?
Post: RE: Change Text Size in Console?

(Jun-02-2020, 08:51 PM)buran Wrote: If user is not happy with the font or font size of their terminal output - they will change it. i.e. that is not a GUI made by you. In terminal it will print usin...
ShakeyPakey General Coding Help 8 3,475 Jun-03-2020, 07:38 AM
    Thread: Change Text Size in Console?
Post: RE: Change Text Size in Console?

(Jun-02-2020, 08:07 PM)buran Wrote: why would you want to mess with other people's settings of their terminal? I am changing the font size so my output is readable.
ShakeyPakey General Coding Help 8 3,475 Jun-02-2020, 08:20 PM
    Thread: Change Text Size in Console?
Post: Change Text Size in Console?

Hello, everyone! On Windows 10, I am creating a Python script, but the text output in the console is too tiny. I am aware that I can right-click on it, go to Properties, then Font, then change the si...
ShakeyPakey General Coding Help 8 3,475 Jun-02-2020, 07:58 PM
    Thread: random.choice() takes two positional arguments, but three were given.
Post: RE: random.choice() takes two positional arguments...

(May-31-2020, 12:36 PM)menator01 Wrote: Should use a list import random as rnd mylist = [] for i in range(10): mylist.append(i) print(rnd.choice(mylist)) print(rnd.choice(mylist)) print(rnd.choi...
ShakeyPakey General Coding Help 5 3,066 May-31-2020, 01:00 PM
    Thread: random.choice() takes two positional arguments, but three were given.
Post: random.choice() takes two positional arguments, bu...

Hello. In Python, I am using the random module. I have used the random.choice() method to randomly pick from two strings: import random variable = random.choice('string1','string2') pri...
ShakeyPakey General Coding Help 5 3,066 May-31-2020, 12:16 PM
    Thread: Ignore first few letters of a line when reading file.
Post: RE: Ignore first few letters of a line when readin...

The issue is solved. Thanks for everyone who has been part of this thread. Here is the solution: with open("file.txt",) as f: line = f.readline() # Line is read from file. In this example, the li...
ShakeyPakey General Coding Help 16 1,966 May-29-2020, 07:29 PM
    Thread: Ignore first few letters of a line when reading file.
Post: RE: Ignore first few letters of a line when readin...

(May-29-2020, 12:47 PM)buran Wrote: >>> spam = 'name=John' >>> spam 'name=John' >>> spam.split('=') ['name', 'John'] >>> spam.split('=')[1] 'John' >>> eg...
ShakeyPakey General Coding Help 16 1,966 May-29-2020, 01:25 PM
    Thread: Ignore first few letters of a line when reading file.
Post: RE: Ignore first few letters of a line when readin...

(May-29-2020, 11:25 AM)buran Wrote: show your code, as well as sample input file it may turn you can use configparser instead of parsing the file yourself (you can alsway split at '=')How am I able ...
ShakeyPakey General Coding Help 16 1,966 May-29-2020, 12:42 PM
    Thread: Ignore first few letters of a line when reading file.
Post: Ignore first few letters of a line when reading fi...

Hello, everybody! I have run into a spot of bother while writing my Python script and I am wondering if anyone can help me out. I am trying to read a text file using Python. That goes well and I am ...
ShakeyPakey General Coding Help 16 1,966 May-29-2020, 11:14 AM

User Panel Messages

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