Re: How would one scrap property listing website like this?

2022-09-23 Thread Leo
On Thu, 22 Sep 2022 09:36:47 -0700 (PDT), tripd...@gmail.com wrote: > https://nigeriapropertycentre.com/ > Has anyone scrap something like this before? > probably i should try power bi first to see if it can? You can try something like this. import urllib.request from bs4 import BeautifulSoup U

Re: mapLast, mapFirst, and just general iterator questions

2022-06-20 Thread Leo
l2.append(l1.pop()) print(len(l1), len(l2)) main() ``` -- Leo -- https://mail.python.org/mailman/listinfo/python-list

Algorithm of ordering in Python using recursion

2017-09-13 Thread Leo
Can anyone help me find the error of this implementation in Python what am I doing with this TBiS algorithm? Algorithm: Function b = TBiSort(a, n, k, dir) if n == 1 then b = a; else h1 = TBiSort(a(1:n/2), n/2, k, dir); h2 = TBiSort(a(n/2+1:n),n/2,k, -dir); b = TB

Re: Just starting to learn Python, and encounter a problem

2016-07-22 Thread Zagyen Leo
I got it! Thank you. Hope in one day I could help other newbies as you do. -- https://mail.python.org/mailman/listinfo/python-list

Just starting to learn Python, and encounter a problem

2016-07-22 Thread Zagyen Leo
yeah, it may be quite simple to you experts, but hard to me. In one of exercises from the Tutorial it said: "Write a program that asks the user their name, if they enter your name say "That is a nice name", if they enter "John Cleese" or "Michael Palin", tell them how you feel about them ;), ot

Learn Python + Swift 3 by creating a comprehensive system with web app and iOS app

2016-07-05 Thread Leo Trieu
. In case you're interested and want to learn more, check it out here: http://kck.st/29NjAtR Feel free to comment here with any questions. Leo -- https://mail.python.org/mailman/listinfo/python-list

Fwd: Re: Error 0*80070570

2016-04-21 Thread Allan Leo
I need help with this setup error. -- Forwarded message -- From: "Allan Leo" Date: Apr 21, 2016 10:06 AM Subject: Re: Error 0*80070570 To: Cc: When running the setup for your 3.5.1(32-bit version), the setup experiences error 0*80070570 and tells me to check the log

Re: Error 0*80070570

2016-04-21 Thread Allan Leo
When running the setup for your 3.5.1(32-bit version), the setup experiences error 0*80070570 and tells me to check the log file. What could be the problem and whats the solution. On Apr 21, 2016 7:05 AM, "Allan Leo" wrote: > When running the setup for your 3.5.1(32-bit versi

Re: Vaga Java (Belgica, com tudo pago)

2015-08-13 Thread leo kirotawa
Wondering why a position for Java/JS was sent to this list...just wondering... On Thu, Aug 13, 2015 at 11:59 AM, wrote: > https://walljobs.typeform.com/to/uWpUqj > > We seek a software developer with experience in web application development. > > Should you have the passion to work in the start-

Re: AttributeError

2015-08-11 Thread leo kirotawa
assign using () creates tuple not a list. Tuples have not .sort() method. correct would be: ncount = [key,val] On Tue, Aug 11, 2015 at 9:01 PM, Ltc Hotspot wrote: > Hi Everyone, > > > What is the list equivalent to line 12: ncount.sort(reverse=True) > > > count = dict() > fname = raw_input("Enter

GDAL Installation in Enthought Python Distribution

2015-02-25 Thread Leo Kris Palao
Hi Python Users, Would like to request how to install GDAL in my Enthought Python Distribution (64-bit). I am having some problems making GDAL work. Or can you point me into a blog that describes how to set up GDAL in Enthought Python Distribution. Thanks for any help. -Leo -- https

Configuring problems with GDAL in enthought Python Canopy

2015-02-25 Thread Leo Kris Palao
installation is located in: C:\Users\lpalao\AppData\Local\Enthought\Canopy\User\Scripts\python.exe Thanks in advance for the help. -Leo -- https://mail.python.org/mailman/listinfo/python-list

Random forest and svm for remote sensing in python

2015-02-12 Thread Leo Kris Palao
using random forest and support vector machine algorithms. Thanks, -Leo -- https://mail.python.org/mailman/listinfo/python-list

Re: GDAL installation

2015-02-11 Thread Leo Kris Palao
Hi Asim, thanks for your help. It is working properly now. Thanks, -Leo On Wed, Feb 11, 2015 at 4:48 PM, Asim Jalis wrote: > Hi Leo, > > This might be a PATH issue. > > See this discussion for details. > > > https://pythongisandstuff.wordpress.com/2011/07/07/installing

GDAL installation

2015-02-10 Thread Leo Kris Palao
er > _mod = imp.load_module('_gdal', fp, pathname, description) > ImportError: DLL load failed: The specified module could not be found. > >>> Thanks in advance, -Leo -- https://mail.python.org/mailman/listinfo/python-list

Re: meaning of: line, =

2015-02-04 Thread leo kirotawa
You'll find some explanation here: http://stackoverflow.com/questions/1708292/meaning-of-using-commas-and-underscores-with-python-assignment-operator On Wed, Feb 4, 2015 at 12:08 PM, ast wrote: > hello > > I dont understand why there is a comma just after line in the following > command: > > line

Re: Getting a list of all modules

2014-07-30 Thread Leo Jay
understanding of cross- > platform issues, fails to include built-in modules that don't live in the > file system, and probably more). > > Is this problem already solved? Can anyone make any suggestions? > > > > -- > Steven > -- > https://mail.python.org/mailman/listinfo/python-list -- Best Regards, Leo Jay -- https://mail.python.org/mailman/listinfo/python-list

Re: Distributing python applications as a zip file

2014-07-23 Thread Leo Jay
as a single file that users can just copy and run. > But if you use windows and you happen to use multiprocessing, please be aware of this bug I encountered several years ago. https://mail.python.org/pipermail/python-dev/2011-December/115071.html -- Best Regards, Leo Jay -- https://mail.python.org/mailman/listinfo/python-list

Re: First time I looked at Python was(...)

2014-06-10 Thread leo kirotawa
Gzz, Guys I'm from Brazil too, and I'm ashamed for this troll. And sorry by his terrible taste in music. Wondering now about moderation , have we one? []'s On Tue, Jun 10, 2014 at 5:07 PM, Carlos Anselmo Dias wrote: > > > Terry Jan Reedy ... > > https://www.youtube.com/watch?v=HbGHq2aUXDU (yhis

Python Requests script to login to a phpbb forum

2014-02-19 Thread Leo
Hi there, I have decided to jump in at the deep end to try and learn python. I have been able to get requests to pull the login page off the server and I think send the login request. I don't get logged in though. Please let me know if I would be better off asking in a phpBB related group or

Re: word replacing in a paragraph

2014-01-06 Thread leo kirotawa
Since it is for a template you can round the keyword to be replaced , something like $data$ and then just string.replace('$data','1234') On Mon, Jan 6, 2014 at 12:01 PM, Frank Cui wrote: > Hey guys, > > I'm trying to automate a process by initially creating a standard template > and then rep

Re: file handling issues

2013-09-06 Thread Leo Carnovale
On Saturday, 7 September 2013 13:58:43 UTC+10, Michael Torrie wrote: > On 09/06/2013 09:05 PM, Leo Carnovale wrote: > > > Ah and one other thing! What is this crypto algorithm you speak of? I > > > desperately need some sort of encryption as at the moment anyone can >

Re: file handling issues

2013-09-06 Thread Leo Carnovale
On Saturday, 7 September 2013 13:03:14 UTC+10, Leo Carnovale wrote: > On Saturday, 7 September 2013 02:17:03 UTC+10, Piet van Oostrum wrote: > > > leo.carnov...@gmail.com writes: > > > > > > > > > > > > > I am making this litt

Re: file handling issues

2013-09-06 Thread Leo Carnovale
ch? > > > > -- > > Piet van Oostrum > > WWW: http://pietvanoostrum.com/ > > PGP key: [8DAE142BE17999C4] Yes the code is a mess, I have been tempted to re write the whole thing... The reason for the messiness is firstly because I am relatively new to programming and because this is the result of me tinkering around with previous code, which was still messy, but cleaner than this. So the open("key","w") clears the file straight away? That helps a lot, thanks, this will definitely save me a lot of time in the future. Also the user doesn't guess the pass, I would give it to them. After they enter it, they go on to the guessing game (not shown in the code). Thanks for the help! Leo -- https://mail.python.org/mailman/listinfo/python-list

Re: file handling issues

2013-09-06 Thread leo . carnovale
k if it fits the key and go on if so > > >If not, ask for a new one, check it, go on if its correct. > > > > Every time I run it, it says the key is 0!? > > I can not for the life of me figure out what it is doing. > > > > The code: > > <

file handling issues

2013-09-06 Thread leo . carnovale
f me figure out what it is doing. The code: <https://docs.google.com/document/d/1_Qo4bgmNhRer3fAt3EAtPNSei4N2q58f_q4_9r6OHbw/edit?usp=sharing> Thanks Leo -- https://mail.python.org/mailman/listinfo/python-list

Re: Question on for loop

2013-03-04 Thread leo kirotawa
In fact this code is already doing what you want, but if the second character, by example, is not in secrectWord it'll jump out of the for and return. If you want that interact through the all characters and maybe count how many them are in the secrectWord, just take of the return there or do some

Re: Data Tree urgent help!!!!!!

2013-02-20 Thread Leo Breebaart
there any reason why you introduced the Name class? In Python 2.7 this works equally well if I just do: >>> apple, pear, dog, cat, fork, spoon = map(str, "apple pear dog cat fork >>> spoon".split()) So I was wondering why you used Name. -- Leo Breebaart -- http://mail.python.org/mailman/listinfo/python-list

Re: [ANN] IPython 0.13 is officially out!

2012-07-01 Thread Leo
On 2012-07-01 01:55 +0800, Fernando Perez wrote: > - ~6 months of work. > - 373 pull requests merged. > - 742 issues closed (non-pull requests). > - contributions from 62 authors. > - 1760 commits. > - a diff of 114226 lines. Thank you for the hard work. Leo -- http://mail.

Re: webbrowser.open always opens up Safari on Lion

2012-02-25 Thread Leo
; open file://localhost/nonexistingfile > and > open http://www.python.org/ > > Do they both open Chome for you? The first one prints: The file /nonexistingfile does not exist. No browser is opened. The second one opened Chrome. Leo -- http://mail.python.org/mailman/listinfo/python-list

Re: webbrowser.open always opens up Safari on Lion

2012-02-25 Thread Leo
you have the default browser set to Chrome, it still opens up Safari. Leo -- http://mail.python.org/mailman/listinfo/python-list

webbrowser.open always opens up Safari on Lion

2012-02-25 Thread Leo
Hello, On Lion and with its stock python version 2.7.1 r271:86832, webbrowser.open('file://localhost/nonexistingfile') always opens up Safari. Is this a bug? Leo -- http://mail.python.org/mailman/listinfo/python-list

Cannot use multiprocessing and zip together on windows

2011-12-11 Thread Leo Jay
ta) File "C:\python27\lib\multiprocessing\forking.py", line 454, in prepare assert main_name not in sys.modules, main_name AssertionError: __main__ It seems that the situation described here is similar: http://bugs.python.org/issue10128 But the patch doesn't work for me.

Re: Convert '165.0' to int

2011-07-21 Thread Leo Jay
s of them!) ? I > know I can write a function to do this, but is there anything built-in? > > Thanks > > Frank Millman > How about int(x[:-2])? -- Best Regards, Leo Jay -- http://mail.python.org/mailman/listinfo/python-list

How do you find out what's happening in a process?

2010-11-28 Thread Leo Jay
Hi all, I'd like to know how do you guys find out what's happening in your code if the process seems not work. In java, I will use jstack to check stacks of threads and lock status. But I don't know how to do it in python. -- Best Regards, Leo Jay -- http://mail.python.org/m

Re: What does this PyChecker warning mean?

2010-06-01 Thread Leo Breebaart
pylint on it before doing anything else, just to see what comes up. As far as I can tell the sole reason for that code being structured the way it is, is to provide a kind of module-within-a-module and not clutter up the outer module with these helper classes needed only by the foo() function. -- L

What does this PyChecker warning mean?

2010-06-01 Thread Leo Breebaart
meant by this warning. In fact, it simply seems wrong -- but I have learned not to jump to that conclusion too quickly, so I was hoping someone here could perhaps enlighten me... Many thanks in advance, -- Leo Breebaart -- http://mail.python.org/mailman/listinfo/python-list

Why the inconsistent of those two base64 methods?

2010-05-11 Thread Leo Jay
ult of 'aaa'.encode('base64') has a '\n' at the end, but the other method doesn't. Why the inconsistent? Thanks. -- Best Regards, Leo Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows installer of Python

2010-04-14 Thread Leo Jay
gt; dont know how to catch them. >> > The files and subfolders of Python are all installed into a single > folder, for example C:\Python26, and none into the system folder or > other places, if you are worried about that. > I don't think so. At least, the pythonXX.d

Re: python shell crashing on paste

2010-03-01 Thread Leo
Thanks for responding Michel. It looks like its an issue with pyreadline - http://ipython.scipy.org/moin/PyReadline/Intro - causing the crash. I'm working with the author of it on trying to get the issue figured out. It's not related to UAC. -- --Leo On Feb 23, 10:41 pm, "Miche

python shell crashing on paste

2010-02-23 Thread Leo
b97766 Faulting application path: C:\Windows\system32\conhost.exe Faulting module path: C:\Windows\system32\conhost.exe Report Id: 9c6afd6c-20d7-11df-bbd8-e390d387a902 Has anyone else seen anything like this? Any suggestions on how to even start figuring this out? --Leo -- http://mail.python.org/mailman/

Re: Using class attributes

2010-02-18 Thread Leo Breebaart
evaluation and caching solution now -- I never really had a big problem with that. My thanks again to all of you for helping me out with this. -- Leo Breebaart -- http://mail.python.org/mailman/listinfo/python-list

Re: Using class attributes

2010-02-18 Thread Leo Breebaart
x27;d doubt it). But it's certainly been educational to learn about these techniques. One observation: if I implement the descriptor solution as given above, the code works perfectly, but running the code through pychecker now causes an error, because that again causes an attempt to read from the non-existant base class template file "Foo.tmpl"... -- Leo Breebaart -- http://mail.python.org/mailman/listinfo/python-list

Re: Using class attributes

2010-02-16 Thread Leo Breebaart
Chris Rebert writes: > On Mon, Feb 15, 2010 at 10:29 AM, Leo Breebaart wrote: > > > I have a base class Foo with a number of derived classes FooA, > > FooB, FooC, etc. Each of these derived classes needs to read > > (upon initialisation) text from an associated tem

Using class attributes

2010-02-15 Thread Leo Breebaart
_body, etc.) I can of course always just hardcode the template filenames in each derived class, but I am just curious if it can be automated through some form of introspection. -- Leo Breebaart -- http://mail.python.org/mailman/listinfo/python-list

ask a question about the module

2009-11-11 Thread leo zhao
when I run a program, it list the hint: Could not import module "Gnuplot" - it is not installed on your system. You need to install the Gnuplot.py package. \easyviz\gnuplot_.py(41) : Traceback (most recent call last): File "E:\study\python\commodity modle 10.23.py", line 3, in import mult

ask help for a proble with invalid syntax

2009-10-13 Thread leo zhao
I try to a run a python numpy programe, however the python can't run this program. my python version is 2.6.2 , numpy version is 1.3.0, however, the program can run in previous numpy version(1.2.0), who can help me to solve the problem, I will deeply appreciate! the program is below: import sy

Can python do something like the onclick events in javascript ?

2009-08-03 Thread Leo Brugud
I'm trying to use python to build a simple web page that make use of the onclick behavior, instead of requiring users to click the 'submit' button. I realize in javascript there are onclick, onchange events. Is python capable of doing the same? Thanks in Advance -- http://mail.python.org/mailman

Python 3 xmlrpc client HTTPS problem

2009-07-16 Thread Leo List
I have just built and installed version 3.1 and all's good, but when I try to connect to a server via HTTPS I get the following: File "/usr/local/lib/python3.1/xmlrpc/client.py", line 1029, in __call__ return self.__send(self.__name, args) File "/usr/local/lib/python3.1/xmlrpc/client.py",

dynamically associate radio buttons with droplists

2009-06-19 Thread Leo Brugud
Hi Folks, Not being very familiar with python, nor with cgi/http, I intend to have 3 of buttons in a webpage, each of them is associate with a file (so I have 3 files, too) What I would like to have is, when users choose a button, the droplist update automatically to load the contents of the ass

Re: and [True,True] --> [True, True]?????

2009-04-23 Thread Leo
Steven D'Aprano wrote: > On Mon, 20 Apr 2009 15:13:15 -0500, Grant Edwards wrote: > > >> I fail to see the difference between "length greater than 0" and "list >> is not empty". They are, by definition, the same thing, aren't they? > > For built-in lists, but not necessarily for arbitrary list

Re: Why %e not in time.strftime directives?

2008-12-13 Thread Leo Jay
on, and platform variations are common. > > So if your underlying C implementation of strftime() supports "%e", then > Python will. My guess is that the same applies to time.strftime as it does > to datetime.strftime > > The docs list ones that are fairly cross-platform. However, it would seem > that not all platforms support "%e" > > > -tkc > > > [1] > http://docs.python.org/library/datetime.html#module-datetime > > -- Best Regards, Leo Jay -- http://mail.python.org/mailman/listinfo/python-list

Why %e not in time.strftime directives?

2008-12-13 Thread Leo jay
Any special reasons? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Equivalent of 'wget' for python?

2008-12-11 Thread Leo Jay
indows. I'm hoping the core python library has > a library for this. Note that I'll be using Python 3.0. > You can get Wget for Windows here: http://gnuwin32.sourceforge.net/packages/wget.htm -- Best Regards, Leo Jay -- http://mail.python.org/mailman/listinfo/python-list

Why optimization mode is slower than normal mode?

2008-12-11 Thread Leo Jay
1) time for 50 passes = 6.00515 This machine benchmarks at 83261.8 pystones/second I tried many times, and get the same result. Why optimization mode is slower than normal mode? -- Best Regards, Leo Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Equivalents of Ruby's "!" methods?

2008-08-25 Thread Leo Jay
this is not an accepted > and pythonic way of doing things then please let me know... and I'll > stop! > how about this one: >>> h = { "1" : "a\r", "2" : "b\n" } >>> dict((k, h[k].strip()) for k in h) {'1': 'a', '2': 'b'} >>> -- Best Regards, Leo Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Generate alphabet?

2008-08-23 Thread Leo Jay
gt; ','.join(string.ascii_lowercase) 'a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z' >>> -- Best Regards, Leo Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: How to read and write the same socket in different threads?

2008-08-22 Thread Leo Jay
On Sat, Aug 23, 2008 at 1:58 AM, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > On Sat, 23 Aug 2008 01:47:23 +0800, Leo Jay <[EMAIL PROTECTED]> wrote: >> >> I'd like to read and write the same socket in different threads. >> one thread is only used to read

How to read and write the same socket in different threads?

2008-08-22 Thread Leo Jay
te port, the program works. But if the first element of the tuple is 's', the program doesn't work. Is it possible to read and write the same socket in different threads? Thanks in advance. -- Best Regards, Leo Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: How to stop iteration with __iter__() ?

2008-08-19 Thread Leo Jay
ntation it should. But catching an exception > can't be the standard way to stop iterating right? > you can use for loop: for line in movie_iter: ... -- Best Regards, Leo Jay -- http://mail.python.org/mailman/listinfo/python-list

virtual IPs

2008-08-06 Thread leo davis
Good Day! I have set up virtual IPs on my Ubuntu client machine & assigned IPs 192.168.12.3 - eth0 192.168.12.4 - eth0:1 192.168.12.5 - eth0:2 192.168.12.6 - eth0:3 I have written python code to send multiple HTTP requests to my web server to load test it.When I check the logs on the apache serve

Re: need help with introducing more traffic

2008-07-25 Thread leo davis
Fredrik Lundh,   I'm with you and my apologies for not making the scenario more clearer in my previous post [QUOTE]"load testing" other people's sites are known as something else, of course[QUOTE]-    yes,that could cause a DoS and its lameI certainly dont intend to do that,was just chec

need help with introducing more traffic

2008-07-24 Thread leo davis
Hiya, I found this code snippet(reference http://www.goldb.org) and wish to do more with it than just send out a Http Get request.I would like to introduce more traffic -say by downloading files,crawling through all the links,logging in etc etc,and wish to see how the web server reacts.I'm tryin

logging into a website using python

2008-07-23 Thread leo davis
Hi,   I''m trying achieve the following by running python programs -login to a website -automate filling up web forms   So far I 've tried out the following codes: import cookielib, urllib, urllib2 login = 'cod45' password = 'mell' # Enable cookie support for urllib2 cookiejar = cookielib.Cooki

Re: wxpython: visual effects missing after py2exe

2008-07-16 Thread Leo Lee
"optimize": 2, "ascii": 1, "bundle_files": 1}}, zipfile = None, windows = [test_wx], ) "Leo Lee" <[EMAIL PROTECTED]> дÈëÏûÏ¢ÐÂÎÅ:[EMAIL PROTECTED] > Please take close look at the details of the two snapshots. > I need explanation and correcting this problem. > > -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython: How can I get window's HANDLE in wxPython.

2008-07-16 Thread Leo Lee
Thank you , Mike. "Mike Driscoll" <[EMAIL PROTECTED]> ??:[EMAIL PROTECTED] On Jul 2, 8:40 pm, "Leo Lee" <[EMAIL PROTECTED]> wrote: > I need a window's handle to be passed to external c++. > Thanks in advance Are you talking about a wxPython wx.Win

wxpython: visual effects missing after py2exe

2008-07-16 Thread Leo Lee
Please take close look at the details of the two snapshots. I need explanation and correcting this problem. begin 666 after.png MB5!.1PT*&@[EMAIL PROTECTED];0```#-" ,```#GL'7)`7-21T(`KLX< MZ01G04U!``"[EMAIL PROTECTED]>B8``("[EMAIL PROTECTED]@``'4P M``#J8 [EMAIL PROTECTED]/ ```P!03%1%

