I'd share (If its old news, its new to me)
Adonis
--
http://mail.python.org/mailman/listinfo/python-list
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
sting for null so it should look like:
if request:
return x
else:
print "No String for you...False!"
Hope this helps.
Adonis
--
http://mail.python.org/mailman/listinfo/python-list
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
return str(primarykeys)
Also there are Python modules for just this. Here is the very first link
from Google:
http://pypi.python.org/pypi/python-json
I have used this one personally and have been very satisfied with it.
There is another one (CJSON?) which is similar, but written in C, for
when performance may be an issue.
Hope this helps.
Adonis
--
http://mail.python.org/mailman/listinfo/python-list
lse I should be looking at?
>
> Oh, and I'm running Python 2.5.1
>
> Thanks for any thoughts.
I do not have experience using pygame, but you can look at:
http://pyui.sourceforge.net/
Creates an user interface with pygame as a possible back end.
Hope this helps.
Adonis
--
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
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
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
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
he Queue module to create a sort of message queue so your data can
be properly synchronized.
Hope this helps.
Adonis
--
http://mail.python.org/mailman/listinfo/python-list
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
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
OF from the
open file object file using its readline() method to provide the data to
be stored.
Hope this helps.
Adonis
--
http://mail.python.org/mailman/listinfo/python-list
tance, but if you prefer delegation, then
that too can be done here. Also, by doing this it will simplify the
moving to more robust graphic toolkits with little modification.
Hope this helps.
Adonis
--
http://mail.python.org/mailman/listinfo/python-list
her
languages (doing the same algorithm).
Hope this helps.
Adonis
--
http://mail.python.org/mailman/listinfo/python-list
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
a Linux system.
Hope this helps.
Adonis
--
http://mail.python.org/mailman/listinfo/python-list
l know...or you could post more code?
>
> Mike
>
Actually, I re-ran this in a terminal and it worked perfectly. I was
using IDLE to write this code, kinda peculiar. Maybe something to do
with IDLE and CSV (or writing to files) with lines > ~1000. A socket
timing out maybe?
Thanks anyways.
Adonis
--
http://mail.python.org/mailman/listinfo/python-list
stopped writing to the file at a certain point. Something
in my code? a bug?
System: Linux 2.4.31 (Slackware), Python 2.5c1
Any help is greatly appreciated.
Adonis
-- code --
def _scan(self):
outFile = file("mp3.dat", "wb")
outCSV = csv.writer(outF
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
GUI.
>
> TIA
> Adam
>
To size the window use Tk's geometry method
self.top.geometry("%dx%d%+d%+d" % (800, 600, 0, 0)) # (width,
height, x, y)
For the scrollbar to fill vertically, use the sticky grid option.
self.scrlr1.grid(row=0, column=1, sticky
Data, which depending on your web application
server could either be static or dynamic data. Then upon reception of
the data, simply parse it and update a section or sections of your AJAX
application (unless GWT has mechanisms to handle such things for you).
Hope this helps.
Adonis
--
http:/
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:
&
point2name.get(ord(i))
entityCode = entity.name2codepoint.get(name)
t +="&#" + str(entityCode)
else:
t += i
print t
Hope this helps.
Adonis
--
http://mail.python.org/mailman/listinfo/python-list
rnal IP you can do:
import urllib
checkIP = urllib.urlopen("http://checkip.dyndns.org";).read()
externalIP = checkIP.split()[-1].strip("")
print externalIP
Hope this helps.
Adonis
--
http://mail.python.org/mailman/listinfo/python-list
TML format, and/or serve it over web with its built-in
HTTP server.
pydoc: http://docs.python.org/lib/module-pydoc.html
Hope this helps.
Adonis
--
http://mail.python.org/mailman/listinfo/python-list
ess = subprocess.Popen(cmd, stdout=subprocess.PIPE)
>>> print process.stdout.read()
For more info on how to do stdin and other things check out:
http://docs.python.org/lib/module-subprocess.html
Hope this helps.
Adonis
--
http://mail.python.org/mailman/listinfo/python-list
x27;t understand how to solve this simple code.
You first need to create an instance of the class:
tree = TREE()
tree.gettree()
or
TREE().gettree()
Hope this helps.
Adonis
P.S. You should look into the tutorial
http://docs.python.org/tut/tut.html it will answer a lot of your questions.
--
h
on version of Google Web
Toolkit, offers a way to create AJAX apps using Python code.
Hope this helps.
Adonis
--
http://mail.python.org/mailman/listinfo/python-list
27;d like to say is something like
> this:
> y = [t.reverse() for t in y]
> Even if reverse worked on tuples, it wouldn't work inside a
> list comprehension.
>
> Yours,
> Noah
>
Provided the data remains the same [(a, b), ...]
Python 2.5a2 (r25a2:45740, May 24 2006,
tya
You must have the Tk libraries present in your system for Python to
compile Tkinter. Go to your distribution's site and try to see if they
offer a TCL/TK package and install it (being that it is Redhat they most
definitely must have one). Then recompile Python.
Hope this helps.
Adonis
--
http://mail.python.org/mailman/listinfo/python-list
ful/cat2all.py", line 13, in ?
> if os.isfile(dpath+name):
> AttributeError: 'module' object has no attribute 'isfile'
>
>
> thank you
Where 'if os.isfile()' it should be 'os.path.isfile()', the isfile
method is not available in the os m
Florian Lindner wrote:
> Hello,
> how can I get all subdirectories of a given directories? os.listdir() gives
> me all entries and I've found no way to tell if an object is a file or a
> directory.
>
> Thanks,
>
> Florian
Here is a quick hack:
import os
import os.path
givenDir = "/"
listing =
Paul Watson wrote:
> Is there any chance that Python would support the --version command line
> parameter? It seems that many open source programs use this switch to
> report their version number.
try at a command prompt:
python -V
Hope this helps.
Adonis
--
http://mail.python.or
t thats my assumption as it works fine on my system.
Adonis
--
http://mail.python.org/mailman/listinfo/python-list
t; Unix, but would be interesting if it was cross-platform.
>
> Thanks.
>
Here is a quick hack I just did, its very ugly, but does the job.
First do locate -u to create a cache then just locate [term], its not so
fancy as to remind you when the cache is too old, but hey.
It require
erver, then now it may mimic a "local"
feel but all on your Linux server. Now they can run the X app and be
able to achieve what you want. I am in no way an expert and some of my
ideas might not be 100% accurate, but at my university this is how we
have it set and it works perfectly (
2.
>
> Maybe I'm missing something.
>
If the data has closing tags this is easily achieved using a dom or sax
parser, but here is a slightly modified version, very ugly but simple.
hope this helps.
Adonis
---
from HTMLParser import HTMLParser
data = """
ProvoWallis wrote:
From what I gather here is a quickie, probably better solutions on the
way but this accomplishes the idea I think.
Some helpful links:
http://docs.python.org/lib/module-sgmllib.html
http://docs.python.org/lib/module-HTMLParser.html
http://docs.python.org/lib/module-htmllib.
def callback():
if tkMessageBox.askokcancel("Quit", "Do you really wish to quit?"):
root.destroy()
root = Tk()
root.protocol("WM_DELETE_WINDOW", callback)
root.mainloop()
Hope this helps.
Adonis
--
http://mail.python.org/mailman/listinfo/python-list
e this helps.
Adonis
--
http://mail.python.org/mailman/listinfo/python-list
the argument list it works just fine?
Any help is greatly appreciated.
Adonis
--
http://mail.python.org/mailman/listinfo/python-list
ZDNet has released this article that talks about open source scriptingg
languages and mentions Python/Jython/IronPython, just wanted to share
the info.
http://news.zdnet.com/2100-9593_22-5705448.html?tag=st.num
Adonis
--
http://mail.python.org/mailman/listinfo/python-list
bserver by only accessing data you need. go to cherrypy.org and
right on the start page there should be a link labeled AJAX which is the
buzzword being used for this kind of implementation.
Hope this helps.
Adonis
--
http://mail.python.org/mailman/listinfo/python-list
n look into CherryPy http://www.cherrypy.org/
Hope this helps
Adonis
--
http://mail.python.org/mailman/listinfo/python-list
://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/81549
Hope this helps.
Adonis
--
http://mail.python.org/mailman/listinfo/python-list
natively go to its folder in explorer and double click it to run.
pythonwin is just a developing enviroment, and the execution of scripts
within it is just for debugging use.
Hope this helps.
Adonis
--
http://mail.python.org/mailman/listinfo/python-list
immediately, any help is greatly
appreciated.
Adonis
http://home.earthlink.net/~adonisv/flatten.py
http://home.earthlink.net/~adonisv/flatten.c
--
http://mail.python.org/mailman/listinfo/python-list
Gary Richardson wrote:
Has this bug been fixed in 2.3.5 or 2.4? Does it exist in XP systems?
#-
from Tkinter import *
def _onMouseWheel(event):
print event
root = Tk()
root.bind('',_onMouseWheel)
root.mainloop()
Works for me... WinXP SP2 Python 2.4 final
Adon
50 matches
Mail list logo