[issue34870] Core dump when Python VSCode debugger is attached

2018-10-02 Thread Per Lundberg
New submission from Per Lundberg : My code has recently started triggering a core dump in the Python executable when the VSCode debugger is attached. This doesn't happen right away; it seems to happen more or less _after_ the program is done executing (I just placed a breakpoint and stepped

[issue25144] 3.5 Win install fails with "TARGETDIR"

2017-11-20 Thread Per Fryking
Per Fryking <fryk...@gmail.com> added the comment: Got the same issue with the 3.6 installer from python.org The thing is that I can't elevate the priviliges to be administrator. So I'm stuck. Uploading the log. Running windows 7 -- nosy: +Per Fryking Added file:

[issue22544] Inconsistent cmath.log behaviour

2015-04-25 Thread Per Brodtkorb
Per Brodtkorb added the comment: This is not only a problem for division. It also applies to multiplication as exemplified here: complex(0,inf)+1 # expect 1 + infj Out[16]: (1+infj) (complex(0,inf)+1)*1 # expect 1 + infj Out[17]: (nan+infj) complex(inf, 0) + 1j # expect inf + 1j Out[18

[issue14507] Segfault with starmap and izip combo

2012-04-05 Thread Per Myren
New submission from Per Myren progr...@gmail.com: The following code crashes with a segfault on Python 2.7.2: from operator import add from itertools import izip, starmap a = b = [1] for i in xrange(10): a = starmap(add, izip(a, b)) list(a) It also crashes with Python 3.2.2: from

[issue6715] xz compressor support

2011-11-30 Thread Per Øyvind Karlsen
Per Øyvind Karlsen peroyv...@mandriva.org added the comment: Ah, I thought that he had reused most of the original C code in _lzmamodule.c not replaced by python code, but I see that not being the case now (only slight fragments;). Oh well, I thought that I'd still earned a note with some

[issue6715] xz compressor support

2011-11-29 Thread Per Øyvind Karlsen
Per Øyvind Karlsen peroyv...@mandriva.org added the comment: Not meaning to sound petty, but wouldn't it be common etiquette to retain some original copyright notice from original code intact..? -- ___ Python tracker rep...@bugs.python.org http

[issue12013] file /usr/local/lib/python3.1/lib-dynload/_socket.so: symbol inet_aton: referenced symbol not found

2011-11-16 Thread Per Rosengren
Per Rosengren per.roseng...@gmail.com added the comment: On Linux: nm -C /lib/libc.so.6 |grep ' inet_aton' 000cbce0 W inet_aton This means that when Python is build with GCC (like on linux), inet_aton is in system libc. If you build with GCC in solaris, inet_aton will be taken from

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-06-24 Thread Per Cederqvist
Changes by Per Cederqvist ce...@lysator.liu.se: -- nosy: +ceder ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12394 ___ ___ Python-bugs-list

[issue11817] berkeley db 5.1 support

2011-04-09 Thread Per Øyvind Karlsen
New submission from Per Øyvind Karlsen peroyv...@mandriva.org: This patch adds support for berkeley db = 5.1. -- components: Extension Modules files: Python-2.7.1-berkeley-db-5.1.patch keywords: patch messages: 133442 nosy: proyvind priority: normal severity: normal status: open title

[issue11817] berkeley db 5.1 support

2011-04-09 Thread Per Øyvind Karlsen
Per Øyvind Karlsen peroyv...@mandriva.org added the comment: forgot some additional config checks in setup.py in previous patch.. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11817

[issue11817] berkeley db 5.1 support

2011-04-09 Thread Per Øyvind Karlsen
Per Øyvind Karlsen peroyv...@mandriva.org added the comment: sloppysloppy... fix previous patch -- Added file: http://bugs.python.org/file21602/Python-2.7.1-berkeley-db-5.1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue6715] xz compressor support

2010-10-31 Thread Per Øyvind Karlsen
Per Øyvind Karlsen peroyv...@mandriva.org added the comment: I've uploaded a new version of the patch to http://codereview.appspot.com/2724043/ now. I'd be okay on doing maintenance directly against the CPython repository btw. :) -- ___ Python

