[issue32520] error writing to file in binary mode - python 3.6.3

2018-01-08 Thread jeff deifik
New submission from jeff deifik <j...@jeffunit.com>: I am running python 3.6.3 on cygwin / windows. Here is a test program to demonstrate the bug: #!/usr/bin/env python3 fp = open("bug_out.txt", "ab") buff = 'Hello world' print('type of buff is', type(buff)) bin_

[issue11802] filecmp.cmp needs a documented way to clear cache

2011-06-06 Thread jeff deifik
jeff deifik j...@jeffunit.com added the comment: There are many possible solutions to this problem. Personally, I think mine is the simplest, though it changes the API. However, there have been several suggestions on simple fixes that don't change the API, all of which fix the resource leak

[issue11802] filecmp.cmp needs a documented way to clear cache

2011-04-07 Thread jeff deifik
New submission from jeff deifik j...@jeffunit.com: I have a program which calls filecmp.cmp a lot. It runs out of memory. I read the source to filecmp, and then I periodically set filecmp._cache = {} Without doing this, filecmp's cache uses up all the memory in the computer. There needs

[issue7405] compiling python 3.1.1 using cygwin 1.7.0 and gcc 4.3.4

2009-11-27 Thread jeff deifik
New submission from jeff deifik j...@jeffunit.com: In order to compile 3.1.1 with the cygwin environment, it was necessary to edit Modules/main.c after running configure There are a few tests that still fail when running 'make test', but overall, python 3.1.1 works fine. Included

[issue6909] python 3.1 - filecmp.cmp exception based on file name

2009-09-14 Thread jeff deifik
jeff deifik j...@jeffunit.com added the comment: Oops, you are correct, my mistake. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6909

[issue6909] python 3.1 - filecmp.cmp exception based on file name

2009-09-14 Thread jeff deifik
New submission from jeff deifik j...@jeffunit.com: I am calling filecmp.cmp on a two files, one of which has a name of './Julio_Iglesias-Un_Hombre_Solo-05-Qu\udce9_no_se_rompa_la_noche.mp3' I get an exception from filecmp.cmp saying: 'ascii' codec can't encode character '\udce9' in position

[issue6909] python 3.1 - filecmp.cmp exception based on file name

2009-09-14 Thread jeff deifik
jeff deifik j...@jeffunit.com added the comment: Forgive all the print statements. Here is the result of running this: floup:files are ['./Julio_Iglesias-Un_Hombre_Solo-05-Qu\udce9_no_se_rompa_la_noche.mp3', '/cygdrive/j/music/bea/Julio_Iglesias-Un_Hombre_Solo-05-Qu

[issue4571] write to stdout in binary mode - is it possible?

2008-12-07 Thread jeff deifik
jeff deifik [EMAIL PROTECTED] added the comment: I don't consider sys.stdout.buffer.write(b'abc') to be an acceptable solution. There are many programs that need to produce binary output with standard output. Consider uudecode and similar programs. There needs to be a standard, portable

[issue4588] Need a way to make my own bytes

2008-12-07 Thread jeff deifik
New submission from jeff deifik [EMAIL PROTECTED]: I want to make my own data of types bytes in order to write it out. For example, I want to write out the bytes 0..9 #!/usr/bin/env python3.0 foo = b'' for i in range (0,10): foo += i #sys.stdout.buffer.write(foo) Here is the error

[issue4588] Need a way to make my own bytes

2008-12-07 Thread jeff deifik
jeff deifik [EMAIL PROTECTED] added the comment: Doesn't work. #!/usr/bin/env python3.0 import sys foo = b'' for i in range (0,10): foo += bytes(i) sys.stdout.buffer.write(foo) produces a binary file of 45 bytes. Here is a hex dump (the '.' represent unprintable characters): +00000

[issue4571] write to stdout in binary mode - is it possible?

2008-12-06 Thread jeff deifik
New submission from jeff deifik [EMAIL PROTECTED]: I have a program that needs to output binary data to stdout. I don't want to convert it to a string. for example something like sys.stdout.write('0o377') to write a byte with all the bits turned on. When I try this, I get an error like

[issue4557] array('c') in python 3.0 produces error, doc says it is ok

2008-12-05 Thread jeff deifik
New submission from jeff deifik [EMAIL PROTECTED]: def char_sieve(): char_data = array('c') ... produces: File .../prime.py, line 78, in char_sieve char_data = array('c') ValueError: bad typecode (must be b, B, u, h, H, i, I, l, L, f or d) However, http://docs.python.org/3.0/library

[issue4534] problem with str.join

2008-12-04 Thread jeff deifik
New submission from jeff deifik [EMAIL PROTECTED]: I compiled python 3.0 on a cygwin platform. Here is my modest function: def List_to_String(lis): #return str.join(lis, '') # This is fast, but seems broke in 3.0 s = '' # This is really slow

[issue4534] problem with str.join - should work with list input, error says requires 'str' object

2008-12-04 Thread jeff deifik
Changes by jeff deifik [EMAIL PROTECTED]: -- title: problem with str.join - problem with str.join - should work with list input, error says requires 'str' object ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4534

[issue4534] problem with str.join - should work with list input, error says requires 'str' object

2008-12-04 Thread jeff deifik
jeff deifik [EMAIL PROTECTED] added the comment: Thanks. I want to learn what is wrong with the code I have though. My main goal is to understand python 3.0 better, rather than fixing a specific problem. ___ Python tracker [EMAIL PROTECTED] http