Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: How is it possible to work with Python more regularly?
Post: How is it possible to work with Python more regula...
Hi, I want to separate my work from folder to folder. For example, pictures are in a separate folder, designs in a separate folder. But Python won't let me. Is there any other way to do this besides t... |
|
JgKSuperstar |
General Coding Help |
1 |
1,314 |
Jan-14-2022, 05:24 PM |
|
|
Thread: Preparing an Installation with Python
Post: RE: Preparing an Installation with Python
Thank you for your valuable response **heart** |
|
JgKSuperstar |
News and Discussions |
2 |
2,634 |
Nov-30-2021, 11:40 AM |
|
|
Thread: Preparing an Installation with Python
Post: Preparing an Installation with Python
Hi, I want to create a project in python and I want to make money from this project I am creating. The question I'm going to ask is; I don't want the customer to have access to the source codes of thi... |
|
JgKSuperstar |
News and Discussions |
2 |
2,634 |
Nov-27-2021, 01:12 PM |
|
|
Thread: Serializing Python data Correctly (JSON)
Post: RE: Serializing Python data Correctly (JSON)
(Nov-04-2021, 04:24 PM)bowlofred Wrote: You can't append to JSON data like a log file or a database. If you want to add data to it you need to:
* read in the existing data to a list or dict
* appen... |
|
JgKSuperstar |
General Coding Help |
4 |
2,084 |
Nov-04-2021, 07:31 PM |
|
|
Thread: Serializing Python data Correctly (JSON)
Post: RE: Serializing Python data Correctly (JSON)
Yes, I know that, and here's how I did it ;
def accountRegister(self, user: Account):
self.users.append(user)
self.saveToFile()
def saveToFile(self):
... |
|
JgKSuperstar |
General Coding Help |
4 |
2,084 |
Nov-04-2021, 05:20 PM |
|
|
Thread: Serializing Python data Correctly (JSON)
Post: Serializing Python data Correctly (JSON)
Hi, I want to store the users I created in the file named "asdsad". The first information is being processed correctly, but the second information is overwritten by the first information. I don't want... |
|
JgKSuperstar |
General Coding Help |
4 |
2,084 |
Nov-04-2021, 12:23 PM |
|
|
Thread: How can i fix json.decoder.JSONDecodeError ?
Post: RE: How can i fix json.decoder.JSONDecodeError ?
(Oct-30-2021, 10:18 PM)snippsat Wrote: (Oct-30-2021, 10:12 PM)squad Wrote: If the json file is not empty, the yes code does not give an errorIf start with empty file can not use json.load(file) on... |
|
JgKSuperstar |
General Coding Help |
9 |
4,597 |
Oct-30-2021, 11:23 PM |
|
|
Thread: How can i fix json.decoder.JSONDecodeError ?
Post: RE: How can i fix json.decoder.JSONDecodeError ?
If the json file is not empty, the yes code does not give an error |
|
JgKSuperstar |
General Coding Help |
9 |
4,597 |
Oct-30-2021, 10:12 PM |
|
|
Thread: How can i fix json.decoder.JSONDecodeError ?
Post: RE: How can i fix json.decoder.JSONDecodeError ?
(Oct-30-2021, 04:33 PM)snippsat Wrote: You don't show content of data.json.
Here is my test with a random validated json file.
data.json before:
{
"devDependencies": {
"eslint": "^6.8.0"... |
|
JgKSuperstar |
General Coding Help |
9 |
4,597 |
Oct-30-2021, 09:55 PM |
|
|
Thread: How can i fix json.decoder.JSONDecodeError ?
Post: RE: How can i fix json.decoder.JSONDecodeError ?
(Oct-30-2021, 12:16 PM)snippsat Wrote: file_data = json.load(file)When you do this file_data it's a dictionary.
Then on line-11 can not use .append as that method is only for list.
For dictionary ca... |
|
JgKSuperstar |
General Coding Help |
9 |
4,597 |
Oct-30-2021, 03:30 PM |
|
|
Thread: How can i fix json.decoder.JSONDecodeError ?
Post: RE: How can i fix json.decoder.JSONDecodeError ?
(Oct-30-2021, 11:21 AM)buran Wrote: Your current snippet raise different error
Error:Traceback (most recent call last):
File "***", line **, in <module>
write_json(y)
File "***", line... |
|
JgKSuperstar |
General Coding Help |
9 |
4,597 |
Oct-30-2021, 03:27 PM |
|
|
Thread: How can i fix json.decoder.JSONDecodeError ?
Post: How can i fix json.decoder.JSONDecodeError ?
Hello, how do I solve this problem?
import json
def write_json(new_date, filename='data.json'):
try:
with open(filename, 'r+') as file:
#First we load existing data ... |
|
JgKSuperstar |
General Coding Help |
9 |
4,597 |
Oct-30-2021, 11:06 AM |
|
|
Thread: How does this generator work?
Post: RE: How does this generator work?
Thank you so much for your valuable response. |
|
JgKSuperstar |
General Coding Help |
2 |
1,384 |
Sep-27-2021, 09:18 PM |
|
|
Thread: How does this generator work?
Post: How does this generator work?
code = "F9E56d"
rgb = tuple(int(code[i:i+2], 16) for i in (0, 2, 4))Hi, I don't quite understand the logic of this code.
Can you write me this code in a normal for loop so I can understand that? |
|
JgKSuperstar |
General Coding Help |
2 |
1,384 |
Sep-27-2021, 09:00 PM |
|
|
Thread: Turkish Character Prohibition
Post: RE: Turkish Character Prohibition
(Nov-06-2019, 09:29 PM)Cryptus Wrote: import re
password = input("Please type in your password : ")
tr_characters = re.search("ö|ç|ş|ü|ğ|ı|Ö|Ç|Ş|Ü|Ğ|İ", password)
for control in password:
if ... |
|
JgKSuperstar |
General Coding Help |
3 |
2,575 |
Nov-06-2019, 10:05 PM |
|
|
Thread: Turkish Character Prohibition
Post: Turkish Character Prohibition
Hi, i'm learning Python, but there are some places where I have problems. I would like to ban the use of Turkish characters. But Somewhere I'm making a mistake. How can I solve this problem?
My code ... |
|
JgKSuperstar |
General Coding Help |
3 |
2,575 |
Nov-06-2019, 07:58 PM |