On Jun 28, 2:26 am, python_enthu <[EMAIL PROTECTED]> wrote:
> On Jun 27, 11:05 am, "John Salerno" <[EMAIL PROTECTED]> wrote:
>
>
>
> > "python_enthu" <[EMAIL PROTECTED]> wrote in message
>
> >news:[EMAIL PROTECTED]
>
> > >I am trying this.. what is wrong in this..
>
> > > IDLE 1.2.2
> > import
Silas Snider wrote:
Full-time academic year position
Salary range: $2819 - $4404 per month ( $16.26 - $25.41 per hour)
The following knowledge, skills and experience are necessary for this
position:
Expert Python and SQL programming skills, and proficiency with
Javascript, CSS, XHTML and web
On Fri, Jun 27, 2008 at 4:04 PM, Paul McNett <[EMAIL PROTECTED]> wrote:
> Silas Snider wrote:
>>
>> Full-time academic year position
>> Salary range: $2819 - $4404 per month ( $16.26 - $25.41 per hour)
>
>> The following knowledge, skills and experience are necessary for this
>> position:
>>
>> Exp
I stumbled across this a while back:
http://www.voidspace.org.uk/python/articles/urllib2.shtml.
It covers quite a bit. The urllib2 module is pretty straightforward
once you've used it a few times. Some of the class naming and whatnot
takes a bit of getting used to (I found that to be the most con
Hi..
I'm trying to make a Software USB based on AVR309 application note available
at www.atmel.com/dyn/resources/prod_documents/doc2556.pdf
So what basically i'm doing is programming a ATTINY-44 to do functions of a
USB-driver and when connected to USB port, should be automatically detected
by the
On Jun 27, 8:09 am, "Colin J. Williams" <[EMAIL PROTECTED]> wrote:
> Ryuke wrote:
> > I have a code that receives gps information from nodes and gives off
> > its own coordinates via radios connected by Ethernet. but the code
> > continues to run after receiving only 1 set of coordinates, how do i
If I call os.environ.clear in a python program child processes still
see the deleted entries. But when I iterate over the keys like so
names = os.environ.keys
for k in names:
del os.environ[k]
then the entries are also deleted for the child processes. Where is
the difference? Is this a bug?
On 27 juin, 18:09, "John Salerno" <[EMAIL PROTECTED]> wrote:
> I've been doing some research on web templates, and even though I read that
> they help enforce the MVC pattern, I don't really understand how they are
> keeping content and logic separated.
For which definitions of "content" and "logi
Hi,
I just started to learn Python. I understood how one can create a
class and define a method related with that class. According to my
understanding every call of a methods is related with a specific
object. For example, we have a method "length", than we call this
method as the following "x.len
On Jun 27, 2:41 pm, Kurda Yon <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I just started to learn Python. I understood how one can create a
> class and define a method related with that class. According to my
> understanding every call of a methods is related with a specific
> object. For example, we have
Hi all,
I've been looking at IPython for awhile, but I'm always disappointed
that it comes up in NoColor mode no matter what I try. It is
configured in the ipythonrc file to be 'color Linux'. I've run it from
a Putty terminal window, Konsole and xterm, still no luck. The Putty
window shows color f
On 27 juin, 23:41, Kurda Yon <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I just started to learn Python. I understood how one can create a
> class and define a method related with that class. According to my
> understanding every call of a methods is related with a specific
> object. For example, we have
Hi,
I found one example which defines the addition of two vectors as a
method of a class. It looks like that:
class Vector:
def __add__(self, other):
data = []
for j in range(len(self.data)):
data.append(self.data[j] + other.data[j])
return Vector(data)
In this example one us
I would like to know what are advantages of Python in comparison with C
++? In which cases and why Python can be a better tool than C++?
Thank you!
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
can anybody recommend a simple USB or PCI framegrabber with video
input that runs under xp and has a python driver available? I just
want to get the image into a file, no special requirements.
Thank you
Daniel
--
http://mail.python.org/mailman/listinfo/python-list
I am writing an extension module that needs to release the global
interpreter lock during some blocking I/O calls, but I need a mutex in
the C code to make some of the shared data in the extension module are
kept thread safe. Can anyone recommend a portable way to do this? I
could use a pthre
Kurda Yon wrote:
Hi,
I found one example which defines the addition of two vectors as a
method of a class. It looks like that:
class Vector:
def __add__(self, other):
data = []
for j in range(len(self.data)):
data.append(self.data[j] + other.data[j])
return Vector(data)
In
On Jun 27, 6:32 pm, Hans Nowak <[EMAIL PROTECTED]>
wrote:
> Kurda Yon wrote:
> > Hi,
>
> > I found one example which defines the addition of two vectors as a
> > method of a class. It looks like that:
>
> > class Vector:
> > def __add__(self, other):
> > data = []
> > for j in range(len(s
I am having trouble with the following code:
PyObject *module = PyImport_ImportModule(modulename);
if (module == NULL) {
PyObject* et, *ev, *etr;
PyErr_Fetch(&et, &ev, &etr);
PyObject* traceback = PyImport_ImportModule("traceback");
PyObject* tb = PyObject_CallMethodObjArgs(traceb
Kurda Yon wrote:
OK, I see. In the given example "self" is just a name which can be
replace by whichever (valid) name. Is that always like that? I mean,
does "slef" have a special meaning in some cases or it is always "just
a name like any other"?
Yes.
A method is a function bound to a cla
I have read that multiple times. It is hard to understand but it did help a
little. But I found a bit of a work-around for now which is not what I
ultimately want. However, even when I can get to the page I want lets say,
"Http://dictionary.reference.com/browse/cheese", I look on firebug, and
exte
I have read that multiple times. It is hard to understand but it did help a
little. But I found a bit of a work-around for now which is not what I
ultimately want. However, even when I can get to the page I want lets say,
"Http://dictionary.reference.com/browse/cheese", I look on firebug, and
exte
Okay, so I am having issues figuring anything out about this and have
read the "missing manual" about it so please don't send me that link
again. To put it simply I want to be able to input a word and get the
definition from dictionary.com. Now I found a work-around for
searching for the wo
Terry Reedy wrote:
Kurda Yon wrote:
OK, I see. In the given example "self" is just a name which can be
replace by whichever (valid) name. Is that always like that? I mean,
does "slef" have a special meaning in some cases or it is always "just
a name like any other"?
Yes.
A method is a funct
Daniel Fetchinson wrote:
How difficult would it be to implement a system in python that would
warn if there are unnecessarily imported packages/modules/objects in
the code? I mean that when developing some code one frequently imports
stuff, deletes the import, changes stuff here and there, import
On Friday 27 June 2008 06:41:22 pm Kurda Yon wrote:
> OK, I see. In the given example "self" is just a name which can be
> replace by whichever (valid) name. Is that always like that? I mean,
> does "slef" have a special meaning in some cases or it is always "just
> a name like any other"? I am ask
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Kurda Yon wrote:
> Hi,
>
> I found one example which defines the addition of two vectors as a
> method of a class. It looks like that:
>
> class Vector:
> def __add__(self, other):
> data = []
> for j in range(len(self.data)):
> data.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Kurda Yon wrote:
> I would like to know what are advantages of Python in comparison with C
> ++? In which cases and why Python can be a better tool than C++?
>
> Thank you!
I'm a relative novice, so I couldn't tell you about deeply hidden
features or
I'm trying to extract all the links on a page with lxml. Ideally, I
would like it to return me a list of hrefs of each link on the page,
in a list.
How would I go about doing this?
--
http://mail.python.org/mailman/listinfo/python-list
With module httplid, I can do
conn.request("POST", "/target", params, headers)
Now, I want to log the request message that is sent by the request
method. I don't don't see a method for that task. Any suggestion?
For a response, I can log the response message by using the call
method. Though, I
Hi,
I'm trying to implement a simple Borg or Singleton pattern for a class that
inherits from 'dict'. Can someone point out why this code does not work?
class MyDict( dict ):
__state = {}
def __init__(self):
self.__dict__ = self.__state
a = MyDict()
a['one'] = 1
a['two'] = 2
print a
On Fri, Jun 27, 2008 at 3:21 PM, Casey McGinty <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> I'm trying to implement a simple Borg or Singleton pattern for a class that
> inherits from 'dict'. Can someone point out why this code does not work?
>
> class MyDict( dict ):
>__state = {}
>def __init__(s
On Jun 27, 4:33 pm, Lane Brooks <[EMAIL PROTECTED]> wrote:
> I am writing an extension module that needs to release the global
> interpreter lock during some blocking I/O calls, but I need a mutex in
> the C code to make some of the shared data in the extension module are
> kept thread safe. Can a
On Jun 27, 5:47 pm, sleek <[EMAIL PROTECTED]> wrote:
> I am having trouble with the following code:
>
> PyObject *module = PyImport_ImportModule(modulename);
> if (module == NULL) {
>
> PyObject* et, *ev, *etr;
> PyErr_Fetch(&et, &ev, &etr);
> PyObject* traceback = PyImport_ImportModule
On Jun 27, 4:05 pm, "Joe P. Cool" <[EMAIL PROTECTED]> wrote:
> If I call os.environ.clear in a python program child processes still
> see the deleted entries. But when I iterate over the keys like so
>
> names = os.environ.keys
> for k in names:
> del os.environ[k]
>
> then the entries are al
Tony May wrote:
I'm having trouble importing when I run in Python. The hello world program
passes the test during the bjam build but gives an error about loading
the dll
when I import from a python script.
first the test from running bjam.
...patience...
...found 1915 targets...
...using 1 tem
In article
<[EMAIL PROTECTED]>,
Kurda Yon <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I found one example which defines the addition of two vectors as a
> method of a class. It looks like that:
>
> class Vector:
> def __add__(self, other):
> data = []
> for j in range(len(self.data)):
>
Im using PyGame to draw images of graphs and trees. Howver right now i
am looping using:
while 1:
for event in pygame.event.get():
if event.type == pygame.QUIT: sys.exit()
screen.fill(screencolor)
pygame.draw.circle(screen, linecolor, (500, 20), 12, 0)
draw((500, 20), 3)
In article
<[EMAIL PROTECTED]>,
Kurda Yon <[EMAIL PROTECTED]> wrote:
> OK, I see. In the given example "self" is just a name which can be
> replace by whichever (valid) name. Is that always like that? I mean,
> does [self] have a special meaning in some cases or it is always "just
> a name like
Okay, so I copied your code(and just so you know I am on a mac right now and
i am using pydev in eclipse), and I got these errors, any idea what is up?
Traceback (most recent call last):
File "/Users/Alex/Documents/workspace/beautifulSoup/src/firstExample.py",
line 14, in
print list(get_de
> For efficiency reasons many CPUs require particular primitive data
> types (integers/pointers of various sizes) to be placed in memory at
> particular boundaries. For example, shorts ("H" above, usually two bytes
> and probably always so in the struct module) are often required to be
> on even ad
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
defn noob wrote:
> Im using PyGame to draw images of graphs and trees. Howver right now i
> am looping using:
>
> while 1:
> for event in pygame.event.get():
> if event.type == pygame.QUIT: sys.exit()
>
> screen.fill(screencolor)
>
>
I just installed Pylons onto my hosting server so I could try out
templating with Mako, but it seems a little more complicated than that.
From the look of it all, the site seems to want a full Pylons
application. Is it possible to just use regular HTML files with a bit of
the Mako language embe
right. im an idiot anyway. i can just draw the lines before entering
the loop, problem solved...
--
http://mail.python.org/mailman/listinfo/python-list
Le Saturday 28 June 2008 00:17:33 Kurda Yon, vous avez écrit :
> class Vector:
> def __add__(self, other):
> data = []
> for j in range(len(self.data)):
> data.append(self.data[j] + other.data[j])
> return Vector(data)
>
> In this example one uses "self" and "other". Does one re
John Salerno wrote:
I just installed Pylons onto my hosting server so I could try out
templating with Mako, but it seems a little more complicated than that.
From the look of it all, the site seems to want a full Pylons
application. Is it possible to just use regular HTML files with a bit of
Le Saturday 28 June 2008 03:47:43 Casey McGinty, vous avez écrit :
> On Fri, Jun 27, 2008 at 3:21 PM, Casey McGinty <[EMAIL PROTECTED]>
>
> wrote:
> > Hi,
> >
> > I'm trying to implement a simple Borg or Singleton pattern for a class
> > that inherits from 'dict'. Can someone point out why this cod
Thanks for the pointer. I'll check it out. That is what I was looking
for.
Lane
Benjamin wrote:
On Jun 27, 4:33 pm, Lane Brooks <[EMAIL PROTECTED]> wrote:
I am writing an extension module that needs to release the global
interpreter lock during some blocking I/O calls, but I need a mute
I am a newbie... and the first to admit it... but this has me stuffed:
I have two lists A and B that are both defined as range(1,27) I want
to find the entries that are valid for A = BxB
so here is my code:
A = range(1,27)
B = range(1,27)
for b in B:
if b*b in A:
print b
"John Salerno" <[EMAIL PROTECTED]> wrote:
>
>Is it correct to say that Mako allows you to embed Python code within HTML,
>whereas Cheetah requires a certain amount of "tweaking" of Python code so
>that it isn't really code you could just run independently in the
>interpreter?
>
>I'm getting that
Le Saturday 28 June 2008 06:30:25 ToshiBoy, vous avez écrit :
> I am a newbie... and the first to admit it... but this has me stuffed:
>
> I have two lists A and B that are both defined as range(1,27) I want
> to find the entries that are valid for A = BxB
>
> so here is my code:
>
> A = range(1,27
ToshiBoy wrote:
> I have two lists A and B that are both defined as range(1,27) I want
> to find the entries that are valid for A = BxB
[ ... ]
> I get, as expected 1,4,9,16,25 printed out being the only members of B
> where the condition is true, but when I print B I get:
>
> [1, 2, 3, 4, 5, 7, 9
Le Saturday 28 June 2008 06:30:50 Tim Roberts, vous avez écrit :
> Others really like the TAL scheme in Zope.
> For my taste, TAL just requires too much non-essential syntax; it
> interferes with the reading of the page.
>
> So, the folks who like TAL can go ahead and be productive with TAL, and
Ampedesign wrote:
> I'm trying to extract all the links on a page with lxml. Ideally, I
> would like it to return me a list of hrefs of each link on the page,
> in a list.
>
> How would I go about doing this?
Read the manual?
http://codespeak.net/lxml/dev/lxmlhtml.html#working-with-links
http://
On Jun 28, 2:48 pm, Mel <[EMAIL PROTECTED]> wrote:
> ToshiBoy wrote:
> > I have two lists A and B that are both defined as range(1,27) I want
> > to find the entries that are valid for A = BxB
> [ ... ]
> > I get, as expected 1,4,9,16,25 printed out being the only members of B
> > where the conditi
On Jun 27, 3:10 pm, eliben <[EMAIL PROTECTED]> wrote:
> Hello,
> I'm trying to compile the minimal example
> fromhttp://en.wikibooks.org/wiki/Python_Programming/Extending_with_Cwith
> MinGW (latest version) and Python 2.5 (latest ActiveState binary
> install). When running the setup file, the foll
ToshiBoy,
You might want to take a look at the filter() function, it can also be used
for the kind of the thing you're doing.
http://docs.python.org/tut/node7.html#SECTION00713
>>> B = range(1,27)
>>> def test(b):
... if b*b in B:
... return True
... else:
...
teh_sAbEr <[EMAIL PROTECTED]> wrote:
>Hi everybody. I'm trying to write a script that'll change desktop
>wallpaper every time its run. Heres what I've gotten so far:
>
>#random wallpaper changer!
>import _winreg
>from os import walk
>from os.path import exists
>from random import randint
>
>#first
On Jun 28, 3:41 pm, eliben <[EMAIL PROTECTED]> wrote:
> On Jun 27, 3:10 pm, eliben <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hello,
> > I'm trying to compile the minimal example
> > fromhttp://en.wikibooks.org/wiki/Python_Programming/Extending_with_Cwith
> > MinGW (latest version) and Python 2.5 (lates
Benjamin <[EMAIL PROTECTED]> wrote:
>
>On Jun 27, 4:05 pm, "Joe P. Cool" <[EMAIL PROTECTED]> wrote:
>> If I call os.environ.clear in a python program child processes still
>> see the deleted entries. But when I iterate over the keys like so
>>
>> names = os.environ.keys
>> for k in names:
>> d
On Jun 27, 10:58 pm, defn noob <[EMAIL PROTECTED]> wrote:
> right. im an idiot anyway. i can just draw the lines before entering
> the loop, problem solved...
Do not do that; it'll create a busy loop and use 100% of CPU. Use
pygame.event.wait() instead. It waits for an event to occur, without
us
> Maybe it's a Windows service, eg the indexing service or generating
> thumbnails. Anyway, retrying after a delay would still be worth it.
Yes, this thing works :-) Thanks a lot.
Thanks
Roopesh
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 27, 4:05 pm, "Joe P. Cool" <[EMAIL PROTECTED]> wrote:
> If I call os.environ.clear in a python program child processes still
> see the deleted entries. But when I iterate over the keys like so
>
> names = os.environ.keys
> for k in names:
> del os.environ[k]
>
> then the entries are al
101 - 163 of 163 matches
Mail list logo