[issue44996] tarfile missing TarInfo.offset_data member in documentation

2021-08-25 Thread Nils
New submission from Nils : The title says it all: `TarInfo` objects are missing their `offset_data` member in all documentation versions. -- assignee: docs@python components: Documentation messages: 400248 nosy: docs@python, nilsnolde priority: normal severity: normal status: open

[issue22240] argparse support for "python -m module" in help

2021-08-08 Thread Nils Kattenbeck
Nils Kattenbeck added the comment: I implemented the logic and adjusted the existing tests to have a fixed program name. I also fixed the build error by changing how zip files are detected. Based on you comment Nick you however even had a different idea. Currently I check if __spec__

[issue13824] argparse.FileType opens a file and never closes it

2021-07-25 Thread Nils Kattenbeck
Nils Kattenbeck added the comment: A good alternative would be to use pathlib.Path. The only downside would be that one has to manually handle `-` but besides that it solves most problems. Still the fact that file descriptors are kept open should be added as a warning to the docs

[issue22240] argparse support for "python -m module" in help

2021-07-23 Thread Nils Kattenbeck
Nils Kattenbeck added the comment: I expanded the patch from tebeka to also work with invocations like `python3 -m serial.tools.miniterm` where `miniterm.py` is a file and not a directory with a `__main__.py`. This was able to handle everything I threw at it. However due to the import

[issue22240] argparse support for "python -m module" in help

2021-07-18 Thread Nils Kattenbeck
Nils Kattenbeck added the comment: I am not sure if the patch correctly handles calling a nested module (e.g. `python3 -m serial.tools.miniterm`). Would it also be possible to detect if python or python3 was used for the invocation? -- nosy: +Nils Kattenbeck

[issue41249] TypedDict inheritance doesn't work with get_type_hints and postponed evaluation of annotations across modules

2021-07-03 Thread Nils Kattenbeck
Nils Kattenbeck added the comment: > The way I fixed this is I added `__forward_module__` to `typing.ForwardRef`, > so that it can resolve the forward reference with the same globals as the > ones specified by the module in `__forward_module__`. `TypedDict`'s metaclass > shou

[issue41249] TypedDict inheritance doesn't work with get_type_hints and postponed evaluation of annotations across modules

2021-06-07 Thread Nils Kattenbeck
Nils Kattenbeck added the comment: > I believe it had something to do with TypedDict instances being instances of > dict at runtime, but I can't actually reconstruct the reason. Hm that may be true. My limited low-level Python knowledge leads me to believe that this could also be done

[issue41249] TypedDict inheritance doesn't work with get_type_hints and postponed evaluation of annotations across modules

2021-05-29 Thread Nils Kattenbeck
Nils Kattenbeck added the comment: What is/was the initial reason to not preserve the MRO for a TypedDict? The only thing which came to my mind would be instantiation performance but as annotations are not evaluated by default and on the right-hide side of assignment most people will use

[issue25024] Allow passing "delete=False" to TemporaryDirectory

2021-05-26 Thread Nils Kattenbeck
Nils Kattenbeck added the comment: While the proposal linked by C.A.M. solves one of the use cases but it does not address the others. One use cases which is rather common for me it is e.g. to have scripts/programs which allow configuring whether temporary directories should get deleted

[issue1717] Get rid of more references to __cmp__

2021-05-26 Thread Nils Kattenbeck
Nils Kattenbeck added the comment: Has there been any resolution regarding `sortTestMethodsUsing`? See https://bugs.python.org/msg77261 I spend a decent time and read the documentation thrice before realizing it received an old-style compare function. Brett's proposal for a new attribute

[issue44137] importlib.resources.path raises RuntimeError when FileNotFoundError is raise in context manager

2021-05-22 Thread Nils Kattenbeck
Nils Kattenbeck added the comment: Thanks for looking into it. Yes I can confirm that `importlib_resources` has the expected behaviour - I did not download Python 3.10 as the code seems to be the same. -- ___ Python tracker <ht

[issue44137] importlib.resources.path raises RuntimeError when FileNotFoundError is raise in context manager

