> In that particular case, replace automatic by implicit, and you got the
> reason why it is not a good idea.
> Maybe in your case the C habits clashes to the python habits.
>
You're right !
As a C developer, I appreciate to only include to deal with
strings, without wondering which other heade
At first, thank you all for your answers.
Some more details about what I'm coding and what I need...
The classes AAA and BBB are just given as examples. In fact, BBB's
constructor accepts several parameters, meaning it can be different
for each creation of AAA. So it can't be simply skipped from
>
> What is the behaviour of the __init__.py file?
>
Not yet used, but I read this file is run by Python when a module of a
package is imported.
So you can insert default importations in it.
--
http://mail.python.org/mailman/listinfo/python-list
Hi everyone,
I'm currently coding a C library which provides several modules and
objects.
Let's say that some of these objects are classes called AAA and BBB.
The constructor of AAA needs to get BBB as argument.
So I can run the following code :
from mymodule import AAA
from mymodule import BBB
Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:
> Jeremy C B Nicoll a écrit :
> > Figuring out how IDLE works is a bit beyond me at this stage.
>
> Did you try out, or is it just an a priori ?
Sort of, no and yes...
A few weeks ago I started trying to use Python & ID
Simon Forman <[EMAIL PROTECTED]> wrote:
> On Dec 8, 6:45 pm, Jeremy C B Nicoll <[EMAIL PROTECTED]> wrote:
> > Ah, I've been using IDLE so far (but would probably prefer to write
> > Python in my normal text editor). In IDLE Alt-X syntax checks the saved
>
ored is suitable, you might
sensibly use several or many smaller dicts to store all the data (and thus
save time reverse-keying much less of it).
--
Jeremy C B Nicoll - my opinions are my own.
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Jeremy C B Nicoll:
> > The code someone else posted ...
>
> If you are talking about my D code then I know it...
No I meant the code that used python to iterate over the dict and create
zillions of extra keys. I've deleted earlier posts in the th
put to.
The code someone else posted to reverse the keys is all very well, but
surely hugely wasteful on cpu, maybe storage, and elapsed time.
Even if the dict in this form is needed for some other reason, couldn't the
code that created it also create a reverse index at the same
Steve Howell <[EMAIL PROTECTED]> wrote:
>
> --- Jeremy C B Nicoll <[EMAIL PROTECTED]> wrote:
>
> > Steve Howell <[EMAIL PROTECTED]> wrote:
> >
> > > --- Jeremy C B Nicoll <[EMAIL PROTECTED]>
> > wrote:
> >
> >
Steven D'Aprano <[EMAIL PROTECTED]> wrote:
> On Sun, 09 Dec 2007 00:25:53 +0000, Jeremy C B Nicoll wrote:
>
> > > for app_name in settings.INSTALLED_APPS:
> > > try:
> > > __import__(app_name + '.management',
Steve Howell <[EMAIL PROTECTED]> wrote:
>
> --- Jeremy C B Nicoll <[EMAIL PROTECTED]> wrote:
> > What command (in XP) does one need to issue to
> > syntax check a saved python
> > script without running it?
>
> Perhaps oversimplifying a bit, running
ython
script without running it?
Does a syntax check report all syntax errors or just the first one found?
--
Jeremy C B Nicoll - my opinions are my own.
--
http://mail.python.org/mailman/listinfo/python-list
that could be raised?
How does one write a try/except piece of code that works (ie traps whatever
exception occurs, though obviously it can't necessarily fix an arbitrary
exception) for any exception, even those not known of in advance by the
author?
--
Jeremy C B Nicoll - my opinions are my own.
--
http://mail.python.org/mailman/listinfo/python-list
is vast
surely there's some or a lot of point in breaking it up into a group of
smaller files?
--
Jeremy C B Nicoll - my opinions are my own.
--
http://mail.python.org/mailman/listinfo/python-list
and Linux/Unix ways of doing
this?
--
Jeremy C B Nicoll - my opinions are my own.
--
http://mail.python.org/mailman/listinfo/python-list
Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> On Wed, 15 Aug 2007 12:34:27 +0100, Jeremy C B Nicoll wrote:
>
> > I've some supplementary questions... my original code was looking at
> > each leafname in turn via
> >
> > for leaf in o
Jeremy C B Nicoll <[EMAIL PROTECTED]> wrote:
> When I use os.listdir() to return that list of leaf values, I do seem to
> get them in alphabetical order, A before B before C etc, but the
> ~-prefixed ones are returned after the Z-prefixed files rather than before
> the A-ones.
er than before the A-ones.
I was wondering why...
--
Jeremy C B Nicoll - my opinions are my own.
--
http://mail.python.org/mailman/listinfo/python-list
Neil Cerutti <[EMAIL PROTECTED]> wrote:
> On 2007-06-08, Jeremy C B Nicoll <[EMAIL PROTECTED]> wrote:
> > Neil Cerutti <[EMAIL PROTECTED]> wrote:
> >> Luckily, the output format has not changed yet, so issues with
> >> maintaining the above haven'
ed to be sure that you
don't have any other code anywhere that implicitly relies on a particular
field being a known fixed length.
>
> However, I'd like something better.
What precisely do you want to achieve?
--
Jeremy C B Nicoll - my opinions are my own.
--
http://mail.python.org/mailman/listinfo/python-list
so that either no
commands are passed to an external environment, or that only some are.
Surely that'd be less work than creating something from scratch.
--
Jeremy C B Nicoll, Edinburgh, Scotland - my opinions are my own.
--
http://mail.python.org/mailman/listinfo/python-list
22 matches
Mail list logo