On Mar 21, 11:06 am, Nathan Rice
wrote:
> As for syntax, we have a lot of "real" domain specific languages, such
> as English, math and logic. They are vetted, understood and useful
> outside the context of programming. We should approach the discussion
> of language syntax from the perspective o
On 03/18/2012 12:15 AM, Cameron Simpson wrote:
> BTW, Lee, there is an external module for daemonising things in the UNIX
> sense:
> http://pypi.python.org/pypi/python-daemon
> I recommend you use it.
>
> Cheers,
I haven't updated the gist yet, but I did try it with the code below -
but I get the
On Mar 21, 4:34 pm, Steven D'Aprano wrote:
> On Wed, 21 Mar 2012 11:22:01 -0500, Evan Driscoll wrote:
> > On 01/-10/-28163 01:59 PM, Steve Howell wrote:
> >> Code shouldn't necessarily follow the example of English prose, but it
> >> seems that English has had some influence:
>
> >> 1 push(stac
On Wednesday, March 21, 2012 8:06:47 AM UTC-7, Ralph Heinkel wrote:
> Hi,
>
> when processing our mass spectrometry data we are running against the
> 2GB memory limit on our 32 bit machines. So we are planning to move to
> 64bit. Downloading and installing the 64bit version of Python for
> Windows
On Wed, 21 Mar 2012 11:22:01 -0500, Evan Driscoll wrote:
> On 01/-10/-28163 01:59 PM, Steve Howell wrote:
>> Code shouldn't necessarily follow the example of English prose, but it
>> seems that English has had some influence:
>>
>> 1 push(stack, item) # Push on the stack the item
>> 2 push(
On 03/21/12 15:54, Chris Kaynor wrote:
As Chris Rebert pointed out, there is no guarantee as to when the
__del__ method is called. CPython will generally call it immediately,
however if there are reference cycles it may never call it
And more maddeningly, modules/objects used/called from within
On Wed, Mar 21, 2012 at 1:34 PM, Chris Rebert wrote:
>
> On Wed, Mar 21, 2012 at 12:30 PM, John Gordon wrote:
> > I'm writing an application that interacts with ldap, and I'm looking
> > for advice on how to handle the connection. Specifically, how to
> > close the ldap connection when the appli
On Wed, Mar 21, 2012 at 12:30 PM, John Gordon wrote:
> I'm writing an application that interacts with ldap, and I'm looking
> for advice on how to handle the connection. Specifically, how to
> close the ldap connection when the application is done.
>
> I wrote a class to wrap an LDAP connection,
Write a context manager.
Then you just do
with MyLDAPWrapper() as ldap
ldap.this()
ldap.that()
and when you leave the scope of the with statement, your ldap __exit__
method will get called regardless of how you left.
Cheers,
Cliff
On Wed, 2012-03-21 at 19:30 +, John Gordon wrote:
I'm writing an application that interacts with ldap, and I'm looking
for advice on how to handle the connection. Specifically, how to
close the ldap connection when the application is done.
I wrote a class to wrap an LDAP connection, similar to this:
import ldap
import ConfigParser
Hi,
Ralph Heinkel writes:
> Hi,
>
> when processing our mass spectrometry data we are running against the
> 2GB memory limit on our 32 bit machines. So we are planning to move to
> 64bit. Downloading and installing the 64bit version of Python for
> Windows is trivial, but how do we compile our o
On 3/21/2012 8:15 AM Katya said...
Out of this GUI on user's request I want to create a report,
> prefferebly in DOC or/and ODT or/and PDF or/and HTML formats.
ReportLab which seems to be suitable is not ready for Python3.
So, any reason why not to just run that part under python2 -- they
t
MOAR TROLLING...
>> In my opinion, people who make statements such as "#1/2 are imperative,
>> #3 is OO" are missing pretty much the entire point of what OO is.
>>
>> OO is much more about semantics and the way code is structured. The
>> difference between #1/2 (especially #1, of course) and #3 is
On 3/21/2012 11:06 AM, Ralph Heinkel wrote:
when processing our mass spectrometry data we are running against the
2GB memory limit on our 32 bit machines. So we are planning to move to
64bit. Downloading and installing the 64bit version of Python for
Windows is trivial, but how do we compile our
On Wed, 21 Mar 2012 17:59:56 +0100
Peter Otten <__pete...@web.de> wrote:
> Rod Person wrote:
>
> > We have a module called constants.py, which contains [whatever]
> > related to server names, databases, service account users and their
> > passwords.
>
> Passwords?
>
Yes, not the best thing, bu
On Wed, 21 Mar 2012 09:56:57 -0700
Chris Rebert wrote:
> On Wed, Mar 21, 2012 at 8:25 AM, Rod Person
> wrote:
> > The question is there a way I can do this with out having to import
> > constants when what it's doing is importing itself. It would seem
> > to me that there should be a way for a
Rod Person wrote:
> We have a module called constants.py, which contains [whatever] related to
> server names, databases, service account users and their passwords.
Passwords?
> In order to be able to use constants as command line parameters for
> calling from our batch files I created the class
On Wed, Mar 21, 2012 at 8:25 AM, Rod Person wrote:
> The question is there a way I can do this with out having to import
> constants when what it's doing is importing itself. It would seem to me
> that there should be a way for a module to reference itself. In that
> thinking I have tried
>
> if
On Mar 21, 9:22 am, Evan Driscoll wrote:
> On 01/-10/-28163 01:59 PM, Steve Howell wrote:
>
>
>
>
>
>
>
>
>
> > Code shouldn't necessarily follow the example of English prose, but it
> > seems that English has had some influence:
>
> > 1 push(stack, item) # Push on the stack the item
> > 2 p
Jorgen Grahn, 13.03.2012 21:44:
> On Mon, 2012-03-12, MRAB wrote:
>> Probably the best solution is to put it into a database. Have a look at
>> the sqlite3 module.
>
> Some people like to use databases for everything, others never use
> them. I'm in the latter crowd, so to me this sounds as overki
On 01/-10/-28163 01:59 PM, Steve Howell wrote:
Code shouldn't necessarily follow the example of English prose, but it
seems that English has had some influence:
1 push(stack, item) # Push on the stack the item
2 push(item, stack) # Push the item on the stack
3 stack.push(item) # On the
Hi,
when processing our mass spectrometry data we are running against the
2GB memory limit on our 32 bit machines. So we are planning to move to
64bit. Downloading and installing the 64bit version of Python for
Windows is trivial, but how do we compile our own C extension? Visual C
++ 2008 express
We have a module called constants.py, which contains related to server
names, databases, service account users and there passwords.
In order to be able to use constants as command line parameters for
calling from our batch files I created the class below that checks to
make sure the parameter valu
I have a Python3 GUI, where user selects certain values to be statistically
evaluated and/or plotted (matplotlib hist).
Out of this GUI on user's request I want to create a report, prefferebly in DOC
or/and ODT or/and PDF or/and HTML formats. The layout of the report is pretty
much fixed, what
Thanks, Ian.
That does seem to explain it. The inner loop doesn't have access to the
class's name space, and of course you can't fix it by referencing Foo.y
explicitly, because the class isn't fully defined yet.
Ultimately, we realized that the dict should be created in the __init__
method, so t
On 03/21/2012 11:40 AM, Diez B. Roggisch wrote:
Andrea Crotti writes:
It works - so why do you bother? And I'm not sure about the above code -
AFAIK, validation is a two-step thing:
http://www.voidspace.org.uk/python/articles/configobj.shtml#validation
Diez
I don't agree, if you write code
On 03/21/2012 11:38 AM, Diez B. Roggisch wrote:
Andrea Crotti writes:
When I publish something on Pypi, is there a way to make it fetch the
list of dependencies needed by my project automatically?
It would be nice to have it in the Pypi page, without having to look
at the actual code..
Any ot
On 2012-03-20 22:26, Prasad, Ramit wrote:
I just looked at your source file on ActiveState and noticed that
you do not import traceback. That is why you are getting the
AttributeError. Now you should be getting a much better error
once you import it:)
Nope. That would result in a NameError. After
Andrea Crotti writes:
> On 03/19/2012 12:59 PM, Andrea Crotti wrote:
>> I seemed to remember that type validation and type conversion worked
>> out of the box, but now
>> I can't get it working anymore.
>>
>> Shouldn't this simple example actually fail the parsing (instead it
>> parses perfectly
Andrea Crotti writes:
> When I publish something on Pypi, is there a way to make it fetch the
> list of dependencies needed by my project automatically?
>
> It would be nice to have it in the Pypi page, without having to look
> at the actual code..
> Any other possible solution?
I don't understa
On Wed, Mar 21, 2012 at 6:57 PM, Steve Howell wrote:
> verb first: English-imperative ("boil water", "add noodles/salt",
> "serve in dish") or math-functional, e.g. sum(a,b,c)
> verb middle: infix, arithmetic-like ("5 plus 4", "10 divided by 2")
> or English-descriptive ("Dog bites man")
In Eng
On Mar 21, 12:16 am, Chris Rebert wrote:
> On Tue, Mar 20, 2012 at 11:52 PM, Steve Howell wrote:
> > On Mar 20, 10:40 pm, Chris Angelico wrote:
> >> On Wed, Mar 21, 2012 at 3:58 PM, Steve Howell wrote:
> >> > So saying "push(stack, item)" or "push(item, stack)" seems very
> >> > unsophisticated
Assuming you have:
lib/__init__.py
lib/foo.py
lib/foo.c
Then:
from distutils.core import setup, Extension
setup(name="lib", packages=["lib"], ext_modules=[Extension("lib._foo",
["lib/foo.c"])])
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, Mar 20, 2012 at 11:52 PM, Steve Howell wrote:
> On Mar 20, 10:40 pm, Chris Angelico wrote:
>> On Wed, Mar 21, 2012 at 3:58 PM, Steve Howell wrote:
>> > So saying "push(stack, item)" or "push(item, stack)" seems very
>> > unsophisticated, almost assembly-like in syntax, albeit at a higher
On Wed, Mar 21, 2012 at 5:52 PM, Steve Howell wrote:
> On the one hand, you say that "push(stack, item)" reads quite
> differently from "stack.push(item)".
>
> On the other hand, you say they are "so close to identical as makes no
> odds."
>
> I'm trying to make sense of that. Are you saying that
35 matches
Mail list logo