Re: Why indentation is use to denote block of code?

2009-09-14 Thread Andreas Waldenburger
On Sun, 13 Sep 2009 21:43:49 -0700 (PDT) TerryP bigboss1...@gmail.com wrote: Not to be omega-rude and disrespectful, but if you have to ask such a question -- you are either to stupid a programmer to warrant any intellectual response, or are just interested in wasting peoples bandwidth.

Re: Google Code Jam language usage

2009-09-14 Thread Andreas Waldenburger
On Mon, 14 Sep 2009 11:17:02 -0400 Terry Reedy tjre...@udel.edu wrote: At the recent Google Code Jam, Python was the 3rd most popular language after C/C++ and Java. Good for C/C++ and Java that they are not ranked by fun per line. /W -- INVALID? DE! --

Re: including constants

2009-09-13 Thread Andreas Waldenburger
On Sun, 13 Sep 2009 18:44:25 + (UTC) Nikola Skoric nick-n...@net4u.hr wrote: Hi there, I have a simple problem and I know how to solve it :-D, but I suspect that there is a standard solution which is more elegant. So, here is my problem: I have django app versioned with svn and I

Re: Python strict mode?

2009-09-13 Thread Andreas Waldenburger
On Sun, 13 Sep 2009 09:25:50 -0700 (PDT) Peng Yu pengyu...@gmail.com wrote: Is there is a way to make python check the variables just as the strict mode in perl. Short answer: No. Long answer: I'm guessing you want Python to complain when assigning to a variable that has not been declared

Re: Is there a similar mailing list about django?

2009-09-13 Thread Andreas Waldenburger
On Sun, 13 Sep 2009 14:17:42 -0400 Joel Goldstick joel.goldst...@columbuswebmakers.com wrote: I'm learning python and django more or less concurrently. I've googled to find a similar list like this for django. Help? Didn't like http://groups-beta.google.com/group/django-users ? (Second hit

Re: Which version of python I should use if I just start programming in python?

2009-09-13 Thread Andreas Waldenburger
On Sun, 13 Sep 2009 15:52:44 -0500 Peng Yu pengyu...@gmail.com wrote: On Sun, Sep 13, 2009 at 12:27 AM, John Nagle na...@animats.com wrote: What are the differences between 2.5 and 2.6? http://docs.python.org/dev/whatsnew/2.6.html /W -- INVALID? DE! --

Re: Is there a similar mailing list about django?

2009-09-13 Thread Andreas Waldenburger
On Sun, 13 Sep 2009 15:54:07 -0400 Albert Hopkins mar...@letterboxes.org wrote: On Sun, 2009-09-13 at 21:27 +0200, Andreas Waldenburger wrote: Didn't like http://groups-beta.google.com/group/django-users ? (Second hit for django mailing list, but I know Google results vary from country

Re: Which version of python I should use if I just start programming in python?

2009-09-13 Thread Andreas Waldenburger
On Sun, 13 Sep 2009 17:04:25 -0500 Peng Yu pengyu...@gmail.com wrote: On Sun, Sep 13, 2009 at 4:01 PM, Andreas Waldenburger use...@geekmail.invalid wrote: On Sun, 13 Sep 2009 15:52:44 -0500 Peng Yu pengyu...@gmail.com wrote: On Sun, Sep 13, 2009 at 12:27 AM, John Nagle na...@animats.com

Re: Is there a similar mailing list about django?

2009-09-13 Thread Andreas Waldenburger
On Sun, 13 Sep 2009 18:46:44 -0400 Joel Goldstick joel.goldst...@columbuswebmakers.com wrote: Thanks.. I saw the google group, but I was hoping for a list that I can read in my thunderbird client. Thanks all for the good pointers Huh? Django-Users is a mailing list. That's what Google-Groups

Re: Is there a similar mailing list about django?

2009-09-13 Thread Andreas Waldenburger
On Mon, 14 Sep 2009 01:24:49 +0200 Andreas Waldenburger use...@geekmail.invalid wrote: (among a Usenet portal) Damn those late hours. What I meant was amongst other things such as a Usenet portal. /W -- INVALID? DE! -- http://mail.python.org/mailman/listinfo/python-list

Re: Help with cumulative sum

