Re: Ensure unwanted names removed in class definition

2015-08-13 Thread Peter Otten
Ben Finney wrote: > Peter Otten <__pete...@web.de> writes: > >> Ben Finney wrote: >> >> > Peter Otten <__pete...@web.de> writes: >> > >> > That's an unexpected inconsistency between list comprehensions >> > versus generator expressions, then. Is that documented explicitly in >> > the Python 2 do

Re: How to model government organization hierarchies so that the list can expand and compress

2015-08-13 Thread Frank Millman
"Alex Glaros" wrote in message news:b3c1e2da-9f72-420a-8b68-288dddf9f...@googlegroups.com... It's like the desktop folder/directory model where you can create unlimited folders and put folders within other folders. Instead of folders, I want to use government organizations. Example: Let use

Re: Is Django the way to go for a newbie?

2015-08-13 Thread Laura Creighton
In a message of Thu, 13 Aug 2015 18:30:17 -0700, Rustom Mody writes: > >I dont know Django. Used RoR some years ago and it was frightening. >And Ruby is not bad. So I assume Rails is. >I just assumed -- maybe ignorantly -- that Django and RoR are generically >similar systems > It's web2py that is

Re: Is Django the way to go for a newbie?

2015-08-13 Thread Michael Torrie
On 08/13/2015 07:30 PM, Rustom Mody wrote: > Nothing specifically Django I am getting at. > Just that learning > - a templating engine -- eg Cheetah, Mako > - an ORM eg SQLAlchemy > - etc > > is more fun than learning to chant the right mantras that a framework > demands without any clue of what/w

Re: Mock object but also assert method calls?

2015-08-13 Thread Steven D'Aprano
On Fri, 14 Aug 2015 07:21 am, Ben Finney wrote: >> If find following totally different to the normal API which >> is provided by the mock library: >> >> assert call().test2("hello") in mocked_objects.mock_calls > > The ‘assert’ statement is a crude tool, which knows little about the > intent of y

Re: Module load times

2015-08-13 Thread Chris Angelico
On Fri, Aug 14, 2015 at 12:25 PM, Joseph L. Casale wrote: > Yeah that wasn't clear. The plugins are invoked in fresh interpreter processes > and hence modules with import side effects or simply large modules can > manifest over time. If they're invoked in fresh processes, then you're looking at p

RE: Module load times

2015-08-13 Thread Joseph L. Casale
> Importing is not the same as instantiation. > > When you import a module, the code is only read from disk and instantiated > the first time. Then it is cached. Subsequent imports in the same Python > session use the cached version. I do mean imported, in the original design there were many ctype

Re: Module load times

2015-08-13 Thread Steven D'Aprano
On Fri, 14 Aug 2015 07:12 am, Joseph L. Casale wrote: >> What makes you think the import might be a problem? That's a one-time >> thing. Or is your application a command-line tool or so that needs to >> start and terminate quickly? > > The code is used within plugin points and soon to be asynchro

Re: Is Django the way to go for a newbie?

2015-08-13 Thread Chris Angelico
On Fri, Aug 14, 2015 at 11:05 AM, Michael Torrie wrote: > Given that until recently he thought Django was an IDE, I think calling > Django a library is fair, as it describes to him how it relates to > Python. You download it and install it and it goes in site-packages > along with all the other l

Re: Is Django the way to go for a newbie?

2015-08-13 Thread Rustom Mody
On Friday, August 14, 2015 at 6:35:27 AM UTC+5:30, Michael Torrie wrote: > On 08/10/2015 10:08 PM, Rustom Mody wrote: > > On Tuesday, August 11, 2015 at 8:59:47 AM UTC+5:30, Michael Torrie wrote: > >> On 08/10/2015 07:49 PM, Dwight GoldWinde wrote: > >>> Thank you, Gary, for this new information. >

Re: Is Django the way to go for a newbie?

2015-08-13 Thread Michael Torrie
On 08/10/2015 10:08 PM, Rustom Mody wrote: > On Tuesday, August 11, 2015 at 8:59:47 AM UTC+5:30, Michael Torrie wrote: >> On 08/10/2015 07:49 PM, Dwight GoldWinde wrote: >>> Thank you, Gary, for this new information. >>> >>> I will be looking into virtualenv and vertualenvwrapper. >>> >>> I thought

[Back off topic] - Re: Hooking Mechanism when Entering and Leaving a Try Block

2015-08-13 Thread Michael Torrie
On 08/13/2015 12:28 AM, Sven R. Kunze wrote: > On 12.08.2015 20:44, Sven R. Kunze wrote: >> On 12.08.2015 18:11, Chris Angelico wrote: >>> Sounds to me like you want some sort of AST transform, possibly in an >>> import hook. Check out something like MacroPy for an idea of how >>> powerful this sor

[OT] unwritten list etiquette ate, was Re: Hooking Mechanism when Entering and Leaving a Try Block

