Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
  Information Thread: set time & date by user in tkinter
Post: RE: set time & date by user in tkinter

(Mar-07-2017, 01:10 PM)gray Wrote: how can a user set time & date in a tkinter window...please give me a link...i searched but i didn't find a suitable content... i am looking for a general code...
dudeisbrendan03 GUI 3 18,918 Mar-10-2017, 10:42 PM
    Thread: Having issues with open,write,read
Post: RE: Having issues with open,write,read

(Mar-10-2017, 09:58 PM)zivoni Wrote: You should remove code that does nothing to increase clarity. I guess that code that do something starts on line 18. You are opening same file twice (not a pro...
dudeisbrendan03 General Coding Help 11 7,799 Mar-10-2017, 10:02 PM
    Thread: Having issues with open,write,read
Post: RE: Having issues with open,write,read

(Mar-10-2017, 09:50 PM)wavic Wrote: Did you write this code? Again, in line 18 you are opening the file to read it. Without closing it, in line 26 you are opening it again to appending to it. You h...
dudeisbrendan03 General Coding Help 11 7,799 Mar-10-2017, 09:57 PM
    Thread: Having issues with open,write,read
Post: RE: Having issues with open,write,read

(Mar-10-2017, 09:40 PM)wavic Wrote: Yes, because in line 16 you are closing a file which is not open.I commented it out before I ran it before. Forgot to say that. Sorry. EDIT: Realised I commented...
dudeisbrendan03 General Coding Help 11 7,799 Mar-10-2017, 09:43 PM
    Thread: converting json to xml
Post: RE: converting json to xml

(Mar-10-2017, 09:36 PM)zivoni Wrote: Your json2xml function has wrong indentation on line 19 - return is inside for loop, so processing ends after parsing first member in dictionary. With that corre...
dudeisbrendan03 General Coding Help 6 23,461 Mar-10-2017, 09:40 PM
    Thread: Having issues with open,write,read
Post: RE: Having issues with open,write,read

(Mar-10-2017, 09:33 PM)wavic Wrote: How did you modify the code? When I removed line 9 it didnt detect the file and on line 12 I get an IO error, because python automatically closes the file.
dudeisbrendan03 General Coding Help 11 7,799 Mar-10-2017, 09:36 PM
    Thread: Having issues with open,write,read
Post: RE: Having issues with open,write,read

(Mar-10-2017, 09:22 PM)wavic Wrote: You must specify a file name as a parameter to open - open(f, 'r'). What does "f" contain? In line 6 - if my_file.is_file():. To check if something is a file if...
dudeisbrendan03 General Coding Help 11 7,799 Mar-10-2017, 09:31 PM
    Thread: converting json to xml
Post: RE: converting json to xml

(Mar-10-2017, 07:53 PM)pasi12 Wrote: Thanks for the tips I was able to install with pip but i am not sure where to put/link the python code in my code as you mentioned? what a bout a print statement...
dudeisbrendan03 General Coding Help 6 23,461 Mar-10-2017, 09:14 PM
    Thread: converting json to xml
Post: RE: converting json to xml

Python already allows you to convert from JSON into a native dict (using ''json'' or, in versions < 2.6, simplejson), so I found a library that converts native dicts into an XML string. https://git...
dudeisbrendan03 General Coding Help 6 23,461 Mar-10-2017, 07:07 PM
    Thread: Having issues with open,write,read
Post: Having issues with open,write,read

import sys import os import time from pathlib import Path my_file = Path("database.txt") print("I HIGHLY RECOMMEND USING DATABASE.TXT AS I HAVE NOT REWROTE THE SCRIPT TO ALWAYS USE THIS VALUE") f ...
dudeisbrendan03 General Coding Help 11 7,799 Mar-10-2017, 06:54 PM

User Panel Messages

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