2009-09-10 Thread Andreas Waldenburger
On Thu, 10 Sep 2009 17:48:32 +0200 Giacomo Boffi giacomo.bo...@polimi.it wrote: Maggie la.f...@gmail.com writes: [...] else: print 'The loop is finito' do you know of it.comp.lang.python? Neat! They use computers in IT now? *flees, snickering* /W -- INVALID? DE! --

RE: Extracting patterns after matching a regex

2009-09-08 Thread Andreas Tawn
Hi, I need to extract a string after a matching a regular expression. For example I have the string... s = FTPHOST: e4ftl01u.ecs.nasa.gov and once I match FTPHOST I would like to extract e4ftl01u.ecs.nasa.gov. I am not sure as to the best approach to the problem, I had

RE: Extracting patterns after matching a regex

2009-09-08 Thread Andreas Tawn
Hi, I need to extract a string after a matching a regular expression. For example I have the string... s = FTPHOST: e4ftl01u.ecs.nasa.gov and once I match FTPHOST I would like to extract e4ftl01u.ecs.nasa.gov. I am not sure as to the best approach to the problem, I had been trying to

Re: Question on the csv library

2009-08-28 Thread Andreas Waldenburger
On Fri, 28 Aug 2009 09:03:49 +0100 Mark Lawrence breamore...@yahoo.co.uk wrote: p.s. is it separator or seperator, after 50+ years I still can't remember? The former. It's cognate to English part if that helps any. /W -- INVALID? DE! -- http://mail.python.org/mailman/listinfo/python-list

Re: Question on the csv library

2009-08-27 Thread Andreas Waldenburger
On Thu, 27 Aug 2009 21:36:28 +0200 Andreas Waldenburger use...@geekmail.invalid wrote: [snip] Might I humbly suggest sheet = list(spamReader) # ? Oh, and while I'm humbly suggesting: spam_reader instead of spamReader or SpamReader or SpamrEadeR or suchlike. Caps are reserved

Re: Question on the csv library

2009-08-27 Thread Andreas Waldenburger
On Thu, 27 Aug 2009 13:12:07 -0700 (PDT) vsoler vicente.so...@gmail.com wrote: On Aug 27, 9:42 pm, Andreas Waldenburger use...@geekmail.invalid wrote: [snip what I wrote] Thank you for your answers. Let me however make some comments: 1- the csv file was generated with Excel 2007

Re: problem to write a THREAD enabled python extension

2009-08-25 Thread Andreas Otto
Stefan Behnel wrote: You forgot to create a thread state for the new thread. See the PyThreadState_New() function. this does not really solve the problem even if the original error does no happen anymore ... but a bucket of other error happen sometimes and this mean that time and (I

problem to write a THREAD enabled python extension

2009-08-24 Thread Andreas Otto
Hi, the following scenario: 1. using GIL 2. a pthread is created in a library and have to be announced to python 3. the thread is created in a PyObject_CallObject function call from extension c code using a other extension c-code function called from python code python

RE: Extract the numeric and alphabetic part from an alphanumeric string

2009-08-03 Thread Andreas Tawn
Hi, I have a string as str='123ACTGAAC'. I need to extract the numeric part from the alphabetic part which I did using numer=re.findall(r'\d+',str) numer 123 To get the alphabetic part, I could do alpha=str.replace('123','') alpha ACTGAAC But when I give

RE: index nested lists

2009-07-28 Thread Andreas Tawn
hi at all, If I have this list: lista ['ciao', 1, ['mela', 'pera', 'banana'], [1, 2, 3]] if I want enumerate elements...I can see: for parola in lista: print lista[i] i = i + 1 ciao 1 ['mela', 'pera', 'banana'] [1, 2, 3] but, if I want to enumerate elements

RE: list of all possible values

2009-07-16 Thread Andreas Tawn
Certainly possible with list comprehensions. a = abc [(x, y) for x in a for y in a] [('a', 'a'), ('a', 'b'), ('a', 'c'), ('b', 'a'), ('b', 'b'), ('b', 'c'), ('c', 'a'), ('c', 'b'), ('c', 'c')] But I like bearophile's version better. Andreas, Thanks, but I think you were

promlems with threading and print

2009-07-15 Thread Andreas Grommek
Hi Newsgroup, I'm new to python and I am familiarizing myself with threads (haven't done any threading in any other language before...). I was playing around and discovered some weird behavior. Here is my code: import threading from time import sleep from random import random import sys class

