[issue46960] Docs: Link from settrace to frame

2022-03-08 Thread Thomas Guettler
New submission from Thomas Guettler : https://docs.python.org/3.10/library/sys.html#sys.settrace > Trace functions should have three arguments: frame, event, and arg. frame is > the current stack frame. It would be super cool, if "current stack frame" could be a hyperlink to

[issue44684] Docs for mock.call

2021-07-20 Thread Thomas Guettler
New submission from Thomas Guettler : The docs for `mock.call` could get improved: https://docs.python.org/3/library/unittest.mock.html#call Up to now it is not clear how to access individual members of the call. Example: I want to check if the call used the kwarg "foo" with

[issue41755] Docs: Please remove `from distutils.core import setup`

2020-09-10 Thread Thomas Guettler
New submission from Thomas Guettler : Please remove this page or at least the code snippet containing `from distutils.core import setup` on this page: https://docs.python.org/3/distutils/setupscript.html There is the more up to date doc here: https://packaging.python.org/tutorials/packaging

[issue35275] Reading umask (thread-safe)

2018-11-19 Thread Thomas Guettler
New submission from Thomas Guettler : Up to now there is no thread way to read the umask in Python https://stackoverflow.com/questions/53227072/reading-umask-thread-safe You can use this pattern: current_umask = os.umask(0) # line1 os.umask(current_umask) # line2 return current_umask

[issue30948] Docs for __subclasses__(): Add hint that Python imports are lazy

2017-07-17 Thread Thomas Guettler
New submission from Thomas Guettler: AFAIK cls.__subclasses__() only returns the classes which the interpreter has already loaded. This means there can be more subclasses in modules where not imported by the current interpreter up to now. https://docs.python.org/3.7/library/stdtypes.html

[issue29612] TarFile.extract() suffers from hard links inside tarball

2017-03-10 Thread Thomas Guettler
Thomas Guettler added the comment: I have the same issue on Python 2.7.12 (Ubuntu 16.04) I tried to execute tartest.py. But I could not find a way how to create the tar which is needed for tartest.py. -- nosy: +guettli ___ Python tracker <

[issue26869] unittest longMessage docs

2016-10-10 Thread Thomas Guettler
Thomas Guettler added the comment: @Mariatta thank you very much. This update makes the docs easy to read and understand. Thank you :-) -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue26869] unittest longMessage docs

2016-04-28 Thread Thomas Guettler
Thomas Guettler added the comment: Thank you for understanding my concern. > The standard failure message for each *assert method* contains useful > information about the objects involved. For example the message from > assertEqual shows the repr of the two unequal objects. It i

[issue26869] unittest longMessage docs

2016-04-27 Thread Thomas Guettler
New submission from Thomas Guettler: The first message of the longMessage docs is confusing: https://docs.python.org/3/library/unittest.html#unittest.TestCase.longMessage > If set to True then This reads between the lines, that the default is False. But that was long ago in Pyth

[issue26817] Docs for StringIO should link to io.BytesIO

2016-04-21 Thread Thomas Guettler
New submission from Thomas Guettler: I think a warning at the top of StringIO docs is needed. And it should link to io.BytesIO. Maybe even deprecate StringIO and cStringIO in Python2? StringIO docs: https://docs.python.org/2/library/stringio.html io.BytesIO docs: https://docs.python.org/2

[issue25017] htmllib deprecated: Which library to use? Missing sane default in docs

2015-09-07 Thread Thomas Guettler
New submission from Thomas Guettler: At the top of the htmllib module: > Deprecated since version 2.6: The htmllib module has been removed in > Python 3. Source: https://docs.python.org/2/library/htmllib.html#module-htmllib Newcomers need more advice: Which library should be used?

[issue25017] htmllib deprecated: Which library to use? Missing sane default in docs

2015-09-07 Thread Thomas Guettler
Thomas Guettler added the comment: This issue is just about documentation. No code change is required for it. How to update the docs, to point to html.parser? -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue24941] classproperty

2015-08-26 Thread Thomas Guettler
New submission from Thomas Guettler: Quoting Guido van Rossum Aug 20 2015. Thread Properties for classes possible? https://mail.python.org/pipermail/python-ideas/2015-August/035354.html {{{ think it's reasonable to propose @classproperty as a patch to CPython. It needs to be C code. Not sure

[issue24259] tar.extractall() does not recognize unexpected EOF