[issue6715] xz compressor support

2010-10-31 Thread Per Øyvind Karlsen
Per Øyvind Karlsen peroyv...@mandriva.org added the comment: LZMAFile, LZMACompressor LZMADecompressor are all inspired by and written to be as similar to bz2's for easier use maintenance. I must admit that I haven't really put much thought into alternate ways to implement them beyond

[issue6715] xz compressor support

2010-10-31 Thread Per Øyvind Karlsen
Per Øyvind Karlsen peroyv...@mandriva.org added the comment: Hehe, don't feel guily on my part at least, I had already implemented it like this long before. :p I guess I could rewrite it following these suggestions, but I probably won't be able to finish it in time for 3.2 beta

[issue6715] xz compressor support

2010-10-28 Thread Per Øyvind Karlsen
Per Øyvind Karlsen peroyv...@mandriva.org added the comment: All fixed now. :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6715

[issue6715] xz compressor support

2010-10-28 Thread Per Øyvind Karlsen
Per Øyvind Karlsen peroyv...@mandriva.org added the comment: Here's a patch with the latest code generated against py3k branch, it comes with Doc/library/lzma.rst as well now. -- keywords: +patch Added file: http://bugs.python.org/file19405/py3k-lzmamodule.patch

[issue6715] xz compressor support

2010-10-28 Thread Per Øyvind Karlsen
Per Øyvind Karlsen peroyv...@mandriva.org added the comment: here's Lib/test/teststring.lzma, required by the test suite. -- Added file: http://bugs.python.org/file19406/teststring.lzma ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue6715] xz compressor support

2010-10-28 Thread Per Øyvind Karlsen
Per Øyvind Karlsen peroyv...@mandriva.org added the comment: here's Lib/test/teststring.xz, required by the test suite. -- Added file: http://bugs.python.org/file19407/teststring.xz ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue6715] xz compressor support

2010-10-27 Thread Per Øyvind Karlsen
Per Øyvind Karlsen peroyv...@mandriva.org added the comment: I've (finally) finalized the api and prepared pyliblzma to be ready for inclusion now. The code can be found in the 'py3k' branch referred to earlier. Someone else (don't remember who:p) volunteered for writing the PEP earlier, so

[issue6715] xz compressor support

2010-05-29 Thread Per Øyvind Karlsen
Per Øyvind Karlsen peroyv...@mandriva.org added the comment: I've ported pyliblzma to py3k now and also implemented the missing functionality I mentioned earlier, for anyone interested in my progress the branch is found at: https://code.launchpad.net/~proyvind/pyliblzma/py3k I need to fix

[issue4015] [patch] make installed scripts executable on windows

2010-05-28 Thread Per
Per pybugs.pho...@safersignup.com added the comment: On POSIX the interpreter will be read from the first line of a file. On Windows the interpreter will be read from the Registry HKEY_CLASSES_ROOT\.file-extension . So the correct way to associate a interpreter to a file is to invent a file

[issue5689] please support lzma compression as an extension and in the tarfile module