2021-05-17 Thread Nils Kattenbeck
Nils Kattenbeck added the comment: Yes I understand that the function handles this specially to not raise an exception if the file is not found in the package (even though the intention behind this is not clear to me). However if a user causes a FileNotFoundException itself inside

[issue44137] importlib.resources.path raises RuntimeError when FileNotFoundError is raise in context manager

2021-05-14 Thread Nils Kattenbeck
Change by Nils Kattenbeck : -- title: importlib.resources.path raises RuntimeError import FileNotFoundError is raise in context manager -> importlib.resources.path raises RuntimeError when FileNotFoundError is raise in context manager ___ Pyt

[issue44137] importlib.resources.path raises RuntimeError import FileNotFoundError is raise in context manager

2021-05-14 Thread Nils Kattenbeck
New submission from Nils Kattenbeck : When a FileNotFoundError is raised inside while the importlib.resources.path context manager is active a RuntimeError is raised. Looking at the (3.8) code it seems that FileNotFound exceptions are handled specially from all other exceptions which may lead

[issue34137] Add Path.lexist() to pathlib

2020-06-25 Thread Nils Philippsen
Nils Philippsen added the comment: I've come across this issue lately and proposed a PR which implements this and, analogous to os.stat(), adds a follow_symlinks parameter to Path.exists(). -- ___ Python tracker <https://bugs.python.

[issue34137] Add Path.lexist() to pathlib

2020-06-25 Thread Nils Philippsen
Change by Nils Philippsen : -- keywords: +patch pull_requests: +20316 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21157 ___ Python tracker <https://bugs.python.org/issu

[issue34137] Add Path.lexist() to pathlib

2020-06-25 Thread Nils Philippsen
Change by Nils Philippsen : -- nosy: +nils ___ Python tracker <https://bugs.python.org/issue34137> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38756] Add generic versions of weakref types to typing module

2019-11-10 Thread Nils Kattenbeck
Nils Kattenbeck added the comment: Okay, if I want to start a discussion about adding weakref types to PEP 585 where should do it? The mailing list or as an issue in the PEP repo? -- ___ Python tracker <https://bugs.python.org/issue38

[issue38761] weakref.WeakSet not instanceof collections.abc.Set

2019-11-10 Thread Nils Kattenbeck
New submission from Nils Kattenbeck : Instances of weakref.WeakSet are not instances of Set and therefore not of MutableSet but they are instances of Collection. They however implement all required methods for a MutableSet and Weak(Key|Value)Dictionary are correctly identified. Is this just

[issue38756] Add generic versions of weakref types to typing module

2019-11-10 Thread Nils Kattenbeck
Nils Kattenbeck added the comment: Okay nevermind, after looking in the PEP again and inspecting the __annotations__ property I learned that annotations are never evaluated and just saved as a string when using said future statement. However this may still be relevant

[issue38756] Add generic versions of weakref types to typing module

2019-11-10 Thread Nils Kattenbeck
Nils Kattenbeck added the comment: Yes thank you, using 'from __future__ import annotations' works fantastic. I did not knew about this functionality of the annotations future import statement, I thought it was only for postponed evaluation but I probably missed something in the PEP

[issue38756] Add generic versions of weakref types to typing module

2019-11-09 Thread Nils Kattenbeck
Nils Kattenbeck added the comment: A possible use case would be having multiple users and some groups said users can belong to. When using a WeakSet a user won't be part of a groups after he deleted his account without having to iterate over all groups. class User: pass class Group

[issue38756] Add generic versions of weakref types to typing module

2019-11-09 Thread Nils Kattenbeck
New submission from Nils Kattenbeck : I would like to request the addition of generic variants of some of the types in weakref to the typing module. This would for example include weakref.WeakKeyDictionary among others. Doing so would allow one to add type annotations to code using such data

[issue31652] make install fails: no module _ctypes

2019-04-18 Thread Nils Goroll
Nils Goroll added the comment: In case this helps: I noticed this during the build: *** WARNING: renaming "_ssl" since importing it failed: ld.so.1: python: fatal: libssl.so.1.1: open failed: No such file or directory *** WARNING: renaming "_hashlib" since importin

[issue35558] venv: running activate.bat gives ' parameter format not correct - 65001'