wxPython: How can I get window's HANDLE in wxPython.

2008-07-02 Thread Leo Lee
I need a window's handle to be passed to external c++. Thanks in advance -- http://mail.python.org/mailman/listinfo/python-list

Re: Does '!=' equivelent to 'is not'

2008-06-16 Thread Leo Jay
r of python: >>> a = 10 >>> b = 10 >>> a is b False >>> a == b True >>> a = 5 >>> b = 5 >>> a is b True >>> a == b True >>> which is caused by small object cache mechanism. -- Best Regards, Leo Jay -- http://mail.python.org/mailman/listinfo/python-list

why can i still able to reproduce the SimpleHTTPServer bug which is said fixed 3 years ago?

2008-06-13 Thread Leo Jay
r("Content-Length", str(fs[6]))# <-- obviously, this is not the same with len(f.read()) in windows. -- Best Regards, Leo Jay -- http://mail.python.org/mailman/listinfo/python-list

Hyphenation: PyHyphen-0.7 released

2008-04-02 Thread Dr. leo
'ful']] print h_en.wrap('beautiful', 6) [u'beau-', u'tiful'] print h_en.wrap('beautiful', 7) [u'beauti-', u'ful'] from textwrap2 import fill print fill('very long text...', width = 40, use_hyphens = h_en) My thanks go to those who helped enormously with advice, suggestions, criticism and Windows builds. Regards Leo -- http://mail.python.org/mailman/listinfo/python-list

