Re: Moving to Python for web

2013-08-28 Thread Andreas Ecaz
On Wednesday, August 28, 2013 11:08:52 PM UTC+2, Joel Goldstick wrote: On Wed, Aug 28, 2013 at 4:14 PM, Ecaz wrote: So, I have been working in PHP for several years but I want to learn something new. That something new is Python. But since I'm a web developer I want to build stuff for

Re: Moving to Python for web

2013-08-28 Thread Andreas Ecaz
On Wednesday, August 28, 2013 11:25:44 PM UTC+2, Andreas Ecaz wrote: I've looked at Flask, Bottle and Web.py. I quite like the look of Bottle. I'll keep looking for some other microframeworks, maybe I can find something else that interests me. Thank you. At the moment I'm worried

Re: Question about mailing list rules

2013-07-12 Thread Andreas Perstinger
posting your latest 10,000 line program :-) Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: A few questiosn about encoding

2013-06-20 Thread Andreas Perstinger
be exchanged and faithfully rendered. http://files.pef-format.org/specifications/pef-2008-1/pef-specification.html#Unicode I wish you a pleasant sleep tonight. Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Help me with the script? How to find items in csv file A and not in file B and vice versa

2013-06-18 Thread Andreas Perstinger
) The syntax for the for-clause in a comprehension is for x in something thus you are missing the in keyword: writer.writerows([item] for item in in_a_not_b) Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

OT: C vs Python terminology (was: A certainl part of an if() structure never gets executed)

2013-06-16 Thread Andreas Perstinger
write that as In Python, this first creates an integer object with value 6 and then binds the name b to it. Then it binds the name a to the same object. Thus both a and b reference the same object, i.e. they are different names for the same object. Bye, Andreas -- http://mail.python.org/mailman

Re: OT: C vs Python terminology

2013-06-16 Thread Andreas Perstinger
On 16.06.2013 14:55, Dave Angel wrote: On 06/16/2013 07:22 AM, Andreas Perstinger wrote: On 16.06.2013 08:32, Denis McMahon wrote: C: ^ int a, b; b = 6; a = b; In C, this places the numeric value 6 into the memory location identified ^ by the variable b, so far so

Re: Pattern Search Regular Expression

2013-06-15 Thread Andreas Perstinger
the basic regex metacharacters and try to come up with a solution (Hint: you will need groups) http://docs.python.org/3/howto/regex.html#regex-howto http://docs.python.org/3/library/re.html#regular-expression-syntax Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Don't feed the troll...

2013-06-15 Thread Andreas Perstinger
Nick the Gr33k supp...@superhost.gr wrote: You are spamming my thread. Well, you don't own this thread. In fact nobody owns it. This is a public forum and thus anybody can answer to any post as he likes. Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Having a hard time to 'get' bing api search results

2013-06-14 Thread Andreas Perstinger
, idx=_w(s, 0).end()) File /usr/local/lib/python2.7/json/decoder.py, line 381, in raw_decode obj, end = self.scan_once(s, idx) ValueError: Expecting property name: line 2 column 1 (char 2) Thanks for your inputs Andreas. Also, this is my JSON file, I'll post again. Since it's going

Re: Problem creating a regular expression to parse open-iscsi, iscsiadm output (help?)

2013-06-13 Thread Andreas Perstinger
, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Wrong website loaded when other requested

2013-06-13 Thread Andreas Perstinger
text. Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Wrong website loaded when other requested

2013-06-13 Thread Andreas Perstinger
) and to the forum at devshed.com (at least you've found the right subforum there). Thank you very much! Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Having a hard time to 'get' bing api search results

2013-06-13 Thread Andreas Perstinger
, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: A certainl part of an if() structure never gets executed.

2013-06-12 Thread Andreas Perstinger
) ) to somehow return '==' instead of 0 but don't know how. As with most of your problems you are barking up the wrong tree. Why not use the actual value you get from the form to check whether you have a valid month? Do you understand why 0 is submitted instead of ==? Bye, Andreas

OT: e-mail reply to old/archived message (was Re: Encoding questions (continuation))

2013-06-11 Thread Andreas Perstinger
to and then add manually the In-Reply-To and References headers to your e-mail using that Id. It's probably easier to just use the web interface at Gmane. Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Receing a form variable as a list instead of as a string