2015-05-30 Thread Thomas Guettler
Thomas Guettler added the comment: With Python 3.4.0 you get an OSError if you try to extractall() the uploaded tar_which_is_cut.tar. That's nice. Seems like only 2.7 seems to be buggy. === python3 Python 3.4.0 (default, Apr 11 2014, 13:05:11) [GCC 4.8.2] on linux Type help, copyright

[issue24259] tar.extractall() does not recognize unexpected EOF

2015-05-29 Thread Thomas Guettler
Thomas Guettler added the comment: I thought about this again. It could be solved with the help of a ByteCountingStreamReader. With ByteCountingStreamReader I mean a wrapper around a stream like codescs.StreamReader. But the ByteCountingStreamReader should not changes the content, but just

[issue24259] tar.extractall() does not recognize unexpected EOF

2015-05-27 Thread Thomas Guettler
Thomas Guettler added the comment: Who has enough knowledge of the tarfile module to create a good patch? -- nosy: +guettli ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24259

[issue23625] load_module() docs: zipped eggs are not loaded.

2015-03-17 Thread Thomas Guettler
Thomas Guettler added the comment: The docs should be where new users look. I don't speak about several hundret words Where do you think new users look for documentation if they want a method which does find a module? -- ___ Python tracker

[issue23625] load_module() docs: zipped eggs are not loaded.

2015-03-17 Thread Thomas Guettler
Thomas Guettler added the comment: In this case I am wearing newbee user glasses. And with this glasses on my nose, I don't care for implementation. I am confused that imp module does not work like import foo. -- ___ Python tracker rep

[issue23625] load_module() docs: zipped eggs are not loaded.

2015-03-11 Thread Thomas Guettler
Thomas Guettler added the comment: Dear Bret Cannon, I don't ask for egg support in the imp module. I don't want to change the implemenation of imp.find_module() I just want to update the docs. Most people run a python version which supports loading zipped eggs. Please reopened this, since I

[issue18675] Daemon Threads can seg fault

2014-09-30 Thread Thomas Guettler
Thomas Guettler added the comment: What kind of patch do you want? Documentation patch or fixing the bug in the interpreter? I am not a native speaker, that's why I avoid documentation patches. For me, the issue is solved. It is documented in stackoverflow and here. Since Python2

[issue14102] argparse: add ability to create a man page

2014-06-11 Thread Thomas Guettler
Changes by Thomas Guettler guet...@thomas-guettler.de: -- nosy: -guettli ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14102 ___ ___ Python-bugs

[issue21495] Sane default for logging config

2014-05-18 Thread Thomas Guettler
Thomas Guettler added the comment: Just for the record. Here are the discussions about this topic on the python-ideas mailing list: https://mail.python.org/pipermail/python-ideas/2014-May/027839.html https://mail.python.org/pipermail/python-ideas/2014-May/027858.html

[issue21495] Sane default for logging config

2014-05-13 Thread Thomas Guettler
New submission from Thomas Guettler: Imagine you write a small console script which is implemented like a library. This tool has to do two things: the console script needs to configure the logging, and the library needs to use it. The library usage of logging it easy well documented

[issue21495] Sane default for logging config

2014-05-13 Thread Thomas Guettler
Thomas Guettler added the comment: Thank you for reading and replying. Yes, I wrote no concret proposal up to now. I have this solutions in mind: logging.config.defaultConfig() Related https://docs.python.org/2/library/logging.config.html Loading a python module

[issue20598] argparse docs: '7'.split() is confusing magic

2014-02-11 Thread Thomas Guettler
New submission from Thomas Guettler: I think the docs of argparse still contain confusing magic: parser.parse_args('7'.split()) You know what it does and I know it. But a lot of people new to Python, don't understand what this should be. Please use: parser.parse_args(['7']) Close

[issue5673] Add timeout option to subprocess.Popen

2013-11-18 Thread Thomas Guettler
Thomas Guettler added the comment: For Python 2.x there is a backport of the subprocess module of 3.x: https://pypi.python.org/pypi/subprocess32. It has the timeout argument for call() and pipe.wait(). -- ___ Python tracker rep...@bugs.python.org

[issue19039] sphinx search, result sorting

