Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
for lin in openfile:
#4
what if i am not the one doing the open? the file is already open. it might be stdin. it might be passed by a call to this code. it might be returned from a function call.

is there a change_encoding() call that i could use instead of open()?

and it looks like Python3 still needs some more tweaks. the print() function complains about the "ascii" encoding if given a Unicode character to print on a platform that supports UTF-8, yet has no support for an encoding option to fix it.

Python3 is not ready for prime time (not that Python2 is even close).

i was moving over to Python3 fully, abandoning Python2. i think i need to cancel that plan.

Python3 needs to assume the world is Unicode/UTF-8 and deal with the few exceptions as special cases.

there should be a sys.encoding() function that sets a program-wide encoding for everything.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
for lin in openfile: - by Skaperen - Jun-27-2018, 03:41 AM
RE: for lin in openfile: - by buran - Jun-27-2018, 06:50 AM
RE: for lin in openfile: - by snippsat - Jun-27-2018, 09:14 AM
RE: for lin in openfile: - by Skaperen - Jun-27-2018, 10:02 PM
RE: for lin in openfile: - by snippsat - Jun-27-2018, 10:48 PM
RE: for lin in openfile: - by Skaperen - Jun-28-2018, 02:01 AM
RE: for lin in openfile: - by snippsat - Jun-28-2018, 12:47 PM
RE: for lin in openfile: - by DeaD_EyE - Jun-28-2018, 02:19 PM
RE: for lin in openfile: - by Skaperen - Jun-28-2018, 08:53 PM
RE: for lin in openfile: - by snippsat - Jun-28-2018, 09:42 PM
RE: for lin in openfile: - by Skaperen - Jun-28-2018, 11:36 PM
RE: for lin in openfile: - by snippsat - Jun-29-2018, 07:52 AM
RE: for lin in openfile: - by Skaperen - Jun-29-2018, 09:59 PM
RE: for lin in openfile: - by snippsat - Jun-30-2018, 12:07 PM
RE: for lin in openfile: - by Skaperen - Jun-30-2018, 05:47 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  combobox_callback(choice choice part of openfile name (kind of dependency) janeik 9 1,575 Sep-10-2023, 10:27 PM
Last Post: janeik

Forum Jump:

User Panel Messages

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