numpy.fromiter in pypy

2014-12-31 Thread Albert-Jan Roskam
Hi, I would like to use numpy implementation for Pypy (what else would one do on December 31 :-). In particular, I would like to use numpy.fromiter, which is available according to this overview: http://buildbot.pypy.org/numpy-status/latest.html. However, contrary to what this website says,

Re: include "icudt53.dll, icuin53.dll, icuuc53.dll" ?

2015-01-07 Thread Albert-Jan Roskam
On Wed, Jan 7, 2015 2:09 PM CET Timothy W. Grove wrote: >Does anyone have an idea of what the following .dll's are for? Cx_freeze >includes them in a Python3.4-PyQt5 deployment adding about 23 Mb to my >application. Removing them doesn't appear to make any differenc

class-based class decorator

2015-01-09 Thread Albert-Jan Roskam
Hi, I am trying to write a class decorator that checks whether deprecated parameters with non-default arguments are used. More complete code is here: http://pastebin.com/ZqnMis6M. In the code below, how should I modify __call__ such that f.bar(old="oh no") prints "hello world"? I thought it

Re: class-based class decorator

2015-01-12 Thread Albert-Jan Roskam
- Original Message - > From: Ian Kelly > To: Python > Cc: > Sent: Saturday, January 10, 2015 7:30 AM > Subject: Re: class-based class decorator > > On Fri, Jan 9, 2015 at 2:26 PM, Albert-Jan Roskam > > wrote: >> >> >> Hi, >&g

Re: Python 3 regex woes (parsing ISC DHCPD config)

2015-01-12 Thread Albert-Jan Roskam
- Original Message - > From: Jason Bailey > To: python-list@python.org > Cc: > Sent: Monday, January 12, 2015 7:20 PM > Subject: Python 3 regex woes (parsing ISC DHCPD config) > > Hi all, > > I'm working on a Python _3_ project that will be used to parse ISC DHCPD > configuration fi

Re: class-based class decorator

2015-01-13 Thread Albert-Jan Roskam
- Original Message - > From: Jean-Michel Pichavant > To: Albert-Jan Roskam > Cc: Python > Sent: Monday, January 12, 2015 4:20 PM > Subject: Re: class-based class decorator > > - Original Message ----- >> From: "Albert-Jan Roskam" >

Re: class-based class decorator

2015-01-13 Thread Albert-Jan Roskam
On Tue, Jan 13, 2015 6:31 AM CET Ian Kelly wrote: >On Jan 12, 2015 6:47 AM, "Albert-Jan Roskam" wrote: >> Thanks for your replies. I changed it into a regular decorator (not a class >> decorator). It would have been even nicer if I

Re: List of "python -m" tools

2015-01-14 Thread Albert-Jan Roskam
- Original Message - > From: Irmen de Jong > To: python-list@python.org > Cc: > Sent: Wednesday, January 14, 2015 12:01 AM > Subject: Re: List of "python -m" tools > > On 12-1-2015 5:17, Miki Tebeka wrote: >> Greetings, >> >> I've compiled a list of "python -m" tools at > python

Re: class-based class decorator

2015-01-15 Thread Albert-Jan Roskam
- Original Message - > From: Jean-Michel Pichavant > To: Albert-Jan Roskam > Cc: Python > Sent: Tuesday, January 13, 2015 5:37 PM > Subject: Re: class-based class decorator > > - Original Message ----- >> From: "Albert-Jan Roskam" >&

Re: How to "wow" someone new to Python

2015-01-16 Thread Albert-Jan Roskam
On Fri, Jan 16, 2015 4:24 PM CET Andrew Berg wrote: >On 2015.01.16 09:03, Chris Angelico wrote: >> Scenario: You're introducing someone to Python for the first time. >> S/he may have some previous programming experience, or may be new to >> the whole idea of giving a

Re: unicode question

2015-01-28 Thread Albert-Jan Roskam
On Wed, Jan 28, 2015 8:21 AM CET Terry Reedy wrote: >On 1/27/2015 12:17 AM, Rehab Habeeb wrote: >> Hi there python staff >> does python support arabic language for texts ? and what to do if it >> support it? >> i wrote hello in Arabic using codeskulptor and the powers

Re: meaning of: line, =

2015-02-04 Thread Albert-Jan Roskam
- Original Message - > From: Chris Angelico > To: > Cc: "python-list@python.org" > Sent: Wednesday, February 4, 2015 3:24 PM > Subject: Re: meaning of: line, = > > On Thu, Feb 5, 2015 at 1:08 AM, ast wrote: >> I dont understand why there is a comma just after line in the following

Re: How to extract a movie title out of a text file

2015-02-07 Thread Albert-Jan Roskam
- On Sat, Feb 7, 2015 6:36 PM CET Mark Lawrence wrote: >On 07/02/2015 16:50, Seymore4Head wrote: >> What I would like to be able to do is download and save to a folder >> all the srr files in this Usenet group. alt.binaries.moovee >> >> I would then like to be able t

