e.
Also http://tebeka.bizhat.com/Software/bitter.py
HTH.
Miki
--
http://mail.python.org/mailman/listinfo/python-list
n
>packaging python with an application in a single installer ? Has that
>been done before ?
http://starship.python.net/crew/theller/moin.cgi/ShippingEmbedded
HTH,
Miki
--
http://mail.python.org/mailman/listinfo/python-list
#x27;s all! You'll have a working .pyd ready to rock.
Miki
--
http://mail.python.org/mailman/listinfo/python-list
n, but no-one has really spelt it out (in idiot
> form!) in a way I can understand.
Note that apart from what all the other pepole said, "self" is not a
reserved word. It's just the wide convention that we use the name
"self".
If you know C++/Java then "self" i
ll on a particular data item.
>
> This includes % after a string.
>
> I would also like browseable help with good examples on whatever
> methods and functions and operators it pops up.
The IDLE that will come (soon) with Python 2.5 with have some
intellisense. Not all that you requeste
Hello Scott,
> Which one do you use?
psycopg2 (http://initd.org/tracker/psycopg/wiki/PsycopgTwo)
> What do you like about it?
Compiles and works. Has support for Postgres array types.
Also thread safe.
HTH,
Miki
http://pythonwise.blogspot.com/
--
http://mail.python.org/mailman/listinfo/
ctime(file1), getctime(file2))
def walktree(path):
file_list = []
for root, dirs, files in walk(path):
file_list += [join(root, file) for file in files]
file_list.sort(cmp_file_by_ctime)
return file_list[-2]
HTH,
Miki
http://pythonwise.blogspot.com/
--
http://mail.python.org/mailman/listinfo/python-list
Hello T,
> Is there a way to access yahoo mail via its web interface? If so, can
> someone give some pointers?
http://www.crummy.com/software/BeautifulSoup/
http://wwwsearch.sourceforge.net/ClientForm/
HTH,
Miki
http://pythonwise.blogspot.com/
--
http://mail.python.org/mailman/listinfo/
Hello Ben,
> Question: I have Python modules named without '.py' as the extension,
> and I'd like to be able to import them. How can I do that?
http://docs.python.org/lib/module-imp.html (hint: load_source :)
HTH,
Miki
http://pythonwise.blogspot.com/
--
http://mail.python
ruiseControl can take care of all the rest.
I also found that writing a simple Continuous integration system myself
was a very simple task in Python, it might be a good choice as well. (I
resorted to this solution after giving up on trying to install Java on
OpenBSD.)
HTH,
Miki
http://p
SQLObject
(http://www.sqlobject.org/) and SQLAlchemy (http://www.sqlalchemy.org/)
can do this work for you (IIRC).
HTH,
Miki
http://pythonwise.blogspot.com/
--
http://mail.python.org/mailman/listinfo/python-list
t mean that we can now debug embedded python with IDLE ?
I don't think so, it just open a new "python.exe" process and
communicates with it via TCP.
HTH,
Miki
http://pythonwise.blogspot.com/
--
http://mail.python.org/mailman/listinfo/python-list
Hello Rene,
You can also check out BeautifulSoup
(http://www.crummy.com/software/BeautifulSoup/) which is less strict
than the regular HTML parser.
HTH,
Miki
http://pythonwise.blogspot.com/
--
http://mail.python.org/mailman/listinfo/python-list
Hello All,
Decided that there are not enough blogs out there so
http://pythonwise.blogspot.com/ is up :)
This blog will feature a weekly (or about) Python code examples.
I'll be glad to hear your comments.
Miki,
http://pythonwise.blogspot.com/
--
http://mail.python.org/mailman/listinfo/p
directories including the one with win32api.pyd.
> Besides, if it were an install or path problem, why would it work at
> the command prompt?
IIRC you need to set the path explicitly in an embedded interpreter.
See the code in "site.py" (which again IMO is *not* imported when the
interpreter starts).
HTH,
Miki
http://pythonwise.blogspot.com/
--
http://mail.python.org/mailman/listinfo/python-list
Hello Eric,
> Is there anything like an all Python dialog equivalent floating around?
http://www.pythonware.com/library/tkinter/introduction/
HTH,
--
Miki
http://pythonwise.blogspot.com/
--
http://mail.python.org/mailman/listinfo/python-list
that in some rare cases sys.path[0] might not contain the script
directory. For example in an executable created by py2exe).
HTH.
--
Miki
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
://www.unixreview.com/documents/s=9133/ur0404e/ur0404e_listing1.htm
--
Miki
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
f them :)
>>> import my_module
>>> my_module.add(1, 1)
4
[Hack]
>>> reload(my_module)
>>> my_module.add(1, 1)
2
HTH,
--
Miki <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
are there any texts that anyone can recommend to
> me for learning more about this area?
A good book about NLP is http://nlp.stanford.edu/fsnlp/ which have a
chapter about
text classification. http://www.cs.cmu.edu/~tom/mlbook.html has some
good coverage on
the subject as well.
HTH.
--
Miki Te
m
from sys import argv
OUTFILE = "geturl.txt"
system("lynx -dump %s > %s" % (argv[1], OUTFILE))
system("start notepad %s" % OUTFILE)
(You can find lynx at http://lynx.browser.org/)
Note the removing sidebars is a very difficult problem.
Search for &q
, 15
]
for g in group(i):
print g
HTH,
--
Miki <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
tes, and GOTO 1
> ...
http://wwwsearch.sourceforge.net/mechanize/
HTH,
--
Miki <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
ad\n");
Py_Finalize();
return 1;
}
func = PyObject_GetAttrString(module, "pr");
args = PyTuple_New(1);
value = PyLong_FromLong(10);
PyTuple_SetItem(args, 0, value);
PyObject_CallObject(func, args);
Py_Finalize();
return 0;
}
HTH,
--
Miki <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
s done, start using some "continuous automation" tools
(like http://cruisecontrol.sourceforge.net/, http://buildbot.net/trac
and others).
HTH,
--
Miki <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
bels[label] = value.strip()
Another option is to use an external fast program (such as egrep):
from os import popen
labels = {}
for line in popen("egrep 'endtest|other_label' test.txt"):
label, value = line.strip().split()
labels[label] = value
HTH,
--
Miki <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com/
--
http://mail.python.org/mailman/listinfo/python-list
append("/path/to/my/modules")
Note that your script directory is automatically added to the path.
> Is there a lightweight Https Server I could run locally (WINXP), which
> would run .py scripts, without lots of installation modifications ?
http://lighttpd.net.
Make sure "mod_cgi" is uncommented, set your document root and set
right python interpreter in cgi.assign
HTH,
--
Miki <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
Hello Hugo,
> Is it possible to "automagically" coerce the named groups to python types?
> e.g.:
Not that I know of, however I use the following idiom:
match = my_regexp.find(some_string)
def t(name, convert=str):
return convert(match.group(name))
myint = t("field1
a GET method, just specify it using the form
METHOD="GET" attribute).
HTH.
--
Miki <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
Hello SamG,
> I do this on PowerPC..
>
> >>> import os
> >>> os.listdir('/usr/bin')
>
> And endup getting this ...
>
> OSError: [Error 5] Input/output error:/usr/bin
What happens when you run "ls /usr/bin" in the terminal?
HTH,
--
Mik
7;m not even
> sure if this is possible through Python. Any help?
Have a look at
http://www.myinterestingfiles.com/2007/03/playboy-germany-ads.html
for getting the data and at http://www.crummy.com/software/BeautifulSoup/
for handling it.
HTH.
--
Miki Tebeka <[EMAIL PROTECTED]>
http://py
elp the OP
> get data from a website...
Ouch, let there be a lesson to me to *read* my posts before sending
them :)
Should have been http://wwwsearch.sourceforge.net/mechanize/.
--
Miki (who can't paste) Tebeka
[EMAIL PROTECTED]
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
s" ?
http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-10.html#%_idx_590
HTH,
--
Miki <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
search for "k-Nearest Neighbors python", yielded
http://people.revoledu.com/kardi/tutorial/KNN/resources.html which
pointed to http://biopython.org/DIST/docs/api/public/Bio.kNN-module.html
HTH,
--
Miki <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
le-curses.html
Another solution is to ask the user to hit CTRL-C
from time import sleep
try:
while 1:
print "BEEP"
sleep(1)
except KeyboardInterrupt:
print "BYE BYE"
HTH,
--
Miki <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
s).
Same in Vim (:set spell)
HTH,
--
Miki <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
> and dateutil libraries in my program and I don't know how to make them
> visible to python_d.exe
> Am I using the right approach?
If you are the one compiling the called module, you can add `__asm int
3` somewhere in
the code. When this is reached, the windows debugger will pop up on
th
> steps.sort(key = lambda s: s.time)
This is why attrgetter in the operator module was invented.
from operator import attrgetter
...
steps.sort(key=attrgettr("time"))
HTH,
--
Miki <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
correct but looks the clearest to me
> def wished_first(x):
> try:
> return a(x)
> except:
> return b(x)
> except:
> return c(x)
> except:
> raise CantDoIt
Again, exception are for error handling, not for flow control.
As a side n
Hello Paulo,
> What's wrong with this way of subclassing?
> ...
See
http://sourceforge.net/tracker/index.php?func=detail&aid=1448640&group_id=5470&atid=105470
HTH,
--
Miki <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
un param1 (myfun2 param5 param8) param3
If you have
result = func1 func2 arg
is it
result = func1(func2, arg)
or
result = func1(func2(arg))
Miki <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
tuple(map(lambda x: 2 * x, im.size))
new = im.resize(new_size)
return new.tostring("gif", "P") # This is probably the problem,
have no idea
image_data = urlopen(url).read()
image_data = double(image_data)
code
However I don't get a valid GIF image.
An
Hello Ghirai,
> Are there any p2p chat/filetransfer frameworks/examples floating
> around?
http://divmod.org/projects/shtoom
HTH,
--
Miki <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
>def run(self):
> # -w 1 option to ping makes it timeout after 1 second
> pingcmd="/bin/ping -c 2 -q -i 0.3 -w 1 %s >/dev/null" % ip
Not sure, but "ip" should be "self.ip", this might cause the problem.
HTH,
--
Miki <[EMA
raise SystemExit" is what
you want.
If you want to enter the debugger, you can do:
from pdb import set_trace
...
set_trace() # Stop and execute debugger here.
...
HTH,
--
Miki
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
scraping (IMO).
from urllib import urlopen
from BeautifulSoup import BeautifulSoup
html = urlopen("http://www.python.org";).read()
soup = BeautifulSoup(html)
for link in soup("a"):
print link["href"], "-->", link.contents
HTH,
--
Miki
http://
def aggregate(lst):
items = {} # key -> values
for key, value in lst:
values = items.get(key)
if values:
if type(values) == list:
values.append(value)
else:
items[key] = [values, value]
else:
items[key] = value
return [list(pair) for pair in items.items()]
>>> aggregate(lst)
[['a', ['13', '3']], ['c', ['12', '15', '4']], ['b', '6'], ['e',
['11', '5', '16', '7']], ['d', '2']]
>>>
HTH,
--
Miki <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
Hello Carlos,
> I'm interested in printing out coloured lines of my application and
> I don't know what to use. Can anybody give me an idea??
I use the following script:
#!/usr/bin/env python
'''Print message using ANSI terminal codes'''
__auth
nd_line) and (fname ==
filename):
print "%s is from B" % name
HTH,
--
Miki Tebeka <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
gt; b = [0.2, 0.2, 0.2, 0.2, 0.1, 0.1]
>>> qa = [gmpy.mpq(int(i * 10), 10) for i in a]
>>> qb = [gmpy.mpq(int(i * 10), 10) for i in b]
>>> sum(qa)
mpq(1)
>>> sum(qb)
mpq(1)
>>> sum(qa) == sum(qb)
True
HTH,
--
Miki <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
Hello Anya,
See http://docs.python.org/lib/node597.html
IMO if you'll place the picture as 1'st MutliMime part the *some* email
readers will show it like you want.
HTH,
Miki
--
http://mail.python.org/mailman/listinfo/python-list
Hello llothar,
IIRC trac (http://www.edgewall.com/trac/) is pure python, have a web
server and support FCGI
HTH,
Miki
--
http://mail.python.org/mailman/listinfo/python-list
Hello Alex,
Not really an answer but if you use InnoSetup
(http://www.jrsoftware.org/) you can set file type association (see
http://www.jrsoftware.org/isfaq.php)
HTH,
Miki
--
http://mail.python.org/mailman/listinfo/python-list
Hello Zoidberg,
> How would one compile python with Visual Studio 2005?
By reading the section "Building on non-UNIX systems" in the README
file (hint: chceck out the "PC" directory)
Miki
http://pythonwise.blogspot.com/
--
http://mail.python.org/mailman/listinfo/python-list
Hello Jacky,
I found CherryPy + Cheeta a good solution.
See (shameless plug)
http://www.unixreview.com/documents/s=10075/ur0604h/
Miki
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
Job Title: Python Application Expert
Company: Logia (http://www.logiamobile.com)
Contact: Lior Rudnik ([EMAIL PROTECTED])
Job Description:
* Design & Development of our leading product's PC client
application
* Development in Python
Job Requirements:
* At least 4 years of experience
Hello Gary,
> (Pdb) p root.title
> >
> (Pdb) p root.title[Tk.wm_title]
Looks like "title" is a function, try "p root.title()"
HTH,
Miki
http://pythonwise.blogspot.com/
--
http://mail.python.org/mailman/listinfo/python-list
- see msnpy and other libraries
HTH,
Miki
http://pythonwise.blogspot.com/
--
http://mail.python.org/mailman/listinfo/python-list
Hello volcano,
http://pyunit.sourceforge.net/ has unittestgui.py (bit old though)
HTH,
Miki
http://pythonwise.blogspot.com/
--
http://mail.python.org/mailman/listinfo/python-list
Hello BigSmoke,
You can process one at a time in an "OnIdle" handler, this way you'll
work only when the application is doing nothing.
HTH,
Miki,
http://pythonwise.blogspot.com/
--
http://mail.python.org/mailman/listinfo/python-list
Hello Matthew,
You can try either http://docs.python.org/lib/module-shelve.html or any
other database bindings with blobs.
HTH,
Miki
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
tml', 'r') # file-like object
Open a file (like built-in "open") on remote site in read mode
> target = host.file('newdir/index.html', 'w') # file-like object
Open a file (like built-in "open") on remote site in write mode
> host.copyfile
Hello Tommy,
Use the subprocess module
(http://docs.python.org/lib/module-subprocess.html).
for app in MY_APPLICATION_LIST:
pipe = Popen(app)
pipe.wait()
HTH,
http://pythonwise.blogspot.com/
--
http://mail.python.org/mailman/listinfo/python-list
e:", self._last_name.GetValue()
print >> fo, "Work Status:",
self._work_status.GetStringSelection()
print >> fo, "Martial Status:",
self._martial_status.GetStringSelection()
fo.close()
HTH,
Miki
http://pythonwise.blogspot.com/
--
http://mail.python.org/mailman/listinfo/python-list
Hello Martin,
You can use gmpy (http://gmpy.sourceforge.net/)
def primes():
n = 2
while 1:
yield long(n)
n = gmpy.next_prime(n)
HTH,
Miki
http://pythonwise.blogspot.com/
--
http://mail.python.org/mailman/listinfo/python-list
Hello Eric,
> I'd appreciate any pointer on a simple way to tell within an event handler
> where the event came from.
def HandleSomething(self, event):
generating_control = event.GetEventObject()
print generating_control
HTH,
--
Miki Tebeka <[EMAIL PR
o
> "import", but not to the starting module named on the Python command
> line. Is that correct? Thanks.
http://docs.python.org/lib/module-imp.html
HTH,
--
Miki Tebeka <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
Posting code examples to blogger.com hosted blog is not fun (need to
remember alway escape < and >).
Is there any free blog hosting that is more "code friendly" (easy to
post code snippets and such)?
Thanks,
--
Miki <[EMAIL PROTECTED]>
http://pythonwise
ss up the first indentation in the
section :)
Thanks,
--
Miki <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
t; could do (foreach line in file, split by ":" and then do dictionary
> insert). Wondering, if some python built-in function can just read a
> valid dictionary-file and load it?
def load_as_dict(filename):
return eval("{" + open(filename).read() + "}")
Note that t
g time) with that data?
> The date is not important, just the local time.
> The format is not important, the easiest would probably be a tuple
> (h,m,s) .
http://labix.org/python-dateutil
HTH,
--
Miki <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
ne has an
> example that would help to shorten my learning curve.
Just have a look at the "scons" script:
import SCons.Script
SCons.Script.main()
Looks simple enough.
HTH,
--
Miki <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
--
> Ran 0 tests in 0.000s
>
> OK
> ---
IIRC unittest checks the __main__ module for tests to run. Once you
run python with "-m pdb" the __main__ module is pdb and not your
script.
HTH,
--
Miki <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
Hello Bernd,
> at the moment my program sends mail with smtplib. Is there a chance to
> sign and/or encode/cipher this mails with GnuPG?
> If yes, does anyone have some sample code?
Not exactly Python, but maybe http://codesorcery.net/old/mutt/mutt-gnupg-howto
might help.
HTH,
--
Mik
to start as the topmost window?
Thanks,
--
Miki <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
hout
the user clicking on the python launcher icon).
All the best,
--
Miki <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
ers don't run Python apps from the Terminal but
> instead double-click an application icon. In that event, "lift" should
> work fine, because the application will already have focus.
Thanks,
--
Miki <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
conify)
> root.mainloop()
>
> This was a trick that had to be done on Windows a few years back to force
> the main window to be created on top of this others. It deosn't seem to be
> needed anymore now, but maybe the trick can be used on a Mac... Don't know
> if th
read the client output and propagate it to the main loop (maybe using
Queue.Queue)
HTH,
--
Miki <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
they all
> communicate.
IMO you should start with twisted (http://twistedmatrix.com/trac/),
which simplifies socket programming very much.
HTH,
--
Miki <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
the shameless plug in http://pythonwise.blogspot.com/2008/03/ansiprint.html
HTH,
--
Miki <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
y better. Is there such
> a tool?
Have a look at http://docs.python.org/lib/module-distutils.html,
specially http://docs.python.org/dist/node13.html and
http://docs.python.org/inst/alt-install-windows.html
HTH,
--
Miki <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
ippet? error page? ...
My *guess* is that the web server don't know how to server the image
(wrong path configuration?)
HTH,
--
Miki <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
)
def change_size():
b["text"] = "More text"
b = tk.Button(root, text="Text", command=change_size)
b.pack()
root.mainloop()
You'll see that the button changes size to accommodate the new text.
HTH,
--
Miki <[EMAIL PROTECTED]>
http://pythonwi
t; data.
import re
for match in re.finditer("_([\w ]+):_(\d+)", text):
print match.groups()[0], match.groups()[1]
for match in re.finditer("Date: ([^=]+)=", text):
print match.groups()[0]
for match in re.finditer("(\w+): (\d+)", text):
print match.groups()[
?
Thanks,
--
Miki <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
ions?
Use ImageMagick (www.imagemagick.org), "identify -verbose "
should have the comments somewhere
in the output.
There also a python binding to ImageMagick but I have no experience
with it.
HTH,
--
Miki <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
bitrary resizing of the
> window, there's no real way to guarantee that the widgets will be
> visible at all times.
Thanks.
I've set a minimal size to the window. However when I resize it to be
shorter, the buttons are hidden while the top frame stays visible.
T
>
> (PS: I have no clue why google groups thinks it should put
> "gnu.gcc.help" on the from line)
Just zap the end and use time.strptime:
>>> s = '19-Aug-2007 07:38:43+216ms NZST'
>>> strptime(re.sub("\+\d{3}ms [A-Z]{4}", "", s), "
buttons frame first (using side=BOTTOM), it stays
visible at all times.
Thanks,
--
Miki <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
current directory is always looked first in when loading DLLs).
HTH,
--
Miki <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
Any thoughts or ideas that could help me get started? Thanks!
Apart from PIL, some other options are:
1. Most GUI frameworks (wxPython, PyQT, ...) give you a canvas object
you can draw on
2. A bit of an overkill, but you can use PyOpenGL
3. ImageMagick bindings? (http://www.imagemagick.org/script
installer: apt/deb, rpm, port, ...
On Windows you can use one of the free installer (InnoSetup and
friends).
HTH,
--
Miki <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 24, 8:17 am, [EMAIL PROTECTED] wrote:
> I'm looking for a cool trick using generators. Know any exercises I
> can work?
Simple one the comes to mind is flattening a list:
>>> list(flatten([1, [[2], 3], [[[4))
[1, 2, 3, 4]
>>>
HTH,
--
0 300
Chapter 3 (300-450 150)
Chapter 4 (450-500 50)
-- 300-450 250
Chapter 5 (500-600 100)
-- 500-600 100
Where the user can move the divider up and down to create new volume,
they can also add and delete dividers.
The program will not allow to drag the
before?
Nope, compiles out of the box for me on 7.1 (IIRC easy_install worked
for it as well).
> Any comment/suggestion is highly appreciated.
Do you have limits.h on your system?
Did you install the python2.5-dev package?
HTH,
--
Miki <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
("_mp_d", POINTER(c_uint)),
]
gmp = cdll.LoadLibrary("libgmp.so")
m = mpz()
gmp.__gmpz_init(byref(m))
gmp.__gmpz_set_ui(byref(m), 27)
gmp.__gmp_printf("m is %d\n", byref(m))
However, the output is:
m is -1210863888
Any ideas?
(gmp.h can bee view at http://t
t it should be quite straightforward, but
> I'm finding the code a bit opaque.
>
> Any suggestions?
>From a quick look at the code, you need to either hook to do_GET where
you have the URL (see the urlunparse line).
If you want the actual content of the page, you'll need t
= BeautifulSoup(html)
for div in soup("div", {"class" : "special"}):
...
Not sure how fast it is though.
There is also the htmllib module that comes with python, it might do
the work as well and maybe a bit faster.
If the file is valid HTML and you need some sp
stuff.
HTH,
--
Miki <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 521 matches
Mail list logo