2015-08-13 Thread Michael Torrie
On 08/13/2015 12:26 AM, Sven R. Kunze wrote: > > Btw. to me, the *context is the entire post*, not just two lines. You're a very rare person indeed. Most people seem to not read any of the post except the first and last lines. At least posting inline shows me they've read and understood the porti

Re: [Meta] How to post properly (was: Re: Hooking Mechanism when Entering and Leaving a Try Block)

2015-08-13 Thread Steven D'Aprano
On Thu, 13 Aug 2015 07:09 pm, Marko Rauhamaa wrote: > A third rule, which I'm violating here myself, is stick to > Python-related topics on this newsgroup. On the sorts of places that take these sorts of fine distinctions seriously, your post would be considered Meta rather than Off-topic. That i

Re: Mock object but also assert method calls?

2015-08-13 Thread Ben Finney
Thomas Lehmann via Python-list writes: > How about asserting that test2 of class Bar is called? It is unusual to call class methods; do you mean a method on an instance? You will make a mock instance of the class, or a mock of the class; and you'll need to know which it is. > Of course I can d

Re: Module load times

2015-08-13 Thread Joseph L. Casale
Hi Stefan, > How is the DLL binding implemented? Using "ctypes"? Or something else? It is through ctypes. > Obviously, instantiating a large ctypes wrapper will take some time. A > binary module would certainly be quicker here, both in terms of import time > and execution time. Since you're gene

Re: How to model government organization hierarchies so that the list can expand and compress

2015-08-13 Thread Laura Creighton
Figure out, right now, what you want to do when you find a government agency that has 2 masters and not one, so the strict heirarchy won't work. Laura -- https://mail.python.org/mailman/listinfo/python-list

Re: How to model government organization hierarchies so that the list can expand and compress

2015-08-13 Thread Ian Kelly
On Thu, Aug 13, 2015 at 1:10 PM, Alex Glaros wrote: > It's like the desktop folder/directory model where you can create unlimited > folders and put folders within other folders. Instead of folders, I want to > use government organizations. > > Example: Let user create agency names: Air Force, Ma

Re: How to model government organization hierarchies so that the list can expand and compress

2015-08-13 Thread Stéphane Wirtel
Create a model with a parent_id on the current model and you can use the mptt concept or some others for the reading. On 13 Aug 2015, at 21:10, Alex Glaros wrote: It's like the desktop folder/directory model where you can create unlimited folders and put folders within other folders. Instead

How to model government organization hierarchies so that the list can expand and compress

2015-08-13 Thread Alex Glaros
It's like the desktop folder/directory model where you can create unlimited folders and put folders within other folders. Instead of folders, I want to use government organizations. Example: Let user create agency names: Air Force, Marines, Navy, Army. Then let them create an umbrella collecti

Re: Module load times

2015-08-13 Thread Stefan Behnel
Joseph L. Casale schrieb am 13.08.2015 um 18:56: > I have an auto generated module that provides functions exported from a > c dll. Its rather large and we are considering some dynamic code generation > and caching, however before I embark on that I want to test import times. > > As the module is

Module load times

2015-08-13 Thread Joseph L. Casale
I have an auto generated module that provides functions exported from a c dll. Its rather large and we are considering some dynamic code generation and caching, however before I embark on that I want to test import times. As the module is all auto generated through XSL, things like __all__ are not

Re: OBIEE Developer and Administrator @ Seattle WA

2015-08-13 Thread Stéphane Wirtel
Hi Amrish, I think you can post to j...@python.org See: https://www.python.org/community/jobs/howto/ Thank you Stephane On 13 Aug 2015, at 18:42, Amrish B wrote: Hello Folks, Please go through below job description and send me updated resume to amr...@uniteditinc.com Job Title: OBIEE De

OBIEE Developer and Administrator @ Seattle WA

2015-08-13 Thread Amrish B
Hello Folks, Please go through below job description and send me updated resume to amr...@uniteditinc.com Job Title: OBIEE Developer and Administrator Location: Seattle WA Duration: 12+months Experience: 10+ years only Job Description: * maintain the Oracle Business Intelligence Enterp

Re: Vaga Java (Belgica, com tudo pago)

2015-08-13 Thread leo kirotawa
Wondering why a position for Java/JS was sent to this list...just wondering... On Thu, Aug 13, 2015 at 11:59 AM, wrote: > https://walljobs.typeform.com/to/uWpUqj > > We seek a software developer with experience in web application development. > > Should you have the passion to work in the start-

Mock object but also assert method calls?

2015-08-13 Thread Thomas Lehmann via Python-list
Hi, How about asserting that test2 of class Bar is called? Of course I can do a patch for a concrete method but I was looking for something like: mocked_object.assert_method_called_with(name="test2", "hello") If find following totally different to the normal API which is provided by the mock

Re: problem with netCDF4 OpenDAP

2015-08-13 Thread Jason Swails
On Thu, Aug 13, 2015 at 6:32 AM, Tom P wrote: > I'm having a problem trying to access OpenDAP files using netCDF4. > The netCDF4 is installed from the Anaconda package. According to their > changelog, openDAP is supposed to be supported. > > netCDF4.__version__ > Out[7]: > '1.1.8' > > Here's some

