Kenneth McDonald wrote:
> I'm doing some work with a Python program that works hand-in-hand with
> the DOM on a local client (processing DOM events, issuing DOM
> modification commands, etc.) I'm currently using cherrypy as the Python
> server for this communication, and simple AJAX on the clien
Pyenos wrote:
> class TREE:
> def gettree(self):print self
> TREE.gettree() # I get an error saying
># TypeError: unbound method gettree() must be called
># with TREE instance as first argument (got nothing instead
>
>
> I still don't understand how to solve t
cypher543 wrote:
> This has been driving me insane for the last hour or so. I have search
> everywhere, and nothing works. I am trying to use the subprocess module
> to run a program and get its output line by line. But, it always waits
> for the process to terminate and then return the output all
[EMAIL PROTECTED] wrote:
> I'm looking for a good example of how to correctly abstract TK code
> from the rest of my program. I want to just get some user info and
> then get 4 values from the GUI. Right now I've written it OOP per the
> examples on python.org but it doesn't seem to be meshing very
[EMAIL PROTECTED] wrote:
> Hi,
>
> My program has the following code to transfer a binary file
>
> f = open(pathanme+filename,'rb')
> print "start transfer"
> self.fthHandle.storbinary('STOR '+filename, f)
>
> How can I do an ASCII file transfer??
> -Ted
>
Taken fro
Tobiah wrote:
> Wow, thunderbird displayed this to me as a true exponent, even
> though it is an ascii message. anyone else get this?
>
>
Yeah I can confirm Thunderbird 1.5.10 on Linux.
Adonis
--
http://mail.python.org/mailman/listinfo/python-list
Steve Howell wrote:
> I've always thought that the best way to introduce new
> programmers to Python is to show them small code
> examples.
You could try this wiki page:
http://rosettacode.org/wiki/Main_Page
It has a fair amount of Python examples as well as many more other
languages (doing
self.wfile.write("put")
def do_DELETE(self):
self.wfile.write("delete")
def main(server_class=BaseHTTPServer.HTTPServer, handler_class=REST):
server_address = ('', 8000)
httpd = server_class(server_address, handler_class)
h
I am writing a program that walks a directory full of mp3s reads their
ID3 data (using Mutagen), this part works perfectly. The problem is I
write these tags to a CSV file through the CSV module. But when I read
the file the file seems to be incomplete. Further inspecting it has
seemed to have
[EMAIL PROTECTED] wrote:
>>
>> -- code --
>>
>> def _scan(self):
>> outFile = file("mp3.dat", "wb")
>> outCSV = csv.writer(outFile)
>> output = list()
>> for root, dirs, files in os.walk(self.directory):
>> files = [x for x in files if x.endswi
Chaz Ginger wrote:
> I have a need for the minimal Linux system to run Python. Basically I
> want the system to boot up and instead of starting up Init/etc. I would
> love it to run python (and a python script I have written).
>
> Before embarking on doing it myself I was wondering if anyone knew
packages automatically?
>
> thanks in advance!
setuptools is for you
http://peak.telecommunity.com/DevCenter/setuptools
Once installed, its easy as easy_install
Hope this helps.
Adonis Vargas
--
http://mail.python.org/mailman/listinfo/python-list
Sean Davis wrote:
> I would like to set up a server that takes XMLRPC requests and
> processes them asynchronously. The XMLRPC server part is trivial in
> python. The job processing part is the part that I am having trouble
> with. I have been looking at how to use threadpool, but I can't see
>
Scott Huey wrote:
> I am working on a Python module and I would like to prepare some API
> documentaiton. I managed to find epydoc after some searching online.
>
> Is there a standard way to document the API for Python modules? Is
> epydoc the best way to go if there is no standard? Are there othe
Scripter47 wrote:
> How do i get my ip address?
>
> in cmd.exe i just type "ipconfig" then it prints:
> ...
> IP-address . . . . . . . . . . . . . . . . . : 192.168.1.10
> ...
> how can i do that in python??
>
If you want to get your external IP you can do:
import urllib
checkIP
Steven D'Aprano wrote:
> I have a string containing Latin-1 characters:
>
> s = u"© and many more..."
>
> I want to convert it to HTML entities:
>
> result =>
> "© and many more..."
>
> Decimal/hex escapes would be acceptable:
> "© and many more..."
> "© and many more..."
>
> I can look up tab
Adonis Vargas wrote:
[...]
>
> Its *very* ugly, but im pretty sure you can make it look prettier.
>
> import htmlentitydefs as entity
>
> s = u"© and many more..."
> t = ""
> for i in s:
> if ord(i) in entity.codepoint2name:
&
Shadab Sayani wrote:
> Hi ,
> We have a project where I need to read files store
> them in database in the backend.We have done this in
> python.Now we decided to use Ajax technique for user
> interface.For that we found that GWT is one of the
> best toolkits.Now I got a doubt can I interface GWT
>
Adam wrote:
> I think my main questions are:
> 1. How can I get the Window to be sized the way I want it?
> 2. How can I get the Scrollbars to fill the side of the text box
> instead of being small? (like .pack(fill= tk.Y)
>
>
> I have only posted the code relevant to the GUI.
>
> TIA
> Adam
>
Adam wrote:
> On Feb 28, 9:13 pm, Adonis Vargas <[EMAIL PROTECTED]>
> wrote:
>> Adam wrote:
>>
>>
>>
>>> I think my main questions are:
>>> 1. How can I get the Window to be sized the way I want it?
>>> 2. How can I get the Scrollb
ythonw the application has an extension of
.pyw and .py files are run by the regular python executable. This the
default behavior, unless for some odd reason you modified this through
the registry or through explorer to do otherwise.
Adonis Vargas
--
http://mail.python.org/mailman/listinfo/python-list
urllib
response = urllib.urlopen("http://www.roche.com/rochea_z_sp.pdf";)
print response.info()
Hope this helps.
Adonis Vargas
--
http://mail.python.org/mailman/listinfo/python-list
ath variables, select edit variable and
append ;C:\Python25 to it. And thats it reopen a new command prompt the
type python and it should just fire up.
Hope this helps.
Adonis Vargas
--
http://mail.python.org/mailman/listinfo/python-list
misbehave since you are rebinding the
name.
Hope this helps.
Adonis Vargas
--
http://mail.python.org/mailman/listinfo/python-list
PatrickMinnesota wrote:
> I know this isn't strictly a Python question, but I'm betting some
> here might be able to give me a hint.
>
> I have a few graphical programs doing some 2D data visualization using
> simple Pygame code for pseudo real-time animation. It's running
> under windows XP rig
Gowri wrote:
> Hello,
>
> I actually have two questions:
> 1. Are there any libraries which convert XML to JSON?
> 2. I am currently doing the above using the DOM parser and creating a
> JSON array
>
>
> for node in doc.getElementsByTagName("book"):
> isbn = node.getAttribute("is
reopen as needed.
import cPickle
data = {'k1': 'v1', 'k2': 'v2'}
output = open('output.dat', 'wb')
cPickle.dump(data, output)
output.close()
data1 = cPickle.load(open('output.dat', 'rb'))
print type(data1)
print data1
Hope this helps.
Adonis Vargas
--
http://mail.python.org/mailman/listinfo/python-list
gargonx wrote:
> Say i have the two methods:
>
> def ReturnMethod(request, x):
> if request is True:
> return x
> else: print "No String for you...False!"
>
> def SendMethod(request):
> xstring = "Some text"
> ReturnMethod(request, xstring)
>
> SendMethod(True)
>
> W
drew
>
>
Have you looked into this library:
http://cthedot.de/cssutils/
May help you, if you are trying to achieve something. If your doing it
as an exercise then I can not help you, I avoid regex like the plague
(but thats just me).
Hope this helps.
Adonis Vargas
--
http://mail.python.org/mailman/listinfo/python-list
29 matches
Mail list logo