2013-06-11 Thread Andreas Perstinger
or MiniFieldStorage instance but a list of such instances. Similarly, in this situation, form.getvalue(key) would return a list of strings. http://docs.python.org/3.3/library/cgi.html#using-the-cgi-module Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: OT: e-mail reply to old/archived message

2013-06-11 Thread Andreas Perstinger
On 11.06.2013 22:14, Νικόλαος Κούρας wrote: Τη Τρίτη, 11 Ιουνίου 2013 2:21:50 μ.μ. UTC+3, ο χρήστης Andreas Perstinger έγραψε: sending the mail to python-list@python.org will just open anew subject intead of replyign to an opened thread. You would need to find out the Message-Id

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-10 Thread Andreas Perstinger
. Leading zeros are usually discarded when a number is printed: bin(70) '0b1000110' 0b100110 == 0b00100110 True 0b100110 == 0b00100110 True It's the same with decimal notation. You wouldn't say 00123 is different from 123, would you? Bye, Andreas -- http://mail.python.org/mailman/listinfo

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-10 Thread Andreas Perstinger
as it is, as 1 byte. They are the same EBCDIC and ASCII and Unicode are charactet sets, correct? iso-8859-1, iso-8859-7, utf-8, utf-16, utf-32 and so on are encoding methods, right? Look at http://www.unicode.org/glossary/ for an explanation of all the terms. Bye, Andreas -- http

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-09 Thread Andreas Perstinger
' bin(0xe1) '0b1111' Now look at the table on https://en.wikipedia.org/wiki/UTF-8#Description to find out how many bytes a UTF-8 decoder expects when it reads that value. Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Source code as text/plain

2013-06-04 Thread Andreas Perstinger
? http://hg.python.org/cpython/help/tip Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: netcdF4 variables

2013-06-01 Thread Andreas Perstinger
. Thus ncf.variables.keys() should return a view (or list, depending on your python version) of all keys, i.e. all variable names. Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

[issue18092] Python 2.7.5 installation broken on OpenSuse 12.2

2013-05-29 Thread Andreas Jung
Changes by Andreas Jung zopyxfil...@gmail.com: -- components: +Build ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18092 ___ ___ Python-bugs-list

[issue18092] Python 2.7.5 installation broken on OpenSuse 12.2

2013-05-29 Thread Andreas Jung
New submission from Andreas Jung: I tried to install 2.7.5 on my OpenSuse 12.2 (latest patches) ajung@blackmoon2:~/sandboxes/mib.portal cat /etc/issue Welcome to openSUSE 12.2 Mantis - Kernel \r (\l). Compilation went fine (no visible errors). Starting the interpreter gives me: ajung

[issue18062] m68k FPU precision issue

2013-05-26 Thread Andreas Schwab
Andreas Schwab added the comment: Thorsten Glaser t...@mirbsd.de writes: root@ara3:~ # ./a.out test#1 fail: 1.0E+00 test#2 fail: 1.00040E+16 changing FPU control word from to 0080 = 0080 test#1 fail: 1.0E+00 test#2 fail

Re: PEP 378: Format Specifier for Thousands Separator

2013-05-24 Thread Andreas Perstinger
question. Don't worry. I guess most people on this list don't understand it either. It looks like dihedral is a bot although nobody knows for sure. Search for some other posts from him/her/it in the archive and form your own opinion. IMHO you can simply ignore him/her/it. Bye, Andreas -- http

Re: Illegal seek error with seek() and os.lseek()

2013-05-14 Thread Andreas Perstinger
is a char device. Are you sure that your device is seekable? Try f = open(/dev/relpcfpga, r+b, buffering=0) print(f.seekable()) Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: global variable not working inside function. Increment

2013-05-13 Thread Andreas Perstinger
which tutorials you read. So why don't you tell them yourself? Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

[issue17873] _ctypes/libffi missing bits for aarch64 support

2013-04-29 Thread Andreas Schwab
New submission from Andreas Schwab: ctype modules doesn't build for aarch64 due to missing bits in the fficonfig.py script. -- components: ctypes files: ctypes-libffi-aarch64.patch keywords: patch messages: 188116 nosy: schwab priority: normal severity: normal status: open title

Re: Error in Import gv module

2013-04-22 Thread Andreas Perstinger
are missing graphviz or you need to adapt your paths: https://code.google.com/p/python-graph/issues/detail?id=15 Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Error in Import gv module

2013-04-22 Thread Andreas Perstinger
://code.google.com/p/python-graph/issues/list?can=1q=import+gvcolspec=ID+Type+Status+Priority+Milestone+Owner+Summarycells=tiles Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Error in Import gv module

