"GTXY20" <[EMAIL PROTECTED]> wrote
> Anyway, I am looking for some suggestions for reading up on how to
> call
> Python from PHP scripts, specifically calling from a PHP web
> application -
> PHP will call python script with some arguments and python will run
> on the
> server and return the r
"Patrick Lists" <[EMAIL PROTECTED]> wrote
> I probably won't need to start writing classes but I really want to
> finish the book before I start coding something.
Such things are personal but I would personally recommend
writing as much code as you can as soon as you can. Do
the examples in the
Tony Cappellini wrote:
>>> http://www.ibiblio.org/swaroopch/byteofpython/read/self.html
> Is there a typo in the contents of this web page?
Yes, you are right, C++ uses 'this'.
Kent
>
> Should this statement
>
> Note for C++/Java/C# Programmers
>
> The self in Python is equivalent to the "sel
>>http://www.ibiblio.org/swaroopch/byteofpython/read/self.html
Is there a typo in the contents of this web page?
Should this statement
Note for C++/Java/C# Programmers
The self in Python is equivalent to the "self" pointer in C++ and the
this reference in Java and C#.
Actually be
Note for C++
Seon Kang wrote:
> class EnemyPokemon(games.Sprite):
>
> image = games.load_image("bulbasaur.bmp")
>
> def __init__(self, speed = 2, odds_change = 200, y = 240):
> """ Initialize the Chef object. """
> super(EnemyPokemon, self).__init__(image = EnemyPokemon.image, y
> = 2
Hi Alan,
Alan Gauld wrote:
> "Patrick" <[EMAIL PROTECTED]> wrote
>
>> Can anyone please point me to a document that explains "self" in
>> layman's terms.
>
> Try the OOP topic inmy tutorial...
Thanks will have a look.
>> Or lacking such a doc throw in a much appreciated
>> layman's explanati
Hi Alan,
Alan Gauld wrote:
> "Patrick" <[EMAIL PROTECTED]> wrote
>
>> Can anyone please point me to a document that explains "self" in
>> layman's terms.
>
> Try the OOP topic inmy tutorial...
Thanks will have a look.
>> Or lacking such a doc throw in a much appreciated
>> layman's explanati
Hi Michael,
Michael Langford wrote:
> In C, you may have "objectorientedesque" code like the following;
>
> struct net {
> int foo;
> int bar;
> int baz;
> };
>
>
> void populate_net( struct net* mynet, int fooval, int barval)
> {
> mynet->foo = fooval;
> mynet->bar = ba
Hi Kent,
Kent Johnson wrote:
> Patrick wrote:
>> Hi guru's,
>>
>> New to the list. I bought O'Reilly's Learning Python (3rd edition for
>> 2.5) a while back. Slowly making my way through it and was pleasantly
>> surprised that Python seems easier than C. Until...I bumped into the
>> "self" thingy.
"Patrick" <[EMAIL PROTECTED]> wrote
> Can anyone please point me to a document that explains "self" in
> layman's terms.
Try the OOP topic inmy tutorial...
> Or lacking such a doc throw in a much appreciated
> layman's explanation what "self" is and when/where to use it?
Others have given co
Hi all,
First off let me say how helpful and informative this mailing list is. It is
very much appreciated.
Anyway, I am looking for some suggestions for reading up on how to call
Python from PHP scripts, specifically calling from a PHP web application -
PHP will call python script with some argu
Registration for PyCon 2008 is now open. Held in Chicago March 14-16 with
"Tutorial Thursday" on March 13 and sprints afterwards, it is expected that
nearly 800 Python enthusiasts will attend at least part of the conference.
It is totally run by volunteers and is affordable for just about anyone.
Seon Kang wrote:
> Why does it not specify the type?
Actually, it is specifying the type of the bad argument, which is itself
'type'. Confusing, I know. Try this:
>>> 1+int
Traceback (most recent call last):
File "", line 1, in
: u
Tyler Smith wrote:
> iflist = ifstring.replace('\n', ' ').split()
The replace is not needed, split() splits on any whitespace including
newlines.
> # build hash of form (prefix1, prefix2): [word]
> word_hash = {}
> for i in range(len(iflist) - 2):
> pr1 = iflist[i]
> pr2 = iflist[i+1]
>
Patrick wrote:
> Hi guru's,
>
> New to the list. I bought O'Reilly's Learning Python (3rd edition for
> 2.5) a while back. Slowly making my way through it and was pleasantly
> surprised that Python seems easier than C. Until...I bumped into the
> "self" thingy.
This should be covered by any tutor
Seon Kang wrote:
> When i tried to run my program, i was given this message
> (this is the message in part)
>
> file "C:Python25\lib\site-packages\livewires\games.py", line 503, in_tick
> self.position = ((self._x + self._dx), (self._y + self._dy))
> TypeError: unsopported opernad type(s) for
I did a little research on the question of running the same script
unmodified in Python 2.6 and 3.0. It seems that there is no consensus
opinion and it may depend on your personal tolerance for compatibility
cruft. Here is a c.l.py thread of interest:
http://groups.google.com/group/comp.lang.pyt
In C, you may have "objectorientedesque" code like the following;
struct net {
int foo;
int bar;
int baz;
};
void populate_net( struct net* mynet, int fooval, int barval)
{
mynet->foo = fooval;
mynet->bar = barval;
mynet ->baz = fooval * 5;
}
int connect_to_net(str
Hi,
I'm a middling amateur coder in C and elisp, trying to wrap my head around
python syntax. I've implemented the code for the markov chain random
text generator from Kernighan and Pike's "The practice of
programming", and I'd appreciate any tips on how to make it more
pythonic.
The code appears
When i tried to run my program, i was given this message
(this is the message in part)
file "C:Python25\lib\site-packages\livewires\games.py", line 503, in_tick
self.position = ((self._x + self._dx), (self._y + self._dy))
TypeError: unsopported opernad type(s) for +: 'int' and type'
What is t
Hi guru's,
New to the list. I bought O'Reilly's Learning Python (3rd edition for
2.5) a while back. Slowly making my way through it and was pleasantly
surprised that Python seems easier than C. Until...I bumped into the
"self" thingy.
Can anyone please point me to a document that explains "self"
Dotan Cohen wrote:
> Thanks. My concern is not that the code won't run on Python3, rather,
> that the effort that I put into learning 2.x will be wasted when 3.x
> will be current.
No, it will not be wasted. 3.0 is not a new language, it is a major
tuneup of the existing language.
> Now I'm a b
On 03/02/2008, Kent Johnson <[EMAIL PROTECTED]> wrote:
> Dotan Cohen wrote:
> > The little programming that I need I have been able to get away with
> > silly php and bash scripts. However, my needs are getting bigger and I
> > see Python as an ideal language for my console apps, and the
> > oc
Dotan Cohen wrote:
> The little programming that I need I have been able to get away with
> silly php and bash scripts. However, my needs are getting bigger and I
> see Python as an ideal language for my console apps, and the
> occasional GUI that I might write for the wife. However, with the
> com
Dotan Cohen wrote:
> However, with the coming of Python3 and the new syntax, is this a bad time to
> start learning Python?
Not at all, I'd say. Changes will be fairly small, with the main changes
being:
- print is replaced by a print() function
- / will become the float division operator
- cha
motion/motion.conf
> [0] Processing config file /etc/motion/motion.1.conf
> [0] Processing config file /etc/motion/motion.2.conf
> [1] Thread is from /etc/motion/motion.1.conf
> [2] Thread is from /etc/motion/motion.2.conf
> [1] Thread started
> [2] Thread started
> [1] File of t
On 03/02/2008, Alan Gauld <[EMAIL PROTECTED]> wrote:
>
> "Dotan Cohen" <[EMAIL PROTECTED]> wrote
>
> > coming of Python3 and the new syntax, is this a bad time to start
> > learning Python? I don't want to learn 2.x if 3.x will replace it,
>
> 3.x won't be the end of changes in Python, amy more tha
le /etc/motion/motion.2.conf
[1] Thread is from /etc/motion/motion.1.conf
[2] Thread is from /etc/motion/motion.2.conf
[1] Thread started
[2] Thread started
[1] File of type 2 saved to: /var/lib/motion/20080203/01/tmp/175253.jpg
...etc ...
I just can't work out why this is happenin
"Dotan Cohen" <[EMAIL PROTECTED]> wrote
> coming of Python3 and the new syntax, is this a bad time to start
> learning Python? I don't want to learn 2.x if 3.x will replace it,
3.x won't be the end of changes in Python, amy more than
other languages change. While the changes for 3.x will be
bigg
The little programming that I need I have been able to get away with
silly php and bash scripts. However, my needs are getting bigger and I
see Python as an ideal language for my console apps, and the
occasional GUI that I might write for the wife. However, with the
coming of Python3 and the new sy
"Varsha Purohit" <[EMAIL PROTECTED]> wrote
> AttributeError: 'str' object has no attribute 'load'I am unable
> to
> understand what is the problem. Can any one help me understand this
> imagechop module ??
When posting errors don't just post the last line. Post the whole
error message since
31 matches
Mail list logo