2018-12-22 Thread Nils Lindemann
Change by Nils Lindemann : -- resolution: -> duplicate stage: -> resolved status: -> closed ___ Python tracker <https://bugs.python.org/issue35558> ___ ___

[issue35558] venv: running activate.bat gives ' parameter format not correct - 65001'

2018-12-21 Thread Nils Lindemann
New submission from Nils Lindemann : Windows 7, Python 3.7.1:260ec2c36a after doing C:\python\python -m venv C:\myvenv and then C:\>myvenv\Scripts\activate.bat it prints parameter format not correct - 65001 However, it activates the venv - the prompt shows (myvenv

[issue31816] Unexpected behaviour of `dir()` after implementation of __dir__

2017-10-19 Thread Nils Diefenbach
Nils Diefenbach <23okrs20+pyt...@mykolab.com> added the comment: Alright. Are there any other magic methods that do some post-processing on a custom implementation of them ? I couldn't think of one, which is why this behaviour appeared odd to me. -- status: pending -

[issue31816] Unexpected behaviour of `dir()` after implementation of __dir__

2017-10-19 Thread Nils Diefenbach
New submission from Nils Diefenbach <23okrs20+pyt...@mykolab.com>: When defining a custom __dir__ method in a class, calling dir() on said class still sorts the output. This is, imo, unexpected behaviour, especially if the order of output was specified in __dir__ and is somehow re

[issue30580] WSGI examples raise AttributeError: __exit__

2017-06-06 Thread Nils Lindemann
Nils Lindemann added the comment: ok -- status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30580> ___ ___ P

[issue30580] WSGI examples raise AttributeError: __exit__

2017-06-06 Thread Nils Lindemann
Nils Lindemann added the comment: I am not sure if the py package i found on PyPi is what you meant, but if you mean the py launcher (the py.exe in the windows dir), yes, i have that. My system was indeed misconfigured as you correctly guessed, i had the .py filetype pointing to a Python

[issue30580] WSGI examples raise AttributeError: __exit__

2017-06-06 Thread Nils Lindemann
Nils Lindemann added the comment: What would that be? If i google 'py helper command' i get no good results. -- resolution: not a bug -> status: closed -> open ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue30580] WSGI examples raise AttributeError: __exit__

2017-06-06 Thread Nils Lindemann
Nils Lindemann added the comment: I just found out that the example works in idle and if i do in a console: python server.py but not if i do just: server.py What is the secret behind this? -- ___ Python tracker <rep...@bugs.python.org>

[issue30580] WSGI examples raise AttributeError: __exit__

2017-06-06 Thread Nils Lindemann
Nils Lindemann added the comment: I tried a few online python 3 interpreters. These give the same exception: http://www.learnpython.org/en/Hello%2C_World%21 http://rextester.com/l/python3_online_compiler http://ideone.com/pIMilt http://www.tutorialspoint.com/execute_python3_online.php

[issue30580] WSGI examples raise AttributeError: __exit__

2017-06-06 Thread Nils Lindemann
New submission from Nils Lindemann: All examples on https://docs.python.org/3/library/wsgiref.html raise this exception: Traceback (most recent call last): File "C:\Code\test\server.py", line 110, in with make_server('', 8000, simple_app) as httpd: AttributeError: __exit

[issue25444] Py Launch Icon

2017-06-06 Thread Nils Lindemann
Nils Lindemann added the comment: Two years later: To the dude who removed the rocket from the icons in 3.6: I LOVE YOU! -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue25444] Py Launch Icon

2015-10-29 Thread Nils Lindemann
Nils Lindemann added the comment: i see now what you mean. I have this icon too (py 3.5.0 idle icon.png). Something is misconfigured with the icons in the python 3.5.0 windows installer, also python files in explorer have no icons. Thanks for your hint with the python ideas list, i will post

[issue25444] Py Launch Icon

2015-10-26 Thread Nils Lindemann
Nils Lindemann added the comment: it seems i have still not explained my issue in an understandable way: the three first icons in the file list in the screenshot, aka the icons which are used in eg py 3.2, these icons are cool. the icon i do not like, is the launcher icon which is used in eg

[issue25444] Py Launch Icon