locale bug in Python 2.7, 3.3, 3.4 (Win7 64)?

2015-02-09 Thread Albert-Jan Roskam
Hi, In the locale module we have: * setlocale, the setter that also returns something * getlocale, the getter that returns the OS-specific locale tuple (supposedly!) * getdefaultlocale, the getter that always returns a unix locale tuple Why are the getlocale() results below sometimes windows-lik

Re: locale bug in Python 2.7, 3.3, 3.4 (Win7 64)?

2015-02-09 Thread Albert-Jan Roskam
- Original Message - > From: Mark Lawrence > To: python-list@python.org > Cc: > Sent: Monday, February 9, 2015 5:02 PM > Subject: Re: locale bug in Python 2.7, 3.3, 3.4 (Win7 64)? > > On 09/02/2015 15:43, Albert-Jan Roskam wrote: >> Hi, >>

Re: Taming the verbosity of ipython tracebacks

2015-02-10 Thread Albert-Jan Roskam
- Original Message - > From: Chris Angelico > To: > Cc: "python-list@python.org" > Sent: Tuesday, February 10, 2015 8:00 PM > Subject: Re: Taming the verbosity of ipython tracebacks > > On Wed, Feb 11, 2015 at 5:53 AM, John Ladasky > wrote: >> I'm running Python 3.4.0, and ipython3

Re: pickle error by multiprocessing

2015-02-15 Thread Albert-Jan Roskam
On Sun, Feb 15, 2015 7:43 AM CET dieter wrote: >Martijn Millecamp writes: > >> for a schoolproject we had to build a robot and control this robot with a >> gui to follow a pathWe use multiprocessingand in our group 2 people can run >> the codebut if i run the code,

Re: Python Silent Install

2015-02-24 Thread Albert-Jan Roskam
Personally I find that Python is incomplete without pip and setuptools.-- https://mail.python.org/mailman/listinfo/python-list

mx as dependency tox throws GCC error

2015-02-25 Thread Albert-Jan Roskam
Hi, If I pip install the mx package with "pip install egenix-mx-base", it works. If I put that same pip install command under 'install_command' in my tox.ini it also works (see below) However, if I specify the dependency under 'deps', I get an error. Any idea why? I read that 'install_command'

locale getlocale returns None on OSX

2014-03-12 Thread Albert-Jan Roskam
Hi, locale.getlocale() sometimes returns (None, None) under OSX (Python 2, not sure about Python 3, but I think so). The problem is outlined here: http://stackoverflow.com/questions/1629699/locale-getlocale-problems-on-osx What is the cause of this? Is it limited to just Darwin systes? Does the

Re: locale getlocale returns None on OSX

