Re: compile a python3 project with autotools

2016-08-14 Thread Chris Angelico
On Mon, Aug 15, 2016 at 7:23 AM, wrote: > #!/usr/bin/env python3 > > import sys > sys.path.insert(1, '@pythondir@') > > from mkbib.main import mkbib > if __name__ == "__main__": > app = mkbib() > r = app.run() > sys.exit(r) > > > Now, the problem is it is compiling fine (make; make in

Re: compile a python3 project with autotools

2016-08-14 Thread Rudra Banerjee
On Monday, August 15, 2016 at 12:39:33 AM UTC+2, Lawrence D’Oliveiro wrote: > On Monday, August 15, 2016 at 9:24:04 AM UTC+12, Rudra Banerjee wrote: > > but while running the application, I am getting error: > > (mkbib:14843): Gtk-CRITICAL **: New application windows must be added after > > the GAp

Re: Finding the first index in a list greater than a particular value

2016-08-14 Thread Jussi Piitulainen
Atri Mahapatra writes: > I have a list of dictionaries which look like this: > [{'Width': 100, 'Length': 20.0, 'Object': 'Object1'}, {'Width': 12.0, > 'Length': 40.0, 'Object': 'Object2'}.. so on till 10] > > I would like to find the first index in the list of dictionaries whose > length is

Re: Finding the first index in a list greater than a particular value

2016-08-14 Thread Michael Selik
On Sun, Aug 14, 2016 at 2:21 PM Atri Mahapatra wrote: > I have a list of dictionaries which look like this: > [{'Width': 100, 'Length': 20.0, 'Object': 'Object1'}, {'Width': 12.0, > 'Length': 40.0, 'Object': 'Object2'}.. so on till 10] > > I would like to find the first index in the list of d

Re: What's the best way to minimize the need of run time checks?

2016-08-14 Thread Steven D'Aprano
On Mon, 15 Aug 2016 08:45 am, Lawrence D’Oliveiro wrote: > On Monday, August 15, 2016 at 4:31:44 AM UTC+12, BartC wrote: > >> But it can't create a new record or struct type at runtime which can >> then be accessed using normal syntax, in compiled code that already >> existed before the record wa

Re: What's the best way to minimize the need of run time checks?

2016-08-14 Thread Michael Torrie
On 08/14/2016 04:45 PM, Lawrence D’Oliveiro wrote: > On Monday, August 15, 2016 at 4:31:44 AM UTC+12, BartC wrote: > >> But it can't create a new record or struct type at runtime which can >> then be accessed using normal syntax, in compiled code that already >> existed before the record was cre

Re: What's the best way to minimize the need of run time checks?

2016-08-14 Thread Lawrence D’Oliveiro
On Monday, August 15, 2016 at 4:31:44 AM UTC+12, BartC wrote: > But it can't create a new record or struct type at runtime which can > then be accessed using normal syntax, in compiled code that already > existed before the record was created. That’s an awful lot of “which ... that” qualificati

Re: compile a python3 project with autotools

2016-08-14 Thread Lawrence D’Oliveiro
On Monday, August 15, 2016 at 9:24:04 AM UTC+12, Rudra Banerjee wrote: > but while running the application, I am getting error: > (mkbib:14843): Gtk-CRITICAL **: New application windows must be added after > the GApplication::startup signal has been emitted. Does the application actually fail? Be

Re: compile a python3 project with autotools

2016-08-14 Thread Rudra Banerjee
Plz ignore src/Mkbib/mkbib.in file, as appeared in the tree -- https://mail.python.org/mailman/listinfo/python-list

compile a python3 project with autotools

2016-08-14 Thread bnrj . rudra
Hi, I am trying to compile a python project using autotools. The project runs absolutely fine from command line, and it uses Gtk3 library. the src file is: ├── src │   ├── Makefile.am │   ├── Makefile.in │   ├── Mkbib │   │   ├── cell.py │   │   ├── dialogue.py │   │   ├── filemanager.py │   │

Re: Finding the first index in a list greater than a particular value

