On Dec 8, 8:56 pm, Steve Howell <[EMAIL PROTECTED]> wrote:
> --- Bruno Desthuilliers
>
> <[EMAIL PROTECTED]> wrote:
> > Colin J. Williams a écrit :
> > > I'm not sure that I like add 3, 5, 7
>
> > > but it would be nice to be able to drop the
> > parentheses
> > > when no argument is required.
>
>
"Mario M. Mueller" <[EMAIL PROTECTED]> wrote:
>Bjoern Schliessmann wrote:
>
>[...]
>> BTW, who in his mind designs three byte floats? Memory isn't that
>> expensive anymore. Even C bool is four bytes long.
>
>It's output of a digitizer (but not that old). I was also wondering about
>the reason for
I have a list of strings. These strings are previously selected
bigrams with underscores between them ('and_the', 'nothing_given', and
so on). I need to write a regex that will read another text string
that this list was derived from and replace selections in this text
string with those from my l
On Dec 8, 8:35 pm, Rick Muller <[EMAIL PROTECTED]> wrote:
> I'm a computational chemist who frequently dabbles in Python. A
> collaborator sent me a huge XML file that at one point was evidently
> modified by a now defunct java application. A sample of this file
> looks something like:
>
>
> T
"Tommy Nordgren" <[EMAIL PROTECTED]> wrote:
>
> On 8 dec 2007, at 12.52, Mario M. Mueller wrote:
>
> > Bjoern Schliessmann wrote:
> >
> > [...]
> >> BTW, who in his mind designs three byte floats? Memory isn't that
> >> expensive anymore. Even C bool is four bytes long.
> >
> > It's output of a di
--- Jeremy C B Nicoll <[EMAIL PROTECTED]> wrote:
> 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 ove
--- Rick Muller <[EMAIL PROTECTED]> wrote:
> If I want to do this, it seems like I need to keep a
> connection
> between the gui element and the original value in
> the elementtree, so
> I can update it. But I'm having a hard time
> visualizing exactly how
> this works. Can someone help me out he
I'm a computational chemist who frequently dabbles in Python. A
collaborator sent me a huge XML file that at one point was evidently
modified by a now defunct java application. A sample of this file
looks something like:
Test
File Name
fileName
Name of the input f
On Sun, 09 Dec 2007 00:25:53 +, Jeremy C B Nicoll wrote:
> > for app_name in settings.INSTALLED_APPS:
> > try:
> > __import__(app_name + '.management', {}, {}, [''])
> > except ImportError, exc:
> > if exc.args[0]!='No module named manageme
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 "python" does a
> syntax check, and if it pas
--- Jeremy C B Nicoll <[EMAIL PROTECTED]> wrote:
> Steve Howell <[EMAIL PROTECTED]> wrote:
>
> > There are a zillion powerful editors out there.
> I've
> > been productive in EditPlus, MultiEdit, SlickEdit,
> > vim, and emacs, just to throw out a few examples.
>
> What command (in XP) does one
--- Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> On Sat, 08 Dec 2007 16:58:25 -0800, Karthik Gurusamy
> wrote:
>
> > Why are the following accepted even without a
> warning about syntax
> > error?
> > (I would expect the python grammar should catch
> these kind of syntax
> > errors)
> >
Steve Howell <[EMAIL PROTECTED]> wrote:
> There are a zillion powerful editors out there. I've
> been productive in EditPlus, MultiEdit, SlickEdit,
> vim, and emacs, just to throw out a few examples.
What command (in XP) does one need to issue to syntax check a saved python
script without runnin
On Sat, 08 Dec 2007 16:58:25 -0800, Karthik Gurusamy wrote:
> Why are the following accepted even without a warning about syntax
> error?
> (I would expect the python grammar should catch these kind of syntax
> errors)
>
n = 1
2 * + n
> 2
n += 1
n
> 2
++n
> 2
There i
On Dec 8, 7:58 pm, Karthik Gurusamy <[EMAIL PROTECTED]> wrote:
> I see python doesn't have ++ or -- operators unlike say, C.
> I read some reasonings talking about immutable scalars and using ++/--
> doesn't make much sense in python (not sure if ++i is that far-fetched
> compared to the allowed i
I see python doesn't have ++ or -- operators unlike say, C.
I read some reasonings talking about immutable scalars and using ++/--
doesn't make much sense in python (not sure if ++i is that far-fetched
compared to the allowed i += 1)
In any case, I accidentally wrote ++n in python and it silently
Fuzzyman wrote:
> Wouldn't it be more useful having a store (possibly with a mapping
> API?) that stored several values. Then a single commit can be done at
> the end of the transaction.
>
> If the transaction fails, then the whole process can be repeated with
> none of the changes having been co
On Sat, 08 Dec 2007 23:14:44 +, Bruce Coram wrote:
>> http://www.catb.org/~esr/faqs/smart-questions.html
>>
> Eric Raymond's advice on how to ask questions the smart way would seem
> to provide an excuse for people with ego control problems to indulge
> themselves at the expense of others.
Thomas Guettler <[EMAIL PROTECTED]> wrote:
> If you look at this code, you see there are two kind of ImportErrors:
>
> 1. app_name has no attribute or file managment.py: That's OK.
> 2. managment.py exists, but raises an ImportError: That's not OK: reraise
>
> # Import the 'management' m
In article <[EMAIL PROTECTED]>,
Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:
> MonkeeSage a écrit :
> > On Dec 8, 2:51 pm, Glenn Hutchings <[EMAIL PROTECTED]> wrote:
> >
> >>On Dec 8, 7:44 pm, MonkeeSage <[EMAIL PROTECTED]> wrote:
> >>
> >>
> >>>I think it muddies the water to say that a.a() a
Richard Jones a écrit :
> Bruno Desthuilliers wrote:
>
>>class A(object):
>> @apply
>> def a():
>> def fget(self):
>> return self._a
>> def fset(self, val):
>> self._a = val
>> return property(**locals())
>> def __init__(self):
>> self.a = "foo"
>
>
> That prope
--- Richard Jones <[EMAIL PROTECTED]>
wrote:
>
> class A(object):
> def set_a(self, value):
> self._a = value
> a = property(lambda self: self._a, set_a)
>
> Note that this differs from a regular attribute
> because "a" is not deletable
> from instances (the property defines no d
Chris <[EMAIL PROTECTED]> wrote:
> For the first one you are parsing the entire file everytime you want
> to lookup just one domain...
Is the file sorted? If so wouldn't it be easier either to read the whole
thing and then binary-chop search it, or if the file is vast to use seek
creatively to b
On Dec 8, 10:53 pm, Michael Sparks <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm interested in writing a simple, minimalistic, non persistent (at this
> stage) software transactional memory (STM) module. The idea being it should
> be possible to write such a beast in a way that can be made threadsafe fa
--- Bruno Desthuilliers >
> > Another aspect of Ruby is that the final
> expression
> > evaluated in a method actually gets returned as
> the
> > result of a method,
>
> Unless there's an explict return before...
>
> > which has further implications on
> > whether "close" is simply evaluated or
Bruno Desthuilliers wrote:
> class A(object):
>@apply
>def a():
> def fget(self):
>return self._a
> def fset(self, val):
>self._a = val
> return property(**locals())
>def __init__(self):
> self.a = "foo"
That property setup seems overly complicated.
Steve Howell a écrit :
> --- Bruno Desthuilliers
> <[EMAIL PROTECTED]> wrote:
>
>
>>Colin J. Williams a écrit :
>>
>>>I'm not sure that I like add 3, 5, 7
>>>
>>>but it would be nice to be able to drop the
>>
>>parentheses
>>
>>>when no argument is required.
>>>
>>>Thus: close;
>>>could r
Aahz wrote:
> In article <[EMAIL PROTECTED]>,
> Nigel Rantor <[EMAIL PROTECTED]> wrote:
>
>> I think what Boris was being exceedingly unhelpful in saying was "why
>> should it work when you're calling methods that do not exist"
>>
>
> http://www.catb.org/~esr/faqs/smart-questions.html
>
Bruno Desthuilliers a écrit :
(snip)
> # hiscores.py
> import sys
>
> def _read_scores(path):
> f = open(path)
> # we don't expect a huge file so it's simpler to
> # read it all in memory
> lines = f.readlines()
> f.close()
>
> scores = []
> for line in filter(None, ma
MonkeeSage a écrit :
> On Dec 8, 12:42 pm, Bruno Desthuilliers
> <[EMAIL PROTECTED]> wrote:
>
>>MonkeeSage a écrit :
>>
>>
>>>On Dec 7, 11:08 pm, Steve Howell <[EMAIL PROTECTED]> wrote:
>>
>>(snip)
>>
4) Ruby forces you to explicitly make attributes for
instance variables. At first I fou
Hi,
I'm interested in writing a simple, minimalistic, non persistent (at this
stage) software transactional memory (STM) module. The idea being it should
be possible to write such a beast in a way that can be made threadsafe fair
easily.
For those who don't know, STM is a really fancy way of say
MonkeeSage a écrit :
> On Dec 8, 2:51 pm, Glenn Hutchings <[EMAIL PROTECTED]> wrote:
>
>>On Dec 8, 7:44 pm, MonkeeSage <[EMAIL PROTECTED]> wrote:
>>
>>
>>>I think it muddies the water to say that a.a() and a.a are the same
>>>thing--obviously they are not.
>>
>>A thing is not what it is;
>>A thing
MonkeeSage a écrit :
> On Dec 8, 12:56 pm, Bruno Desthuilliers
> <[EMAIL PROTECTED]> wrote:
>
>>MonkeeSage a écrit :
>>
>>
>>
>>
>>>On Dec 8, 2:10 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
>>
On Fri, 07 Dec 2007 23:19:40 -0800, tjhnson wrote:
>>
>With properties, attributes a
In article <[EMAIL PROTECTED]>,
Chris Mellon <[EMAIL PROTECTED]> wrote:
>On Nov 22, 2007 3:04 PM, Brian <[EMAIL PROTECTED]> wrote:
>
>> / Chime Mode
>> I have, in fact, sent this thread to my friend.
>> His limiting factors are
>>
>> - money-control people favor MS platforms
>> - C# and VS have mi
from urllib import urlopen
url = urlopen("http://www.google.com";).read()
Enjoy!
On 12/8/07, Larry Bates <[EMAIL PROTECTED]> wrote:
>
> Gabriel Genellina wrote:
> > En Fri, 07 Dec 2007 17:58:43 -0300, yi zhang <[EMAIL PROTECTED]>
> > escribió:
> >
> >> The urllib.urlretrieve() can only download t
On Sat, 08 Dec 2007 13:06:15 -0800, Steve Howell wrote:
> This is what I came up with:
>
> http://pylonshq.com/pastetags/form_remote_tag
I see that Pylons uses a standard templating systems with all the JS
renderers hooked into it as standard template function calls. That's
great, now I just h
Shawn Minisall a écrit :
> I'm writing a game that uses two functions to check and see if a file
> called highScoresList.txt exists in the main dir of the game program.
> If it doesn, it creates one. That part is working fine. The problem is
> arising when it goes to read in the high scores f
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| What don't I know that I should know to just edit/run, preferably at
| the tap of a function key?
In IDLE, which come with Python, it is F5. (See Options/General/Autosave)
Startup is about .1 sec since the program runs in a window of
I'm looking for recommendations for writing a user manual. It will need
lots of examples of command line inputs and terminal outputs.
I'd like to minimize the effort to integrate the terminal input/output into
my document. I have lots of experience with latex, but I wonder if there
may be some o
On Sat, 08 Dec 2007 11:23:57 -0800, MonkeeSage wrote:
>> > The equivalent python idiom is something like:
>>
>> > class A:
>> > __a = "foo"
>> > def __init__(self):
>> > self.a = A.__a
[...]
>> > Which roughly translates to this in ruby:
>>
>> > class A
>> > attr_accessor :a
>> > def in
On Dec 9, 12:26 am, Michael Ströder <[EMAIL PROTECTED]> wrote:
> Jeffrey Froman wrote:
>
> > I'd still be interested in a mod_wsgi wrapper for 3rd-party CGI scripts.
>
> I doubt that this is possible, not because of the interface. But
> conventional CGI scripts are implemented with the assumption o
On Dec 8, 2:51 pm, Glenn Hutchings <[EMAIL PROTECTED]> wrote:
> On Dec 8, 7:44 pm, MonkeeSage <[EMAIL PROTECTED]> wrote:
>
> > I think it muddies the water to say that a.a() and a.a are the same
> > thing--obviously they are not.
>
> A thing is not what it is;
> A thing is what it does.
> This is t
--- Samuel <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Following the masses I was drawn to RoR's website
> today and I saw the
> following HTML template in one of the screencasts:
>
I know a lot of Rails goodies have been ported to
Python, so you might want to google some variations on
"form_remote_
On Sat, 08 Dec 2007 13:32:08 -0500, Shawn Minisall wrote:
> I'm writing a game that uses two functions to check and see if a file
> called highScoresList.txt exists in the main dir of the game program. If
> it doesn, it creates one. That part is working fine. The problem is
> arising when it goe
On Dec 8, 7:44 pm, MonkeeSage <[EMAIL PROTECTED]> wrote:
> I think it muddies the water to say that a.a() and a.a are the same
> thing--obviously they are not.
A thing is not what it is;
A thing is what it does.
This is the Way of the Duck.
-- Basho (in his "3 extra syllables" phase)
--
http
On Dec 8, 4:19 am, [EMAIL PROTECTED] wrote:
> With properties, attributes and methods seem very similar. I was
> wondering what techniques people use to give clues to end users as to
> which 'things' are methods and which are attributes.
Methods are verbs, attributes are nouns :)
--
Roberto Bonv
Hi,
Following the masses I was drawn to RoR's website today and I saw the
following HTML template in one of the screencasts:
--
<% form_remote_tag :url => { :action => :search },
:update => :results,
:complete => visual_effect(:blind_down, 'image')
:before => %(Element
Gabriel Genellina wrote:
> En Fri, 07 Dec 2007 17:58:43 -0300, yi zhang <[EMAIL PROTECTED]>
> escribió:
>
>> The urllib.urlretrieve() can only download the text part of a webpage,
>> not the image associated. How can I download the whole, complete
>> webpage with python? Thanks!
>
> The images
On Sat, 08 Dec 2007 11:44:36 -0800, MonkeeSage wrote:
> On Dec 8, 12:56 pm, Bruno Desthuilliers
>> callable attributes are not necessarily methods, and are still
>> 'variables' anyway.
>
> I think it muddies the water to say that a.a() and a.a are the same
> thing--obviously they are not. In the
--- Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] a écrit :
> > I'm a java guy used to the effective edit/run
> cycle you get with a
> > good IDE.
> >
> > Today I'm writing my first Python, but can't seem
> to find the way to
> > use Python's inherent edit/run cycle.
> >
>
xkenneth wrote:
> Hi All,
>
> I'll shortly be distributing a number of python applications that
> use proprietary. The software is part of a much larger system and it
> will need to be distributed securely. How can i achieve this?
>
> Regards,
> Ken
We have partnered with developers to use
On Dec 8, 10:07 pm, Chris <[EMAIL PROTECTED]> wrote:
> On Dec 8, 8:32 pm, Shawn Minisall <[EMAIL PROTECTED]> wrote:
>
>
>
> > I'm writing a game that uses two functions to check and see if a file
> > called highScoresList.txt exists in the main dir of the game program.
> > If it doesn, it creates o
> I'm writing a game that uses two functions to check and see if a file
> called highScoresList.txt exists in the main dir of the game program.
> If it doesn, it creates one. That part is working fine. The problem is
> arising when it goes to read in the high scores from the file when I
Hi Mark,
Thank you so much for the help. I figured it was something pretty
simple like that. And I was also puzzled by the concept of the lambda
function, so now I know what they do too. I just tried it out, and it
works well.
Much appreciated,
Ciao back at you,
Robbie
--
http://mail.python.or
On Dec 8, 6:05 am, "Mario M. Mueller" <[EMAIL PROTECTED]> wrote:
> Tommy Nordgren wrote:
>
> [...]
>
> > One thing to consider: It is possible that one of the bytes
> > contributes bits to BOTH the mantissa and the exponent ;
>
> From todays point of view I cannot exclude this.
>
> > Do you know th
On Dec 8, 8:32 pm, Shawn Minisall <[EMAIL PROTECTED]> wrote:
> I'm writing a game that uses two functions to check and see if a file
> called highScoresList.txt exists in the main dir of the game program.
> If it doesn, it creates one. That part is working fine. The problem is
> arising when it g
--- [EMAIL PROTECTED] wrote:
>
> What don't I know that I should know to just
> edit/run, preferably at
> the tap of a function key?
Most good editors let you do these things:
1) Save a file.
2) Run a script from the shell.
3) Turn steps 1 and 2 into a macro.
4) Allow you to map th
--- Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
> Colin J. Williams a écrit :
> > I'm not sure that I like add 3, 5, 7
> >
> > but it would be nice to be able to drop the
> parentheses
> > when no argument is required.
> >
> > Thus: close;
> > could replace close();
>
> This just cou
[EMAIL PROTECTED] a écrit :
> I'm a java guy used to the effective edit/run cycle you get with a
> good IDE.
>
> Today I'm writing my first Python, but can't seem to find the way to
> use Python's inherent edit/run cycle.
>
> I edit my source, import it into Python, run it. Fine. Then I edit
> ag
On Dec 8, 12:56 pm, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
> MonkeeSage a écrit :
>
>
>
> > On Dec 8, 2:10 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
>
> >>On Fri, 07 Dec 2007 23:19:40 -0800, tjhnson wrote:
>
> >>>With properties, attributes and methods seem very similar. I wa
On Dec 8, 12:42 pm, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
> MonkeeSage a écrit :
>
> > On Dec 7, 11:08 pm, Steve Howell <[EMAIL PROTECTED]> wrote:
>
> (snip)
> >> 4) Ruby forces you to explicitly make attributes for
> >> instance variables. At first I found this clumsy, but
> >> I've got
I'm writing a game that uses two functions to check and see if a file
called highScoresList.txt exists in the main dir of the game program.
If it doesn, it creates one. That part is working fine. The problem is
arising when it goes to read in the high scores from the file when I
play again.
MonkeeSage a écrit :
> On Dec 8, 2:10 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
>
>>On Fri, 07 Dec 2007 23:19:40 -0800, tjhnson wrote:
>>
>>>With properties, attributes and methods seem very similar. I was
>>>wondering what techniques people use to give clues to end users as to
>>>w
[EMAIL PROTECTED] a écrit :
> Hi,
>
> With properties, attributes and methods seem very similar. I was
> wondering what techniques people use to give clues to end users as to
> which 'things' are methods and which are attributes.
Documentation.
> With ipython, I
> use tab completion all the ti
On 7 Des, 17:43, [EMAIL PROTECTED] wrote:
>
> If you built a GUI with wxPython, it would just use the OS's native
> dialogs unless it didn't have one and then it would use a generic
> dialog. I would think creating a installer with wxPython and threads
> would be fairly trivial.
I'm not convinced
Colin J. Williams a écrit :
> Steve Howell wrote:>
> Thanks for the interesting comparison.
>
> [snip]
>
>> 3) I actually like being able to omit parentheses in
>> method definitions and method calls. In Ruby you can
>> express "add(3,5,7)" as both "add(3,5,7)" and "add 3,
>> 5, 7." The latte
MonkeeSage a écrit :
> On Dec 7, 11:08 pm, Steve Howell <[EMAIL PROTECTED]> wrote:
>
(snip)
>> 4) Ruby forces you to explicitly make attributes for
>> instance variables. At first I found this clumsy, but
>> I've gotten used to it, and I actually kind of like it
>> in certain circumstances.
> 4
I'm writing a game that uses two functions to check and see if a file
called highScoresList.txt exists in the main dir of the game program.
If it doesn, it creates one. That part is working fine. The problem is
arising when it goes to read in the high scores from the file when I
play again.
http://xkcd.com/353/
--
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
--
http://mail.python.org/mailman/listinfo/python-list
Martin v. Löwis wrote:
>> OK I need to use something a bit more complex then; I figure this should
>> work
>>
>> #if defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__)
>> #ifdef __BIG_ENDIAN__
>> #ifdef WORDS_BIGENDIAN
>> #endif
>
> I don't understand. If you assume that ei
I'm a java guy used to the effective edit/run cycle you get with a
good IDE.
Today I'm writing my first Python, but can't seem to find the way to
use Python's inherent edit/run cycle.
I edit my source, import it into Python, run it. Fine. Then I edit
again, but the next import doesn't notice that
On Nov 24, 12:03 am, MonkeeSage <[EMAIL PROTECTED]> wrote:
>
> class open(file):
> def __init__(self, name):
> self.size = os.stat(name).st_size
> file.__init__(self, name)
> def eof(self):
> return self.tell() == self.size
>
> f = open('tmp.py')
> print f.eof() # False
> f.read()
>
On Nov 22, 10:37 am, Hrvoje Niksic <[EMAIL PROTECTED]> wrote:
>
> def read(self, size=None):
> if size is None:
> val = file.read(self)
> self.eof = True
> else:
> val = file.read(self, size)
> if len(val) < size:
> self.eof = True
> As far as I can tell, you have a bit more code in boo, and somewhere in
> that code (after the print statement), you rebind the name 'kills'.
Okay, yes:
def boo()
kills += 1
print kills
> the absence of a global declaration, this makes this name a local
> variable.
I think I see what you mean
> OK I need to use something a bit more complex then; I figure this should
> work
>
> #if defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__)
> #ifdef __BIG_ENDIAN__
> #ifdef WORDS_BIGENDIAN
> #undef WORDS_BIGENDIAN
> #endif
> #define WORDS_BIGENDIAN 1
> #
Thanks Bruno, I had to keep coding, so I used the long form
[Object.subobject.property = blah] anyway. It's long-winded, but
unambiguous.
\d
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 8, 10:04 am, Shane Geiger <[EMAIL PROTECTED]> wrote:
> What is so obvious about dealing with months that vary in length and the
> leap-year issue? Nothing. If you were born on a day that does not
> exist every year (Feb 29th), how old are you on Feb 28th?
X years, 11 months, 28 days
or M
Martin v. Löwis wrote:
...
>> I'm puzzled why WORDS_BIGENDIAN is undefined if both __BIG_ENDIAN__ and
>> __LITTLE_ENDIAN__ are undefined. Surely in that case WORDS_BIGENDIAN
>> should be left alone (if it is already defined). If there's a compiler
>> for a bigendian architecture which doesn't d
I have been waiting for something like this! Thanks!
On Dec 8, 2007 6:08 AM, Steve Howell <[EMAIL PROTECTED]> wrote:
> Python is my favorite programming language. I've used
> it as my primary language for about six years now,
> including four years of using it full-time in my day
> job. Three m
Donn Ingle a écrit :
>>class Key(object):
>>def __init__self):
>>self.__dict__['props'] = KeyProps()
>
> Okay - that's weird.
No, that's coherent. The default behavior (I mean, when there's no
descriptor involved etc) of __setattr__ is to store attributes in
instance.__dict__. So as long a you
> PIL may also have a similar problem as the 1.1.6 setup.py script also
> defines WORDS_BIGENDIAN like this
>
> if struct.unpack("h", "\0\1")[0] == 1:
> defs.append(("WORDS_BIGENDIAN", None))
>
> probably I borrowed/stole this as we have something very similar in our
> setup.p
> #ifdef __BIG_ENDIAN__
> #define WORDS_BIGENDIAN 1
> #else
> #ifndef __LITTLE_ENDIAN__
> #undef WORDS_BIGENDIAN
> #endif
> #endif
>
>
> I'm puzzled why WORDS_BIGENDIAN is undefined if both __BIG_ENDIAN__ and
> __LITTLE_ENDIAN__ are undefined. Surely in that case WORDS_BIGENDIAN
> should be left
--- Jan Claeys <[EMAIL PROTECTED]> wrote:
> Op Mon, 03 Dec 2007 14:20:52 +1300, schreef greg:
>
> > If you want a really appropriate name for a
> programming language, I'd
> > suggest Babbage. (not for Python, though!)
>
> Konrad Zuse wrote the first high-level programming
> language, so I thin
Donn Ingle a écrit :
(snip)
> [in one.py]
> kills=0
> def boo():
> print kills
>
> It will abort with:
> print kills
> UnboundLocalError: local variable 'kills' referenced before assignment
As far as I can tell, you have a bit more code in boo, and somewhere in
that code (after the print st
> Please refer me to some basic Python code for animation like that .
You are in for a wild ride! Depending on your platform you can use dozens of
different tools. Try wxPython, pyCairo, pyGTK and PIL (Python Imaging
Library) for the most capable.
Basically you are looking at a fairly complex thin
Martin v. Löwis wrote:
.
>
> In the specific case, just use the WORDS_BIGENDIAN macro defined in
> pyconfig.h; it will be defined if the target is bigendian, and
> undefined otherwise. In the case of a universal build, it will be
> undefined in the x86 compiler invocation, and defined in t
Op Mon, 03 Dec 2007 14:20:52 +1300, schreef greg:
> If you want a really appropriate name for a programming language, I'd
> suggest Babbage. (not for Python, though!)
Konrad Zuse wrote the first high-level programming language, so I think
his name would be a better candidate...
--
JanC
--
ht
> class Key(object):
> def __init__self):
> self.__dict__['props'] = KeyProps()
Okay - that's weird. Is there another way to spin this?
> def __setattr__(self,var,val):
> setattr(self.props,var,val)
Perhaps by changing this one?
\d
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 8, 8:26 am, Michael Ströder <[EMAIL PROTECTED]> wrote:
> But conventional CGI scripts are implemented with the assumption of being
> stateless.
while it might be that some CGI scripts must be executed in a new
python process on each request, common sense and good programming
practices wou
Hi,
I have two modules, the second is imported by the first.
Let's call them one.py and two.py (two being my API)
In the first I register a function into the second.
[in one.py]
def boo(): ...
...
two.register( boo )
two.startLoop()
In two.py it starts a loop (GTK timeout), so processing remains
Colin J. Williams wrote:
> Steve Howell wrote:>
> Thanks for the interesting comparison.
>
> [snip]
>
>> 3) I actually like being able to omit parentheses in
>> method definitions and method calls. In Ruby you can
>> express "add(3,5,7)" as both "add(3,5,7)" and "add 3,
>> 5, 7." The latter
Martin v. Löwis wrote:
> At first, I also thought that Robin suggested that there is a problem
> with Python. Upon re-reading, I now believe he rather sees the bug
> in the reportlabs code, and is asking for an approach to solve it there.
I saw your posting after I sent mine. The gmane web interfa
Martin v. Löwis wrote:
>>> A user reports problems with one of our extensions when running the
>>> intel compiled extension on ppc and vice versa. He is building the
>>> extension as a universal binary. Although the intel compiled version
>>> runs fine it displays a known bug when run on a ppc.
>> A user reports problems with one of our extensions when running the
>> intel compiled extension on ppc and vice versa. He is building the
>> extension as a universal binary. Although the intel compiled version
>> runs fine it displays a known bug when run on a ppc.
>
> Have you reported the
MonkeeSage wrote:
> On Dec 7, 11:08 pm, Steve Howell <[EMAIL PROTECTED]> wrote:
>> Python is my favorite programming language. I've used
>> it as my primary language for about six years now,
>> including four years of using it full-time in my day
>> job. Three months ago I decided to take a posit
Steve Howell wrote:>
Thanks for the interesting comparison.
[snip]
> 3) I actually like being able to omit parentheses in
> method definitions and method calls. In Ruby you can
> express "add(3,5,7)" as both "add(3,5,7)" and "add 3,
> 5, 7." The latter syntax is obviously more error
> prone, b
Robin Becker wrote:
> A user reports problems with one of our extensions when running the
> intel compiled extension on ppc and vice versa. He is building the
> extension as a universal binary. Although the intel compiled version
> runs fine it displays a known bug when run on a ppc.
Have you r
> One proposed fix is to make the endian variable code dynamically change
> at run time.
I would advise against that. Endianness depdency should be resolved at
compile time, with appropriate conditional compilation. Endianness won't
change at run-time (and no, not even for a fat binary - the x86 c
On Sat, 08 Dec 2007 14:26:00 +0200, Donn Ingle wrote:
>> So you might want to describe your use-case.
> Um.. I wanted an object with Key to hold other data. I wanted a way to
> set that *other* data within Key without having to specify the "object
> in-between" everytime.
That's called "automatic
On Dec 8, 6:37 am, "http://members.lycos.co.uk/dariusjack/";
<[EMAIL PROTECTED]> wrote:
> I need to draw a shaded rectangle and have flashing (gif animated)
> points on it
> so not to refresh all objects a rectangle, but points, changing their
> colors, attributes.
> Please refer me to some basic P
1 - 100 of 139 matches
Mail list logo