Hyphenation: PyHyphen 0.4.1 and textwrap2-0.1.1 released

2008-03-02 Thread Dr. leo
This latest version of PyHyphen is only important for Python 2.4 addicts who encountered a missing type when compiling. Further, a few signed/unsigned mismatch warnings coming from MSVC should be fixed. As I have only Python 2.5, I'd be interested in any experiences when compiling it with Python 2.

Hyphenation module PyHyphen-0.4 released - good news for Windows users

2008-02-26 Thread Dr. leo
#x27;s and web development frameworks. Although I would be happy to give it a first go on textwrap, I fear I won't find the time in the coming weeks. Spring is ahead in my country after all... So if you wish to contribute, the above bullets may be good starting points. Thanks again and en

Hyphenation module PyHyphen-0.3 released

2008-02-23 Thread Dr. leo
ld be terrific. Bests Leo -- http://mail.python.org/mailman/listinfo/python-list

PyHyphen-0.2.1a - OpenOffice-like hyphenation

2008-02-13 Thread Dr. leo
Hi, a couple of weeks ago I uploaded PyHyphen-0.1 on the PyPI. It is a wrapper around the C library "hnj_hyphen 2.3" that ships with OpenOffice and Mozilla products. You can have a look at PyHyphen at http://pypi.python.org/pypi/PyHyphen/0.2.1a I've tested it on Linux, but it should also run on