RE: list of all possible values

2009-07-14 Thread Andreas Tawn
David Gibb: For example: if my values are ['a', 'b', 'c'], then all possible lists of length 2 would be: aa, ab, ac, ba, bb, bc, ca, cb, cc. from itertools import product list(product(abc, repeat=2)) [('a', 'a'), ('a', 'b'), ('a', 'c'), ('b', 'a'), ('b', 'b'), ('b', 'c'), ('c', 'a'),

[issue6323] Py3.1 pdb doesn't deal well with syntax errors

2009-07-09 Thread Andreas Kloeckner
Andreas Kloeckner inf...@tiker.net added the comment: Vladislav: The behavior you find funny is actually correct. pass is a statement and as such not allowed in a lambda. (only expressions are) Your posting is unrelated to this bug report. If you're still confused, please ask on comp.lang.python

ANNOUNCE: libmsgque 3.4

2009-07-03 Thread Andreas Otto
and this has still some bugs ... to get the release 3.4 files you have to use the files link. mfg Andreas Otto -- http://mail.python.org/mailman/listinfo/python-list

[issue1652] subprocess should have an option to restore SIGPIPE to default action

2009-07-02 Thread Andreas Kloeckner
Changes by Andreas Kloeckner inf...@tiker.net: -- nosy: +inducer ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1652 ___ ___ Python-bugs-list

RE: Specific iterator in one line

2009-06-30 Thread Andreas Tawn
This is purely sport question. I don't really intend to use the answer in my code, but I am wondering, if such a feat could be done. I have a following problem: I have a list based upon which I would like to construct a different one. I could simply use list comprehensions, but there

RE: Specific iterator in one line

2009-06-30 Thread Andreas Tawn
This is purely sport question. I don't really intend to use the answer in my code, but I am wondering, if such a feat could be done. I have a following problem: I have a list based upon which I would like to construct a different one. I could simply use list comprehensions, but

RE: Specific iterator in one line

2009-06-30 Thread Andreas Tawn
Andreas Tawn andreas.t...@ubisoft.com writes: list(.join([(a,b*2)[x] for x in [1,0,0,1]]) 50 characters. Do I win £5? Er, missing right paren. Try: list(.join((a,bb)[x] for x in [1,0,0,1])) -- Indeed. Stupid paste ;o) -- http://mail.python.org/mailman/listinfo/python-list

[issue4949] Constness in PyErr_NewException

2009-06-22 Thread Andreas Kloeckner
Changes by Andreas Kloeckner inf...@tiker.net: -- versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4949 ___ ___ Python-bugs

[issue6322] Pdb breakpoints don't work on lines without bytecode

2009-06-22 Thread Andreas Kloeckner
New submission from Andreas Kloeckner inf...@tiker.net: Take this program: 8 --- print START a = [ 1 for i in range(10)] 8 --- as a.py, run python -m pdb a.py, say b 3 to set a breakpoint

[issue6323] Py3.1 pdb doesn't deal well with syntax errors

2009-06-22 Thread Andreas Kloeckner
New submission from Andreas Kloeckner inf...@tiker.net: Steps to reprdocue: 1) Debug a program with a syntax error in pdb. 2) Get the SyntaxError traceback. 3) Hit q to quit. 4) Another SyntaxError traceback, and you're back at the Pdb prompt. -- components: Library (Lib) messages

ANNOUNCE: libmsgque 3.3

2009-06-12 Thread Andreas Otto
Andreas Otto -- http://mail.python.org/mailman/listinfo/python-list

[issue6246] Python bebugger ignores exception if instructed to return from generator

2009-06-08 Thread Andreas Kloeckner
New submission from Andreas Kloeckner inf...@tiker.net: I get this debugger session with the attached file. Note that even though a NameError occurs, no indication of that error is visible on the debugger conosle. 8 - $ python -m

[issue6246] Python debugger ignores exception if instructed to return from generator

2009-06-08 Thread Andreas Kloeckner
Changes by Andreas Kloeckner inf...@tiker.net: -- title: Python bebugger ignores exception if instructed to return from generator - Python debugger ignores exception if instructed to return from generator ___ Python tracker rep...@bugs.python.org

Re: What text editor is everyone using for Python