2013-09-17 Thread Thomas Guettler
New submission from Thomas Guettler: If you search for printf in the docs you get this result: http://docs.python.org/3.3/search.html?q=printfcheck_keywords=yesarea=default Please have a look at the first results. I guess most people don't want to see docs about PyOS_snprintf Most people

[issue1596321] KeyError at exit after 'import threading' in other thread

2013-08-07 Thread Thomas Guettler
Thomas Guettler added the comment: Only few people seem to use daemon threads. We do and see this problem often with Python 2.7. How difficult is it to get this fixed for 2.7? Is there a way to work around this problem? -- nosy: +guettli

[issue1856] shutdown (exit) can hang or segfault with daemon threads running

2013-08-07 Thread Thomas Guettler
Thomas Guettler added the comment: There are some examples to work around this for Python2: http://stackoverflow.com/questions/18098475/detect-interpreter-shut-down-in-daemon-thread -- nosy: +guettli ___ Python tracker rep...@bugs.python.org http

[issue18675] Daemon Threads can seg fault

2013-08-07 Thread Thomas Guettler
New submission from Thomas Guettler: This is a documentation bug: Since #1856 is not solved for Python2, it needs to be documented. Daemon Threads on Python2 can seg fault. Work arounds: http://stackoverflow.com/questions/18098475/detect-interpreter-shut-down-in-daemon-thread

[issue18336] codecs: Link to readline module (history) instead of fd.readline()

2013-07-01 Thread Thomas Guettler
New submission from Thomas Guettler: The documentation of codecs.readline() has a link to the readline module. That the same word with a total different meaning! http://docs.python.org/2/library/codecs.html?highlight=readline#codecs.StreamReader.readline The GNU readline module is about

[issue18337] codecs: StremReader readline() breaks on undocumented characters

2013-07-01 Thread Thomas Guettler
New submission from Thomas Guettler: The stream reader of codecs.open() breaks on undocumented characters: http://docs.python.org/2/library/codecs.html?highlight=codecs%20readline#codecs.StreamReader.readline import tempfile temp=tempfile.mktemp() fd=open(temp, 'wb') fd.write('abc\ndef\x85ghi

[issue14102] argparse: add ability to create a man page

2013-01-11 Thread Thomas Guettler
Changes by Thomas Guettler guet...@thomas-guettler.de: -- nosy: +guettli ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14102 ___ ___ Python-bugs

[issue16933] argparse: remove magic from examples

2013-01-11 Thread Thomas Guettler
New submission from Thomas Guettler: The current argparse documentation is not easy to read people new to python. http://docs.python.org/dev/library/argparse.html#choices {{{ current: parser.add_argument('foo', choices='abc') }}} Please make this more explicit: {{{ better: parser.add_argument

get date from email

2011-12-01 Thread Thomas Guettler
(date_tuple)) if date: ... # valid date found Somehow this looks too complicated. Any chance to integrate the datetime module into the email module? related: http://stackoverflow.com/questions/1790795/python-parsing-date-with-timezone-from-an-email -- Thomas Guettler, http://www.thomas

[issue13232] Logging: Unicode Error

2011-10-21 Thread Thomas Guettler
Changes by Thomas Guettler guet...@thomas-guettler.de: Added file: http://bugs.python.org/file23486/unicodedecodeerror-in-logging.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13232

[issue13232] Logging: Unicode Error

2011-10-21 Thread Thomas Guettler
Thomas Guettler guet...@thomas-guettler.de added the comment: I attached a testcase (unicodedecodeerror-in-logging.py). If the filesystemencoding is UTF-8 and the source code is encoded in latin1, then the logging fails. It happens because there is a German umlaut in the comment behind 1/0

[issue13232] Logging: Unicode Error

2011-10-20 Thread Thomas Guettler
New submission from Thomas Guettler guet...@thomas-guettler.de: In changeset fe6be0426e0d the format() method was changed. Unfortunately it does not catch all unicode decode errors. I think line 482 of logging/__init__.py should be modified: to this (add 'replace'): s = s

Re: HeaderParseError

2011-07-05 Thread Thomas Guettler
On 04.07.2011 13:20, Peter Otten wrote: Thomas Guettler wrote: On 04.07.2011 11:51, Peter Otten wrote: Thomas Guettler wrote: I get a HeaderParseError during decode_header(), but Thunderbird can display the name. from email.header import decode_header Hi, I created a ticket: http

[issue12489] email.errors.HeaderParseError if base64url is used