Re: C++ equivalent of comp.lang.python?

2008-01-06 Thread Leo Jay
y one manually. > > For those of you who work in C++, where do you go to discuss it > online? I'm interested in any newsgroups, mailing lists, or web > boards you can recommend. > -- Best Regards, Leo Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: japanese encoding iso-2022-jp in python vs. perl

2007-10-24 Thread Leo Kislov
#x27;.translate(iso2022_squeezing)) It prints u'\u30e1'. Feel free to ask questions if something is not clear. Note, this is just an example, I *don't* claim it does what you want for any character in FF61-FFDF range. You may want to carefully review the whole unicode block: http://www.unicode.org/charts/PDF/UFF00.pdf -- Leo. -- http://mail.python.org/mailman/listinfo/python-list

Re: From D

2007-07-26 Thread Leo Petr
On Jul 24, 10:10 am, Stargaming <[EMAIL PROTECTED]> wrote: > On Tue, 24 Jul 2007 03:19:53 -0700, bearophileHUGS wrote: > > There are various things I like about the D language that I think Python > > too may enjoy. Here are few bits (mostly syntactical ones): > > > 1) (we have discussed part of thi

Re: Portable general timestamp format, not 2038-limited

2007-06-28 Thread Leo Kislov
e zero time point (just like OP wanted). TAI timestamps are pretty useless IMHO. They need to be converted to decimal/float for interval calculations and they don't represent any legal time. -- Leo -- http://mail.python.org/mailman/listinfo/python-list

Re: String formatting for complex writing systems

2007-06-27 Thread Leo Kislov
On Jun 27, 3:10 am, Leo Kislov <[EMAIL PROTECTED]> wrote: > On Jun 27, 12:20 am, Andy <[EMAIL PROTECTED]> wrote: > > > Hi guys, > > > I'm writing a piece of software for some Thai friend.  At the end it > > is supposed to print on paper some report with

Re: String formatting for complex writing systems

2007-06-27 Thread Leo Kislov
back from rendering library. Assuming you use *fixed* font for English and Thai the following function will return how many columns your text will use: from unicodedata import category def columns(self, s): return sum(1 for c in s if category(c) != 'Mn') -- Leo -- http://mail.python.org/mailman/listinfo/python-list

Re: Method much slower than function?

2007-06-13 Thread Leo Kislov
> > 20004 function calls in 10.214 CPU seconds > >>> cProfile.run("z=r.readgenome(open('cb_foo'))") > > 20004 function calls in 0.041 CPU seconds > I suspect open files are cached so the second reader picks up where the first one left:

Re: How to wrap a Japanese text in Python

2007-06-08 Thread Leo Kislov
On Jun 8, 2:24 am, Leo Kislov <[EMAIL PROTECTED]> wrote: > On Jun 7, 5:12 am, [EMAIL PROTECTED] wrote: > > > Hi All, > > > I am trying to wrap a japanese text in Python, by the following code. > > > if len(message) > 54: > >message = message.

Re: How to wrap a Japanese text in Python

2007-06-08 Thread Leo Kislov
--- Result: Can you post a short example that clearly demonstrates the problem? -- Leo -- http://mail.python.org/mailman/listinfo/python-list

Re: Python memory handling

2007-06-01 Thread Leo Kislov
ict() for i in range(88)] If it doesn't help that means 1) list&dict caches don't really work like I think or 2) pymalloc cannot return memory because of fragmentation and that is not simple to "fix". -- Leo -- http://mail.python.org/mailman/listinfo/python-list

