Let me present my newborn project (in Python) ImSim:
http://sourceforge.net/projects/imsim/
Its README.txt:
-
ImSim is a python script for finding the most similar pic(s) to
a given one among a set/list/db of your pics.
The scrip
Hi All,
I am using python's reportlab to print some unicode Tamil characters
'பே'. I added necessary unicode font to reportlab. But It
prints the output as 'ேப' (in reverse order). This issue
happens for multi-byte characters, whereas for character 'ப' is
printed as it is.
I am struggling to fi
> I'm using python to do some log file analysis and I need to store
> on disk a very large dict with tuples of strings as keys and
> lists of strings and numbers as values.
I recommend that you'll use the shelve module. It stores data on disk and is
more memory efficient than in-memory pickle obje
> otasks = [
> ...
> print pool.map(f, tasks)
You are running the maps on "tasks" while the list of URLs is called otasks
(unless there's any error in the cut&paste).
HTH,
--
Miki
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 4, 2011, at 11:08 PM, Vincent Ren wrote:
> Hello, everyone, recently I am trying to learn python's
> multiprocessing, but
> I got confused as a beginner.
>
> If I run the code below:
>
> from multiprocessing import Pool
> import urllib2
> otasks = [
> 'http://www.php.net'
> 'http
Hello, everyone, recently I am trying to learn python's
multiprocessing, but
I got confused as a beginner.
If I run the code below:
from multiprocessing import Pool
import urllib2
otasks = [
'http://www.php.net'
'http://www.python.org'
'http://www.perl.org'
'http://www.gnu.org
Hey
Want to free hosting... This is for very short time.
Visithttp://www.balticwebhost.com/aff.php?aff=001
--
http://mail.python.org/mailman/listinfo/python-list
On 5 March 2011 02:14, MRAB wrote:
...
>> Any comments, suggestions?
>>
You obviously can't feed your computer pickles then.
How about a tasty tidbit of XML? Served up in a main dish of DOM, or
serially if preferred?
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 4, 5:07 pm, Corey Richardson wrote:
> On 03/04/2011 04:48 PM, ErichCart ErichCart wrote:
>
> > In fact this doesn't necessary need to be web application. For example
> > I have a friend who uses Delphi, and he can create all sorts of
> > windows applications easily, like he can see the wind
On Mar 4, 5:07 pm, Corey Richardson wrote:
> On 03/04/2011 04:48 PM, ErichCart ErichCart wrote:
>
> > In fact this doesn't necessary need to be web application. For example
> > I have a friend who uses Delphi, and he can create all sorts of
> > windows applications easily, like he can see the wind
On Mar 4, 5:07 pm, Corey Richardson wrote:
> On 03/04/2011 04:48 PM, ErichCart ErichCart wrote:
>
> > In fact this doesn't necessary need to be web application. For example
> > I have a friend who uses Delphi, and he can create all sorts of
> > windows applications easily, like he can see the wind
On 3/4/2011 16:48, ErichCart ErichCart wrote:
In fact this doesn't necessary need to be web application. For example
I have a friend who uses Delphi, and he can create all sorts of
windows applications easily, like he can see the window on the screen
and he can place buttons, text fields, radio
On 05/03/2011 01:56, Bob Fnord wrote:
I'm using python to do some log file analysis and I need to store
on disk a very large dict with tuples of strings as keys and
lists of strings and numbers as values.
I started by using cPickle to save the instance of the class that
contained this dict, but
ErichCart ErichCart writes:
> By real-time, I mean that I want it to be similar to the way instant
> online chess works. Something like here: instantchess.com, but for
> RISK.
If you want to do that in a web browser, the main technique for it is
called AJAX and you'd write your application in Jav
I'm using python to do some log file analysis and I need to store
on disk a very large dict with tuples of strings as keys and
lists of strings and numbers as values.
I started by using cPickle to save the instance of the class that
contained this dict, but the pickling process started to write
th
Actually, I import numpy in my code for array creation...in the
documentation I did not manage to find anything that would solve this
precision problem I mentioned however. If you're familiar with it, would you
happen to know what capability of numpy might solve my problem?
On Fri, Mar 4, 2011 a
On Fri, Mar 4, 2011 at 5:26 PM, MRAB wrote:
>> UnsupportedOperation: can't do non-zero end-relative seeks
>>
>> But offset is initialized to -10. Does anyone have any thoughts on
>> what the error might be caused by?
>>
> I think it's because the file has been opened in text mode, so there's
> the
On 04/03/2011 21:46, tkp...@hotmail.com wrote:
I've implementing this method of reading a file from the end, i.e
def seeker(filename):
offset = -10
with open(filename) as f:
while True:
f.seek(offset, os.SEEK_END)
lines = f.readlines()
if
On 3/4/11 4:32 PM, Jon Herman wrote:
Hello all,
I am new to the Python language and writing a Runge-Kutta-Fellberg 7(8)
integrator in Python, which requires an extreme numerical precision for my
particular application. Unfortunately, I can not seem to attain it.
The interesting part is if I take
On 3/4/11 5:49 PM, Santoso Wijaya wrote:
Have you taken a look at numpy? [1] It was written for exactly this kind of
usage.
~/santa
[1] http://numpy.scipy.org/
While numpy does provide arrays much like MATLAB's, it won't help at all for the
precision issues the OP is encountering (and hones
Have you taken a look at numpy? [1] It was written for exactly this kind of
usage.
~/santa
[1] http://numpy.scipy.org/
On Fri, Mar 4, 2011 at 2:32 PM, Jon Herman wrote:
> Hello all,
>
> I am new to the Python language and writing a Runge-Kutta-Fellberg 7(8)
> integrator in Python, which requi
Hello all,
I am new to the Python language and writing a Runge-Kutta-Fellberg 7(8)
integrator in Python, which requires an extreme numerical precision for my
particular application. Unfortunately, I can not seem to attain it.
The interesting part is if I take my exact code and translate it to Matl
In <1b0d04db-c45d-481d-b19e-03ba2d2a5...@p16g2000vbo.googlegroups.com>
ErichCart ErichCart writes:
> By real-time, I mean that I want it to be similar to the way instant
> online chess works. Something like here: instantchess.com, but for
> RISK.
That site appears to require a monthly fee, so i
On 03/04/2011 04:48 PM, ErichCart ErichCart wrote:
> In fact this doesn't necessary need to be web application. For example
> I have a friend who uses Delphi, and he can create all sorts of
> windows applications easily, like he can see the window on the screen
> and he can place buttons, text fiel
GUI application is a whole other matter entirely. For that, you might want
to look into cross-platform GUI toolkits with Python bindings. E.g., PyQT
[1], wxPython [2], TkInter [3], etc. Python, after all, is just a
cross-platform language. To do all those user-friendly bells and whistles,
you'd nee
check the link below. (you can read online or get a pdf)
http://www.swaroopch.com/notes/Python
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 4, 9:30 pm, John Machin wrote:
> Your data has been FUABARred (the first A being for Almost) -- the
> "\u3c00" and "\u3e00" were once "<" and ">" respectively. You will
Hi John,
I realized that a few minutes after posting. I then realized that
I could just extract the text between th
Still need the answer to the question: " howto embed given python file
(which contains python class and its members) into the c++
application ? "
I have to pass the arguments from c++ to python and back so I need to
do conversions. They are ok. Fails PyImport_Import(my_module) call
saying "No modu
By real-time, I mean that I want it to be similar to the way instant
online chess works. Something like here: instantchess.com, but for
RISK.
I thought about making such an application, and now that I want to
practice python I thought that perhaps it can be done with python.
Now after your answers
I've implementing this method of reading a file from the end, i.e
def seeker(filename):
offset = -10
with open(filename) as f:
while True:
f.seek(offset, os.SEEK_END)
lines = f.readlines()
if len(lines) >= 2:
return lines[-1]
>
> Declaring the *type* of such variables is a different matter I think (and
> probably is not considered 'pythonic'; certainly it's a crude, if effective,
> way of getting extra performance).
I concur. Especially given performance is not a primary goal of Python to
begin with, and--if such a bo
"Steven D'Aprano" wrote in message
news:4d6f26a5$0$30003$c3e8da3$54964...@news.astraweb.com...
On Wed, 02 Mar 2011 19:45:16 -0800, Yingjie Lan wrote:
Hi everyone,
Variables in Python are resolved dynamically at runtime, which comes at
a performance cost. However, a lot of times we don't nee
In <67a0332e-aa25-4bc6-a0b5-0f68f597b...@y14g2000vbb.googlegroups.com>
ErichCart ErichCart writes:
> It is just that I want to better my python skills by doing this.
> I have heard about Django, can't this be done with Django?
Django does help with web content, but it doesn't (as far as I know
On 03/04/2011 03:34 PM, ErichCart ErichCart wrote:
> It is just that I want to better my python skills by doing this.
>
> I have heard about Django, can't this be done with Django?
As you described it? Absolutely not [1]. When thinking of Django, think
more of Ruby on Rails or something vaguely a
Django is excellent as a CMS builder (think blogs, articles websites),
though it has many uses beyond that, as well. If, ultimately, you want
client-side interactivity, however, you'd have to look into (perhaps in
addition to Python--it can provide some of the backend logic for the website
you want
It is just that I want to better my python skills by doing this.
I have heard about Django, can't this be done with Django?
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 5, 6:53 am, JT wrote:
> Yo,
>
> So I have almost convinced a small program to do what I want it to
> do. One thing remains (at least, one thing I know of at the moment):
> I am converting xml to some other format, and there are strings in the
> xml like this.
>
> The python:
>
> elif v ==
On 03/04/2011 03:08 PM, ErichCart ErichCart wrote:
> I am currently a Computer Science student, I can write in pascal, C,
> and Java, and recently I learned about Python and fell in love with
> it. I watched some python programming tutorials on youtube, and now I
> can write some programs.
> But wh
First, learn the language. Second, browse a multitude of popular web
frameworks written in Python, and try your hands on a few of them. I'd
suggest looking into django, pyramid, webpy, ... (others will fill in).
~/santa
On Fri, Mar 4, 2011 at 12:08 PM, ErichCart ErichCart wrote:
> I am currentl
I am currently a Computer Science student, I can write in pascal, C,
and Java, and recently I learned about Python and fell in love with
it. I watched some python programming tutorials on youtube, and now I
can write some programs.
But what I really want to do is to make a website where people can
On Mar 4, 12:49 pm, Ignoramus20691 wrote:
> I bought a "Hello World!" book for my 9 year old son. The book teached
> "programming for kids" and it does it in Python.
>
> I do not know any Python, but I am very comfortable with C++ and perl.
> I wrote a little over 100k lines of perl.
>
> I want to
Yo,
So I have almost convinced a small program to do what I want it to
do. One thing remains (at least, one thing I know of at the moment):
I am converting xml to some other format, and there are strings in the
xml like this.
The python:
elif v == "content":
print "content", a.
In article <20110304161955.LI5T1.94538.root@cdptpa-web16-z02>,
wrote:
> Is anyone here using the Python XMP Toolkit? I'm trying to install
> this and having problems.
>
> First, I tried installing Exempi. The website says to do the following:
> ./configure
> make
> sudo make install
>
> but
if you could define extension to be a tuple, you could use it this way,
which is a little simpler:
extensions = ('hdf5',) #works
files =
('MOD03.A2010002.1810.005.2010258062733.hdf','MOD03.A2010002.1950.005.2010258063105.hdf','MOD03.A2010002.1950.005.2010258063105.hdf5')
for filename in files:
Using simple words: I have mymodule.py file and c++ application.
mymodule.py file contains two classes A and B. A class is a custom data
type. B class contains functions putJSON, getJSON which I want to run from
within C++ code. These functions are members of class B. So I need to import
mymodule.p
I bought a "Hello World!" book for my 9 year old son. The book teached
"programming for kids" and it does it in Python.
I do not know any Python, but I am very comfortable with C++ and perl.
I wrote a little over 100k lines of perl.
I want to learn Python quickly to help him with his studies/fun
Extending an embedded Python is not that much different than extending
Python proper. There's even this section [1] in that documentation,
conveniently titled, "Extending Embedded Python."
~/santa
[1]
http://docs.python.org/extending/embedding.html#extending-embedded-python
On Fri, Mar 4, 2011 a
The problem is "how to write python module under SWIG for C++
application"
Nor SWIG documentation neither embeding python documentation does not
answer to this.
If you can help, please, share your idea.
Arthur
--
http://mail.python.org/mailman/listinfo/python-list
Yes, I did. Here the link
http://docs.python.org/extending/extending.html#providing-a-c-api-for-an-extension-module
It does not cover .py file embeding. So it is not my case.
On Fri, Mar 4, 2011 at 7:03 PM, Santoso Wijaya wrote:
> Have you read the doc [1] on extending/embedding Python?
>
> ~/sa
Is anyone here using the Python XMP Toolkit? I'm trying to install
this and having problems.
First, I tried installing Exempi. The website says to do the following:
./configure
make
sudo make install
but for Mac OS X they say to do one of these (I'm installing it on Leopard
and hopefully Snow
Have you read the doc [1] on extending/embedding Python?
~/santa
[1] http://docs.python.org/extending/
On Fri, Mar 4, 2011 at 8:27 AM, Arthur Mc Coy <1984docmc...@gmail.com>wrote:
> Hi all,
>
>
> I have a C++ application. I have a .cpp file which is not a main
> program, but a class where I wan
On Mar 4, 7:32 am, "Frank Millman" wrote:
> Hi all
>
> I want to create a cookie containing a session id. In python 2.6 I had the
> following -
>
> from __future__ import unicode_literals
> session_id = b64encode(urandom(20))
> response_headers.append(
> (b'Set-Cookie', b'sid="{0}"'.format(ses
Hi all,
I have a C++ application. I have a .cpp file which is not a main
program, but a class where I want to call python script
(doSomething.py file).
I'm using embed python like in a tutorial here:
http://www.codeproject.com/KB/cpp/embedpython_1.aspx
But the tutorial is bad. It does not expla
Hi,
thanks guys. This is it. The following code will match both hdf and hdf5
for reasons explained in the email from Ethan.
extensions = 'hdf5' #doesn't work
files =
('MOD03.A2010002.1810.005.2010258062733.hdf','MOD03.A2010002.1950.005.2010258063105.hdf','MOD03.A2010002.1950.005.2010258063105.hdf
On 3/4/2011 10:24 AM, Daniel Mahoney wrote:
On Thu, 03 Mar 2011 22:24:24 -0500, Steven W. Orr wrote:
I look everywhere but I couldn't find anything. Could someone please
point me to a small example program that does an import rpm, takes an
rpm file as an argument and gets the list of files cont
On Fri, Mar 4, 2011 at 2:57 AM, Godson Gera wrote:
> You can use PyAMF http://pyamf.org
>
Thanks!
Beno
--
http://mail.python.org/mailman/listinfo/python-list
On Thursday 03 March 2011, 10:40:20 Gelonida wrote:
> Hi,
>
> I have a QWebview application, which segfaults rather often,
> but not all the time.
>
> I assume it is some kind of race condition when loading a certain web
> page with quite some built in AJax.
>
[...]
>
> The application crashes unde
On Fri, 04 Mar 2011 09:24:26 -0600, Daniel Mahoney wrote:
> On Thu, 03 Mar 2011 22:24:24 -0500, Steven W. Orr wrote:
>
>> I look everywhere but I couldn't find anything. Could someone please
>> point me to a small example program that does an import rpm, takes an
>> rpm file as an argument and ge
On Thu, 03 Mar 2011 22:24:24 -0500, Steven W. Orr wrote:
> I look everywhere but I couldn't find anything. Could someone please
> point me to a small example program that does an import rpm, takes an
> rpm file as an argument and gets the list of files contained in the
> file, the same as if I had
"Chris Rebert" wrote in message
news:mailman.596.1299215244.1189.python-l...@python.org...
On Thu, Mar 3, 2011 at 9:05 PM, Dan Stromberg wrote:
On Thu, Mar 3, 2011 at 8:48 PM, Chris Rebert wrote:
On Thu, Mar 3, 2011 at 8:41 PM, monkeys paw wrote:
> Does python have an analogy to c/perl i
On Fri, Mar 4, 2011 at 12:47 PM, loopzhong001 wrote:
> Dear All,
> Would anyone tell me haow to start?
Well, to start on this mailing list - 1) Name the networking
framework/modules you want to use (if you have one, else say "can
someone suggest a networking framework/module?") 2) Say what y
On 03/03/11 23:39, Matt Funk wrote:
> Hi,
> i have a list of files, some of which end with .hdf and one of them end
> with hdf5. I want to filter the hdf5 file. Thereforei set extensions: hdf5
> I try to filter as below:
> if (any(filename.endswith(x) for x in extensions)):
>
> The problem is that
Good day people,
So I have python file which can handle json data to put and get back
it from a file say objects.json. Great.
Now I want to run this code from within C++ application. I used swig
to wrap the C++ class, which wants to call python code. It works fine,
because when I import native p
On 4 Mar, 14:54, Aldo Ceccarelli wrote:
> Hello All,
> I will need to write a manager for acquiring barcodes from a USB
> reader with
>
> PyUSB 1.0 http://pyusb.sourceforge.neton libusbhttp://www.libusb.org/
>
> but unfortunately I have no USB protocol background at the moment. Is
> there any PyU
Hello All,
I will need to write a manager for acquiring barcodes from a USB
reader with
PyUSB 1.0 http://pyusb.sourceforge.net on libusb http://www.libusb.org/
but unfortunately I have no USB protocol background at the moment. Is
there any PyUSB 1.0 reporistory of examples to learn? Thank you Al
On 3/3/2011 11:11 PM, geremy condra wrote:
On Thu, Mar 3, 2011 at 7:24 PM, Steven W. Orr wrote:
I look everywhere but I couldn't find anything. Could someone please point
me to a small example program that does an import rpm, takes an rpm file as
an argument and gets the list of files contained
Dear All,
Would anyone tell me haow to start?
loopzhong
--
http://mail.python.org/mailman/listinfo/python-list
Hi all
I want to create a cookie containing a session id. In python 2.6 I had the
following -
from __future__ import unicode_literals
session_id = b64encode(urandom(20))
response_headers.append(
(b'Set-Cookie', b'sid="{0}"'.format(session_id)))
After upgrading to 3.2, the above lines gener
On February 28 2011 Rafael Durán Castañeda wrote
I'm stil totally stuck with relative imports, i' ve tried the example tree
from PEP 328 without any result:
package/
__init__.py
subpackage1/
__init__.py
moduleX.py
moduleY.py
subpackage2/
__init__.py
On 3/4/2011 12:07 AM, Chris Rebert wrote:
On Thu, Mar 3, 2011 at 9:05 PM, Dan Stromberg wrote:
On Thu, Mar 3, 2011 at 8:48 PM, Chris Rebert wrote:
On Thu, Mar 3, 2011 at 8:41 PM, monkeys paw wrote:
Does python have an analogy to c/perl incrementer?
e.g.
i = 0
i++
i += 1
If you're doing
Matt Funk wrote:
Hi Grant,
first of all sorry for the many typos in my previous email.
To clarify, I have a python list full of file names called 'files'.
Every single filename has extension='.hdf' except for one file which has
an '.hdf5' extension. When i do (and yes, this is pasted):
f
Ethan Furman wrote:
> What is extensions? A string or a tuple? I'm guessing a string,
> because then you're looking at:
>
> --> filename.endswith(x) for x in 'hdf5'
>
> which is the same as
>
> --> filename.endswith('h') or filename.endswith('d') or
> filename.endswith('f') or filename.end
http://www.etoro.com/B520_A26094_TClick.aspx
--
http://mail.python.org/mailman/listinfo/python-list
http://www.bigextracash.com/aft/3e8b26c3.html
--
http://mail.python.org/mailman/listinfo/python-list
http://bigcash.zipnadazilch.com/index.php?referral=87081
--
http://mail.python.org/mailman/listinfo/python-list
http://www.surftrafficexchange.com/?refid=5979
--
http://mail.python.org/mailman/listinfo/python-list
dude wrote:
>>> f = foo("wow")
...
>>> However, I always get the "module not callable" error.
...
> That was the problem. I was using:
> import ohYeah
To get that error, I think you must have been importing
a module named "foo" as well. Or you would have gotten
a NameError instead.
--
Tom Zych
Hi,
First, sorry for sending an HTML message to the list, this was not
intended.
I now found out that http://docs.python.org/release/2.6.6/license.html
does actually explain which part of the software is covered by which
part of the license, but contains a different subset of licenses than
the LI
Hi, Terry,
Von: Terry Reedy
> Your interpretation seems reasonable, but only a paid lawyer (or
ultimately a judge) can 'confirm' a legal interpretation. Sorry, we
programmers generally hate the system.
I also am a programmer, and not a lawyer.
And our paid lawyer cannot look into the code (where
This applies to debugging a spinning Zope server, but I think you can adapt
the suggestions to your core dump:
http://www.upfrontsystems.co.za/Members/jean/zope-notes/debug-spinning-zope
Regards
Marco
On Thu, Mar 3, 2011 at 10:40 AM, Gelonida wrote:
> Hi,
>
> I have a QWebview application, whi
80 matches
Mail list logo