2011-07-05 Thread Thomas Guettler
Thomas Guettler guet...@thomas-guettler.de added the comment: I received this email. Here is the creator: X-Mailer: CommuniGate Pro MAPI Connector 1.52.53.10/1.53.10.1 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12489

HeaderParseError

2011-07-04 Thread Thomas Guettler
/usr/lib64/python2.6/email/header.py, line 101, in decode_header raise HeaderParseError email.errors.HeaderParseError How can I parse this in Python? Thomas Same question on Stackoverflow: http://stackoverflow.com/questions/6568596/headerparseerror-in-python -- Thomas Guettler, http

Re: HeaderParseError

2011-07-04 Thread Thomas Guettler
On 04.07.2011 11:51, Peter Otten wrote: Thomas Guettler wrote: I get a HeaderParseError during decode_header(), but Thunderbird can display the name. from email.header import decode_header decode_header('=?iso-8859-1?B?QW5tZWxkdW5nIE5ldHphbnNjaGx1c3MgU_xkcmluZzNwLmpwZw==?=') Traceback

[issue12489] email.errors.HeaderParseError if base64url is used

2011-07-04 Thread Thomas Guettler
New submission from Thomas Guettler guet...@thomas-guettler.de: from email.header import decode_header decode_header('=?iso-8859-1?B?QW5tZWxkdW5nIE5ldHphbnNjaGx1c3MgU_xkcmluZzNwLmpwZw==?=') Traceback (most recent call last): File stdin, line 1, in module File /usr/lib64/python2.6/email

[issue12489] email.errors.HeaderParseError if base64url is used

2011-07-04 Thread Thomas Guettler
Thomas Guettler guet...@thomas-guettler.de added the comment: This happens on Python3: root@ubuntu1004devel64:~# python3 Python 3.1.2 (r312:79147, Sep 27 2010, 09:57:50) [GCC 4.4.3] on linux2 Type help, copyright, credits or license for more information. from email.header import decode_header

Re: Is the Usenet to mailing list gateway borked?

2011-06-30 Thread Thomas Guettler
also my suggestion in news:5337093.9j7nak4...@pointedears.de. Hi, Who is responsible? I think in the past there were not many broken threads. I wonder what changed this. Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- http

coverage.py: Highlight hot spots in source code

2011-06-22 Thread Thomas Guettler
they don't have a nice HTML output for every python source file. Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- http://mail.python.org/mailman/listinfo/python-list

Re: best book about Webdesign with Django

2011-06-09 Thread Thomas Guettler
. I guess you need buy two books :-) Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- http://mail.python.org/mailman/listinfo/python-list

[issue11465] Set documentation: Link to wikipedia

2011-03-11 Thread Thomas Guettler
New submission from Thomas Guettler guet...@thomas-guettler.de: A link from http://docs.python.org/library/stdtypes.html#set.union to http://en.wikipedia.org/wiki/Union_%28set_theory%29 would help young people to understand sets. Of course it is the same for intersection(), difference

hashlib in one line

2010-11-29 Thread Thomas Guettler
Hi, I think it would be nice if you could use the hashlib in one line: hashlib.sha256().update('abc').hexdigest() Unfortunately update() returns None. Is there a way to convert a string to the hexdigest of sha256 in one line? Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E

Re: hashlib in one line

2010-11-29 Thread Thomas Guettler
Thank you, I was blind: See condensed: http://docs.python.org/library/hashlib.html Stefan Sonnenberg-Carstens wrote: Am 29.11.2010 14:50, schrieb Thomas Guettler: Hi, I think it would be nice if you could use the hashlib in one line: hashlib.sha256().update('abc').hexdigest

[issue10151] Docs: can globals() be updated?

2010-10-20 Thread Thomas Guettler
New submission from Thomas Guettler guet...@thomas-guettler.de: Hi, the documentation of globals() is missing a note if you can update the dictionary: http://docs.python.org/library/functions.html?highlight=globals#globals For locals() it is documented: http://docs.python.org/library

[issue10004] email/quoprimime.py Exception (with patch)

2010-10-01 Thread Thomas Guettler
New submission from Thomas Guettler guet...@thomas-guettler.de: I get the following traceback. I created a patch against email/quoprimime.py from SVN branch python2.7 File /usr/lib64/python2.6/email/header.py, line 93, in decode_header dec = email.quoprimime.header_decode(encoded) File