2010-05-26 Thread Per Øyvind Karlsen
Per Øyvind Karlsen peroyv...@mandriva.org added the comment: if you're already looking at issue6715, then I don't get why you're asking.. ;) quoting from msg106433: For my code, feel free to use your own/any other license you'd like or even public domain (if the license of bz2module.c

[issue6715] xz compressor support

2010-05-26 Thread Per Øyvind Karlsen
Per Øyvind Karlsen peroyv...@mandriva.org added the comment: Yeah, I guess I anyways can just break the current API right away to make it compatible with future changes, I've already figured since long ago how it should look like. It's not like I have to implement the actual functionality

[issue5689] please support lzma compression as an extension and in the tarfile module

2010-05-25 Thread Per Øyvind Karlsen
Per Øyvind Karlsen peroyv...@mandriva.org added the comment: I'm the author of the pyliblzma module, and if desired, I'd be happy to help out adapting pyliblzma for inclusion with python. Most of it's code is based on bz2module.c, so it shouldn't be very far away from being good 'nuff. What I

[issue5689] please support lzma compression as an extension and in the tarfile module

2010-05-25 Thread Per Øyvind Karlsen
Per Øyvind Karlsen peroyv...@mandriva.org added the comment: ps: pylzma uses the LZMA SDK, which is not what you want. pyliblzma (not the same module;) OTOH uses liblzma, which is the library used by xz/lzma utils You'll find it available at http://launchpad.net/pyliblzma

[issue6715] xz compressor support

2010-05-25 Thread Per Øyvind Karlsen
Per Øyvind Karlsen peroyv...@mandriva.org added the comment: Ooops, I kinda should've commented on this issue here in stead, rather than in issue5689, so I'll just copy-paste it here as well: I'm the author of the pyliblzma module, and if desired, I'd be happy to help out adapting pyliblzma

[issue6715] xz compressor support

2010-05-25 Thread Per Øyvind Karlsen
Per Øyvind Karlsen peroyv...@mandriva.org added the comment: ah, you're right, I forgot that the license for the library had changed as well (motivated by attempt of pleasing BSD people IIRC;), in the past the library was LGPL while only the 'xz' util was public domain.. For my code, feel

Re: creating pipelines in python

2009-11-25 Thread per
-- are there other candidates? thank you. On Nov 23, 4:02 am, Paul Rudin paul.nos...@rudin.co.uk wrote: per perfr...@gmail.com writes: hi all, i am looking for a python package to make it easier to create a pipeline of scripts (all in python). what i do right now is have a set of scripts

creating pipelines in python

2009-11-22 Thread per
hi all, i am looking for a python package to make it easier to create a pipeline of scripts (all in python). what i do right now is have a set of scripts that produce certain files as output, and i simply have a master script that checks at each stage whether the output of the previous script

efficiently splitting up strings based on substrings

2009-09-05 Thread per
I'm trying to efficiently split strings based on what substrings they are made up of. i have a set of strings that are comprised of known substrings. For example, a, b, and c are substrings that are not identical to each other, e.g.: a = 0 * 5 b = 1 * 5 c = 2 * 5 Then my_string might be:

Re: efficiently splitting up strings based on substrings

2009-09-05 Thread per
On Sep 5, 6:42 pm, Rhodri James rho...@wildebst.demon.co.uk wrote: On Sat, 05 Sep 2009 22:54:41 +0100, per perfr...@gmail.com wrote: I'm trying to efficiently split strings based on what substrings they are made up of. i have a set of strings that are comprised of known substrings

Re: efficiently splitting up strings based on substrings

2009-09-05 Thread per
On Sep 5, 7:07 pm, Rhodri James rho...@wildebst.demon.co.uk wrote: On Sat, 05 Sep 2009 23:54:08 +0100, per perfr...@gmail.com wrote: On Sep 5, 6:42 pm, Rhodri James rho...@wildebst.demon.co.uk wrote: On Sat, 05 Sep 2009 22:54:41 +0100, per perfr...@gmail.com wrote: I'm trying

allowing output of code that is unittested?

2009-07-15 Thread per
hi all, i am using the standard unittest module to unit test my code. my code contains several print statements which i noticed are repressed when i call my unit tests using: if __name__ == '__main__': suite = unittest.TestLoader().loadTestsFromTestCase(TestMyCode)

fastest native python database?

2009-06-17 Thread per
hi all, i'm looking for a native python package to run a very simple data base. i was originally using cpickle with dictionaries for my problem, but i was making dictionaries out of very large text files (around 1000MB in size) and pickling was simply too slow. i am not looking for fancy SQL

Re: fastest native python database?

2009-06-17 Thread per
. thanks for the suggestion, will look into gadfly in the meantime. On Jun 17, 11:38 pm, Emile van Sebille em...@fenx.com wrote: On 6/17/2009 8:28 PM per said... hi all, i'm looking for a native python package to run a very simple data base. i was originally using cpickle with dictionaries

generating random tuples in python

2009-04-20 Thread per
hi all, i am generating a list of random tuples of numbers between 0 and 1 using the rand() function, as follows: for i in range(0, n): rand_tuple = (rand(), rand(), rand()) mylist.append(rand_tuple) when i generate this list, some of the random tuples might be very close to each other,

Re: generating random tuples in python

2009-04-20 Thread per
On Apr 20, 11:08 pm, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: On Mon, 20 Apr 2009 11:39:35 -0700, per wrote: hi all, i am generating a list of random tuples of numbers between 0 and 1 using the rand() function, as follows: for i in range(0, n):   rand_tuple = (rand

loading program's global variables in ipython

2009-03-22 Thread per
hi all, i have a file that declares some global variables, e.g. myglobal1 = 'string' myglobal2 = 5 and then some functions. i run it using ipython as follows: [1] %run myfile.py i notice then that myglobal1 and myglobal2 are not imported into python's interactive namespace. i'd like them too

splitting a large dictionary into smaller ones

2009-03-22 Thread per
hi all, i have a very large dictionary object that is built from a text file that is about 800 MB -- it contains several million keys. ideally i would like to pickle this object so that i wouldnt have to parse this large file to compute the dictionary every time i run my program. however

Re: splitting a large dictionary into smaller ones

2009-03-22 Thread per
On Mar 22, 10:51 pm, Paul Rubin http://phr...@nospam.invalid wrote: per perfr...@gmail.com writes: i would like to split the dictionary into smaller ones, containing only hundreds of thousands of keys, and then try to pickle them. That already sounds like the wrong approach.  You want

parsing tab separated data efficiently into numpy/pylab arrays

2009-03-13 Thread per
hi all, what's the most efficient / preferred python way of parsing tab separated data into arrays? for example if i have a file containing two columns one corresponding to names the other numbers: col1\t col 2 joe\t 12.3 jane \t 155.0 i'd like to parse into an array() such that

[issue5411] add xz compression support to distutils

2009-03-09 Thread Per Øyvind Karlsen
Per Øyvind Karlsen peroyv...@mandriva.org added the comment: hmm, I'm unsure about how this should be done.. I guess such a test would belong in Lib/distutils/test_dist.py, but I'm uncertain about how it should be done, ie. should it be a test for doing 'bdist', 'bdist_rpm' and 'sdist

speeding up reading files (possibly with cython)

2009-03-07 Thread per
hi all, i have a program that essentially loops through a textfile file thats about 800 MB in size containing tab separated data... my program parses this file and stores its fields in a dictionary of lists. for line in file: split_values = line.strip().split('\t') # do stuff with

[issue5411] add xz compression support to distutils

2009-03-03 Thread Per Øyvind Karlsen
New submission from Per Øyvind Karlsen peroyv...@mandriva.org: Here's a patch that adds support for xz compression: http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/python/current/SOURCES/Python-2.6.1-distutils-xz-support.patch?view=log -- assignee: tarek components: Distutils

setting PYTHONPATH to override system wide site-packages

2009-02-28 Thread per
hi all, i recently installed a new version of a package using python setup.py install --prefix=/my/homedir on a system where i don't have root access. the old package still resides in /usr/lib/python2.5/site- packages/ and i cannot erase it. i set my python path as follows in ~/.cshrc setenv

Re: setting PYTHONPATH to override system wide site-packages

2009-02-28 Thread per
On Feb 28, 11:24 pm, Carl Banks pavlovevide...@gmail.com wrote: On Feb 28, 7:30 pm, per perfr...@gmail.com wrote: hi all, i recently installed a new version of a package using python setup.py install --prefix=/my/homedir on a system where i don't have root access. the old package still

Re: setting PYTHONPATH to override system wide site-packages

2009-02-28 Thread per
On Feb 28, 11:53 pm, per perfr...@gmail.com wrote: On Feb 28, 11:24 pm, Carl Banks pavlovevide...@gmail.com wrote: On Feb 28, 7:30 pm, per perfr...@gmail.com wrote: hi all, i recently installed a new version of a package using python setup.py install --prefix=/my/homedir

optimizing large dictionaries

2009-01-15 Thread Per Freem
hello i have an optimization questions about python. i am iterating through a file and counting the number of repeated elements. the file has on the order of tens of millions elements... i create a dictionary that maps elements of the file that i want to count to their number of occurs. so i

Re: optimizing large dictionaries

2009-01-15 Thread Per Freem
thanks to everyone for the excellent suggestions. a few follow up q's: 1] is Try-Except really slower? my dict actually has two layers, so my_dict[aKey][bKeys]. the aKeys are very small (less than 100) where as the bKeys are the ones that are in the millions. so in that case, doing a Try-Except

efficient interval containment lookup

2009-01-12 Thread Per Freem
hello, suppose I have two lists of intervals, one significantly larger than the other. For example listA = [(10, 30), (5, 25), (100, 200), ...] might contain thousands of elements while listB (of the same form) might contain hundreds of thousands or millions of elements. I want to count how many

Re: efficient interval containment lookup

2009-01-12 Thread Per Freem
thanks for your replies -- a few clarifications and questions. the is_within operation is containment, i.e. (a,b) is within (c,d) iff a = c and b = d. Note that I am not looking for intervals that overlap... this is why interval trees seem to me to not be relevant, as the overlapping interval

Re: efficient interval containment lookup

2009-01-12 Thread Per Freem
On Jan 12, 10:58 pm, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: On Mon, 12 Jan 2009 14:49:43 -0800, Per Freem wrote: thanks for your replies -- a few clarifications and questions. the is_within operation is containment, i.e. (a,b) is within (c,d) iff a = c and b = d. Note

Re: efficient interval containment lookup

2009-01-12 Thread Per Freem
i forgot to add, my naive_find is: def naive_find(intervals, start, stop): results = [] for interval in intervals: if interval.start = start and interval.stop = stop: results.append(interval) return results On Jan 12, 11:55 pm, Per Freem perfr...@yahoo.com wrote: On Jan 12, 10

Re: efficient interval containment lookup

2009-01-12 Thread Per Freem
... thanks. On Jan 13, 12:24 am, brent bpede...@gmail.com wrote: On Jan 12, 8:55 pm, Per Freem perfr...@yahoo.com wrote: On Jan 12, 10:58 pm, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: On Mon, 12 Jan 2009 14:49:43 -0800, Per Freem wrote: thanks for your replies -- a few

RE: listdir reports [Error 1006] The volume for a file has been externally altered so that the opened file is no longer valid

2009-01-08 Thread Per Olav Kroka
FYI: the '/*.*' is part of the error message returned. -Original Message- From: ch...@rebertia.com [mailto:ch...@rebertia.com] On Behalf Of Chris Rebert Sent: Wednesday, January 07, 2009 6:40 PM To: Per Olav Kroka Cc: python-list@python.org Subject: Re: listdir reports [Error 1006

[issue3810] os.chdir() et al: is the path str or bytes?

2008-09-08 Thread Per Cederqvist
New submission from Per Cederqvist [EMAIL PROTECTED]: The documentation at http://docs.python.org/dev/3.0/library/os.html#os.chdir doesn't specify if the path argument to os.chdir() should be a str or a bytes, or if maybe both are acceptable. This is true for most of the file-manipulating

[issue2315] TimedRotatingFileHandler does not account for daylight savings time

2008-03-17 Thread Per Cederqvist
New submission from Per Cederqvist [EMAIL PROTECTED]: If TimedRotatingFileHandler is instructed to roll over the log at midnight or on a certain weekday, it needs to consider when daylight savings time starts and ends. The current code just blindly adds self.interval to self.rolloverAt, totally

[issue2316] TimedRotatingFileHandler names files incorrectly if nothing is logged during an interval

2008-03-17 Thread Per Cederqvist
New submission from Per Cederqvist [EMAIL PROTECTED]: If nothing is logged during an interval, the TimedRotatingFileHandler will give bad names to future log files. The enclosed example program sets up a logger that rotates the log every second. It then logs a few messages with sleep of 1, 2

[issue2316] TimedRotatingFileHandler names files incorrectly if nothing is logged during an interval

2008-03-17 Thread Per Cederqvist
Per Cederqvist [EMAIL PROTECTED] added the comment: The attached program will generate log messages with a timestamp that are logged into a file with an unexpected extension. To run: mkdir badlogdir python badlogger.py Running the program takes about 9 seconds. Added file: http

[issue2316] TimedRotatingFileHandler names files incorrectly if nothing is logged during an interval

2008-03-17 Thread Per Cederqvist
Changes by Per Cederqvist [EMAIL PROTECTED]: -- components: +Library (Lib) type: - behavior versions: +Python 2.5 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2316

[issue2317] TimedRotatingFileHandler logic for removing files wrong

2008-03-17 Thread Per Cederqvist
New submission from Per Cederqvist [EMAIL PROTECTED]: There are three issues with log file removal in the TimedRotatingFileHandler class: - Removal will stop working in the year 2100, as the code assumes that timestamps start with .20. - If you run an application with backupCount set

[issue2318] TimedRotatingFileHandler: rotate every month, or every year

2008-03-17 Thread Per Cederqvist
New submission from Per Cederqvist [EMAIL PROTECTED]: In my curent project, I would like to rotate log files on the 1st of every month. The TimedRotatingFileHandler class cannot do this, even though it tries to be very generic. I imagine that other projects would like to rotate the log file

Program eating memory, but only on one machine?

2007-01-22 Thread Per B. Sederberg
machines, then I would know where to start and would blame some horrible programming on my end. This just seems like a less straightforward problem. Thanks for any help, Per -- http://mail.python.org/mailman/listinfo/python-list

Re: Program eating memory, but only on one machine?

2007-01-22 Thread Per B.Sederberg
to work with. Thanks, Per -- http://mail.python.org/mailman/listinfo/python-list

Re: Program eating memory, but only on one machine? (Solved, sort of)

2007-01-22 Thread Per B.Sederberg
Per B.Sederberg persed at princeton.edu writes: I'll see if I can make a really small example program that eats up memory on our cluster. That way we'll have something easy to work with. Now this is weird. I figured out the bug and it turned out that every time you call numpy.setmember1d

(question) How to use python get access to google search without query quota limit

2006-05-05 Thread Per
I am doing a Natural Language processing project for academic use, I think google's rich retrieval information and query-segment might be of help, I downloaded google api, but there is query limit(1000/day), How can I write python code to simulate the browser-like-activity to submit more than 10k

Re: (question) How to use python get access to google search without query quota limit

2006-05-05 Thread Per
Yeah, Thanks Am, I can be considered as an advanced google user, presumably.. But I am not a advanced programmer yet. If everyone can generate unlimited number of queries, soon the user-query-data, which I believe is google's most advantage, will be in chaos. Can they simply ignore some queries

Is there such an idiom?

2006-03-19 Thread Per
http://jaynes.colorado.edu/PythonIdioms.html Use dictionaries for searching, not lists. To find items in common between two lists, make the first into a dictionary and then look for items in the second in it. Searching a list for an item is linear-time, while searching a dict for an item is

Re: Is there such an idiom?

2006-03-19 Thread Per
Thanks Ron, surely set is the simplest way to understand the question, to see whether there is a non-empty intersection. But I did the following thing in a silly way, still not sure whether it is going to be linear time. def foo(): l = [...] s = [...] dic = {} for i in l:

serial port server cnhd38

2005-02-22 Thread per . bergstrom
msp-t01 2020 br /Per -- http://mail.python.org/mailman/listinfo/python-list

test

2004-12-23 Thread Per Erik Stendahl
sdfdsafasd -- http://mail.python.org/mailman/listinfo/python-list