2013-04-22 Thread Andreas Perstinger
2) Try some other Graphviz bindings. A quick search on PyPi gave me: https://pypi.python.org/pypi/pygraphviz/1.1 https://pypi.python.org/pypi/pydot/1.0.28 https://pypi.python.org/pypi/yapgvb/1.2.0 Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-17 Thread Andreas Abel
of paradigm is vague and ill-defined. Cheers, Uday Reddy -- Andreas AbelDu bist der geliebte Mensch. Theoretical Computer Science, University of Munich Oettingenstr. 67, D-80538 Munich, GERMANY andreas.a...@ifi.lmu.de http://www2.tcs.ifi.lmu.de/~abel/ -- http://mail.python.org/mailman

[issue17687] Undeclared symbol in _struct.c

2013-04-10 Thread Andreas Kloeckner
New submission from Andreas Kloeckner: This line in the _struct module references a PyStructType that isn't declared anywhere. This is only apparent when the file is compiled without -DNDEBUG. http://hg.python.org/cpython/file/1410b7790de6/Modules/_struct.c#l43 -- components

[issue17687] Undeclared symbol in _struct.c

2013-04-10 Thread Andreas Kloeckner
Andreas Kloeckner added the comment: Whoops. I'm an idiot. Forget I said anything. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17687

[issue17687] Undeclared symbol in _struct.c

2013-04-10 Thread Andreas Kloeckner
Andreas Kloeckner added the comment: (Forgot to say: sorry.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17687 ___ ___ Python-bugs-list

Re: Simple Plot in Python

2013-03-16 Thread Andreas Perstinger
subhabangal...@gmail.com wrote: I was trying to draw in Matplotlib but did not find much help. Have you looked already at the homepape for maptlotlib?: http://matplotlib.org/index.html There you'll find a tutorial: http://matplotlib.org/users/pyplot_tutorial.html Bye, Andreas -- http

[issue17413] format_exception() breaks on exception tuples from trace function

2013-03-14 Thread Andreas Kloeckner
Andreas Kloeckner added the comment: Thanks for the suggestion. Since 3.2 and 3.3 will be with us for a while, I've implemented the workaround you've suggested. Works, too. :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue17413] format_exception() breask on exception tuples from trace function

2013-03-13 Thread Andreas Kloeckner
New submission from Andreas Kloeckner: traceback.format_exception() used to work properly with the 'arg' value passed to a tracing function set up via sys.settrace for an 'exception' event. In Python 3.x, this is no longer the case. Below you'll find what the attached test produces

[issue17296] Cannot unpickle classes derived from 'Exception'

2013-02-26 Thread Andreas Hausmann
Andreas Hausmann added the comment: That is correct. Under 2.4 and 3.3 it should show neither the line EXCEPTION ## EXCEPTION nor the following line TypeError: ('__init__() takes at least 2 arguments. That means, that in version 2.4 and 3.3 that unpickling problem doesn't exist

[issue17296] Cannot unpickle classes derived from 'Exception'

2013-02-26 Thread Andreas Hausmann
Andreas Hausmann added the comment: A backport to 2.7 would be in the interest of the Zope community (I dare say ;)), at least in ours. In our project, after having migrated to Zope 2.13/Python2.7 we found this bug and now we are quite worried what else might happen with our huge pickled

[issue17296] Cannot unpickle classes derived from 'Exception'

2013-02-25 Thread Andreas Hausmann
New submission from Andreas Hausmann: When pickling/unpickling a class that derives from the builtin class Exception, unpickling results in a TypeError: ('__init__() takes at least 2 arguments (1 given)', class '__main__.TestException', ()) A standard exception like ValueError can be pickled

[issue17296] Cannot unpickle classes derived from 'Exception'

2013-02-25 Thread Andreas Hausmann
Andreas Hausmann added the comment: I have not tried in 3.3. I have no running installation of 3.3. I need a solution for 2.7 for a Zope project that was just ported to 2.7. My test for Python3 was halfheartedly on my standard Python3 installation (3.2) after reading Issue1692335

[issue5033] setup.py crashes if sqlite version contains 'beta'

2013-02-23 Thread Andreas Pelme
Andreas Pelme added the comment: This bug still exists in 2.7 and 3.4. If SQLITE_VERSION in sqlite3.h (/usr/include/sqlite3.h on Mac OS) ends with beta, such as #define SQLITE_VERSION3.7.12beta make will fail. The regex changed suggested above fixes this. The attached patch