Vaga Java (Belgica, com tudo pago)

2015-08-13 Thread henrique . calandra
https://walljobs.typeform.com/to/uWpUqj We seek a software developer with experience in web application development. Should you have the passion to work in the start-up environment and the willingness to evolve in a fast-paced environment, then we'd like to get in touch. We are located in Brus

Re: Real-time recoding of video from asx to non-Windows formats

2015-08-13 Thread Michael Torrie
On 08/12/2015 12:04 AM, Montana Burr wrote: > I'm interested in using Python to create a server for streaming my > state's traffic cameras - which are only available as Windows Media streams > - to devices that do not natively support streaming Windows Media content > (think Linux computers & i

Re: Real-time recoding of video from asx to non-Windows formats

2015-08-13 Thread Python UL
On 12-08-15 08:04, Montana Burr wrote: Hi, I'm interested in using Python to create a server for streaming my state's traffic cameras - which are only available as Windows Media streams - to devices that do not natively support streaming Windows Media content (think Linux computers & iP

Re: Linux users: please run gui tests

2015-08-13 Thread Terry Reedy
On 8/13/2015 1:11 AM, Laura Creighton wrote: In a message of Wed, 12 Aug 2015 21:49:24 -0400, Terry Reedy writes: https://bugs.python.org/issue15601 Could you add a note to the issue then? Done, though I wonder if it isn't a separate issue. I was not sure. The people currently nosy will

Re: AttributeError

2015-08-13 Thread Denis McMahon
On Thu, 13 Aug 2015 02:41:55 -0700, Ltc Hotspot wrote: >>> How do I define X? > What are the values of X & Y from the code as follows: > # print time: ['From', 'stephen.marqu...@uct.ac.za', 'Sat', 'Jan', '5', '09:14:16', '2008'] This is the data you need to look at. X is the position in the p

problem with netCDF4 OpenDAP

2015-08-13 Thread Tom P
I'm having a problem trying to access OpenDAP files using netCDF4. The netCDF4 is installed from the Anaconda package. According to their changelog, openDAP is supposed to be supported. netCDF4.__version__ Out[7]: '1.1.8' Here's some code: url = 'http://www1.ncdc.noaa.gov/pub/data/cmb/ersst/

Re: AttributeError

2015-08-13 Thread Ltc Hotspot
On Thu, Aug 13, 2015 at 2:15 AM, Denis McMahon wrote: > On Wed, 12 Aug 2015 16:46:32 -0700, Ltc Hotspot wrote: > >> How do I define X? >> > - >> Traceback reads: >> >> 10 f = open(filename,'r') >> 11 for

Re: AttributeError

2015-08-13 Thread Mark Lawrence
On 12/08/2015 22:04, Ltc Hotspot wrote: So calling people stupid and ignorant on the internet makes you sexual arousal and to masturbate with yourself *plonk* - please follow suit everybody, it's quite clear that he has no interest in bothering with any of the data we've all provided. -- My

Re: AttributeError

2015-08-13 Thread Denis McMahon
On Wed, 12 Aug 2015 16:46:32 -0700, Ltc Hotspot wrote: > How do I define X? > - > Traceback reads: > > 10 f = open(filename,'r') > 11 for l in f: > ---> 12 h = int(l.split()[X].split(':')[Y]) >

[OT] How to post properly (was: Re: Hooking Mechanism when Entering and Leaving a Try Block)

2015-08-13 Thread Marko Rauhamaa
Mark Lawrence : > The rule has been no top posting here for the 15 years I've been using > Python. Top posting is simply annoying. However, I'd like people to also stick to another rule: only quote a few lines. I should start seeing your contribution to the discussion without scrolling because t

Re: AttributeError

2015-08-13 Thread Ltc Hotspot
So calling people stupid and ignorant on the internet makes you sexual arousal and to masturbate with yourself On Wed, Aug 12, 2015 at 1:38 PM, Denis McMahon wrote: > On Wed, 12 Aug 2015 12:05:37 -0700, Ltc Hotspot wrote: > >>>Have a look at assignment_10_2_v_06.py. > >> What should I look at ass

Re: Hooking Mechanism when Entering and Leaving a Try Block

2015-08-13 Thread Mark Lawrence
On 13/08/2015 07:26, Sven R. Kunze wrote: On 13.08.2015 02:45, Chris Angelico wrote: On Thu, Aug 13, 2015 at 6:54 AM, Mark Lawrence wrote: On 12/08/2015 19:44, Sven R. Kunze wrote: On 12.08.2015 18:11, Chris Angelico wrote: (Please don't top-post.) Is this some guideline? I actually quite

Re: Hooking Mechanism when Entering and Leaving a Try Block

2015-08-13 Thread Jonas Wielicki
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 13.08.2015 08:26, Sven R. Kunze wrote: > > So, I take this as a "my personal preference guideline" because I > cannot find an official document for this (maybe, I am looking at > the wrong places). - From RFC 1855 (Netiquette Guidelines