2016-08-14 Thread MRAB
On 2016-08-14 19:40, Atri Mahapatra wrote: On Monday, 15 August 2016 00:03:59 UTC+5:30, MRAB wrote: On 2016-08-14 19:17, Atri Mahapatra wrote: > I have a list of dictionaries which look like this: > [{'Width': 100, 'Length': 20.0, 'Object': 'Object1'}, {'Width': 12.0, 'Length': 40.0, 'Object':

RE: Issue with ctypes and callback functions

2016-08-14 Thread Bill Somerville
-Original Message- From: Bill Somerville Sent: 04 August 2016 18:23 To: 'eryk sun' ; python-list@python.org Subject: RE: Issue with ctypes and callback functions -Original Message- From: eryk sun [mailto:eryk...@gmail.com] from_param is a hook method for a type that's set in a f

Re: Finding the first index in a list greater than a particular value

2016-08-14 Thread Atri Mahapatra
On Monday, 15 August 2016 00:03:59 UTC+5:30, MRAB wrote: > On 2016-08-14 19:17, Atri Mahapatra wrote: > > I have a list of dictionaries which look like this: > > [{'Width': 100, 'Length': 20.0, 'Object': 'Object1'}, {'Width': 12.0, > > 'Length': 40.0, 'Object': 'Object2'}.. so on till 10] > >

Re: Finding the first index in a list greater than a particular value

2016-08-14 Thread MRAB
On 2016-08-14 19:17, Atri Mahapatra wrote: I have a list of dictionaries which look like this: [{'Width': 100, 'Length': 20.0, 'Object': 'Object1'}, {'Width': 12.0, 'Length': 40.0, 'Object': 'Object2'}.. so on till 10] I would like to find the first index in the list of dictionaries whose l

Re: What's the best way to minimize the need of run time checks?

2016-08-14 Thread Paul Rubin
MRAB writes: >> I don't know many untyped languages apart from machine code or maybe >> assembly. Perhaps Forth? (Maybe not -- some Forths include a separate >> floating point stack as well as the usual stack.) Forth is essentially untyped. There's no distinction between integers, characters, a

Finding the first index in a list greater than a particular value

2016-08-14 Thread Atri Mahapatra
I have a list of dictionaries which look like this: [{'Width': 100, 'Length': 20.0, 'Object': 'Object1'}, {'Width': 12.0, 'Length': 40.0, 'Object': 'Object2'}.. so on till 10] I would like to find the first index in the list of dictionaries whose length is greater than a particular value f

Re: Python slang

2016-08-14 Thread Random832
On Wed, Aug 10, 2016, at 19:57, Michael Torrie wrote: > But the grammar must still be a bit complex as sometimes the LHS of the > = is an expression, as well as the RHS. The only place that an *arbitrary* expression (including e.g. = as equality) can appear in the LHS is inside parentheses, otherw

Re: What's the best way to minimize the need of run time checks?

2016-08-14 Thread Chris Angelico
On Mon, Aug 15, 2016 at 2:44 AM, MRAB wrote: > On 2016-08-14 15:29, Steven D'Aprano wrote: > [snip] >> >> I don't know many untyped languages apart from machine code or maybe >> assembly. Perhaps Forth? (Maybe not -- some Forths include a separate >> floating point stack as well as the usual stack

Re: What's the best way to minimize the need of run time checks?

2016-08-14 Thread MRAB
On 2016-08-14 15:29, Steven D'Aprano wrote: [snip] I don't know many untyped languages apart from machine code or maybe assembly. Perhaps Forth? (Maybe not -- some Forths include a separate floating point stack as well as the usual stack.) Hypertalk treated everything as strings. Tcl treats nearl

Re: What's the best way to minimize the need of run time checks?

2016-08-14 Thread BartC
On 14/08/2016 14:18, Chris Angelico wrote: On Sun, Aug 14, 2016 at 8:49 PM, BartC wrote: Well, it's using exec(). So it is generating new program code at runtime. That is possible in quite a few languages, even C. It doesn't have to; that's only so it doesn't have to manually construct a Func

Module pyswisseph

2016-08-14 Thread Lallo
Hi, I would like to install the module pypi.python.org/pypi/pyswisseph in Python 2.7.12 on Windows 7 / 64 Bit. In the instructions it says to use CMake and MinGW. How should I do? Can you help me please? Thanks, Lallo -- https://mail.python.org/mailman/listinfo/python-list

Re: What's the best way to minimize the need of run time checks?

2016-08-14 Thread breamoreboy
On Sunday, August 14, 2016 at 7:09:47 AM UTC+1, Paul Rubin wrote: > Steven D'Aprano writes: > > If the Python community rallies around this "record" functionality and > > takes to it like they took too namedtuple > > I like namedtuple and I think that it's a feature that they're modified > by maki

Re: What's the best way to minimize the need of run time checks?

2016-08-14 Thread Steven D'Aprano
On Thu, 11 Aug 2016 06:33 am, Juan Pablo Romero Méndez wrote: > I've been trying to find (without success so far) an example of a > situation where the dynamic features of a language like Python provides a > clear advantage over languages with more than one type. Python has more than one type. Do

Re: SmallTalk-like interactive environment on base of cPython 2.7.x + wx

2016-08-14 Thread Chris Angelico
On Sun, Aug 14, 2016 at 9:53 PM, Dmitry Ponyatov wrote: > Does anybody can recomend some links on tutorials on making custom dynamic > languages or objects systems on top of cPython2 ? > > I want some interactive dynamic object environment with SmallTalk look&feel > but with Python syntax. Any

Re: I'm looking for a part-time job in Python / Django

2016-08-14 Thread Chris Angelico
On Sun, Aug 14, 2016 at 9:00 PM, Uri Even-Chen wrote: > To python-list@python.org, > > I'm looking for a part-time job in Python / Django, do you know anything? I > live in Herzliya, Israel. I can't relocate but I can work from home. You > can see my CV on LinkedIn. Please let me know if you have

Re: What's the best way to minimize the need of run time checks?

2016-08-14 Thread Chris Angelico
On Sun, Aug 14, 2016 at 8:49 PM, BartC wrote: > Well, it's using exec(). So it is generating new program code at runtime. > That is possible in quite a few languages, even C. It doesn't have to; that's only so it doesn't have to manually construct a Function object. Or you could make a simpler __

SmallTalk-like interactive environment on base of cPython 2.7.x + wx

2016-08-14 Thread Dmitry Ponyatov
Does anybody can recomend some links on tutorials on making custom dynamic languages or objects systems on top of cPython2 ? I want some interactive dynamic object environment with SmallTalk look&feel but with Python syntax. Other tutorials I'm interested in are reflection, dynamic bytecode (d

Re: Anyone here running Python on a PowerPC?

2016-08-14 Thread Tim Chase
On 2016-08-14 12:28, Steven D'Aprano wrote: > Is there anyone here running Python on a PowerPC willing to help me > diagnose and fix this issue? > > http://bugs.python.org/issue27761 Not so savvy in the building, but I've got a Mac PPC (still on 10.4 or whatever the last-ish PPC build of OS X was

Re: How do I make a video animation with transparent background?

2016-08-14 Thread Martin Schöön
Den 2016-08-10 skrev Lawrence D’Oliveiro : > On Thursday, August 11, 2016 at 9:34:33 AM UTC+12, Martin Schöön wrote: >> Next on my TODO list is to look into the color composition idea. I >> have already looked this tutorial: >> https://youtu.be/sZzmksnzrX0 > > If the images you generate have an alp

Re: A strange list concatenation result

2016-08-14 Thread ast
"Mok-Kong Shen" a écrit dans le message de news:noo1v6$r39$1...@news.albasani.net... Am 13.08.2016 um 03:08 schrieb Steven D'Aprano: On Sat, 13 Aug 2016 06:44 am, Mok-Kong Shen wrote: list2 = [1,2,3] list1 += [4,5,6] print(list1, list2) [1, 2, 3, 4, 5, 6] [1, 2, 3] Does that help? I do

Re: Creating dictionary of items from Excel with mutliple keys

2016-08-14 Thread Peter Otten
Atri Mahapatra wrote: > I am trying to create a following dictionary. I am reading data from excel > which has data in the following format: > > Sl no: Name Thickness Length Material Width Quantity Side > > It has 20 rows of data. > > > The dictionary for the 20 rows, I would like to make is

I'm looking for a part-time job in Python / Django

2016-08-14 Thread Uri Even-Chen
To python-list@python.org, I'm looking for a part-time job in Python / Django, do you know anything? I live in Herzliya, Israel. I can't relocate but I can work from home. You can see my CV on LinkedIn. Please let me know if you have any job for me. Thanks, Uri. *Uri Even-Chen* [image: photo] Ph

Re: What's the best way to minimize the need of run time checks?

2016-08-14 Thread BartC
On 14/08/2016 05:20, Chris Angelico wrote: On Sun, Aug 14, 2016 at 2:13 PM, Steven D'Aprano wrote: What you should be doing is comparing the types of record *instances* instead: py> x = record('Spam', 'breakfast lunch dinner')('spam', ... 'spam and eggs', 'spam and eggs and spam with a sid

Re: What's the best way to minimize the need of run time checks?

2016-08-14 Thread BartC
On 14/08/2016 05:13, Steven D'Aprano wrote: On Sun, 14 Aug 2016 06:59 am, BartC wrote: * The fields in my record are known at compile time There's nothing like that in Python. But the difference between compile-time and run-time is not that significant in practice (as opposed to theory, whe