shangyu wrote:
> Hi dear all,
> I have following Python code
> class mydict(dict):
> def __init__(self):
> pass
> I wonder how this new type get created . What is the type of metatype in
> the following line ? type = (PyTypeObject *)metatype->tp_alloc(metatype,
> nslots); (line 2296 of
On Monday, March 11, 2013 6:57:28 PM UTC-5, Kene Meniru wrote:
>
> --
> # contents of myapp.py
> import math
>
> class MyApp(object):
> def __init__(self):
> super(MyApp, self).__init__()
> self.name = "MyAppName"
>
>
> def testFunction():
On Mar 12, 3:35 pm, Nick Mellor wrote:
> event['Items'] is an exhausted (all used up) iterable.
>
> Now I do the following (lines 142-4):
>
> event.update({'Attributes': filtered_attributes})
> del event['Items']
> yield event
>
> and get a KeyError on the del s
Hi all,
event['Items'] is an exhausted (all used up) iterable.
Now I do the following (lines 142-4):
event.update({'Attributes': filtered_attributes})
del event['Items']
yield event
and get a KeyError on the del statement. 'Items' is a key in the event
dicti
On 03/11/2013 06:48 PM, Dave Angel wrote:
> I hope you're just kidding. execfile() and exec() are two of the most
> dangerous mechanisms around. import or __import__() would be much
> better, as long as your user hasn't already run myapp.py as his script.
It's not possible to setuid a python s
On 03/11/2013 09:58 PM, Kene Meniru wrote:
Dave Angel wrote:
On 03/11/2013 07:57 PM, Kene Meniru wrote:
I hope you're just kidding. execfile() and exec() are two of the most
dangerous mechanisms around. import or __import__() would be much
better, as long as your user hasn't already run m
On 03/11/2013 09:23 PM, Kene Meniru wrote:
Dave Angel wrote:
On 03/11/2013 07:57 PM, Kene Meniru wrote:
I hope you're just kidding. execfile() and exec() are two of the most
dangerous mechanisms around. import or __import__() would be much
better, as long as your user hasn't already run m
Dave Angel wrote:
> On 03/11/2013 07:57 PM, Kene Meniru wrote:
>
> I hope you're just kidding. execfile() and exec() are two of the most
> dangerous mechanisms around. import or __import__() would be much
> better, as long as your user hasn't already run myapp.py as his script.
>
Tried __imp
I think I've found it out . For new-style class it's PyType_Type and for
old-style class it's PyClass_Type . Thanks anyway.
To: python-list@python.org
From: yush...@outlook.com
Subject: metatype
Date: Tue, 12 Mar 2013 06:22:24 +0800
发件人: shangyu
发送时间: 2013/3/12 0:20
收件人: core-mentors
Dave Angel wrote:
> On 03/11/2013 07:57 PM, Kene Meniru wrote:
>
> I hope you're just kidding. execfile() and exec() are two of the most
> dangerous mechanisms around. import or __import__() would be much
> better, as long as your user hasn't already run myapp.py as his script.
>
It does wha
On 03/11/2013 07:57 PM, Kene Meniru wrote:
Here's the answer to this question.
The summary of the question: how to run a module (called myapp.py) from
another module (called myappwin.py) and be able to access the namespace of
myapp.py from myappwin.py.
--
Yes, sounds good. I should give it a try.
On Tue, Mar 12, 2013 at 1:02 AM, Xavier L. wrote:
> On 13-03-11 10:42 AM, Shiyao Ma wrote:
>
>> Today I come across a problem.
>> Basically, my need is that I want to launch a http server that can not
>> only support get but also support post (including
A new version of the Python module which wraps GnuPG has been
released.
What Changed?
=
This is a minor enhancement and bug-fix release. See the project
website ( http://code.google.com/p/python-gnupg/ ) for more
information. Summary:
Improved support for status messages from GnuPG.
F
Here's the answer to this question.
The summary of the question: how to run a module (called myapp.py) from
another module (called myappwin.py) and be able to access the namespace of
myapp.py from myappwin.py.
--
# contents of myapp.py
import math
class
Am 10.03.2013 19:39 schrieb Νίκος Γκρ33κ:
Hey man this worked via Python!
[...]
if( os.system( 'echo "%s" | mail -s "%s" supp...@superhost.gr'
% (MESSAGE, FROM) ) ):
[...]
Thank you! I beleive this is the simplest way of sending an email!
Until you get a MESSAGE which
On Sunday, March 10, 2013 11:22:37 AM UTC-5, Steven D'Aprano wrote:
> On Sun, 10 Mar 2013 08:38:43 -0700, mbg1708 wrote:
>
>
>
> > The Bpluspy-1.0 package from Pypi is excellent. The usual setup loads
>
> > the software into site-packages. Unfortunately, once installed, Python
>
> > import s
-原始邮件-
发件人: "shangyu"
发送时间: 2013/3/12 0:20
收件人: "core-mentors...@python.org"
主题: [Core-mentorship] metatype
Hi dear all,
I have following Python code
class mydict(dict):
def __init__(self):
pass
I wonder how this new type get created . What is the type of metatype in the
صور لابنه الاعلامى باسم يوسف
https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fnatigtas7ab.blogspot.com%2F2013%2F03%2Fblog-post_5505.html%23.UT5PNJwVeBF.facebook
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, Mar 11, 2013 at 2:43 PM, Alex Gardner wrote:
> I tried to append what you told me to. Now it appears that I have a syntax
> error! I checked my indentations and they look fine to me, but I get this
> error:
>
> paddle_pos = pygame.mouse.get_pos()
>
On 11/03/2013 20:43, Alex Gardner wrote:
On Saturday, March 2, 2013 7:56:31 PM UTC-6, Alex Gardner wrote:
I am in the process of making a pong game in python using the pygame library.
My current problem is that when I move the mouse, it turns off as soon as the
mouse stops moving. The way I
On Saturday, March 2, 2013 7:56:31 PM UTC-6, Alex Gardner wrote:
> I am in the process of making a pong game in python using the pygame library.
> My current problem is that when I move the mouse, it turns off as soon as
> the mouse stops moving. The way I am doing this is by making the default
On 11/03/13 17:27, Adam Tauno Williams wrote:
Because date/time management in Python is *@*&@R&*(R *@&Y terrible!
Period, full-stop, awful, crappy, lousy, and aggravating. The design is
haphazard and error inducing.
+1
--
djc
--
http://mail.python.org/mailman/listinfo/python-list
On 3/11/2013 2:30 PM, Serhiy Storchaka wrote:
On 11.03.13 04:06, Terry Reedy wrote:
On 3/10/2013 1:42 PM, mukesh tiwari wrote:
Hello all
I am trying to solve this problem[1]
[1] http://www.spoj.com/problems/MAIN12C/
As I remember, and as it still appears, this site severely penalizes
Python s
om pyparsing import __version__ as pyparsing_version
> File "/tmp/openerp-7.0-20130311-002114/pyparsing-2.0.0/pyparsing.py", line
> 629
> nonlocal limit,foundArity
> ^
> SyntaxError: invalid syntax
>
>
> How can I solve it?
nonlocal is a Python 3 keyword.
Hello
I have downloaded pyparsing-2.0.0 files. When I run python setup.py
install I get this error:
Traceback (most recent call last):
File "setup.py", line 9, in
from pyparsing import __version__ as pyparsing_version
File "/tmp/openerp-7.0-20130311-002114/
I am trying to use python-sqlkit (https://pypi.python.org/pypi/sqlkit/0.9.5.1)
but I'm not really getting over the first hurdle.
If I run sqledit (the ready made executable that needs no programming)
on my data then it works fine and displays my table data.
However if I enter the minimal example
On 11.03.13 04:06, Terry Reedy wrote:
On 3/10/2013 1:42 PM, mukesh tiwari wrote:
Hello all
I am trying to solve this problem[1]
[1] http://www.spoj.com/problems/MAIN12C/
As I remember, and as it still appears, this site severely penalizes
Python solvers by using the same time limit for all lan
If you know someone that wants to learn to program their own arcade games,
check out:
http://ProgramArcadeGames.com
* 84 free tutorial videos
* Start creating graphics by Chapter 5
* Full text of the book on-line.
* Cookbook of 47 example programs
* On-line multiple choice quizzes track your pro
A friendly reminder that this forum is for general discussion and
questions about Python.
"Pretty much anything Python-related is fair game for discussion, and
the group is even fairly tolerant of off-topic digressions; there have
been entertaining discussions of topics such as floating point,
On Mon, Mar 11, 2013 at 11:33 AM, Alex Gardner wrote:
> My bad! http://pastebin.com/yuvpT7bH
You're still drawing the blank paddle in two different places. One of
those places is immediately after you draw the paddle, which undoes
the work you just did in drawing it. That's why you're not seei
On Fri, 2013-03-08 at 13:41 -0500, Roy Smith wrote:
> To make a long (and painful) story short, I've got a (large) list of
> datetimes, and was getting some bizarre errors working with it. One of
> the things I tried while debugging the problem was verifying that all
> the elements of the list
On Saturday, March 2, 2013 7:56:31 PM UTC-6, Alex Gardner wrote:
> I am in the process of making a pong game in python using the pygame library.
> My current problem is that when I move the mouse, it turns off as soon as
> the mouse stops moving. The way I am doing this is by making the default
On Mon, Mar 11, 2013 at 11:00 AM, Alex Gardner wrote:
> I added the blank paddle and now the green one is just gone. I feel like
> such a newbie ><
>
>
> screen.blit(bpaddle, paddle_rect)
We're not psychic, so you'll need to post the current code if you want
any suggestions on how to fix it.
On Monday, March 11, 2013 12:00:37 PM UTC-5, Alex Gardner wrote:
> On Monday, March 11, 2013 11:57:49 AM UTC-5, Alex Gardner wrote:
>
> > On Saturday, March 2, 2013 7:56:31 PM UTC-6, Alex Gardner wrote:
>
> >
>
> > > I am in the process of making a pong game in python using the pygame
> > > li
On 13-03-11 10:42 AM, Shiyao Ma wrote:
Today I come across a problem.
Basically, my need is that I want to launch a http server that can not
only support get but also support post (including post file).
My first idea is to use -m http.sever. However, it only supports get.
Later I find some one ex
On Monday, March 11, 2013 11:57:49 AM UTC-5, Alex Gardner wrote:
> On Saturday, March 2, 2013 7:56:31 PM UTC-6, Alex Gardner wrote:
>
> > I am in the process of making a pong game in python using the pygame
> > library. My current problem is that when I move the mouse, it turns off as
> > soon
On Saturday, March 2, 2013 7:56:31 PM UTC-6, Alex Gardner wrote:
> I am in the process of making a pong game in python using the pygame library.
> My current problem is that when I move the mouse, it turns off as soon as
> the mouse stops moving. The way I am doing this is by making the default
Am 11.03.2013 10:15 schrieb nagia.rets...@gmail.com:
Thank you Thomas but that simple line as i have it now its capable of
sending mail successfully
Obviously not, otherwise you wouldn't ask, would you?
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
On 11 March 2013 14:57, Abhinav M Kulkarni wrote:
> Hi Jean,
>
> Below is the code where I am creating multiple processes:
>
> if __name__ == '__main__':
> # List all files in the games directory
> files = list_sgf_files()
>
> # Read board configurations
> (intermediateBoards, fina
On 11 March 2013 15:23, inshu chauhan wrote:
> I am trying to create a dictionary with a key and its values seraching
> from a data set. But something is going wrong. This is the first time I am
> working with dicts.
>
> My code is :
>
> import cv
> def Computesegclass(segimage):
> num_pixel
In inshu chauhan
writes:
> --14dae93408ffe4594104d7a7bf0c
> Content-Type: text/plain; charset=ISO-8859-1
> I am trying to create a dictionary with a key and its values seraching from
> a data set. But something is going wrong. This is the first time I am
> working with dicts.
> My code is :
I am trying to create a dictionary with a key and its values seraching from
a data set. But something is going wrong. This is the first time I am
working with dicts.
My code is :
import cv
def Computesegclass(segimage):
num_pixel = 0
for y in xrange(0, segimage.height):
for x
Please review the Requirements’ which are quit urgent with our client it’s
immediate hire,
Please forward the Resumes with expected rate and skills matrix,
Please send as the resume of your own W2 consultants
Send your Resumes to s...@thinksofttech.com or reach me on 302-343-7478
Requirement
On Sun, Mar 10, 2013 at 8:25 AM, Νίκος Γκρ33κ wrote:
> mail = form.getvalue('mail')
>
> id what the user types in an html form and click submits. this can be a non
> valid email of course i just check if there is a '@' in the mail address.
>
> But will the mail, gets delivered even if mail's valu
- Original Message -
> comment récupérer la couleur d'un canvas ou id d'un canvas?
> --
> http://mail.python.org/mailman/listinfo/python-list
Hello,
I'll take my chance :
http://effbot.org/tkinterbook/canvas.htm
JM
PS : write in english, or frenglish like I do, something that has a c
Hi Jean,
Below is the code where I am creating multiple processes:
if __name__ == '__main__':
# List all files in the games directory
files = list_sgf_files()
# Read board configurations
(intermediateBoards, finalizedBoards) = read_boards(files)
# Initialize parameters
sorry for that, that answer didn't help me..
regards
Il 10/03/2013 23.59, Matthew Dixon Cowles ha scritto:
Dear Leonardo,
Sending the same message three times isn't likely to produce faster
or better help.
Is the reply that you got on the main Python list satisfactory?
Regards,
Today I come across a problem.
Basically, my need is that I want to launch a http server that can not only
support get but also support post (including post file).
My first idea is to use -m http.sever. However, it only supports get.
Later I find some one extended basehttpserver and made it suppor
On 2013-03-09, Roy Smith wrote:
> In article ,
> Grant Edwards wrote:
>
>> What I should have said was that there's no way to return to the OS
>> memory obtained via calls to malloc() et al.
>
> That's true (for certain values of "et al").
>
>> and those are the calls that "good" C programmers (
On Mar 11, 2:28 pm, jmfauth wrote:
> On 11 mar, 03:06, Terry Reedy wrote:
>
>
>
> > ...
> > By teaching 'speed before correctness", this site promotes bad
> > programming habits and thinking (and the use of low-level but faster
> > languages).
> > ...
>
> This is exactly what "your" flexible stri
On 03/11/2013 01:57 AM, Abhinav M Kulkarni wrote:
* My laptop has quad-core Intel i5 processor, so I thought using
multiprocessing module I can parallelize my code (basically
calculate gradient in parallel on multiple cores simultaneously).
* As a result I end up creating a
- Original Message -
> Dear all,
> I need some advice regarding use of the multiprocessing module.
> Following is the scenario:
> * I am running gradient descent to estimate parameters of a pairwise
> grid CRF (or a grid based graphical model). There are 106 data
> points. Each data po
Nagia,
> Thank you Thomas but that simple line as i have it now its capable of sending
> mail successfully wven with greek letters two in subject or in message
> variables.
>
> Now need to dad additional extra code for it to work.
Your code as it is, isn't working. They just sent you several
- Original Message -
> On Fri, 01 Mar 2013 11:19:22 +0100, Jean-Michel Pichavant wrote:
>
> > - Original Message -
> >> So i have a variable called funds that i want to store the value
> >> of
> >> even after the program is exited. My funds variable holds the
> >> total
> >> valu
On 11/03/2013 09:28, jmfauth wrote:
On 11 mar, 03:06, Terry Reedy wrote:
...
By teaching 'speed before correctness", this site promotes bad
programming habits and thinking (and the use of low-level but faster
languages).
...
This is exactly what "your" flexible string representation
does!
On 11 mar, 03:06, Terry Reedy wrote:
>
> ...
> By teaching 'speed before correctness", this site promotes bad
> programming habits and thinking (and the use of low-level but faster
> languages).
> ...
This is exactly what "your" flexible string representation
does!
And away from technical aspe
Thank you Thomas but that simple line as i have it now its capable of sending
mail successfully wven with greek letters two in subject or in message
variables.
Now need to dad additional extra code for it to work.
--
http://mail.python.org/mailman/listinfo/python-list
57 matches
Mail list logo