2009-05-28 Thread Andreas Roehler
Rhodri James wrote: On Tue, 26 May 2009 14:22:29 +0100, Roy Smith r...@panix.com wrote: My pet peeve is syntax-aware editors which get things wrong. For example, the version of emacs I'm using now doesn't parse this properly: '''A triple-quoted string. Some editors won't get this

Re: print stream behavior

2009-05-27 Thread Andreas Kraemer
On May 27, 10:52 am, Peter Otten __pete...@web.de wrote: This is a longstanding quirk of the CPython implementation. The PRINT_ITEM_TO opcode triggers a PyFile_WriteObject() call which in turn does the C equivalent of if isinstance(f, file):    file.write(f, s) else:    write = getattr(f,

RE: While Statement

2009-05-22 Thread Andreas Tawn
Im using 2.6 python and when running this class progess(): def __init__(self, number, total, char): percentage = float(number/total*100) percentage = int(round(percentage)) char = char * percentage print char progess(100, 999,

Re: PYTHONPATH on Windows XP module load problem

2009-05-21 Thread Andreas Otto
Hi, I setup the PYTHONPATH environment variable too does windows use this variable ? mfg Andreas Otto -- http://mail.python.org/mailman/listinfo/python-list

Re: PYTHONPATH on Windows XP module load problem

2009-05-21 Thread Andreas Otto
Hi, I solved the problem ... thank you for your help mfg Andreas Otto -- http://mail.python.org/mailman/listinfo/python-list

ANNOUNCE: libmsgque 3.2

2009-05-21 Thread Andreas Otto
was updated: =    - http://libmsgque.sourceforge.net   For a fast introduction use the following URL:    - http://libmsgque.sourceforge.net/features.htm mfg   Andreas Otto -- http://mail.python.org/mailman/listinfo/python-list

Re: PYTHONPATH on Windows XP module load problem

2009-05-20 Thread Andreas Otto
or just in general how I solve this kind of problem 3. why is no .pyd file created ? - pyd is the extension name supported mfg Andreas Otto -- http://mail.python.org/mailman/listinfo/python-list

Re: PYTHONPATH on Windows XP module load problem

2009-05-20 Thread Andreas Otto
a found module not be loaded mfg Andreas Otto -- http://mail.python.org/mailman/listinfo/python-list

PYTHONPATH on Windows XP module load problem

2009-05-19 Thread Andreas Otto
and the pymsgque extension was done using Microsoft Visual C++ Express Edition it seems that I missing something mfg Andreas Otto -- http://mail.python.org/mailman/listinfo/python-list

Re: PYTHONPATH on Windows XP module load problem

2009-05-19 Thread Andreas Otto
MRAB wrote: Andreas Otto wrote: Hi, I have the following problem using python on windows. I crated a binary extension called pymsgque.dll on windows. The same extension works fine on UNIX/Linux. The problem is on Windows. The build is no problem but python

RE: Printing a hex character and prefixing it correctly

2009-05-15 Thread Andreas Tawn
If I have an integer k, for instance; k = 32 // BASE 10 How do I get print to print it out in HEX and PREFIXED with 0x? What is the PROPER WAY? This does not work: print This is hex 32: , int(k, 16) Xav k = 32 print This is hex 32: , hex(k) Cheers, Drea --

ANNOUNCE: libmsgque 3.1

2009-05-12 Thread Andreas Otto
new documentation and examples were added The Web-Site was updated: = - http://libmsgque.sourceforge.net For a fast introduction use the following URL: - http://libmsgque.sourceforge.net/features.htm mfg Andreas Otto -- http://mail.python.org/mailman

Nimrod programming language

2009-05-09 Thread Andreas Rumpf
Dear Python-users, I invented a new programming language called Nimrod that combines Python's readability with C's performance. Please check it out: http://force7.de/nimrod/ Any feedback is appreciated. Regards, Andreas Rumpf __ GRATIS für

[issue5463] Remove deprecated features from struct module

2009-04-29 Thread Andreas Schawo
Andreas Schawo andreas.sch...@gmail.com added the comment: I think we're done here. There's only the struct.error to be replaced by OverflowError or TypeError. Do you start the discussion on python-dev? I don't know how to. -- status: pending - open

Re: python setup ?

2009-04-28 Thread Andreas Röhler
. So far Andreas -- http://bazaar.launchpad.net/~a-roehler/python-mode/python-mode.el/ https://code.launchpad.net/s-x-emacs-werkstatt/ -- http://mail.python.org/mailman/listinfo/python-list

who is calling the base class __new__ method

2009-04-21 Thread Andreas Otto
PyObject * PyMqS_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { M0 ?? type-tp_base-tp_new( PyMqS_Obj *self = (PyMqS_Obj *)type-tp_alloc(type, 0); self-msgque = NULL; return (PyObject *)self; } mfg Andreas Otto -- http://mail.python.org/mailman/listinfo/python-list

Re: who is calling the base class __new__ method

2009-04-21 Thread Andreas Otto
Hi, found a solution - PyObject_GC_New seems not to be *not* the right function to create a new Python object with a base class included - PyType_GenericNew is the right one ... but this one is not documented from: http://docs.python.org/3.0/c-api/type.html

best void return of a member function

2009-04-20 Thread Andreas Otto
of an error mfg Andreas Otto -- http://mail.python.org/mailman/listinfo/python-list

Re: best void return of a member function

2009-04-20 Thread Andreas Otto
Andreas Otto wrote: well propable found the answer by my own ... Py_RETURN_NONE should be the best -- http://mail.python.org/mailman/listinfo/python-list

Re: best void return of a member function

2009-04-20 Thread Andreas Otto
Stefan Behnel wrote: Andreas Otto writes: I'm writing a native language binding for a library. http://libmsgque.sourceforge.net/ Every native method called by PYTHON have to return a PyObject* even if the function itself does not return anything. [...] Question

Re: best void return of a member function

2009-04-20 Thread Andreas Otto
Propable you can help me with an other problem ... the following code crash with: ==31431== Process terminating with default action of signal 11 (SIGSEGV) ==31431== General Protection Fault ==31431==at 0x4EA5151: PyObject_GenericGetAttr (object.c:982) ==31431==by 0x4EF1FBD:

Re: Question to python C API

2009-04-17 Thread Andreas Otto
, in module from Cython.Distutils import build_ext ImportError: No module named Cython.Distutils 7. a little bit to much errors for the first step, isn't it ? mfg Andreas Otto -- http://mail.python.org/mailman/listinfo/python-list

howto submit documentation bugs on python V3 web-site ?

2009-04-17 Thread Andreas Otto
Hi, is an email or something else available ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Question to python C API

2009-04-17 Thread Andreas Otto
alex23 wrote: On Apr 17, 4:22 pm, Andreas Otto aotto1...@onlinehome.de wrote: Question 1: Why you wall it Pyrex package ? From the first paragraph on the Cython site: Cython is based on the well-known Pyrex, but supports more cutting edge functionality and optimizations. python

Re: Question to python C API

2009-04-17 Thread Andreas Otto
Andreas Otto wrote: alex23 wrote: Did you unpack the Cython archive correctly? Is there a Shadow.py in your src/Cython-0.11.1/Cython/ folder? yes dev1...@linux02:~/ext/x86_64-suse-linux/thread/bin/Cython-0.11.1 ls -al Cython/Shadow.py -rw-r--r-- 1 dev1usr users 4130 3. Apr 10:52 Cython

[issue5777] unable to search in python V3 documentation

2009-04-17 Thread Andreas Otto
New submission from Andreas Otto aotto1...@users.sourceforge.net: Hi, if I search for sys.argv I get Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories. but its available at: http://docs.python.org/3.0

Re: Question to python C API

2009-04-16 Thread Andreas Otto
Hi, I want to make a language binding for an existing C library http://libmsgque.sourceforge.net is this possible ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Question to python C API

2009-04-16 Thread Andreas Otto
Yes, you are right ... I read more and found the doc about this ... the problem I have is something more tricky ... I allready have an extension written for java and the easyest thing would be use this as template and replace the java specific calls with python calls ... but the

looking for a pattern to code logic shared by gui/cli

2009-04-16 Thread Andreas Balogh
model to be passed through for GUI and LOG for the CLI version. Does a good (pythonic) pattern exist to solve this in a better way? Note: sorry, the code sample will not run on its own. I thought it'd be to lengthy to have a functioning sample, especially for the gui. -- Andreas Balogh

[issue5463] Remove deprecated features from struct module

2009-04-16 Thread Andreas Schawo
Andreas Schawo andreas.sch...@gmail.com added the comment: Hi Mark, currently there will be no struct.error neither TypeErorr because PyLong_AsLong floors a given float (see my msg84620). The Question is: should I test for long explicitly and raise an error if a different type is given

Question to python C API

2009-04-15 Thread Andreas Otto
into the function from above mfg Andreas Otto -- http://mail.python.org/mailman/listinfo/python-list

[issue5463] Remove deprecated features from struct module

2009-04-15 Thread Andreas Schawo
Andreas Schawo andreas.sch...@gmail.com added the comment: Hi, could you have a look at cleanup_float_coerce_patch.diff. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5463

Re: Regex similar to ^(?u)\w$, but without digits?

2009-04-12 Thread Andreas Pfrengle
On 12 Apr., 02:31, Mark Tolonen metolone+gm...@gmail.com wrote: Andreas a.pfren...@gmail.com wrote in message news:f953c845-3660-4bb5-8ba7-00b93989c...@b1g2000vbc.googlegroups.com... Hello, I'd like to create a regex that captures any unicode character, but not the underscore

Re: Regex similar to ^(?u)\w$, but without digits?

2009-04-12 Thread Andreas Pfrengle
On 12 Apr., 02:31, Mark Tolonen metolone+gm...@gmail.com wrote: Andreas a.pfren...@gmail.com wrote in message news:f953c845-3660-4bb5-8ba7-00b93989c...@b1g2000vbc.googlegroups.com... Hello, I'd like to create a regex that captures any unicode character, but not the underscore

Regex similar to ^(?u)\w$, but without digits?

2009-04-11 Thread Andreas
Hello, I'd like to create a regex that captures any unicode character, but not the underscore and the digits 0-9. ^(?u)\w$ captures them also. Is there a possibility to restrict an expression like \w to \w without [0-9_]? I'm using python 2.5.4 Thanks in advance, Andreas -- http

Re: absolute newbie: divide a list into sublists (nested lists?) of fixed length

2009-04-11 Thread Andreas Pfrengle
On 11 Apr., 22:14, ergconce...@googlemail.com wrote: Hi, I have a list looking like [ 0.84971586,  0.05786009,  0.9645675,  0.84971586,  0.05786009, 0.9645675, 0.84971586,  0.05786009,  0.9645675,  0.84971586, 0.05786009,  0.9645675] and I would like to break this list into subsets of

[issue1982] Feature: extend strftime to accept milliseconds

2009-04-01 Thread Andreas Balogh
Andreas Balogh balo...@gmail.com added the comment: - a_datetime.replace(microsecond = 1) + a_datetime = a_datetime.replace(microsecond = 1) Thanks for spotting the bug. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1982

[issue5463] Remove deprecated features from struct module

2009-03-30 Thread Andreas Schawo
Andreas Schawo andreas.sch...@gmail.com added the comment: Doesn't took much time. Even nothing happend. PyLong_AsLong trys to convert to int bevor raising an Exception. I'm not sure if struct.pack('l', x) should raise an Exception when a float is given. In case of string there is one. I

[issue5463] Remove deprecated features from struct module

2009-03-29 Thread Andreas Schawo
Andreas Schawo andreas.sch...@gmail.com added the comment: Yes you're right. The TypeError should be an OverflowError. It was just the copy and paste thing. Hm, I also wondering why struct.error is used. But someone already wanted to change this. The patch looks fine. Do you want to go ahead

[issue5544] test_fileio fails on windows MSVC Assertion

2009-03-24 Thread Andreas Schawo
Andreas Schawo andreas.sch...@gmail.com added the comment: I stepped back to r70187 and got no assertion. An update to r70349 result in an assertion. So I reverted the changes in test_fileio.py of r70349 and got no assertion. But the test should work without assertion. I tested releases 2.6.1

[issue5544] test_fileio fails on windows MSVC Assertion

2009-03-24 Thread Andreas Schawo
Andreas Schawo andreas.sch...@gmail.com added the comment: r69214 works with os.close(f.fileno());f.close() (Exception with Errno 9) r69560 does not compile r70152 test_fileio failed (different reason) MSVC Assertion with os.close(f.fileno());f.close() I was not able to use _fileio.c

[issue5463] Remove deprecated features from struct module

2009-03-23 Thread Andreas Schawo
Andreas Schawo andreas.sch...@gmail.com added the comment: I removed definition of _PY_STRUCT_RANGE_CHECKING. The test_standard_integers now expects struct.errors when there are out of range values (should have been part of my last patch). So test_1229380 is now obsolete. -- Added

[issue5463] Remove deprecated features from struct module

2009-03-23 Thread Andreas Schawo
Changes by Andreas Schawo andreas.sch...@gmail.com: Removed file: http://bugs.python.org/file13304/struct_overflow_patch.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5463

[issue5544] test_fileio fials on windows MSVC Assertion

2009-03-23 Thread Andreas Schawo
New submission from Andreas Schawo andreas.sch...@gmail.com: test_fileio fails on windows with MSVC Debug Assertion failed message since last week. -- components: Tests messages: 84015 nosy: andreas.schawo, pitrou severity: normal status: open title: test_fileio fials on windows MSVC

[issue5544] test_fileio fails on windows MSVC Assertion

2009-03-23 Thread Andreas Schawo
Andreas Schawo andreas.sch...@gmail.com added the comment: I'm afraid your patch doesn't solve it. I got the same popup: Debug Assertion Failed! Program: .\python_d.exe File: f:\dd\vctoools\crt_bld\self_x86\crt\src\close.c Line: 48 Expression: (_osfile(fh) FOPEN) It failed while running

[issue5463] Remove deprecated features from struct module

2009-03-20 Thread Andreas Schawo
Andreas Schawo andreas.sch...@gmail.com added the comment: Ok, heres the patch again. Passed regression tests. Should the version number increase to 0.3? Maybe to reflect there are no more deprecated features. It should then take place after FLOAT_COERCE cleanup. I'm currently trying

RE: Python to Perl transalators

2009-03-18 Thread Andreas Tawn
2009/3/17 abhinayaraj.r...@emulex.com: Could anyone suggest whether there is any Python to Perl code convertors? I found one on the net viz. Perthon. But it wasn't really helping out. I am just a beginner learning both the languages. Wondered if I can have some comparative

[issue4228] struct.pack('L', -1)

2009-03-18 Thread Andreas Schawo
Andreas Schawo andreas.sch...@gmail.com added the comment: As I understand actually the zipfile module possibly creates damaged zip files after version 2.4 because of '\x00\x00\x00\x00' instead of '\xff\xff\xff\xff' as header offset. But without any error. I think the _struct.c should

[issue5463] Remove deprecated features from struct module

2009-03-18 Thread Andreas Schawo
Andreas Schawo andreas.sch...@gmail.com added the comment: I agree with you. A separate patch will do better. In the next days I'm able to provide a new patch with the test_struct cleanup. Currently all tests succeeded on Windows and Linux. So I think no other module relies on this feature

Cannot allocate memory when using os.spawn for moving files

2009-03-17 Thread Andreas
', 'mv', LOCALFILENAME, REMOTEFILENAME) where LOCALFILENAME is some string like '/home/andreas/model.bin' and REMOTEFILENAME is some string like '/home/nfs/model-output/'. Here I have the problem that after about every 10th model run, I get an error saying Traceback (most recent call last

[issue5463] Compiler warning get_ulong is never used 3.x

2009-03-11 Thread Andreas Schawo
Andreas Schawo andreas.sch...@gmail.com added the comment: Hi Mark, I've removed all overflow masking from _struct.c. Running the regression test test_struct failed for test_issue4228 wich I think have to be removed too because it tests the deprecated feature. I've tested the constraints

[issue5463] Compiler warning get_ulong is never used 3.x

2009-03-11 Thread Andreas Schawo
Changes by Andreas Schawo andreas.sch...@gmail.com: Removed file: http://bugs.python.org/file13288/get_ulong_patch.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5463

[issue5463] Compiler warning get_ulong is never used 3.x

2009-03-09 Thread Andreas Schawo
New submission from Andreas Schawo andr...@schawo.de: When compiling the newest 3.x trunk I've got a compiler warning that get_ulong is defined but never used. I moved the function near the only place where it is used (disabled code). Now I have no more warnings. I don't know if it's of any

RE: Inverse of dict(zip(x,y))

2009-03-04 Thread Andreas Tawn
Can someone suggest a easy method to do the inverse of dict(zip(x,y)) to get two lists x and y? So, if x and y are two lists, it is easier to make a dictionary using d = dict(zip(x,y)), but if I have d of the form, d = {x1:y1, x2:y2, ...}, what is there any trick to get lists x = [x1, x2, ...]

RE: Inverse of dict(zip(x,y))

2009-03-04 Thread Andreas Tawn
So, if x and y are two lists, it is easier to make a dictionary using d = dict(zip(x,y)), but if I have d of the form, d = {x1:y1, x2:y2, ...}, what is there any trick to get lists x = [x1, x2, ...] and y = [y1, y2, ...] Cheers, Chaitanya. x = d.keys() y = d.values() But be aware that you

Re: Will multithreading make python less popular?

2009-02-16 Thread Andreas Kaiser
different Ruby threads might run on different cores, the speed of your program (at least the Ruby part) is limited to the speed of a single core. - Please don't mix threads and parallel processing on more then one CPU core. Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: len()

2009-02-08 Thread Andreas Waldenburger
On Sun, 08 Feb 2009 07:54:13 -0500 Pat p...@junk.net wrote: Terry Reedy wrote: Pat wrote: Andreas Waldenburger wrote: On Sat, 31 Jan 2009 13:27:02 -0500 Pat p...@junk.net wrote: Tobiah wrote: Just out of curiosity, why was len() made to be it's own function? I often find myself

[issue924806] email.Header.Header() produces wrong headers with utf8 enc.

2009-02-08 Thread Andreas Jung
Andreas Jung aj...@users.sourceforge.net added the comment: No idea - this bug is five years old! ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue924806

Weird Indentation? (Or: is there a for...else construct?)

2009-02-07 Thread Andreas Waldenburger
I've found something in the spirit of the following (in the epydoc sources, if you care): if True: print outer if for t in range(2): if True: print for if else: print phantom else For the life of me I can't place the else. Which if clause does it belong

Re: Weird Indentation? (Or: is there a for...else construct?)

2009-02-07 Thread Andreas Waldenburger
On Sat, 7 Feb 2009 15:21:22 +0100 Andreas Waldenburger geekm...@usenot.de wrote: outer if For if For if Phantom else Geez, I'm a moron. This is obviously not the output from the snippet. But if you fix the capitalization, it is. Sorry for that. /W -- My real email address is constructed

Re: Weird Indentation? (Or: is there a for...else construct?)

2009-02-07 Thread Andreas Waldenburger
On Sun, 08 Feb 2009 01:28:00 +1100 Steven D'Aprano st...@pearwood.info wrote: Andreas Waldenburger wrote: It seems that there is a for...else construct. Replacing the inner if with pass seems to confirm this. The else clause is still executed. Yes, there is a for...else construct

RE: python 3 error i know the file works in python 2.6

2009-02-05 Thread Andreas Tawn
#open file and read last names filename = input('name file') file = open(filename, 'r') names_list = file.readlines() file.close() #open a file for saving passwords outfile_name = input('Save passwords') outfile = open(outfile_name, 'a') #create a password for each name in list import random,

[issue5113] 2.5.4.3 / test_posix failing on HPUX systems

2009-02-02 Thread Andreas Kupries
Andreas Kupries andre...@activestate.com added the comment: Yes. Session log: andre...@bertha:~/tmp/x ll total 0 andre...@bertha:~/tmp/x touch foobar andre...@bertha:~/tmp/x ll total 0 -rw-rw-r-- 1 andreask DomainUsers 0 Feb 2 10:17 foobar andre...@bertha:~/tmp/x chown root foobar

[issue5113] 2.5.4.3 / test_posix failing on HPUX systems

2009-02-02 Thread Andreas Kupries
Andreas Kupries andre...@activestate.com added the comment: I do not know if this is standard for hpux or not. I can say that right now we have six different HPUX machines which behave in this manner, i.e. do not throw an error for the 'chown root foobar' command for an ordinary (non-root) user

[issue5113] 2.5.4.3 / test_posix failing on HPUX systems

2009-02-02 Thread Andreas Kupries
Andreas Kupries andre...@activestate.com added the comment: Yes, that does fail with error 'not owner'. andre...@bertha:~/tmp mkdir x andre...@bertha:~/tmp cd x andre...@bertha:~/tmp/x touch foobar andre...@bertha:~/tmp/x ll total 0 -rw-rw-r-- 1 andreask DomainUsers 0 Feb 2 15:06

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