Re: invoke user's standard mail client

2007-05-07 Thread Leo Kislov
le blank. Do I need MS > Exchange Server to run this demo? No, but you need an account on some mail server and some email program should create a MAPI profile to represent that account on your local computer. As I understand creation of MAPI profiles is not a common practice among non-Microsoft products, for example my computer with Lotus Notes doesn't have any MAPI profiles. -- Leo -- http://mail.python.org/mailman/listinfo/python-list

Re: getmtime differs between Py2.5 and Py2.4

2007-05-07 Thread Leo Kislov
16.384 bytes allocated > 287.555.584 bytes free > > [E:\Projects]c:\Python24\python.exe -c "import os; print > os.path.getmtime('p64.py')" > 1164470381 > > [E:\Projects]c:\Python25\python.exe -c "import os; print > os.path.getmtime('p64.py&#

Re: anyone has experience on cross-compile python 2.5.1?

2007-05-04 Thread Leo Jay
On 4/30/07, Leo Jay <[EMAIL PROTECTED]> wrote: > i have a development board based on s3c2410 arm cpu. and i want to > port python on it. > after googling some threads, i successfully cross compiled python. > but i still encountered a weird issue that when i ran > /lib/pyth

default config has no md5 module?

2007-05-04 Thread Leo Jay
i want to compile a python by myself, but after configure and make, it seems that md5 is not built by default. what should i do to compile md5 as an module? -- Best Regards, Leo Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: relative import broken?