[issue10004] email/quoprimime.py Exception (with patch)

2010-10-01 Thread Thomas Guettler
Changes by Thomas Guettler guet...@thomas-guettler.de: Added file: http://bugs.python.org/file19081/broken-subject.msg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10004

[issue1982] Feature: extend strftime to accept milliseconds

2010-08-16 Thread Thomas Guettler
Thomas Guettler guet...@thomas-guettler.de added the comment: Yes, I think this can be closed, too. -- nosy: +guettli ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1982

[issue9427] logging.error('...', exc_info=True) should display upper frames, too

2010-08-05 Thread Thomas Guettler
Thomas Guettler guet...@thomas-guettler.de added the comment: Until exc_info=True prints the current stack, I use this pattern: import traceback logging.error(u's...\nStack: %s' % ( ''.join(traceback.format_stack())), exc_info=True

[issue1553375] Add traceback.print_full_exception()

2010-07-30 Thread Thomas Guettler
Changes by Thomas Guettler guet...@thomas-guettler.de: -- nosy: +guettli ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1553375 ___ ___ Python-bugs

[issue1553375] Add traceback.print_full_exception()

2010-07-30 Thread Thomas Guettler
Thomas Guettler guet...@thomas-guettler.de added the comment: It would be very nice if logging.info('...', exc_info=True) shows the calling/upper frames, too. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1553375

[issue9427] logging.error('...', exc_info=True) should display upper frames, too

2010-07-30 Thread Thomas Guettler
New submission from Thomas Guettler guet...@thomas-guettler.de: logging.error('...', exc_info=True) only displays the frames downward. But I often need the upper frames, to debug a problem. This example shows, that you don't see the upper frame in the stactrace. But that's information

[issue9427] logging.error('...', exc_info=True) should display upper frames, too

2010-07-30 Thread Thomas Guettler
Thomas Guettler guet...@thomas-guettler.de added the comment: Related: #1553375 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9427

[issue1553375] Add traceback.print_full_exception()

2010-07-30 Thread Thomas Guettler
Thomas Guettler guet...@thomas-guettler.de added the comment: Related #9427 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1553375

[issue9427] logging.error('...', exc_info=True) should display upper frames, too

2010-07-30 Thread Thomas Guettler
Thomas Guettler guet...@thomas-guettler.de added the comment: I tested it only on python 2.6. Can someone please look at more reset versions? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9427

Re: non-blocking IO EAGAIN on write

2010-07-26 Thread Thomas Guettler
John Nagle wrote: On 7/23/2010 1:45 AM, Thomas Guettler wrote: Hi, I use non-blocking io to check for timeouts. Sometimes I get EAGAIN (Resource temporarily unavailable) on write(). My working code looks like this. But I am unsure how many bytes have been written to the pipe if I get

non-blocking IO EAGAIN on write

2010-07-23 Thread Thomas Guettler
: raise Exception('Too many EAGAIN on write %s %s' % (cmd, exc), exc_info=True) Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- http://mail.python.org/mailman/listinfo/python-list

Re: Imports again...

2010-04-09 Thread Thomas Guettler
the file structure and imports to avoid problems like this in the future? Thanks in advance for any help, and I apologize for the broken link the other day. -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- http://mail.python.org/mailman/listinfo

crypto: verify external pkcs7 signature

2010-03-24 Thread Thomas Guettler
') try: print s.verify(p7, File(open(file))) except (M2Crypto.SMIME.PKCS7_Error, M2Crypto.SMIME.SMIME_Error), exc: print '%s failed: %s' % (file, str(exc).strip()) return False return True }}} -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli

Re: Parsing Email Headers

2010-03-12 Thread Thomas Guettler
something like this: message='\n'.join(connection.retr(msg_num)[1]) Your code: emailMessage = email.message_from_string(line) create an email object from only *one* line! You retrieve the whole message (you don't save bandwith), but maybe that's what you want. Thomas -- Thomas Guettler, http

Re: os.rename [Errno 31] Too many links

2010-03-10 Thread Thomas Guettler
this: ls -l /proc/PID/fd/ But I guess it is a limitation of your filesystem. What do you use? I once had this problem with ext2. It has a low limit for subdirectories. With xfs the limits are much greater. Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas

[issue5115] Extend subprocess.kill to be able to kill process groups

2010-01-20 Thread Thomas Guettler
Changes by Thomas Guettler guet...@thomas-guettler.de: -- nosy: +guettli ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5115 ___ ___ Python-bugs

SMTPException: No suitable authentication method found (Server: Microsoft ESMTP MAIL Service)

2010-01-14 Thread Thomas Guettler
The same happens if I use TLS. Any hints? Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- http://mail.python.org/mailman/listinfo/python-list

[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2009-12-02 Thread Thomas Guettler
Changes by Thomas Guettler guet...@thomas-guettler.de: -- nosy: +guettli ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1100942 ___ ___ Python-bugs

'classmethod' object has only read-only attributes

2009-11-25 Thread Thomas Guettler
, in module class Foo(object): File /home/user/tmp/t.py, line 5, in Foo bar.myattr='test' TypeError: 'classmethod' object has only read-only attributes (assign to .myattr) -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- http://mail.python.org

[issue5673] Add timeout option to subprocess.Popen

2009-11-17 Thread Thomas Guettler
Changes by Thomas Guettler guet...@thomas-guettler.de: -- nosy: +guettli ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5673 ___ ___ Python-bugs

[issue3244] multipart/form-data encoding

2009-11-03 Thread Thomas Guettler
Changes by Thomas Guettler guet...@thomas-guettler.de: -- nosy: +guettli ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3244 ___ ___ Python-bugs

Re: PyGTK problems after Linux update...

2009-08-28 Thread Thomas Guettler
Looks like your pygtk package does not fit to the installed python package. from glib._glib import * ImportError: /usr/lib/python2.6/site-packages/gtk-2.0/glib/_glib.so: undefined symbol: PyUnicodeUCS4_DecodeUTF8 -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail

Re: best way to display photos

2009-08-25 Thread Thomas Guettler
that I've missed? Thanks. -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- http://mail.python.org/mailman/listinfo/python-list

Re: os.popen output different from native shell output

2009-08-25 Thread Thomas Guettler
from the shell (not via python). I display the ouput via python by using the print function on the variable that accepts the os.popen ().read() function. ... Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- http://mail.python.org/mailman

Re: os.popen output different from native shell output

2009-08-25 Thread Thomas Guettler
In one of the first chapters of Advanced programming in the unix environment (second edition) there is explained how a unix shell works. You could write you own shell using python. This way the python interpreter gets stared only once, and not for every call to ls. Have fun, Thomas nickname

Re: Workflow Libraries (DB vs Code)

2009-07-22 Thread Thomas Guettler
Diez B. Roggisch schrieb: Thomas Guettler wrote: Hi, I need to write some simple workflows with web interface. For the web stuff I will use django, but I am not sure how to do the workflow part. Did you consider using OpenERP? It comes with a web-frontend (TG1.0.8-based), but also

Re: Mutable Strings - Any libraries that offer this?

2009-07-21 Thread Thomas Guettler
not be difficult to implement this as a class with all fancy methods like startswith() ... Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- http://mail.python.org/mailman/listinfo/python-list

Workflow Libraries (DB vs Code)

2009-07-21 Thread Thomas Guettler
python. Feedback welcome, Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- http://mail.python.org/mailman/listinfo/python-list

Re: logging of strings with broken encoding

2009-07-03 Thread Thomas Guettler
Stefan Behnel schrieb: Thomas Guettler wrote: My quick fix is this: class MyFormatter(logging.Formatter): def format(self, record): msg=logging.Formatter.format(self, record) if isinstance(msg, str): msg=msg.decode('utf8', 'replace') return msg

logging of strings with broken encoding

2009-07-02 Thread Thomas Guettler
, 'backslashreplace') would be better here. What do you think? Should I fill a bugreport? Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- http://mail.python.org/mailman/listinfo/python-list

Re: logging of strings with broken encoding

2009-07-02 Thread Thomas Guettler
. Thomas Thomas Guettler schrieb: Hi, I have bug in my code, which results in the same error has this one: ... -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- http://mail.python.org/mailman/listinfo/python-list

Re: Advanced Python books?

2009-05-19 Thread Thomas Guettler
tkinter, qt or gtk again it would be hard to put something useable into one chapter. Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- http://mail.python.org/mailman/listinfo/python-list

[issue6051] smtplib docs should link to email module examples

2009-05-18 Thread Thomas Guettler
New submission from Thomas Guettler guet...@thomas-guettler.de: On smtplib example: http://docs.python.org/library/smtplib.html#smtp-example should be a link to: http://docs.python.org/library/email-examples.html I think the smtplib example is bad, since the email gets created with a string

Re: file locking...

2009-03-02 Thread Thomas Guettler
. So.. Any thoughts/pointers/comments would be greatly appreciated. Any pointers to academic research, etc.. would be useful. thanks -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- http://mail.python.org/mailman/listinfo/python-list

Re: OT: handling multiple software repositories

2009-02-27 Thread Thomas Guettler
like it is not ready for public. But it looks promising. Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- http://mail.python.org/mailman/listinfo/python-list

OT: handling multiple software repositories

2009-02-26 Thread Thomas Guettler
://trac.edgewall.org/wiki/MultipleRepositorySupport -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- http://mail.python.org/mailman/listinfo/python-list

Re: Start Python at client side from web app

2009-01-22 Thread Thomas Guettler
Bryan Olson schrieb: Thomas Guettler wrote: Sorry, I described my problem not well. Here is more information: Actually you did pretty well. [...] The main application is the intranet web application used with IE (ms windows client). Your idea of a custom mime-type, with a browser

Re: Start Python at client side from web app

2009-01-22 Thread Thomas Guettler
. Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- http://mail.python.org/mailman/listinfo/python-list

Re: Start Python at client side from web app

2009-01-22 Thread Thomas Guettler
Paul Rubin schrieb: Thomas Guettler h...@tbz-pariv.de writes: 1. The user pushes a button in the web app. 2. Webserver sends signed python code to the client with own mime type 3. IE sends code to the python application. 4. Signature gets checked, Python code on the client gets executed. 5

Start Python at client side from web app

2009-01-21 Thread Thomas Guettler
to use some open source project, if it exists. Thanks in advance, Thomas Güttler -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- http://mail.python.org/mailman/listinfo/python-list

Re: Start Python at client side from web app

2009-01-21 Thread Thomas Guettler
. Webserver sends signed python code to the client with own mime type 3. IE sends code to the python application. 4. Signature gets checked, Python code on the client gets executed. 5. Maybe send some data to the server with http. Thomas Server runs Linux with Django and Postgres. Thomas Guettler

Re: Force exception on attribute write access only one object

2009-01-09 Thread Thomas Guettler
if self.instance.pk is None: File /localhome/modw/django/db/models/base.py, line 292, in _get_pk_val return getattr(self, meta.pk.attname) AttributeError: 'MyAction' object has no attribute 'filter_action_ptr_id' Peter Otten schrieb: Thomas Guettler wrote: for debugging I want

Re: eval('07') works, eval('08') fails, why?

2009-01-08 Thread Thomas Guettler
Hi, 07 is octal. That's way 08 is invalid. Try this: === python print 011 9 print int('011') 11 -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- http://mail.python.org/mailman/listinfo/python-list

Force exception on attribute write access only one object

2009-01-08 Thread Thomas Guettler
. -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- http://mail.python.org/mailman/listinfo/python-list

Re: What would you like to see in a book about Matplotlib?

2009-01-07 Thread Thomas Guettler
but couldn't find? The API is not good documented. It was very hard for me to understand what was going on the source. - what would you like to see in a book about matplotlib? How to use the API. Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler

Re: Which PostgreSQL adapter to use?

2008-11-04 Thread Thomas Guettler
Hussein B schrieb: Hey, Which Adapter to use with PostgreSQL: PyPgSQL, psycopg or PyGreSQL? Thanks. I think psycopg2 is a good choice. Never tried anything else. Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- http://mail.python.org

urlencode() doseq and Python 3.0

2008-10-30 Thread Thomas Guettler
wants this: urllib.urlencode({'key': ['value1', 'value2']}) 'key=%5B%27value1%27%2C+%27value2%27%5D' I think this is what most people want: urllib.urlencode({'key': ['value1', 'value2']}, doseq=True) 'key=value1key=value2' Should I open a bug against 3.0? Thomas -- Thomas Guettler, http

Re: parse a table in HTML page.

2008-10-28 Thread Thomas Guettler
aside from link in href. Example: String to parse: trtda href='vaffa.html'elog/a/tdtdnormal text/td/tr Output: [[['elog', 'normal text']]] as you can see it misses the info about href... how can get this information 'vaffa.html'? -- Thomas Guettler, http://www.thomas-guettler.de

  1   2   3   >