[issue900112] cgi.fieldStorage doesn't grok standards env. variables

2013-02-23 Thread Andreas Åkerlund
Andreas Åkerlund added the comment: Submited a patch against 2.7 that adds all environment variables starting with HTTP_, strips of the prefix and converts it to lower case. Also added a small test case. -- keywords: +patch nosy: +thezulk Added file: http://bugs.python.org/file29173

[issue17176] Document imp.NullImporter is NOT used anymore by import

2013-02-23 Thread Andreas Pelme
Andreas Pelme added the comment: This seems like an oversight from http://bugs.python.org/issue15473 The release notes for 3.3 added a note about this: Because None is now inserted into sys.path_importer_cache, if you are clearing out entries in the dictionary of paths that do not have

[issue3991] urllib.request.urlopen does not handle non-ASCII characters

2013-02-23 Thread Andreas Åkerlund
Andreas Åkerlund added the comment: This is a patch against 3.2 adding urllib.parse.quote_uri It splits the URI in 5 parts (protocol, authentication, hostname, port and path) then runs urllib.parse.quote on the path and encodes the hostname to punycode if it's not in ascii. It's not perfect

[issue17267] datetime.time support for '+' and 'now'

2013-02-23 Thread Andreas Åkerlund
Andreas Åkerlund added the comment: Well I have also made a patch for this, using the datetime operator code as much as possible.. this is for version 3.4.. -- nosy: +thezulk Added file: http://bugs.python.org/file29206/issue17267-3.4.diff

Re: Checking for valid date input and convert appropriately

2013-02-22 Thread Andreas Perstinger
. Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Python launcher (PEP 397) and emacs python-mode.el

2013-01-31 Thread Andreas Röhler
python-mode.el acts by default. AFAIU that launcher is implemented in Python3.3 and should not need any patch at all. Should it not work, please file a bug-report at https://bugs.launchpad.net/python-mode Andreas Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Python launcher (PEP 397) and emacs python-mode.el

2013-01-31 Thread Andreas Röhler
Am 31.01.2013 17:35, schrieb Thomas Heller: Am 31.01.2013 12:05, schrieb Andreas Röhler: Am 31.01.2013 10:03, schrieb Thomas Heller: Has someone managed to patch python-mode.el to use the PEP 397 python launcher when you hit C-c C-c? It seems that emacs should parse the shebang line

Re: Python launcher (PEP 397) and emacs python-mode.el

2013-01-31 Thread Andreas Röhler
Am 01.02.2013 00:59, schrieb Vinay Sajip: Thomas Heller theller at ctypes.org writes: What I meant to write is this: when the shebang line in script.py contains this: #!/usr/bin/python3.1-32 then emacs SHOULD run py.exe -3.1-32 script.py and the launcher runs

[issue17017] email.utils.getaddresses fails for certain addresses

2013-01-22 Thread Andreas Dewes
New submission from Andreas Dewes: email.utils.getaddresses doesn't seem to work if the quoted part of address contains \r or \n characters. An example: --- from email.utils import getaddresses address = 'Data Mining, Statistics, Big Data, and Data Visualization Group\r\n Members group-dige

[issue16612] Integrate Argument Clinic specialized preprocessor into CPython trunk

2012-12-04 Thread Andreas Stührk
Changes by Andreas Stührk andy-pyt...@hammerhartes.de: -- nosy: +Trundle ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16612 ___ ___ Python-bugs

[issue16047] Tools/freeze no longer works in Python 3

2012-11-13 Thread Andreas Stührk
Andreas Stührk added the comment: See also issue #11824 for the ABI tags changes. -- nosy: +Trundle ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16047

[issue15667] PEP 3121, 384 refactoring applied to pickle module

2012-11-11 Thread Andreas Stührk
Andreas Stührk added the comment: See also issue #11349. -- nosy: +Trundle ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15667 ___ ___ Python-bugs

[issue12029] Catching virtual subclasses in except clauses

2012-09-16 Thread Andreas Stührk
Changes by Andreas Stührk andy-pyt...@hammerhartes.de: -- nosy: +Trundle ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12029 ___ ___ Python-bugs

Re: How to tell people to ask questions the smart way