2015-10-20 Thread Nils Lindemann
Nils Lindemann added the comment: The icons are not intended to be used instead of the three default icons, please dont, these are just great. I am just targeting the current launcher symbol: * It contains a symbol of an instrument which can be used to kill people. * in the 16x16 icon

[issue25444] Py Launch Icon

2015-10-20 Thread Nils Lindemann
Nils Lindemann added the comment: let me reformulate it: my main intention is to get rid of the launcher symbol, or at least have a nicer looking symbol, i dont care for the idle symbol. -- ___ Python tracker <rep...@bugs.python.org>

[issue25444] Py Launch Icon

2015-10-20 Thread Nils Lindemann
Nils Lindemann added the comment: Here is also a zip containing the icons. -- Added file: http://bugs.python.org/file40818/icons.zip ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue25444] Py Launch Icon

2015-10-19 Thread Nils Lindemann
Nils Lindemann added the comment: Hm actually an alternative icon for idle can be useful to separate it from command lines in the task bar. But a special launcher symbol is not necessary in my opinion. -- ___ Python tracker <rep...@bugs.python.

[issue25444] Py Launch Icon

2015-10-19 Thread Nils Lindemann
New submission from Nils Lindemann: Hi, See attached screen for a list of alternative 16x16 icon suggestions to the current launcher symbol, which i dont like (Dudes, rockets are used in wars!). I copied them a few times to show how they look in groups. (while i was at it i also created

Python 3.5.0 Feedback

2015-10-18 Thread Nils-Hero Lindemann via Python-list
der Suche (welches Sie zwischendurch mal waren, glaube ich). === Bugs === * Python 3.5 verträgt a=input('\n') nicht. Gruß, Nils -- Nils-Hero Lindemann <nilsherolindem...@gmail.com> -- https://mail.python.org/mailman/listinfo/python-list

UDP and Python2.7 and 2.7 documentation gives error!

2015-07-25 Thread Nils
ot valid in its context C:\Utveckling\Counter_python So, please tell me where I am doing wrong, or is doc's wrong?? Nils in Uppsala -- -- https://mail.python.org/mailman/listinfo/python-list

[issue21121] -Werror=declaration-after-statement is added even for extension modules through setup.py

2014-04-01 Thread nils
New submission from nils: I got an error while rebuilding a module for 3.4. This was a ISO C90 error but setup.py explicitely adds -std=c99 to the gcc parameters, and indeed it is used. fifo.h:114:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement

[issue21121] -Werror=declaration-after-statement is added even for extension modules through setup.py

2014-04-01 Thread nils
nils added the comment: The workaround indeed works. At least I can work now until this gets officialy fixed. Thanks! export CFLAGS=$(python3.4 -c 'import sysconfig; print(sysconfig.get_config_var(CFLAGS).replace(-Werror=declaration-after-statement

Critic: New Python Front Page

2014-03-08 Thread Nils-Hero Lindemann
(https://addons.mozilla.org/de/firefox/addon/hack-the-web/). Please compare with e.g. Wikipedia, it is easy there to isolate the main content. http://www.python.org/community/ That picture is scary. Regards, Nils -- Nils-Hero Lindemann nilsherolindem...@gmail.com -- https://mail.python.org

Re: Critic: New Python Front Page

2014-03-08 Thread Nils-Hero Lindemann
to ... https://github.com/python/pythondotorg/issues/265 Regards, Nils -- Nils-Hero Lindemann nilsherolindem...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Newline interpretation issue with MIMEApplication with binary data, Python 3.3.2

2013-09-26 Thread Nils Bunger
to create a multipart msg with a binary file? I was hoping to avoid that. Nils ps. You probably know this, but in case anyone else reads this thread, HTTP requires all headers to have CRLF, not native line endings. The python MIME modules can do that properly as of python 3.2 (fixed

Re: Newline interpretation issue with MIMEApplication with binary data, Python 3.3.2

2013-09-26 Thread Nils Bunger
suggestions helped me think of this. Nils On Wednesday, September 25, 2013 9:38:17 AM UTC-7, Nils Bunger wrote: Hi, I'm having trouble encoding a MIME message with a binary file. Newline characters are being interpreted even though the content is supposed to be binary. This is using

Re: Newline interpretation issue with MIMEApplication with binary data, Python 3.3.2

2013-09-25 Thread Nils Bunger
message without the encoding issue... any help would be greatly appreciate! Nils - import io from email.mime.application import MIMEApplication from email.generator import BytesGenerator from email.encoders import encode_noop app = MIMEApplication(b'Q\x0dQ', _encoder=encode_noop) b

[issue17816] Weak*Dictionary KeyErrors during callbacks

2013-05-01 Thread Nils Bruin
Nils Bruin added the comment: One solution is to patch both WeakValueDictionary and WeakKeyDictionary with their own clear methods where we first store the strong links (to keys, resp. values) in a list, then clear the underlying dictionaries (this will now trigger the deletion

[issue17816] Weak*Dictionary KeyErrors during callbacks

2013-04-22 Thread Nils Bruin
New submission from Nils Bruin: The following program is a little dependent on memory layout but will usually generate lots of Exception KeyError: (A(9996),) in function remove at 0xa47050 ignored messages in Python 2.7. import weakref class A(object): def __init__(self

[issue17816] Weak*Dictionary KeyErrors during callbacks

2013-04-22 Thread Nils Bruin
Nils Bruin added the comment: Have you tried if the fix at issue7105 solves the problem? I don't see the patch there introduce a `clear` method override for WeakValueDictionary or WeakKeyDictionary. The one for WeakSet still calls self.data.clear(), which for dictionaries would still result

[issue17816] Weak*Dictionary KeyErrors during callbacks

2013-04-22 Thread Nils Bruin
Nils Bruin added the comment: I think the difference in behaviour between Py3 and Py2 is coming from: http://hg.python.org/cpython/file/a26df2d03989/Objects/dictobject.c#l1275 which first clears all values before removing any keys. For a WeakValueDictionary that means all the weakrefs

[issue17526] inspect.findsource raises undocumented error for code objects with empty filename

2013-03-25 Thread Nils Bruin
Nils Bruin added the comment: The most straightforward change I can think of is to change the line if not sourcefile and file[0] + file[-1] != '': to if not sourcefile and (not file or file[0] + file[-1] != ''): That solves the problem in the cases I have observed

[issue17526] inspect.findsource raises undocumented error for code objects with empty filename

2013-03-22 Thread Nils Bruin
New submission from Nils Bruin: It would seem reasonable that an empty filename would be a legitimate way of indicating that a code object does not have a corresponding source file. However, if one does that then inspect.findsource raises an unexpected IndexError rather than the documented

[issue11912] Python shouldn't use the mprotect() system call

2011-04-25 Thread Nils Breunese
Nils Breunese n...@breun.nl added the comment: I contacted the author of iotop and he told me iotop does not use mprotect (but it does use dlopen). Guess I'll have to do some more digging to find what is exactly doing the call to mprotect

[issue11912] Python shouldn't use the mprotect() system call

2011-04-23 Thread Nils Breunese
New submission from Nils Breunese n...@breun.nl: When I try to run iotop [0] on CentOS 5.6 on a kernel with grsecurity [1] then iotop won't start because grsecurity is blocking Python because of its use of the mprotect() system call. Please see http://www.atomicorp.com/wiki/index.php/ASL_FAQ

[issue11912] Python shouldn't use the mprotect() system call

2011-04-23 Thread Nils Breunese
Nils Breunese n...@breun.nl added the comment: I got this error message in /var/log/messages when trying to start iotop: Apr 13 08:49:37 hostname kernel: grsec: From xxx.xxx.xxx.xxx: denied RWX mprotect of /lib64/ld-2.5.so by /usr/bin/iotop[iotop:9836] uid/euid:0/0 gid/egid:0/0, parent

[issue11912] Python shouldn't use the mprotect() system call

2011-04-23 Thread Nils Breunese
Nils Breunese n...@breun.nl added the comment: I haven't had any problems with other Python applications like this, Python seems fine otherwise. I just noticed that iotop has a dependency on python-ctypes, which sounds like it could be iotop doing the mprotect() calls via ctypes. Does

[issue6011] python doesn't build if prefix contains non-ascii characters

2011-01-25 Thread Nils Philippsen
Nils Philippsen n...@redhat.com added the comment: NB: it's not the shell, but the kernel which interprets the shebang line (and subsequently calls the shell /bin/sh with it if it's missing, causing funny effects when it encounters the first import line and you happen to have ImageMagick

Re: Standardizing RPython - it's time.

2010-10-12 Thread Nils Ruettershoff
itself has finished and the merging has started... Does anyone has more details? Regrads, Nils [1] http://www.python.org/dev/peps/pep-3146/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Standardizing RPython - it's time.

2010-10-12 Thread Nils Ruettershoff
On 10/12/2010 05:18 PM, Nils Ruettershoff wrote: Hi, On 10/12/2010 07:41 AM, John Nagle wrote: [...] With Unladen Swallow looking like a failed IT project, a year behind schedule and not delivering anything like the promised performance, Google management may pull the plug on funding

[issue6011] python doesn't build if prefix contains non-ascii characters

2010-10-05 Thread Nils Philippsen
Changes by Nils Philippsen n...@redhat.com: -- nosy: +nils ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6011 ___ ___ Python-bugs-list mailing

use of gtk in a nautilus extension

2010-08-18 Thread Nils
this is ?? Yours, Nils -- http://mail.python.org/mailman/listinfo/python-list

Re: pre-uninstall script in bdist_wininst

2010-08-08 Thread Nils
On 6 Aug., 04:02, Mark Hammond skippy.hamm...@gmail.com wrote: According to a comment in pywin32's post-install script:          elif arg == -remove:              # bdist_msi calls us before uninstall, so we can undo what we              # previously did.  Sadly, bdist_wininst calls us

pre-uninstall script in bdist_wininst

2010-08-05 Thread Nils
and de- register on uninstall - so if other ideas are around I'd love to hear them, too... Nils -- http://mail.python.org/mailman/listinfo/python-list

Re: pre-uninstall script in bdist_wininst

2010-08-05 Thread Nils
On 5 Aug., 20:26, Nils andresen.n...@googlemail.com wrote: According to the docs in [1] [...] and with [1] I meant http://docs.python.org/distutils/builtdist.html#the-postinstallation-script Nils -- http://mail.python.org/mailman/listinfo/python-list

Re: source install of python2.7 and rpm install of cx_Oracle collision

2010-07-22 Thread Nils Ruettershoff
to the configure script, that you like to have shared libraries. So you need to add --enable-shared to your configure call: ./configure --prefix=/opt/Python2.7a --enable-shared Now you got the shared libraries in the lib folder. Cheers, Nils -- http://mail.python.org/mailman/listinfo/python-list

Re: source install of python2.7 and rpm install of cx_Oracle collision

2010-07-22 Thread Nils Ruettershoff
. But this is not clean. As Daniel mention, you should try to get a rpm. Otherwise you may get in trouble, if you install a newer Python2.7 version and forget to maintain you library paths. Cheers, Nils -- http://mail.python.org/mailman/listinfo/python-list

[issue1675951] [gzip] Performance for small reads and fix seek problem

2010-06-17 Thread Nils Philippsen
Changes by Nils Philippsen n...@redhat.com: -- nosy: +nils ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1675951 ___ ___ Python-bugs-list mailing

[issue2504] Add gettext.pgettext() and variants support

2010-06-15 Thread Nils Philippsen
Changes by Nils Philippsen n...@redhat.com: -- nosy: +nils ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2504 ___ ___ Python-bugs-list mailing

Re: multiprocessing problems

2010-01-20 Thread Nils Ruettershoff
in all_files: feeder_q.put(file) # inform processes that all work has been ordered queue_filled.set() # wait until queue is empty feeder_q.join() # wait until all processed have finished their jobs for process in process_list: process.join() Cheers, Nils -- http

Re: multiprocessing problems

2010-01-20 Thread Nils Ruettershoff
of the x.join(). This will block the parent process until all processes have been terminated. So as soon as the current set of processes have finished their job, a new set will be spawned. Cheers, Nils -- http://mail.python.org/mailman/listinfo/python-list

Re: Seeding the rand() Generator

2009-08-06 Thread Nils Ruettershoff
/order-by-rand/ if you want to know more please check this article too: http://jan.kneschke.de/2007/2/22/analyzing-complex-queries regards, Nils -- http://mail.python.org/mailman/listinfo/python-list

performance problem with time.strptime()

2009-07-02 Thread Nils Rüttershoff
() checks everytime the locale? had I missed something or could I have a problem with my OS locale? With python 3.1 there is no difference, unless that time.strptime() took approx 12 sec longer... :( regards, Nils Here a complete test script: #!/opt/python/2.6.2/bin/python import time import timeit

Re: performance problem with time.strptime()

2009-07-02 Thread Nils Rüttershoff
Hi Casey Casey Webster wrote: On Jul 2, 7:30 am, Nils Rüttershoff n...@ccsg.de wrote: Rec = re.compile(r^\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}\s-\s\d+\s\[(\d{2}/\w+/\d{4}:\d{2}:\d{2}:\d{2})\s\+\d{4}\].*) Line = '1.2.3.4 - 4459 [02/Jul/2009:01:50:26 +0200] GET /foo HTTP/1.0 200

Re: Spam? Re: whizBase vs. Python

2009-07-02 Thread Nils Rüttershoff
languages? Why Whizbase? Is your study public and if so were we could read it? ;) Regards, Nils -- http://mail.python.org/mailman/listinfo/python-list

Re: seeking thru a file

2009-06-26 Thread Nils Rüttershoff
else: data_present = False break if len(my_buffer) 0: do_something(my_buffer) counter = 0 my_buffer = [] Kind Regards, Nils -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Query: Related to locking a resource in a multithreaded environment

2008-08-19 Thread Nils Oliver Kröger
of this class in each thread by calling Singleton.getInstance(). Hope that helps Regards Nils tarun schrieb: I think I need something called global interpreter lock which is accessible to all the threads. But I am not sure how to implement this. On Tue, Aug 19, 2008 at 11:28 AM, tarun [EMAIL

Re: Cant run application as ./myapp.py

2008-03-03 Thread Nils Oliver Kröger
#!/usr/bin/python If none of this is the problem please post the error message you (hopefully) get. hth Nils Robert Rawlins schrieb: Hello Guys, I’ve got an application here which for some reason won’t start using the following syntax from the command line: Cd /mydirectory

Re: Exception or not

2008-03-03 Thread Nils Oliver Kröger
its task. For example lost connection to user database or things like that. A function should never propagate an expected result as an exception. Greetings Nils Monica Leko schrieb: | Suppose you have some HTML forms which you would like to validate. | Every field can have different errors

Re: how to iterate over sequence and non-sequence ?

2007-10-19 Thread Nils
On Oct 19, 10:58 am, Steven D'Aprano [EMAIL PROTECTED] wrote: On Fri, 19 Oct 2007 01:24:09 +0200, stef mientki wrote: hello, I generate dynamically a sequence of values, but this sequence could also have length 1 or even length 0. So I get some line in the form of: line =

Re: dynamic invoke

2007-10-19 Thread Nils
thing in python. Does it have some build-in function to do it? Kind Regards, Lukasz. Use apply(): http://docs.python.org/lib/non-essential-built-in-funcs.html Nils -- http://mail.python.org/mailman/listinfo/python-list

Re: Threads and racing conditions

2007-08-22 Thread Nils Oliver Kröger
Nils -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGzHsizvGJy8WEGTcRAgN1AJ42cM1P/NW7Ei3F5ViSsmTcKDvCIgCeIUGG GD7DAb3f+Lmcav663F+wkQg= =kJ0G -END PGP SIGNATURE- -- http://mail.python.org/mailman/listinfo

Re: Class destruction

2007-08-22 Thread Nils Oliver Kröger
... Nils -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGzISBzvGJy8WEGTcRAiOwAJ94fJza4/GVQsFmbXwsP8kdvQjV5wCfQktw F/zPJAw0ayjYe5MGxPR1YqI= =4Hl6 -END PGP SIGNATURE- -- http://mail.python.org/mailman/listinfo

Re: Python is removing my quotes!

2007-08-21 Thread Nils Oliver Kröger
quotes as special characters, so does afaik the sh and a couple of other shells in the Unixverse. You will also need to escape blanks and depending on the shell a number of other special characters (like for example the pipe). Greetings Nils -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6

Re: How to optimise this code?

2007-08-21 Thread Nils Oliver Kröger
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 David N Montgomery schrieb: class testCase: def __init__(self, tc): if tc == 1:self.testCase1() if tc == 2:self.testCase2() if tc == 3:self.testCase3() if tc == 4:self.testCase4() if tc ==

Interpreter window

2007-02-02 Thread Nils Overas Bergen
I have created a Python application in Windows XP which uses WxWidgets. When I start the application from the Python interpreter I get one empty interpreter window in addition to the application window. Is there a way to close the interpreter window without closing the application? Or, can I start

Re: Interpreter window

2007-02-02 Thread Nils Overas Bergen
On 2 Feb, 13:07, skyofdreams [EMAIL PROTECTED] wrote: Nils Overas Bergen [EMAIL PROTECTED] [EMAIL PROTECTED] I have created a Python application in Windows XP which uses WxWidgets. When I start the application from the Python interpreter I get one empty interpreter window in addition

Re: pdf to text

2007-01-25 Thread Nils Oliver Kröger
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 have a look at the pdflib (www.pdflib.com). Their Text Extraction Toolkit might be what you are looking for, though I'm not sure whether you can use it detached from the pdflib itself. hth Nils tubby schrieb: I know this question comes up a lot

Re: calling a class instance of function

2006-12-21 Thread Nils Oliver Kröger
a class test which inherits pid. I'm not really sure what the following lines do ... this would usually be the place to introduce class variables. Hope that Helps! Greetings Nils Original-Nachricht Datum: 21 Dec 2006 11:09:32 +1100 Von: Pyenos [EMAIL PROTECTED] An: python-list

Re: what is wrong with my code?

2006-12-21 Thread Nils Oliver Kröger
is anything else but len(progress_table), you should use for example -1 as the default value and calculate the length inside your functions if the parameter is not different. Otherwise dump this parameter. Hope that helps! Greetings Nils Original-Nachricht Datum: 21 Dec 2006 09

Google code search (Was: Names changed to protect the guilty)

2006-10-08 Thread Nils R Grotnes
Google has a cool new service. http://www.google.com/codesearch You can use regular expressions! (I found at least 13 distinct utilities that used the idiom.) Nils -- http://mail.python.org/mailman/listinfo/python-list

Re: Letting a Python application phone home

2006-07-15 Thread Nils Oliver Kröger
protocol. For the latter have a look at the python cryptography toolkit. Sorry I have no url at hand, simply google. Concerning the question of stopping the program when the internet connection breaks: let your program contact the server periodically. If this fails quit the program. Regards Nils

Re: The Nature of the “Unix Philosophy”

2006-06-08 Thread Nils O. Selåsdal
Xah Lee wrote: The Nature of the “Unix Philosophy” Xah Lee, 2006-05 In the computing industry, especially among unix community, we often hear that there's a “Unix Philosophy”. In this essay, i dissect the nature and characterization of such “unix philosophy”, as have been described by

Re: round() wrong in Python 2.4?

2005-09-14 Thread Nils Grimsmo
)] on linux2 Type help, copyright, credits or license for more information. $ gcc-4.0 --version gcc-4.0 (GCC) 4.0.2 20050725 (prerelease) (Debian 4.0.1-3) Klem fra Nils -- http://mail.python.org/mailman/listinfo/python-list

round() wrong in Python 2.4?

2005-09-13 Thread Nils Grimsmo
it by taking integer 1, and -ing in the right exponent, and then casting to double via void*. This would not be very portable, though. Klem fra Nils -- http://mail.python.org/mailman/listinfo/python-list

Re: Comm. between Python and PHP

2005-02-23 Thread Nils Emil P.Larsen
Hello Python is perfectly capable of generating HTML. You don't have to demean yourself by working in PHP. Thanks for the tip about using Python instead of PHP to generate web pages. I may follow it. Nils Emil -- My reply-address is valid. www.bios-flash.dk Min svar-adresse er gyldig

  1   2   >