Hi all,
I know the subject is confusing but I don't know how to describe what
I would like to ask concisely.
Basically I would like to have a program (or server or whatever) take
an HTTP POST method (which contains some information, maybe even an
XML file) from a client, process these XML/informa
On Tue, 08 Nov 2005 00:10:16 -0600
Rob Dowell <[EMAIL PROTECTED]> wrote:
> Just a quick TKinter question. Is it possible to have custom
> frames/widgets? In other words can I customize the way that the GUI
> looks (i.e. rounded corners on the frames, beveled/raised edges, etc.) I
> was just won
any python module to calculate sin, cos, arctan?
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Howard Kao wrote:
> Basically I would like to have a program (or server or whatever) take
> an HTTP POST method (which contains some information, maybe even an
> XML file) from a client, process these XML/information, and then
> generate an XML to send back to the client.
>
> Currently the environ
Alan Gauld wrote:
>> Interfaces and abstract classes - I know they don't exist per se in
>> Python.
>
>
> First you need to define what you mean by the terms.
> Every class has an interface - it is the set of messages to which it
> responds.
Yup, I was thinking more in terms of the Java idea,
Now that I have the answer (16.801), How do I round it of
to 16.80 ? I only need it to be to the closest 1/100.
TIA
Jorge Godoy wrote:
Frank Moore <[EMAIL PROTECTED]> writes:
Johan,
You could try:
percentage = (42 * 250)/100
This gives the answer 105.
A
any code to draw parabola or curve?
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Shi Mu wrote:
> any python module to calculate sin, cos, arctan?
The index to the Library Reference has the answer to this question...
Kent
--
http://www.kentsjohnson.com
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo
Kent Johnson wrote:
>Alex Hunsley wrote:
>
>
>>Interfaces and abstract classes - I know they don't exist per se in
>>Python. But what are the closest analogues? I've found a few examples,
>>e.g. for an abstract class the following page has a fairly common
>>suggestion:
>>
>>http://www.norvig.
I'm writing a Vector class (think Vector as in the mathematical vector)...
A critical snippet is as follows:
class Vector(lister.Lister):
def __init__(self, *elems):
# ensure that we create a list, not a tuple
self.elems = list(elems)
def __add__(self, other):
retu
Shi Mu wrote:
>any code to draw parabola or curve?
>
>
That question is so general and vague it's either unanswerable, or very
easy to answer.
I'll try the 'very easy' answer: yes, there is probably code somewhere
to draw a parabola or curve. Have you tried making a start on this
yourself? Di
Johan Geldenhuys <[EMAIL PROTECTED]> writes:
> Now that I have the answer (16.801), How do I round it of to 16.80
> ? I only need it to be to the closest 1/100.
>>> print "%.2f" % 16.801
16.80
>>> a = 16.80001
>>> b = "%.2f" % a
>>> b
'16.80'
>>> float(b)
16.8
Thanks, that helps.
Jorge Godoy wrote:
Johan Geldenhuys <[EMAIL PROTECTED]> writes:
Now that I have the answer (16.801), How do I round it of to 16.80
? I only need it to be to the closest 1/100.
print "%.2f" % 16.800
Alex Hunsley wrote:
> Alan Gauld wrote:
>
>
>>>Interfaces and abstract classes - I know they don't exist per se in
>>>Python.
>>
>>
>>First you need to define what you mean by the terms.
>>Every class has an interface - it is the set of messages to which it
>>responds.
>
>
> Yup, I was think
Kent Johnson wrote:
>Alex Hunsley wrote:
>
>
>>Alan Gauld wrote:
>>
>>
>>
>>
Interfaces and abstract classes - I know they don't exist per se in
Python.
>>>First you need to define what you mean by the terms.
>>>Every class has an interface - it is the set of mess
Regards testing, I've been playing with both the unittest
(http://pyunit.sourceforge.net/pyunit.html) and doctest
(http://docs.python.org/lib/module-doctest.html). I was wondering what
peoples thoughts were on the effectiveness and convenience of one versus
the other. It seems to me that doctes
Alex Hunsley wrote:
> Oh yes, I'd always reply to the list in the very least; I was really
> just wondering what the etiquette was concerning emails also going back
> to the person you're reply to directly (as well as to the list). I ask
> because the list is set up so that it appears replies ar
Alex Hunsley wrote:
> I'm writing a Vector class (think Vector as in the mathematical vector)...
> A critical snippet is as follows:
>
> class Vector(lister.Lister):
> def __init__(self, *elems):
> # ensure that we create a list, not a tuple
> self.elems = list(elems)
>
>
Kent Johnson wrote:
>Alex Hunsley wrote:
>
>
>>Oh yes, I'd always reply to the list in the very least; I was really
>>just wondering what the etiquette was concerning emails also going back
>>to the person you're reply to directly (as well as to the list). I ask
>>because the list is set up s
Hi,
maybe you can have a look at twisted http://twistedmatrix.com , which is
an "event-driven network framework". I think you could easily build your
own server to handle your requests, you don't even need an apache
webserver for that.
Just have a look, there's some documentation/tutorials out the
Hello,
I want to use Python to do some experimentation with graphic
processing/manipulation, and I am looking for a way to be able to manipulate
individual pixels of the image, as well as display it in a GUI. Ideal image
representation would be something of the form of a two-dimensional array
Alex Hunsley wrote:
>Regards testing, I've been playing with both the unittest
>(http://pyunit.sourceforge.net/pyunit.html) and doctest
>(http://docs.python.org/lib/module-doctest.html). I was wondering what
>peoples thoughts were on the effectiveness and convenience of one versus
>the other.
Marcin Komorowski wrote:
>Hello,
>
>I want to use Python to do some experimentation with graphic
>processing/manipulation, and I am looking for a way to be able to manipulate
>individual pixels of the image, as well as display it in a GUI. Ideal image
>representation would be something of the
Dear List,
Does anyone know of any python semweb tools? I'm especially interested
in tools to build and handle ontologies. I've come across CWM (built by
Tim BL) but not that much else. I'd be really interested in anything
that can interface with a DIG reasoner.
Really, I'm looking for a pythonic
At 08:19 AM 11/8/2005, Matt Williams wrote:
>Dear List,
>
>Does anyone know of any python semweb tools? I'm especially interested
>in tools to build and handle ontologies. I've come across CWM (built by
>Tim BL) but not that much else. I'd be really interested in anything
>that can interface with a
Marcin Komorowski wrote:
> Hello,
>
> I want to use Python to do some experimentation with graphic
> processing/manipulation, and I am looking for a way to be able to manipulate
> individual pixels of the image, as well as display it in a GUI. Ideal image
> representation would be something of
I was interested in getting feedback from current mail group users.We have mirrored your mail list in a new application that provides a more aggregated and safe environment which utilizes the power of broadband.Roomity.com v 1.5 is a web 2.01 community webapp. Our newest version adds broadcast vide
Is there a way in python for a method to determine its parent?
In particular, I'm working with SimpleXMLRPCServer, and would
like to be able to find the client_address in the routine that
has been dispatched. I know that client_address is an attribute
of the handler class instance, but don't know
Hello,
I've been working on a problem and have now sorted most of it (thanks
to some help from the list).
All the ways of writing data to a file I know keep telling me that lists
can't be written to the file. I'm trying to convert data from one set of
files into files of a different format. B
Mea Culpa, Mea Culpa, Mea Maxima Culpa (or, MCMCMMC to repeat my sin of
poly-acronymony.
Semantic Web - (loosely) the idea of incorporating semantic information
in the WWW, so it becomes machine understandable (rather than just
parsable).
CWM is Tim Berners-Lee's (and others) tool to handle ontol
Hi Mike,
Converting an (almost)arbitrary object into a string is what the Pickle
module does. CPickle is faster. Take a look into into it in the docs.
Here's an example:
>>> import cPickle
>>> lala = [1, 2, 3, 'four', 'V']
>>> lala
[1, 2, 3, 'four', 'V']
>>> fileo = open('lala.pkl', 'w')
yes it is...
convert list to string:
L = [1,2,3] L = [str(x) for x in L] s = string.join(L,' ') print len(s)
convert list to a file
myF = open(namaFile,"w") for s in myList[:-1]: myF.write(str(s)+"\n") myF.write(str(myList[len(myList)-1])) myF.close()
Cheers,
Thanks Alex,
Do you know if I can find somewhere sample code that would, lets say, create
a 100x100 image and display it?
Thanks,
Marcin
- Original Message -
From: "Alex Hunsley" <[EMAIL PROTECTED]>
To: "Marcin Komorowski" <[EMAIL PROTECTED]>
Cc: "python-tutor"
Sent: Tuesday, November
>>Yup, I was thinking more in terms of the Java idea, whereby an
>>interface is declared specifically and then a class claiming
>>to implement it causes compilation problems if it doesn't
>>properly implement it.
I guessed as much but that is an idea dreamt up by
Microsoft for COM and picked up
Alex,
I assume you've looked at NumPy?
It has a bunch of math stuff written as a Python module in C.
So its fast and proven correct. (Lawrence Livermore Labs
wrote it I believe)
It should do all the heavy lifting you need,
and might even provide a full solution.
Just a thought,
Alan G.
__
Marcin Komorowski wrote:
> Thanks Kent, this looks promising.
> Are you very familiar with the Python Imaging Library?
No, I have just used it for a few small things. I know it mostly by reputation.
> Can I pick your
> brains if I have questions?
Best to ask questions to the list, I will answ
I believe only by explicitly passing a reference to the parent?
Liam Clarke-Hutchinson
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Bill Campbell
Sent: Wednesday, 9 November 2005 7:00 a.m.
To: Tutor
Subject: [Tutor] Who called me?
Is there a way in p
>
>>>I want to use Python to do some experimentation with graphic
>>>processing/manipulation, and I am looking for a way to be able to
>manipulate
>>>individual pixels of the image, as well as display it in a GUI.
Sounds like a job for the Python Image Library - PIL.
Alan G
Bill Campbell wrote:
> Is there a way in python for a method to determine its parent?
>
> In particular, I'm working with SimpleXMLRPCServer, and would
> like to be able to find the client_address in the routine that
> has been dispatched. I know that client_address is an attribute
> of the handl
Oh dear.
Is Web 2.01 like that whole Web 2 I've heard so much about, but better? Is
it the semantic web, but not so pedantic?
Liam Clarke-Hutchinson
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of shenanigans
Sent: Wednesday, 9 November 2005 5:57 a.
Bill Campbell wrote:
> Is there a way in python for a method to determine its parent?
> In particular, I'm working with SimpleXMLRPCServer, and would
> like to be able to find the client_address in the routine that
> has been dispatched. I know that client_address is an attribute
> of the hand
Liam Clarke-Hutchinson wrote:
>I believe only by explicitly passing a reference to the parent?
>
>Liam Clarke-Hutchinson
>
>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
>Of Bill Campbell
>Sent: Wednesday, 9 November 2005 7:00 a.m.
>To: Tutor
>Subject: [Tu
Hello all :)
I made a GUI app with pyGTK that I want to be able to launch a game I've
downloaded from the pygame website when a button is clicked. I was able
to do this on a linux box since the file was a .py file, but I'm not
sure how to do it on a windows box since the file is an executeable.
On Wed, 9 Nov 2005, Liam Clarke-Hutchinson wrote:
> Is Web 2.01 like that whole Web 2 I've heard so much about, but better? Is
> it the semantic web, but not so pedantic?
That was bad, and the first spam I've seen on the list in a while. I'm
blocking this joker off the mailing list now.
_
Kent Johnson wrote:
> Bill Campbell wrote:
>
>>Is there a way in python for a method to determine its parent?
>>
>>In particular, I'm working with SimpleXMLRPCServer, and would
>>like to be able to find the client_address in the routine that
>>has been dispatched. I know that client_address is an
+++ Hugo Gonz?lez Monteverde [08-11-05 13:13 -0600]:
| Hi Mike,
|
| Converting an (almost)arbitrary object into a string is what the Pickle
module does. CPickle is faster. Take
| a look into into it in the docs.
|
Is there a way to dump the varialble in XML format and retrive it?
e.g.
a="this
Shantanoo Mahajan schrieb:
> +++ Hugo Gonz?lez Monteverde [08-11-05 13:13 -0600]:
> | Hi Mike,
> |
> | Converting an (almost)arbitrary object into a string is what the Pickle
> module does. CPickle is faster. Take
> | a look into into it in the docs.
> |
>
> Is there a way to dump the varialbl
Mike Haft wrote:
> All the ways of writing data to a file I know keep telling me that lists
> can't be written to the file. I'm trying to convert data from one set of
> files into files of a different format. But the easiest way to get the
> data from the first set of files is in a list(s).
>
> So
On 08/11/05, Rob Dowell <[EMAIL PROTECTED]> wrote:
> Just a quick TKinter question. Is it possible to have custom
> frames/widgets? In other words can I customize the way that the GUI
> looks (i.e. rounded corners on the frames, beveled/raised edges, etc.) I
> was just wondering if it was possible
> On 08/11/05, Rob Dowell <[EMAIL PROTECTED]> wrote:
> > Just a quick TKinter question. Is it possible to have custom
> > frames/widgets? In other words can I customize the way that the GUI
> > looks (i.e. rounded corners on the frames, beveled/raised edges, etc.) I
> > was just wondering if it w
Try to add .py in PATHEXT environment windows XP
After that, you can call your python program just like you call exe file.
Hope this help.
pujo
On 11/8/05, Chris Irish <[EMAIL PROTECTED]> wrote:
Hello all :)I made a GUI app with pyGTK that I want to be able to launch a game I'vedownloaded from
Kent Johnson wrote:
>Marcin Komorowski wrote:
>
>
>>Thanks Kent, this looks promising.
>>Are you very familiar with the Python Imaging Library?
>>
>>
>
>No, I have just used it for a few small things. I know it mostly by reputation.
>
>
>
>>Can I pick your
>>brains if I have questions?
Alex Hunsley wrote:
> Marcin Komorowski wrote:
>
>> Hello,
>>
>> I want to use Python to do some experimentation with graphic
>> processing/manipulation, and I am looking for a way to be able to
>> manipulate individual pixels of the image, as well as display it in a
>> GUI. Ideal image repres
[EMAIL PROTECTED] wrote:
>Alex,
>
>I assume you've looked at NumPy?
>
>
Yup, I'm aware of it and it would do the job just fine (and faster too,
probably). However, I'm happy writing my own code (+tests) for the
moment - I'm getting more experience of writing stuff in Python. I may
switch to N
Colin J. Williams wrote:
> Alex Hunsley wrote:
>
>> Regards testing, I've been playing with both the unittest
>> (http://pyunit.sourceforge.net/pyunit.html) and doctest
>> (http://docs.python.org/lib/module-doctest.html). I was wondering
>> what peoples thoughts were on the effectiveness and co
I would like to do some testing of video streams from say a vcr tape. Possibly
using the PVR type capture card. Maybe modules to control it.. or some info
on how I can control it through C/C++ and link those functions into python.
Are there any python user groups or modules that could help me i
How does one test for a running gui in python?
Thanks, Ken
--
A journey of a thousand miles starts under one's feet.
-- Lao Tsu
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Hi Ken,
How do you mean? I assume you're referring to a non-Windows environment? In
Linux, I'd imagine that using os.popen("ps") would do it.
Cheers,
Liam
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Ken Stevens
Sent: Wednesday, 9 November 2005 1
Hmm, no x-server. If you're looking to detect running Python GUI packages,
you could check the namespaces for 'em, but beyond that, I'm stumped.
-Original Message-
From: Ken Stevens [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 9 November 2005 1:23 p.m.
To: Liam Clarke-Hutchinson
Subject:
From: Ken Stevens [mailto:[EMAIL PROTECTED]
> Yes. Under Linux no x-server running? I guess it really wouldn't be
> applicable under a windows enviroment, although I would like my code
> to be transportable. Just under a MS windows enviroment it would
> always be a "gui" environment.
What happens
With urllib, you can set httplib.HTTPConnection.debuglevel to see the HTTP
conversation. But it doesn't work with urllib2. Can someone explain how
to use it in conjunction with urllib2?
Longer story: debuuglevel is a nice debug tool that lets you see the
client-server HTTP conversation:
>>
> Marcin Komorowski wrote:
>> Thanks Kent, this looks promising.
>> Are you very familiar with the Python Imaging Library?
> No, I have just used it for a few small things. I know it mostly by
> reputation.
Somewhat related question: Why isn't PIL in the standard library?
Alan
__
Alex Hunsley wrote:
> Regards testing, I've been playing with both the unittest
> (http://pyunit.sourceforge.net/pyunit.html) and doctest
> (http://docs.python.org/lib/module-doctest.html). I was wondering what
> peoples thoughts were on the effectiveness and convenience of one versus
> the oth
Hello
I'm using Beautiful Soup to scrape a site (that's in Spanish) I
sometimes come across strings like:
'Ner\\xf3n como cantor'
Which gets printed:
Ner\xf3n como cantor
When they should be:
Nerón como cantor
I don't know if it is my fault (due to me misusing BS) or is it a BS
fault. Anyway,
Terry Carroll wrote:
> With urllib, you can set httplib.HTTPConnection.debuglevel to see the HTTP
> conversation. But it doesn't work with urllib2. Can someone explain how
> to use it in conjunction with urllib2?
You have to create your own HTTPHandler, set it to debug and install it in
urlli
I have created a List within a class. If I try and append to the list using
the set function using the property value my variable stops being a list.
Can anyone explain why the set function called by the class property does
not append to the list?
Here is some sample code:
class ShoppingBag:
I have a PostScript file which contains the following lines (the numbers
are for reference only and are *not* in the file):
1 <<
2 /Policies <<
3 /PageSize 3
4 >>
5 >> setpagedevice
These lines never change and are always formatted like this (at least in
the PostScript files that I'm gene
On 09/11/05, Roy Bleasdale <[EMAIL PROTECTED]> wrote:
> I have created a List within a class. If I try and append to the list using
> the set function using the property value my variable stops being a list.
>
> Can anyone explain why the set function called by the class property does
> not append
On Tue, 8 Nov 2005, Kent Johnson wrote:
> You have to create your own HTTPHandler, set it to debug and install it
> in urllib2. Like this:
Thanks, Kent!
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
no takrs on this one?
--- Eric Walker <[EMAIL PROTECTED]> wrote:
> I would like to do some testing of video streams
> from say a vcr tape. Possibly
> using the PVR type capture card. Maybe modules to
> control it.. or some info
> on how I can control it through C/C++ and link those
> functions
On Tue, 8 Nov 2005, Eric Walker wrote:
> I would like to do some testing of video streams from say a vcr tape.
> Possibly using the PVR type capture card. Maybe modules to control it..
> or some info on how I can control it through C/C++ and link those
> functions into python. Are there any pyt
71 matches
Mail list logo