2012-09-05 Thread Andreas Perstinger
On 05.09.2012 01:05, Ben Finney wrote: Andreas Perstinger andiper...@gmail.com writes: On 04.09.2012 11:34, Paolo wrote: how do I know if a JTextField has the focus? thank to all Look there: http://www.catb.org/esr/faqs/smart-questions.html#forum That is an unhelpful response. So we

Re: focus on jtextfield

2012-09-04 Thread Andreas Perstinger
On 04.09.2012 11:34, Paolo wrote: how do I know if a JTextField has the focus? thank to all Look there: http://www.catb.org/esr/faqs/smart-questions.html#forum Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Cut out XML subtree

2012-08-29 Thread Andreas Perstinger
Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Python list archives double-gzipped?

2012-08-27 Thread Andreas Perstinger
that there is something wrong in the browser or server setup, because I notice the same behaviour with Firefox, Chromium, wget and curl. $ ll *July* -rw-rw-r-- 1 andreas andreas 747850 Aug 27 13:48 chromium_2012-July.txt.gz -rw-rw-r-- 1 andreas andreas 748041 Aug 27 13:41 curl_2012-July.txt.gz -rw-rw-r

Re: help me debug my word capitalizer script

2012-08-22 Thread Andreas Perstinger
= linesep.join(lines) Because you haven't removed the newline character from each line, joining them with linesep introduces a second newline character after each line. Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

RE: something about split()???