2007-05-03 Thread Leo Kislov
) would > be useful for a script? (I.e., more useful than importing relative > to the directory holding the script, as indicated by __file__.) Do you realize it's a different behaviour and it won't work for some packages? One possible alternative is to assume empty parent package and let

Re: My Python annoyances

2007-05-03 Thread Leo Kislov
commented further. > I would have changed the status to "invalid" myself, if I were able to do > so. I think it should have been marked as "won't fix" as it's a wart just like 1/2 == 0, but as there are many users of the current behaviour it's "

Re: hp 11.11 64 bit python 2.5 build gets error "import site failed"

2007-05-03 Thread Leo Kislov
" of convertsimple() - sure it is. However, how > did it get there? It's in an argument tuple - and where came > that from? Looking at the call stack OP posted, -1 is coming as forth parameter of __import__, I *guess* at the first import in site.py or at implicit "import sit

anyone has experience on cross-compile python 2.5.1?

2007-04-30 Thread Leo Jay
push("world\n") asyncore.loop() s.join() but the weirdest thing is, if i run python test_asynchat.py directly, everything is ok. anybody could help me? thanks in advance. ps, my linux box is an ubuntu 6.10. -- Best Regards, Leo Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's handling of unicode surrogates

2007-04-22 Thread Leo Kislov
wierd. When the programmer is *ready* to support unicode he/she will explicitly call .codepoints() or .graphemes(). As they say: You can lead a horse to water, but you can't make it drink. -- Leo -- http://mail.python.org/mailman/listinfo/python-list