2014-03-12 Thread Albert-Jan Roskam
> > From: Albert-Jan Roskam >To: Python >Sent: Wednesday, March 12, 2014 1:22 PM >Subject: locale getlocale returns None on OSX > > >Hi, > >locale.getlocale() sometimes returns (None, None) under OSX (Python 2, not >sure abo

Re: Question about Source Control

2014-03-22 Thread Albert-Jan Roskam
Hi, I can recommend the book "Pragmatic Guide to Git". Very practical and to the point: http://www.amazon.com/Pragmatic-Guide-Git-Programmers/dp/1934356727/ref=sr_1_1/184-0142481-0484062?ie=UTF8&qid=1395518159&sr=8-1&keywords=pragmatic+guide+to+git I addition, I read a big fat super-exhaustive

Re: Question about Source Control

2014-03-23 Thread Albert-Jan Roskam
> From: Dave Angel >To: python-list@python.org >Sent: Sunday, March 23, 2014 3:18 AM >Subject: Re: Question about Source Control > > >Albert-Jan Roskam Wrote in message: >> > >In addition to posting in html format,  you have

Re: Martijn Faassen: The Call of Python 2.8

2014-04-15 Thread Albert-Jan Roskam
- Original Message - > From: Terry Reedy > To: python-list@python.org > Cc: > Sent: Tuesday, April 15, 2014 10:32 AM > Subject: Re: Martijn Faassen: The Call of Python 2.8 > > On 4/15/2014 1:03 AM, Marko Rauhamaa wrote: >> Terry Reedy : >> >>> Any decent system should have 3.4 avai

Re: Why Python 3?

2014-04-19 Thread Albert-Jan Roskam
- Original Message - > From: Chris Angelico > To: > Cc: "python-list@python.org" > Sent: Saturday, April 19, 2014 3:42 PM > Subject: Re: Why Python 3? > Right. It's not the magic line that fixes everything; if it were, > Python 3 wouldn't be a big deal at all. Go Py3 if you can, bu

shebang & windows: call an extensionless git hook

2014-05-22 Thread Albert-Jan Roskam
Hi, I wrote the git pre-commit hook below. It is supposed to reject commits that contain large files (e.g. accidental commits by inexperienced users, think of "git add .") Anyway, I tried this under Linux, but the target platform is Windows. As per Git design the hook name *must* be "pre-comm

Re: shebang & windows: call an extensionless git hook

2014-05-23 Thread Albert-Jan Roskam
- Original Message - > From: Albert-Jan Roskam > To: Python > Cc: > Sent: Thursday, May 22, 2014 6:58 PM > Subject: shebang & windows: call an extensionless git hook > > Hi, > > I wrote the git pre-commit hook below. It is supposed to reject commits t

Re: shebang & windows: call an extensionless git hook

2014-05-23 Thread Albert-Jan Roskam
- Original Message - > From: Chris Angelico > To: > Cc: Python > Sent: Friday, May 23, 2014 4:01 PM > Subject: Re: shebang & windows: call an extensionless git hook > > On Fri, May 23, 2014 at 11:53 PM, Albert-Jan Roskam > > wrote: >> Ok, I just

Re: win32serviceutil: ImportError: DLL load failed: The specified module could not be found

2014-05-26 Thread Albert-Jan Roskam
Original Message - > From: Terry Reedy > To: python-list@python.org > Cc: > Sent: Sunday, May 25, 2014 11:49 PM > Subject: Re: win32serviceutil: ImportError: DLL load failed: The specified > module could not be found > > On 5/25/2014 1:40 PM, Nagy László Zsolt wrote: >>   >>> import wi

how to load test a web app?

2013-11-01 Thread Albert-Jan Roskam
Hi, I am looking at three Github-like programs (Stash, Gitbucket and Trac) to see if they could be used in our company. I would like to test the reliability and stability of at least one of them (I won't do any tests if some required functionality is missing). I am curious whether the program

Re: Python Worst Practices

2015-02-26 Thread Albert-Jan Roskam
- Original Message - > From: Simon Ward > To: > Cc: "python-list@python.org" > Sent: Thursday, February 26, 2015 8:36 PM > Subject: Re: Python Worst Practices > > > > On 25 February 2015 21:24:37 GMT+00:00, Chris Angelico > wrote: >> On Thu, Feb 26, 2015 at 7:45 AM, Mark Lawrence

Pythonic locale

2015-03-02 Thread Albert-Jan Roskam
Hi, The Python locale standard libraries has some oddities and (long-standing) bugs. Example oddity: SETlocale *returns* a locale; getlocale output cannot always be consumed by setlocale. Example bug: resetlocale fails in Windows. What is your opinion about the work-around code below? import

io.open vs. codecs.open

2015-03-04 Thread Albert-Jan Roskam
Hi, Is there a (use case) difference between codecs.open and io.open? What is the difference? A small difference that I just discovered is that codecs.open(somefile).read() returns a bytestring if no encoding is specified*), but a unicode string if an encoding is specified. io.open always retur

Re: io.open vs. codecs.open

2015-03-06 Thread Albert-Jan Roskam
- Original Message - > From: Steven D'Aprano > To: python-list@python.org > Cc: > Sent: Wednesday, March 4, 2015 8:56 PM > Subject: Re: io.open vs. codecs.open > > Albert-Jan Roskam wrote: > >> Hi, >> >> Is there a (use case) diff

Re: Newbie question about text encoding

2015-03-07 Thread Albert-Jan Roskam
--- Original Message - > From: Chris Angelico > To: > Cc: "python-list@python.org" > Sent: Saturday, March 7, 2015 6:26 PM > Subject: Re: Newbie question about text encoding > > On Sun, Mar 8, 2015 at 4:14 AM, Marko Rauhamaa wrote: >> See: >> >> $ mkdir /tmp/xyz >> $ touch /tm

Re: Letter class in re

2015-03-09 Thread Albert-Jan Roskam
On Mon, 3/9/15, Tim Chase wrote: Subject: Re: Letter class in re To: python-list@python.org Date: Monday, March 9, 2015, 12:17 PM On 2015-03-09 11:37, Wolfgang Maier wrote: > On 03/09/2015 11:23 AM, Antoon Pardon wrote: >> Does anyone know w

Re: HELP!! How to ask a girl out with a simple witty Python code??

2015-03-09 Thread Albert-Jan Roskam
- Original Message - > From: Jonas Wielicki > To: python-list@python.org > Cc: > Sent: Monday, March 9, 2015 8:12 PM > Subject: Re: HELP!! How to ask a girl out with a simple witty Python code?? > > On 09.03.2015 14:39, Omar Abou Mrad wrote: >> On Thu, Mar 5, 2015 at 3:34 AM, Xrrific

Re: Letter class in re

2015-03-10 Thread Albert-Jan Roskam
On Tue, 3/10/15, Antoon Pardon wrote: Subject: Re: Letter class in re To: python-list@python.org Date: Tuesday, March 10, 2015, 9:35 AM Op 09-03-15 om 17:11 schreef Steven D'Aprano: > Antoon Pardon wrote: > >> I am using PLY for a parsing task which uses re for the lexical >> analys

Re: Python script output in file

2015-03-18 Thread Albert-Jan Roskam
On Wed, Mar 18, 2015 7:06 PM CET Rustom Mody wrote: >On Wednesday, March 18, 2015 at 8:12:12 PM UTC+5:30, Robert Clove wrote: >> ./my_eth_script.pl eth0 M > a.txt >> >> How can i run this command with subprocess.popen > >Something like this I guess? > >>> proc = Pope

Re: Python script output in file

2015-03-20 Thread Albert-Jan Roskam
- On Thu, Mar 19, 2015 12:16 AM CET Steven D'Aprano wrote: >On Thu, 19 Mar 2015 07:22 am, Albert-Jan Roskam wrote: > >> >> >> On Wed, Mar 18, 2015 7:06 PM CET Rustom Mody wrote: >> >>On Wednesd

Re: Automation of Windows app?

2015-03-23 Thread Albert-Jan Roskam
-- On Sun, Mar 22, 2015 6:41 PM CET Emile van Sebille wrote: >On 3/20/2015 10:55 AM, Grant Edwards wrote: > >> I need to automate operation of a Windows application. > >I've been productively using python to create macro scheduler [1] scripts to >automate windows prog

Re: New to Programming - XML Processing

2015-04-02 Thread Albert-Jan Roskam
- On Wed, Apr 1, 2015 10:00 AM CEST Mark Lawrence wrote: >On 01/04/2015 05:27, Andrew Farrell wrote: >> You should follow Rustom's advice before just diving into the blog post >> I linked to. Otherwise you risk blindly following things and losing your >> bearings when

[OT] Git for nazis

2015-04-23 Thread Albert-Jan Roskam
Just had to share this: https://youtu.be/CDeG4S-mJts-- https://mail.python.org/mailman/listinfo/python-list

Re: Wrote a memoize function: I do not mind feedback

2015-04-27 Thread Albert-Jan Roskam
- Original Message - > From: Peter Otten <__pete...@web.de> > To: python-list@python.org > Cc: > Sent: Monday, April 27, 2015 4:28 PM > Subject: Re: Wrote a memoize function: I do not mind feedback > > Cecil Westerhof wrote: > >> I started again with Python. In Clojure you have memoize.

Re: Question Installing latest Python

2015-04-28 Thread Albert-Jan Roskam
On Mon, Apr 27, 2015 4:55 PM CEST Steven D'Aprano wrote: >On Mon, 27 Apr 2015 01:11 am, Φώντας Λαδοπρακόπουλος wrote: > >> Τη Κυριακή, 26 Απριλίου 2015 - 6:05:50 μ.μ. UTC+3, ο χρήστης Steven >> D'Aprano έγραψε: >> On Mon, 27 Apr 2015 01:00 am, Φώντας Λαδοπρακόπουλος w

windows and file names > 256 bytes

2015-06-25 Thread Albert-Jan Roskam
Hi, Consider the following calls, where very_long_path is more than 256 bytes: [1] os.mkdir(very_long_path) [2] os.getsize(very_long_path) [3] shutil.rmtree(very_long_path) I am using Python 2.7 and [1] and [2] fail under Windows XP [3] fails under Win7 (not sure about XP). It throws: “WindowsEr

Re: windows and file names > 256 bytes

2015-06-26 Thread Albert-Jan Roskam
On Thu, 25 Jun 2015 14:37:55 +0100, Tim Golden wrote: > On 25/06/2015 14:35, Michael Torrie wrote: >> On 06/25/2015 06:34 AM, Tim Golden wrote: >>> On 25/06/2015 13:04, Joonas Liik wrote: It sounds to me more like it is possible to use long file names on windows but it is a pain and in p

Re: windows and file names > 256 bytes

2015-06-26 Thread Albert-Jan Roskam
> import os import shutil import sys > > # create an insanely long directory tree p = os.getenv("TEMP") > #p = ur"\\server\share\blah\temp" > tmpdir = p os.chdir(tmpdir) > for i in xrange(1000): > tmpdir = os.path.join(tmpdir, "sub") os.mkdir("?\\" + tmpdir) > #os.mkdir(u"?\\UN

RE: -2146826246 in win32com.client for empty #N/A cell in Excel

2015-08-16 Thread Albert-Jan Roskam
> Date: Sun, 16 Aug 2015 09:53:32 -0700 > Subject: -2146826246 in win32com.client for empty #N/A cell in Excel > From: sven.bo...@gmail.com > To: python-list@python.org > > > Anyone know how to handle "#N/A" in Excel from win32com.client. > > I'm extracting data from an Excel file using win32c

RE: Python CI and CD support available on Semaphore (feedback appreciated)

2015-09-08 Thread Albert-Jan Roskam
> To: python-list@python.org > From: tjre...@udel.edu > Subject: Re: Python CI and CD support available on Semaphore (feedback > appreciated) > Date: Tue, 8 Sep 2015 14:46:28 -0400 > > On 9/8/2015 6:27 AM, Filip Komnenović wrote: > > > We have recently launched Python support on our continuous

RE: I'm using Sphinx, but is there a UML auto generator

2015-10-02 Thread Albert-Jan Roskam
(Sorry for top-posting, mobile hotmail sie sucks). This is cool, although it's not a Sphinx directive. You use insert the resulting graph in the .rst of course: http://furius.ca/snakefood/ Date: Fri, 2 Oct 2015 11:14:59 -0300 Subject: I'm using Sphinx, but is there a UML auto generator From: gil

Pandas question

2014-06-05 Thread Albert-Jan Roskam
Hi, I am new to Pandas. I am trying to remove the lower and upper 15 percentiles of interest rates within a day. The index column is the date. Below is some code, but how do I apply the trim function day-by-day? I tried using grouped() in conjunction with apply(), but that turned out to be an e

Re: Unicode and Python - how often do you index strings?

2014-06-05 Thread Albert-Jan Roskam
- Original Message - > From: Ian Kelly > To: Python > Cc: > Sent: Thursday, June 5, 2014 10:18 PM > Subject: Re: Unicode and Python - how often do you index strings? > > On Thu, Jun 5, 2014 at 1:58 PM, Paul Rubin > wrote: >> Ryan Hiebert writes: >>> How so? I was using line=l

Re: Question about metacharacter '*'

2014-07-06 Thread Albert-Jan Roskam
>In article , > Rick Johnson wrote: > >> As an aside i prefer to only utilize a "character set" when >> nothing else will suffice. And in this case r"[0-9][0-9]*" >> can be expressed just as correctly (and less noisy IMHO) as >> r"\d\d*". > >Even better, r"\d+" I tend tot do that too, even th

Re: How to decipher :re.split(r"(\(\([^)]+\)\))" in the example

2014-07-10 Thread Albert-Jan Roskam
- Original Message - > From: Joel Goldstick > To: fl > Cc: "python-list@python.org" > Sent: Thursday, July 10, 2014 7:05 PM > Subject: Re: How to decipher :re.split(r"(\(\([^)]+\)\))" in the example > > On Thu, Jul 10, 2014 at 11:37 AM, fl wrote: >> Hi, >> >> This example is from

Re: How to decipher :re.split(r"(\(\([^)]+\)\))" in the example

2014-07-11 Thread Albert-Jan Roskam
- Original Message - > From: Steven D'Aprano > To: python-list@python.org > Cc: > Sent: Friday, July 11, 2014 11:04 AM > Subject: Re: How to decipher :re.split(r"(\(\([^)]+\)\))" in the example > > On Thu, 10 Jul 2014 23:33:27 -0400, Roy Smith wrote: > >> In article , >>   Tim Chase

how to msi install Python to non-default target dir?

2014-07-16 Thread Albert-Jan Roskam
hi, I am trying to create a .bat file where (among other things) Python will have to be silently installed. It needs to be installed to the non-default location "c:\program files\python27". Any idea how this can be done? I keep getting the 'Help' menu, indicating that something went wrong. I've

Re: how to msi install Python to non-default target dir?

2014-07-16 Thread Albert-Jan Roskam
  - Original Message - > From: Zachary Ware > To: Albert-Jan Roskam > Cc: Python > Sent: Wednesday, July 16, 2014 3:47 PM > Subject: Re: how to msi install Python to non-default target dir? > > On Wed, Jul 16, 2014 at 8:29 AM, Albert-Jan Roskam > > wrote:

Re: What meaning of this ""hello %s you are %s years old" % x"

2014-07-28 Thread Albert-Jan Roskam
  > That's not tuple%tuple, but rather string%tuple.  And string%tuple is > the older method of formatting an output string from a template and a > tuple of values.  See > https://docs.python.org/2/library/stdtypes.html#string-formatting for > details. > > However, if you are just learning

Re: rpath alike feature for python scripts

2014-07-28 Thread Albert-Jan Roskam
- Original Message - > From: Olaf Hering > To: dieter > Cc: python-list@python.org > Sent: Monday, July 28, 2014 9:57 AM > Subject: Re: rpath alike feature for python scripts > > On Sat, Jul 26, dieter wrote: > >> The "binary" corresponds to a script. The script could have >> a fun

Re: converting ISO8601 date and time string representations to datetime

2014-07-31 Thread Albert-Jan Roskam
>In article , > Wolfgang Maier wrote: > >> Hi, >> I'm trying to convert ISO8601-compliant strings representing dates or >> dates and times into datetime.datetime objects. > >https://pypi.python.org/pypi/iso8601 Yikes, what a regex. It must have been painstaking to get that right. https://bitb

Re: converting ISO8601 date and time string representations to datetime

2014-07-31 Thread Albert-Jan Roskam
>In article , > Wolfgang Maier wrote: > >> Hi, >> I'm trying to convert ISO8601-compliant strings representing dates or >> dates and times into datetime.datetime objects. > >https://pypi.python.org/pypi/iso8601 Yikes, what a regex. It must have been painstaking to get that right. https://bitb

Re: Correct type for a simple "bag of attributes" namespace object

2014-08-03 Thread Albert-Jan Roskam
--- Original Message - > From: Terry Reedy > To: python-list@python.org > Cc: > Sent: Sunday, August 3, 2014 4:43 AM > Subject: Re: Correct type for a simple "bag of attributes" namespace object > > On 8/2/2014 8:59 PM, Ian Kelly wrote: >> On Sat, Aug 2, 2014 at 2:46 PM, Mark Summerfield >

Re: Correct type for a simple "bag of attributes" namespace object

2014-08-03 Thread Albert-Jan Roskam
- Original Message - > From: Peter Otten <__pete...@web.de> > To: python-list@python.org > Cc: > Sent: Sunday, August 3, 2014 11:37 AM > Subject: Re: Correct type for a simple "bag of attributes" namespace object > > Albert-Jan Roskam wrote: >

Re: Correct type for a simple "bag of attributes" namespace object

2014-08-03 Thread Albert-Jan Roskam
- Original Message - > From: Albert-Jan Roskam > To: Terry Reedy ; "python-list@python.org" > > Cc: > Sent: Sunday, August 3, 2014 11:17 AM > Subject: Re: Correct type for a simple "bag of attributes" namespace object >>>>>  

Re: [OT] Question about Git branches

2014-09-16 Thread Albert-Jan Roskam
- On Tue, Sep 16, 2014 9:37 AM CEST Steven D'Aprano wrote: >Ben Finney wrote: > >> "Frank Millman" writes: >> >> I know there some Git experts on this list, so I hope you don't mind >> me posting this question here. >> >> I do. There may be experts on parquetry floo

Re: [OT] Question about Git branches

2014-09-16 Thread Albert-Jan Roskam
- On Tue, Sep 16, 2014 10:29 AM CEST Chris Angelico wrote: >On Tue, Sep 16, 2014 at 6:21 PM, Marko Rauhamaa wrote: >> "Frank Millman" : >> >> You are encouraged to make liberal use of 'branches', >> >> Personally, I only use forks, IOW, "git clone". I encourage that >

Re: Python code in presentations

2014-09-30 Thread Albert-Jan Roskam
-- On Tue, Sep 30, 2014 1:50 PM CEST Jean-Michel Pichavant wrote: >Hello list, > >I'm currently writing a presentation to help my co-workers ramp up on new >features of our tool (written in python (2.7)). > >I have some difficulties presenting code in an efficient wa

what is the easiest way to install multiple Python versions?

2014-10-12 Thread Albert-Jan Roskam
Hi, (sorry for cross-posting) A few days ago I needed to check whether some Python code ran with Python 2.6. What is the easiest way to install another Python version along side the default Python version? My own computer is Debian Linux 64 bit, but a platform-independent solution would be bes

Re: what is the easiest way to install multiple Python versions?

2014-10-16 Thread Albert-Jan Roskam
- Original Message - > From: Rustom Mody > To: python-list@python.org > Cc: > Sent: Monday, October 13, 2014 10:00 AM > Subject: Re: what is the easiest way to install multiple Python versions? > > On Monday, October 13, 2014 1:24:27 PM UTC+5:30, Chris Angelico wrote: >> On Mon, Oct

Re: what is the easiest way to install multiple Python versions?

2014-10-16 Thread Albert-Jan Roskam
- Original Message - > From: Chris Angelico > To: > Cc: Python > Sent: Sunday, October 12, 2014 4:20 PM > Subject: Re: what is the easiest way to install multiple Python versions? > > On Mon, Oct 13, 2014 at 12:33 AM, Albert-Jan Roskam > > wrote: >

Re: what is the easiest way to install multiple Python versions?

2014-10-16 Thread Albert-Jan Roskam
- Original Message - > From: Gayathri J > To: Albert-Jan Roskam > Cc: Python > Sent: Sunday, October 12, 2014 6:15 PM > Subject: Re: what is the easiest way to install multiple Python versions? > > I have been using Anaconda's (Continnum) conda installation

Re: what is the easiest way to install multiple Python versions?

2014-10-16 Thread Albert-Jan Roskam
- Original Message - > From: Terry Reedy > To: python-list@python.org > Cc: > Sent: Monday, October 13, 2014 2:54 AM > Subject: Re: what is the easiest way to install multiple Python versions? > > On 10/12/2014 9:33 AM, Albert-Jan Roskam wrote: > > >

Re: what is the easiest way to install multiple Python versions?

2014-10-16 Thread Albert-Jan Roskam
- Original Message - > From: Chris Angelico > To: > Cc: Python > Sent: Thursday, October 16, 2014 10:48 AM > Subject: Re: what is the easiest way to install multiple Python versions? > > On Thu, Oct 16, 2014 at 7:42 PM, Albert-Jan Roskam > The differe

Re: [Tutor] Convert Qstring to string in windows

2014-10-16 Thread Albert-Jan Roskam
- On Thu, Oct 16, 2014 10:59 PM CEST Alan Gauld wrote: >On 16/10/14 19:14, Danny Yoo wrote: > >> need more information. But I think you may get better help on a >> Qt-specific mailing list; I suspect very few of us here have Qt >> experience. > >There are at least 2 P

real-life example LC_CTYPE effects?

2014-10-21 Thread Albert-Jan Roskam
Hi, The locale category LC_CTYPE may affect character classification and case conversion. That's the theory. Can you give a practical example where this locale setting matters? Eg.: locale.setlocale(locale.LC_CTYPE, loc) m = re.match("\d+", s, re.I | re.L) So with two different values for loc

Zipf test in Python

2007-11-22 Thread Albert-jan Roskam
Hi, I have hospital data for 5 groups of hospitals. Each group of hospitals used a different tool to register medical procedures. Since the medical procedures are probably Zipf distributed, I want to formally test whether the hospitals differ in terms of procedure-ditribution. Is there a Python mo

Research-oriented Python mailing list?

2007-11-22 Thread Albert-jan Roskam
Hi again, One more Q: I was wondering if there exists a more research-oriented Python listserv. This one is good (or so it seems, I'm just a newbie!), but the topics are very broad. Suggestions, anyone? Thanks in advance! Cheers!!! Albert-Jan Cheers! Albert-Jan

newbie question: converting csv to another dialect

2008-02-15 Thread Albert-jan Roskam
Hi all, I have a csv file with tab as a delimiter. I want to convert it into one that is comma delimited. I changed the regional settings on my computer to US. At first I thought I could use the CSV module for this, by reading the csv file, registering the new (desired = comma-delimited) dialect

Re: newbie - merging xls files using xldt and xlwt

2008-10-15 Thread Albert-jan Roskam
bie - merging xls files using xldt and xlwt > To: python-list@python.org > Date: Wednesday, October 15, 2008, 3:14 PM > On Oct 15, 9:16 pm, Albert-jan Roskam > <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I wrote the program below to merge all xls files in a > g

newbie - merging xls files using xldt and xlwt

2008-10-15 Thread Albert-jan Roskam
Hi, I wrote the program below to merge all xls files in a given directory into one multisheet xls file. It uses xlwt and xlrd. The xls files I use for input are generated by Spss. When I open and re-save the files in Excel, the program works, but when I use the xls files as they were created by

Newbie: Limesurvey and... MySQLdb?

2009-03-20 Thread Albert-jan Roskam
Hi! I made a website using Limesurvey (www.wordsalad.eu) and I would like to query the MySQL database, mostly for *FUN* and to learn more about Python. Should the MySQLdb module be my starting point? Or is there some other/more up-to-date module? Thanks in advance for your replies! Albert-Ja

IDE for Win CE?

2009-04-27 Thread Albert-jan Roskam
Hi, A colleague of mine is looking for a Python IDE for Windows CE. Does anybody happen to know what is a good choice? Thanks, AJ -- http://mail.python.org/mailman/listinfo/python-list

OrderedDict with kwds

2017-04-22 Thread Albert-Jan Roskam
For regular dicts I like to use the dict() function because the code is easier to write and read. But OrderedDict() is not equivalent to dict(): In the docstring of collections.OrderedDict it says "keyword arguments are not recommended because their insertion order is arbitrary" (https://github.

Re: OrderedDict with kwds

2017-04-22 Thread Albert-Jan Roskam
From: eryk sun Sent: Saturday, April 22, 2017 7:59 AM To: Python Main Cc: Albert-Jan Roskam Subject: Re: OrderedDict with kwds   On Fri, Apr 21, 2017 at 6:08 PM, Albert-Jan Roskam wrote: > Would the insertion order be preserved if the last line were to be > replaced with: >

Re: How to get Buttons to work

2017-04-22 Thread Albert-Jan Roskam
(sorry for top-posting). UpdateRecords and the other functions need to be nested so they fall under your class. Right now they are functions, not methods. AJ From: Python-list on behalf of horgan.ant...@gmail.com Sent: Saturday, April 22, 2017 12:45:09 PM To: p

Fw: Unable to convert pandas object to string

2017-06-24 Thread Albert-Jan Roskam
From: Albert-Jan Roskam Sent: Saturday, June 24, 2017 11:26:26 AM To: Paul Barry Subject: Re: Unable to convert pandas object to string (sorry for top posting) Try using fillna('') to convert np.nan into empty strings. df['desc'] = df.

Re: Combining 2 data series into one

2017-06-28 Thread Albert-Jan Roskam
(sorry for top posting) Yes, I'd try pd.concat([df1, df2]). Or this: df['both_names'] = df.apply(lambda row: row.name + ' ' + row.surname, axis=1) From: Python-list on behalf of Paul Barry Sent: Wednesday, June 28, 2017 12:30:25 PM To: Bhaskar Dhariyal Cc: python

Re: Combining 2 data series into one

2017-07-01 Thread Albert-Jan Roskam
Dhariyal Sent: Thursday, June 29, 2017 4:34:56 AM To: python-list@python.org Subject: Re: Combining 2 data series into one On Wednesday, 28 June 2017 23:43:57 UTC+5:30, Albert-Jan Roskam wrote: > (sorry for top posting) > Yes, I'd try pd.concat([df1, df2]). > Or this: > df['b

Re: memory leak with re.match

2017-07-05 Thread Albert-Jan Roskam
From: Python-list on behalf of Mayling ge Sent: Tuesday, July 4, 2017 9:01 AM To: python-list Subject: memory leak with re.match      Hi,    My function is in the following way to handle file line by line. There are    multiple error patterns  defined and  need to apply  to each  line. I  us

Re: Test 0 and false since false is 0

2017-07-11 Thread Albert-Jan Roskam
From: Python-list on behalf of Dan Sommers Sent: Friday, July 7, 2017 2:46 AM To: python-list@python.org Subject: Re: Test 0 and false since false is 0   On Thu, 06 Jul 2017 19:29:00 -0700, Sayth Renshaw wrote: > I have tried or conditions of v == False etc but then the 0's being > false als

Re: Compare files excel

2017-07-22 Thread Albert-Jan Roskam
(sorry for top posting) Try: df1['difference'] = (df1 == df2).all(axis=1) From: Python-list on behalf of Smith Sent: Saturday, July 22, 2017 7:47:59 AM To: python-list@python.org Subject: Compare files excel Hello to all, I should compare two excel files with p

Postgresql equivalent of Python's timeit?

2023-09-15 Thread Albert-Jan Roskam via Python-list
Hi, This is more related to Postgresql than to Python, I hope this is ok. I want to measure Postgres queries N times, much like Python timeit (https://docs.python.org/3/library/timeit.html). I know about EXPLAIN ANALYZE and psql \timing, but there's quite a bit of variation in the

Re: Postgresql equivalent of Python's timeit?

2023-09-17 Thread Albert-Jan Roskam via Python-list
On Sep 15, 2023 19:45, "Peter J. Holzer via Python-list" wrote: On 2023-09-15 17:42:06 +0200, Albert-Jan Roskam via Python-list wrote: >    This is more related to Postgresql than to Python, I hope this is ok. >    I want to measure Postgres queries N

pathlib.Path.is_file vs os.path.isfile difference

2024-03-08 Thread Albert-Jan Roskam via Python-list
Hi, I was replacing some os.path stuff with Pathlib and I discovered this: Path(256 * "x").is_file() # OSError os.path.isfile(256 * "x") # bool Is this intended? Does pathlib try to resemble os.path as closely as possible? Best wishes, Albert-Jan -- https://mail.python.or

Re: pathlib.Path.is_file vs os.path.isfile difference

2024-03-08 Thread Albert-Jan Roskam via Python-list
On Mar 8, 2024 19:35, Thomas Passin via Python-list wrote: On 3/8/2024 1:03 PM, Albert-Jan Roskam via Python-list wrote: > Hi, > I was replacing some os.path stuff with Pathlib and I discovered this: > Path(256 * "x").i

Re: pathlib.Path.is_file vs os.path.isfile difference

2024-03-10 Thread Albert-Jan Roskam via Python-list
On Mar 10, 2024 12:59, Thomas Passin via Python-list wrote: On 3/10/2024 6:17 AM, Barry wrote: > > >> On 8 Mar 2024, at 23:19, Thomas Passin via Python-list wrote: >> >> We just learned a few posts back that it might be specific to Linux; I ran it on

Re: Suggested python feature: allowing except in context maneger

2024-06-16 Thread Albert-Jan Roskam via Python-list
The example exception is not what bothers me. The syntax change is nowhere near as useful as `with` and context managers. They provide an excellent idiom for resource usage and release. Your suggestion complicates the `with` statement and brings only a tiny indentation red

Re: Best use of "open" context manager

2024-07-12 Thread Albert-Jan Roskam via Python-list
Or like below, although pylint complains about this: "consider using with". Less indentation this way. f = None try: f = open(FILENAME) records = f.readlines() except Exception: sys.exit(1) finally: if f is not None: f.close() -- https://mai

Re: Error codes

2024-08-13 Thread Albert-Jan Roskam via Python-list
On Aug 13, 2024 15:29, Barry Scott via Python-list wrote: > Could not find file 'C:\Users\Charl\OneDrive\Documents\The Sims 4 Mod Constructor\Projects\MetalMummysMods_Ehlers-DanlosMod\Python\__pycache__\MetalMummysMods_Ehlers-DanlosMod.cpython-37.pyc'. > Element ID: (No Elem

<    1   2   3   >