2012-08-14 Thread Andreas Tawn
I have a question about the split function? surpose a = |,and when I use a.split(|) , I got the list [',] ,but I want to get the empty list,what should I do ? Something like... [x for x in |.split(|) if x] [] Cheers, Drea -- http://mail.python.org/mailman/listinfo/python-list

Re: Beautiful Soup Table Parsing

2012-08-09 Thread Andreas Perstinger
in header_row.findNextSiblings(tr): # do something Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: PollyReports 1.5 -- Band-oriented PDF Report Generator

2012-07-12 Thread Andreas Perstinger
On Thu, 12 Jul 2012 16:59:06 +1000 Chris Angelico ros...@gmail.com wrote: On Thu, Jul 12, 2012 at 3:35 PM, Andreas Perstinger andiper...@gmail.com wrote: Do you mean this license?: http://packages.python.org/PollyReports/license.html It's the standard license for NetBSD projects

Re: ANN: PollyReports 1.5 -- Band-oriented PDF Report Generator

2012-07-11 Thread Andreas Perstinger
/licenses/bsd-license.php and GPL-compatible: http://www.gnu.org/licenses/license-list.html#FreeBSD Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

[issue14981] 3.3.0a4 compilation fails von MacOS Lion /10.7.4

2012-06-01 Thread Andreas Jung
New submission from Andreas Jung aj...@users.sourceforge.net: ranlib: file: libpython3.3m.a(dynamic_annotations.o) has no symbols ranlib: file: libpython3.3m.a(pymath.o) has no symbols gcc -framework CoreFoundation -o python.exe Modules/python.o libpython3.3m.a -ldl -framework CoreFoundation

[issue14981] 3.3.0a4 compilation fails von MacOS Lion /10.7.4

2012-06-01 Thread Andreas Jung
Changes by Andreas Jung aj...@users.sourceforge.net: -- type: - compile error ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14981 ___ ___ Python

RE: Dealing with the __str__ method in classes with lots of attributes

2012-05-14 Thread Andreas Tawn
p.s. Is Python seeing a lot of use at Ubisoft or is this just for personal interest (or perhaps both)? We do use Python a fair bit, mostly for build systems and data mining, but also because it's the built-in script language for Motionbuilder. --

RE: Dealing with the __str__ method in classes with lots of attributes

2012-05-11 Thread Andreas Tawn
This issue bit me once too often a few months ago, and now I have a class called O from which I often subclass instead of from object. Its main purpose is a friendly __str__ method, though it also has a friendly __init__. Code: class O(object): ''' A bare object subclass to

RE: Dealing with the __str__ method in classes with lots of attributes

2012-05-11 Thread Andreas Tawn
I have no idea why using __repr__ versus __str__ would make any difference in the order of the attributes. They're going to come out in the order you specify, regardless of what you name your method. If you don't like the arbitrary order you get from the dictionary, then either sort it,

RE: Dealing with the __str__ method in classes with lots of attributes

2012-05-11 Thread Andreas Tawn
It's also helpful to not have to display every attribute, of which there may be dozens. Do I detect a code smell here? Possibly. I'll often try to subdivide into several simpler types, but sometimes that makes the code more complex than it needs to be. --

RE: Dealing with the __str__ method in classes with lots of attributes

2012-05-11 Thread Andreas Tawn
It's also helpful to not have to display every attribute, of which there may be dozens. Do I detect a code smell here? I think so, Murphy's law dictates that the attribute you're interested in will not be displayed anyway. That's what __repr__'s for. --

Dealing with the __str__ method in classes with lots of attributes

2012-05-10 Thread Andreas Tawn
Say I've got a class... class test(object): def __init__(self): self.foo = 1 self.bar = 2 self.baz = 3 I can say... def __str__(self): return foo: {0}\nbar: {1}\nbaz: {2}.format(self.foo, self.bar, self.baz) and everything's simple and clean and I can vary the

RE: Dealing with the __str__ method in classes with lots of attributes

2012-05-10 Thread Andreas Tawn
On Thu, May 10, 2012 at 11:33 PM, Andreas Tawn andreas.t...@ubisoft.com wrote: Say I've got a class... class test(object):    def __init__(self):        self.foo = 1        self.bar = 2        self.baz = 3 I can say... def __str__(self):   return foo: {0}\nbar: {1}\nbaz

[issue10142] Support for SEEK_HOLE/SEEK_DATA

2012-03-20 Thread Andreas Klauer
Andreas Klauer andreas.kla...@googlemail.com added the comment: ZFS supports SEEK_HOLE/SEEK_DATA in lseek() syscall. The feature has patches available too for Linux, but never integrated in mainline kernel, AFAIK. it is difficult to write a testcase when I can only test under a system

[issue13908] PyType_FromSpec() lacks PyType_Ready() call

2012-01-29 Thread Andreas Stührk
New submission from Andreas Stührk andy-pyt...@hammerhartes.de: As already stated by Amaury in http://mail.python.org/pipermail/python-dev/2011-October/113829.html, that leads to crashes: import xxlimited repr(xxlimited.Str) [1]19575 segmentation fault (core dumped) ./python

Re: Learning Python 2.4

2011-12-21 Thread Andreas Perstinger
/python/english3e/preface3-rle.html Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

[issue11829] inspect.getattr_static code execution with meta-metaclasses

2011-12-21 Thread Andreas Stührk
Andreas Stührk andy-pyt...@hammerhartes.de added the comment: As the test demonstrates, it's still possible to trigger a dynamic lookup without the patch, hence I think this is still needed and valid, yes. I updated the patch to make it reflect the latest committed changes. -- Added

Re: sick of distribute, setup, and all the rest...

2011-11-28 Thread Andreas Perstinger
problems or what's wrong with any of the distribution systems. So what answers are you expecting from such a post? Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Trying to write beautifulsoup result to a file and get error message

2011-11-14 Thread Andreas Perstinger
into a file, you have to convert this structur back into a string: new_html = str(soup) type(new_html) type 'str' new_html 'html\n body\n Demo\n /body\n/html' HTH, Andreas -- http://mail.python.org/mailman/listinfo/python-list

[issue13390] Hunt memory allocations in addition to reference leaks

2011-11-12 Thread Andreas Stührk
Changes by Andreas Stührk andy-pyt...@hammerhartes.de: -- nosy: +Trundle ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13390 ___ ___ Python-bugs

Re: Python lesson please

2011-11-07 Thread Andreas Perstinger
pulled it again, using the 'raw' link, saved it, no extra tabs. But it still doesn't work for linux. My python is 2.6.6 Go to the directory where you've downloaded the file and type: python DuquDriverPatterns.py . What output do you get? Bye, Andreas -- http://mail.python.org/mailman/listinfo

Philosophical Python: 2*b or not 2*b

2011-10-27 Thread Andreas Neudecker
Not the answers I expected: ;-) b = True 2*b or not 2*b 2 b = False 2*b or not 2*b True It all becomes clear when you look at: b = False 2*b 0 b = True 2*b 2 No surprise there really. But fun anyway. Any more philsophical Python code out there? --

Genehmigt vom Ministerium für alberne Gangarten

2011-10-27 Thread Andreas Neudecker
http://blog.stuttgarter-zeitung.de/fundstucke/2011/10/27/genehmigt-vom-ministerium-fur-alberne-gangarten/ -- http://mail.python.org/mailman/listinfo/python-list

[issue13188] generator.throw() ignores __traceback__ of exception

2011-10-18 Thread Andreas Stührk
Andreas Stührk andy-pyt...@hammerhartes.de added the comment: It leaks because `PyException_GetTraceback()` already returns a new reference, hence the Py_XINCREF(tb) is wrong. -- nosy: +Trundle ___ Python tracker rep...@bugs.python.org http

[issue13204] sys.flags.__new__ crashes

2011-10-17 Thread Andreas Stührk
New submission from Andreas Stührk andy-pyt...@hammerhartes.de: It's not possible (by intention) to instantiate a new instance of sys.flags. This is achieved by setting the tp_new slot to NULL (in `_PySys_Init()`), after `PyType_Ready()` is called, which means that a slot wrapper is added

[issue13204] sys.flags.__new__ crashes

2011-10-17 Thread Andreas Stührk
Changes by Andreas Stührk andy-pyt...@hammerhartes.de: Added file: http://bugs.python.org/file23432/sys_flags__new__crash_2.7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13204

Re: Opportunity missed by Python ?

2011-10-13 Thread Andreas Neudecker
it a viable alternative to JS) Can the Python community do this without involvment in browser development? Regards Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Python gp.ListFeatureClasses return only one file

2011-10-13 Thread Andreas Perstinger
(assuming you are using version 9.2): shpList = gp.ListFeatureClasses(*.shp) shp = shpList.Next() while shp: print shp shp = shpList.Next() Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: file processing question

2011-10-12 Thread Andreas Perstinger
, ...], ...])? At least I get this impression from your samples. Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

[issue13138] ElementTree's Element.iter() lacks versionadded

2011-10-08 Thread Andreas Stührk
New submission from Andreas Stührk andy-pyt...@hammerhartes.de: See http://docs.python.org/whatsnew/2.7.html#updated-module-elementtree-1-3 -- assignee: docs@python components: Documentation files: Element_iter_versionadded.patch keywords: patch messages: 145199 nosy: Trundle, docs

Re: Invoke a superclass method from a subclass constructor

2011-09-11 Thread Andreas Perstinger
() there is no output either. Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

[issue12915] Add inspect.locate and inspect.resolve

2011-09-08 Thread Andreas Stührk
Changes by Andreas Stührk andy-pyt...@hammerhartes.de: -- nosy: +Trundle ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12915 ___ ___ Python-bugs

[issue12844] Support more than 255 arguments

2011-09-02 Thread Andreas Stührk
Andreas Stührk andy-pyt...@hammerhartes.de added the comment: Attached is a patch that removes the limit and that allows passing an arbitrary number of positional and keyword arguments. Lacks tests for now. -- keywords: +patch nosy: +Trundle Added file: http://bugs.python.org/file23089

Usage of PyDateTime_FromTimestamp

2011-08-30 Thread Andreas
Hi, I'm working on a c-extension of python and want to create an instance of python datetime object with a unix timestamp in c. On the documentation site ( http://docs.python.org/c-api/datetime.html ) I found the function PyDateTime_FromTimestamp() which returns a new reference based on an input

Re: Usage of PyDateTime_FromTimestamp

2011-08-30 Thread Andreas
Am 30.08.2011 23:49, schrieb MRAB: The key phrase is argument tuple. The arguments passed to a Python call are always a tuple, not PyFloat_Object. You can build a tuple from the PyFloat_Object using: Py_BuildValue((O), float_object) The (O) says to build a tuple ((...)) containing

Re: relative speed of incremention syntaxes (or i=i+1 VS i+=1)

2011-08-21 Thread Andreas Löscher
What the precise difference (semantics and speed) is between the BINARY_ADD and INPLACE_ADD opcodes, I dunno. Look in the Python source code or maybe someone knows it from memory :-) Irmen from Python/ceval.c: 1316case BINARY_ADD: 1317w = POP(); 1318

Re: relative speed of incremention syntaxes (or i=i+1 VS i+=1)

2011-08-21 Thread Andreas Löscher
Am Sonntag, den 21.08.2011, 14:52 -0400 schrieb Roy Smith: In article mailman.282.1313951079.27778.python-l...@python.org, Christian Heimes li...@cheimes.de wrote: Am 21.08.2011 19:27, schrieb Andreas Lscher: As for using Integers, the first case (line 1319 and 1535) are true

<    1   2   3   4   5   6   7   8   9   10   >