Re: iterator interface for Queue?

2007-04-08 Thread Leo Kislov
#x27;s a personal preference, I usually put as many quit sentinels in a queue as many consumers. -- Leo -- http://mail.python.org/mailman/listinfo/python-list

Re: shutil.copy Problem

2007-04-01 Thread Leo Kislov
everywhere in your program is a complete solution. Like shutil.copy(xmlfile, u"C:\iTunes Music Library.xml") if you use constant or make sure your file name is unicode: dest = unicode() shutil.copy(xmlfile, dest) -- Leo. -- http://mail.python.org/mailman/listinfo/python-list

Re: I18n issue with optik

2007-04-01 Thread Leo Kislov
f sys.stdout to another encoding? What are you going to set it to? As I understand you're going to distribute your program to some users. How are you going to find out the encoding of the terminal of your users? -- Leo -- http://mail.python.org/mailman/listinfo/python-list

Re: shutil.copy Problem

2007-03-26 Thread Leo Kislov
output: > exceptions.UnicodeDecodeError > 'ascii' codec can't decode byte 0xd6 in position 26: ordinal not in > range(128)] > > What could the possible cause of this be? Show us traceback, without it I doubt anyone can help. > Shouldn't shutil simply be &

Re: Unicode zipping from Python code?

2007-03-26 Thread Leo Kislov
ng that can handle the characters good, or > handle the unicode filenames. You said you've got good result, so it's not clear what do you want. > Does anyone knows about a python project that can do this? > Or other tool what I can use for zipping intern. characters? Zipp

Re: Making a non-root daemon process

2007-03-23 Thread Leo Kislov
; How can I get that without being > the root user? Maybe you can go over the list of all possible signals from the terminal and notify kernel that you want to ignore them. Sounds similar to dettaching from the terminal, but maybe there some differences. But the fact that os.setsid fails for you is weird anyway. -- Leo. -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   >