Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: How does the code run? My code wrong?
Post: How does the code run? My code wrong?

[attachment=731] Referring to the screenshot above, you can see the "print()" was excuted 2 times, although 1 time is expected. According to the results printed, the second time excution is expected...
jollydragon General Coding Help 0 1,745 Oct-10-2019, 06:24 AM
    Thread: offset can not be negative in File.seek()?
Post: RE: offset can not be negative in File.seek()?

Found the explaination on internet, and thank you again.
jollydragon General Coding Help 6 7,020 Sep-28-2019, 03:08 AM
    Thread: offset can not be negative in File.seek()?
Post: RE: offset can not be negative in File.seek()?

(Sep-27-2019, 07:01 PM)Gribouillis Wrote: The negative seek works if the file is opened in binary mode 'rb'. Thank you so much, it's really the root cause! May I know why it only works in "rb" mode?...
jollydragon General Coding Help 6 7,020 Sep-28-2019, 12:05 AM
    Thread: offset can not be negative in File.seek()?
Post: RE: offset can not be negative in File.seek()?

(Sep-27-2019, 11:46 AM)Gribouillis Wrote: What is csv_file ? csv_file = open("1.csv", "r") I don't want to use any additional module, saying "os", because it's a simple work to seek backward with ...
jollydragon General Coding Help 6 7,020 Sep-27-2019, 01:35 PM
    Thread: offset can not be negative in File.seek()?
Post: offset can not be negative in File.seek()?

It's intersting I can not put the "offset" to non-zero if I set the second parameter as "1" or "2" in file.seek(), and please refer to the below screenshot for more details. I don't believe it's a bu...
jollydragon General Coding Help 6 7,020 Sep-27-2019, 09:04 AM
    Thread: Label doesn't refresh
Post: RE: Label doesn't refresh

(Jul-12-2018, 12:21 PM)Larz60+ Wrote: And if it works in __init__ is what is the objection to keeping it there? It's still local to the class. Got it and thank you very much.
jollydragon GUI 7 7,013 Jul-13-2018, 05:55 AM
    Thread: Label doesn't refresh
Post: RE: Label doesn't refresh

(Jul-11-2018, 07:55 AM)Larz60+ Wrote: It doesn't have to be in __init__. This is a habit of mine as I tend to access from several methods, but it can be used in local scope. No, it doesn't work in l...
jollydragon GUI 7 7,013 Jul-12-2018, 07:23 AM
    Thread: Close Toplevel after clicking button
Post: RE: Close Toplevel after clicking button

(Jul-11-2018, 10:19 AM)wuf Wrote: Hi jollydragon Instead of partial you can of course also use the lambda function. wuf ;-) Thank you very much. You are right it works well too with Lambda. But ho...
jollydragon GUI 3 10,673 Jul-12-2018, 06:22 AM
    Thread: Close Toplevel after clicking button
Post: Close Toplevel after clicking button

After runing below code, got below error. How to colse the Toplevel window after clicking the button in my Python v3.6.5? Thanks for any help or suggestion. Error:_tkinter.TclError: bad window path ...
jollydragon GUI 3 10,673 Jul-11-2018, 07:14 AM
    Thread: Label doesn't refresh
Post: RE: Label doesn't refresh

(Jul-10-2018, 10:41 AM)Axel_Erfurt Wrote: it works by commenting the line # if len(absPath) > 40: absPath = ' ...%s' % absPath[-37:] There must be a problem with this line Thanks for ...
jollydragon GUI 7 7,013 Jul-11-2018, 03:18 AM
    Thread: Label doesn't refresh
Post: Label doesn't refresh

With below code, the label of directory path doesn't be refreshed correctly after I change the directory with "Ctrl+o". E.g. When you change it to "C:\", you can see the new label is displayed on ol...
jollydragon GUI 7 7,013 Jul-10-2018, 09:35 AM
    Thread: which PyPI to use for file and directory operations?
Post: RE: which PyPI to use for file and directory opera...

no one knows about it?
jollydragon GUI 2 2,763 Jun-14-2018, 03:24 AM
    Thread: which PyPI to use for file and directory operations?
Post: which PyPI to use for file and directory operation...

Please help suggest which PyPI can be the best for the purpose below: I want to create a graphic UI, there's a button to find a correct path, then read the files information in that path. then I can c...
jollydragon GUI 2 2,763 Jun-13-2018, 10:07 AM

User Panel Messages

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