Re: beutifulsoup

2008-10-30 Thread Stefan Behnel
Peter Pearson wrote: Like you, I struggle with BeautifulSoup Well, there's always lxml.html if you need it. http://codespeak.net/lxml/ Stefan -- http://mail.python.org/mailman/listinfo/python-list

Re: beutifulsoup

2008-10-30 Thread Kay Schluehr
On 29 Okt., 17:45, luca72 [EMAIL PROTECTED] wrote: Hello I try to use beautifulsoup i have this: sito = urllib.urlopen('http://www.prova.com/') esamino = BeautifulSoup(sito) luca = esamino.findAll('tr', align='center') print luca[0] tr align=centerth width=5%a

Re: is there a way to access postgresql in python3.0rc1

2008-10-30 Thread davy zhang
thanks, I'll wait a month and see, in the mean time I can use 2.x for my prototyping, hope python3.0 final can drop a nuke on the ground :D On Thu, Oct 30, 2008 at 12:31 PM, Steve Holden [EMAIL PROTECTED] wrote: Terry Reedy wrote: davy zhang wrote: I'm currently on a project, it could last

how to get full-text search of pysqlite3 work in python2.5.2

2008-10-30 Thread hawk
Hi, my environment is debian, python 2.5.2. when i call con.enable_load_extension(True), the following message prompt out. debian:~# python2.5 Python 2.5 (release25-maint, Jul 20 2008, 20:47:25) [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 Type help, copyright, credits or license

Unicode Problem

2008-10-30 Thread Seid Mohammed
I am new to python. I want to print Amharic character using the Python IDLE. here goes somple code == abebe = 'አበበ በሶ በላ' abebe '\xe1\x8a\xa0\xe1\x89\xa0\xe1\x89\xa0 \xe1\x89\xa0\xe1\x88\xb6 \xe1\x89\xa0\xe1\x88\x8b' print abebe አበበ በሶ

urlencode() doseq and Python 3.0

2008-10-30 Thread Thomas Guettler
Hi, I think the default of urlencode doseq being false is just there to preserve the old behavior. http://svn.python.org/view/python/branches/py3k/Lib/urllib/parse.py?rev=66199sortby=dateview=markup {{{ ... if not doseq: # preserve old behavior }}} I guess no one want really

Re: Unicode Problem

2008-10-30 Thread Marc 'BlackJack' Rintsch
On Thu, 30 Oct 2008 10:28:39 +0300, Seid Mohammed wrote: I am new to python. I want to print Amharic character using the Python IDLE. here goes somple code == abebe = 'አበበ በሶ በላ' abebe '\xe1\x8a\xa0\xe1\x89\xa0\xe1\x89\xa0

Re: Fastest way to convert sql result into a dict or list ?

2008-10-30 Thread Peter Otten
Dennis Lee Bieber wrote: On Wed, 29 Oct 2008 04:35:31 -0700 (PDT), [EMAIL PROTECTED] [EMAIL PROTECTED] declaimed the following in comp.lang.python: Hello, I'm trying to find the fastest way to convert an sql result into a dict or list. What i mean, for example: my sql result:

Re: Need some help speeding up this loop

2008-10-30 Thread Marc 'BlackJack' Rintsch
On Wed, 29 Oct 2008 19:24:32 -0700, erikcw wrote: I'm trying to write a loop that will build a list of template strings. My current implementation is *really slow*. It took 15 minutes to finish. (final len(list) was about 16k entries.) What is `list` here? Do you mean ``len(templates)``?

Re: Unicode Problem

2008-10-30 Thread Ulrich Eckhardt
Seid Mohammed wrote: I am new to python. Welcome! :) abebe = 'አበበ በሶ በላ' abebe '\xe1\x8a\xa0\xe1\x89\xa0\xe1\x89\xa0 \xe1\x89\xa0\xe1\x88\xb6 \xe1\x89\xa0\xe1\x88\x8b' print abebe አበበ በሶ በላ abeba = ['አበበ','በሶ','በላ'] abeba ['\xe1\x8a\xa0\xe1\x89\xa0\xe1\x89\xa0',

Re: Unicode Problem

2008-10-30 Thread Bard Aase
On Thu, Oct 30, 2008 at 8:28 AM, Seid Mohammed [EMAIL PROTECTED] wrote: I am new to python. I want to print Amharic character using the Python IDLE. here goes somple code == abebe = 'አበበ በሶ በላ' abebe

Ascii codec can't encode

2008-10-30 Thread luca72
hello i have this problem: UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 8: ordinal not in range(128) Generally i solve the problem inserting : # -*- coding: ISO-8859-1 -*- at the top of the file but now he don't work can you help me thanks Luca --

Re: Ascii codec can't encode

2008-10-30 Thread Ulrich Eckhardt
luca72 wrote: hello i have this problem: UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 8: ordinal not in range(128) This is the result of transcoding a Unicode string to ASCII, where the Unicode string contains a character that is not representable in ASCII. This

Re: How to open a shell prompt from an existing shell prompt

2008-10-30 Thread gaurav kashyap
Do we have subprocess module in python 2.3 -- http://mail.python.org/mailman/listinfo/python-list

Re: Ascii codec can't encode

2008-10-30 Thread luca72
On 30 Ott, 10:27, luca72 [EMAIL PROTECTED] wrote: Hy the code is this: Pok\xe9mon Luca Sorry is the é -- http://mail.python.org/mailman/listinfo/python-list

Re: How to open a shell prompt from an existing shell prompt

2008-10-30 Thread gaurav kashyap
reply please -- http://mail.python.org/mailman/listinfo/python-list

open a shell prompt froma python program

2008-10-30 Thread gaurav kashyap
Dear all, Can u tell me a python program that when executed in a shell prompt,opens another shell prompt. Simply i want to open a shell prompt from a python program. Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Ascii codec can't encode

2008-10-30 Thread Ulrich Eckhardt
luca72 wrote: Hy the code is this: Pok\xe9mon That's not what I meant, I meant a piece of Python source code. This piece has to be large enough to demonstrate the problem but with everything else removed. The point is that guessing what is wrong in your program is just futile; In order to

Re: open a shell prompt froma python program

2008-10-30 Thread Lars Stavholm
gaurav kashyap wrote: Dear all, Can u tell me a python program that when executed in a shell prompt,opens another shell prompt. Simply i want to open a shell prompt from a python program. I think you're looking for: import os os.system(/bin/sh) --

Re: Regarding shared memory

2008-10-30 Thread James Mills
On Thu, Oct 30, 2008 at 2:13 PM, gaurav kashyap [EMAIL PROTECTED] wrote: Dear all, I have a server program that listens to a particular port and a number of client programs that connect to the server. Now i want to put some data in form of python list in main memory on server.Hence whenver

Re: Is ctypes appropriate in my case?

2008-10-30 Thread dudeja . rajat
On Wed, Oct 29, 2008 at 6:51 PM, Terry Reedy [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: Hi, I've a dll and its header file that controls an hardware. I want to write a wrapper for this dll in Python. What is the best way that I can write a wrapper? What do you want to do with the

Re: Ascii codec can't encode

2008-10-30 Thread luca72
Hello Again the code is this # -*- coding: ISO-8859-1 -*- from BeautifulSoup import BeautifulSoup import urllib sito = urllib.urlopen('http://text.net/') esamino = BeautifulSoup(sito) luca = esamino.findAll('tr', align='center') lunghezza = len(luca) messaggio_per_scar = open('me', 'wb')

Re: Need some help speeding up this loop

2008-10-30 Thread Arnaud Delobelle
On Oct 30, 2:24 am, erikcw [EMAIL PROTECTED] wrote: Hi all, I'm trying to write a loop that will build a list of template strings. My current implementation is *really slow*.  It took 15 minutes to finish. (final len(list) was about 16k entries.) #combinations = 12 small template strings

Re: open a shell prompt froma python program

2008-10-30 Thread gaurav kashyap
On Oct 30, 2:59 pm, Lars Stavholm [EMAIL PROTECTED] wrote: gaurav kashyap wrote: Dear all, Can u tell me a python program that when executed in a shell prompt,opens another shell prompt. Simply i want to open a shell prompt from a python program. I think you're looking for: import

Re: Unit Testing: a couple of questions

2008-10-30 Thread Emanuele D'Arrigo
Thank you all for the very instructive replies! Much appreciated! By the sound of it I just have to relax a little and acquire a little bit more experience on the matter as I go along. =) Thank you again! Manu -- http://mail.python.org/mailman/listinfo/python-list

Re: download image from flickr.com

2008-10-30 Thread Justin Ezequiel
##compile_obj = re.compile(r'dyn.Img\(.*?,.*?,.*?,(.*?)') compile_obj = re.compile(r'\img src=([^]+?)') -- http://mail.python.org/mailman/listinfo/python-list

Re: open a shell prompt froma python program

2008-10-30 Thread Diez B. Roggisch
gaurav kashyap wrote: On Oct 30, 2:59 pm, Lars Stavholm [EMAIL PROTECTED] wrote: gaurav kashyap wrote: Dear all, Can u tell me a python program that when executed in a shell prompt,opens another shell prompt. Simply i want to open a shell prompt from a python program. I think you're

Re: How to open a shell prompt from an existing shell prompt

2008-10-30 Thread Tino Wildenhain
gaurav kashyap wrote: reply please try to invest some time in your question, it might be a cultural thing and from my observations common in questions from the indian area... So give me that. I require... might syntactically be correct, but the sound to other people on mailinglists is not so

Re: Python-list Digest, Vol 61, Issue 443

2008-10-30 Thread Seid Mohammed
ok but still i am not clear with my problem. if i test this one == kk ='how old are you' len(kk) 15 == but in my case == abebe = 'አበበ በሶ በላ' len(abebe) 23 == why the lenght is 23 while I am expecting to be 9 only. becuase I have 9 characters(including

Re: open a shell prompt froma python program

2008-10-30 Thread gaurav kashyap
HI, I am getting the following error: konsole: cannot connect to X server do i need to install the related files. -- http://mail.python.org/mailman/listinfo/python-list

Re: Ascii codec can't encode

2008-10-30 Thread Marc 'BlackJack' Rintsch
On Thu, 30 Oct 2008 03:01:07 -0700, luca72 wrote: the code is this # -*- coding: ISO-8859-1 -*- from BeautifulSoup import BeautifulSoup import urllib sito = urllib.urlopen('http://text.net/') esamino = BeautifulSoup(sito) luca = esamino.findAll('tr', align='center') lunghezza = len(luca)

Re: How to open a shell prompt from an existing shell prompt

2008-10-30 Thread gaurav kashyap
Dear Tino, I am using python 2.3.5. on POSIX system,I have the simple query as: I log into the shell as root.Can i issue some command that will open another terminal?(i.e I get a duplicate copy of the shell prompt already opened) -- http://mail.python.org/mailman/listinfo/python-list

The way that will help you to be a professional game developer.

2008-10-30 Thread smartx
Hi, I would like to share my knowledge as a game programmer, really game programming is hard, I don't want to disappoint you, the important point to become a game programmer is to love game programming, this way you will reach your target, also you need to be patient, don't stop on the half of the

about recursive load

2008-10-30 Thread Michel Perez
Hi, am very newbie in Python, but as part of a project i need to load configuration -a settings.py file in the package dir- of my apps recursively, something like this: settings.load_config(project.test.app) settings.load_config(project.test.*) settings.load_config(project.test)

Re: Finding the instance reference of an object

2008-10-30 Thread Fuzzyman
On Oct 30, 1:13 am, Joe Strout [EMAIL PROTECTED] wrote: On Oct 29, 2008, at 4:52 PM, Fuzzyman wrote: You're pretty straightforwardly wrong. In Python the 'value' of a variable is not the reference itself. That's the misconception that is leading some folks around here into tangled nots of

Restricted Execution of untrusted code

2008-10-30 Thread Emanuele D'Arrigo
I noticed that this issue has been discussed in this newsgroup periodically over the years and I seem to understand that - comprehensive- safe/restricted execution of untrusted code in python is currently quite hard to achieve. What if the safety requirements are a little relaxed though? All I'd

Re: Python-list Digest, Vol 61, Issue 443

2008-10-30 Thread Marc 'BlackJack' Rintsch
On Thu, 30 Oct 2008 13:50:47 +0300, Seid Mohammed wrote: ok but still i am not clear with my problem. if i test this one == kk ='how old are you' len(kk) 15 == but in my case == abebe = 'አበበ በሶ በላ' len(abebe) 23 == why the lenght is 23 while I

Re: Ascii codec can't encode

2008-10-30 Thread luca72
Hy the code is this: Pok\xe9mon Luca -- http://mail.python.org/mailman/listinfo/python-list

py2exe

2008-10-30 Thread Gandalf
I'm new to py2exe. i'm using python 2.5 on XP and py2exe 0.6.6 does someone know what may be wrong with this script: from distutils.core import setup import py2exe setup(console=['babylon.py'], options = { py2exe: { packages: [pyHook, encodings, pywinauto, pywinauto.controls,

Re: how to get full-text search of pysqlite3 work in python2.5.2

2008-10-30 Thread Guilherme Polo
On 10/30/08, hawk [EMAIL PROTECTED] wrote: Hi, my environment is debian, python 2.5.2. when i call con.enable_load_extension(True), the following message prompt out. debian:~# python2.5 Python 2.5 (release25-maint, Jul 20 2008, 20:47:25) [GCC 4.1.2 20061115 (prerelease) (Debian

Re: Finding the instance reference of an object

2008-10-30 Thread Fuzzyman
On Oct 30, 1:13 am, Joe Strout [EMAIL PROTECTED] wrote: On Oct 29, 2008, at 4:52 PM, Fuzzyman wrote: You're pretty straightforwardly wrong. In Python the 'value' of a variable is not the reference itself. That's the misconception that is leading some folks around here into tangled nots of

Re: py2exe

2008-10-30 Thread Gandalf
OK this question is not clear enough. I'm trying to convert my python script to executable file. it seems than the simple setup(console=['file.py']) won't work in my case because i use unsupported modules (like pywinauto and extra). this are the modules I import: import wx import wx.html as

Re: 2.6, 3.0, and truly independent intepreters

2008-10-30 Thread Andy O'Meara
Okay, here's the bottom line: * This is not about the GIL.  This is about *completely* isolated interpreters; most of the time when we want to remove the GIL we want a single interpreter with lots of shared data. * Your use case, although not common, is not extraordinarily rare either.  

Re: 2.6, 3.0, and truly independent intepreters

2008-10-30 Thread Jesse Noller
On Wed, Oct 29, 2008 at 8:05 PM, Glenn Linderman [EMAIL PROTECTED] wrote: On approximately 10/29/2008 3:45 PM, came the following characters from the keyboard of Patrick Stinson: If you are dealing with lots of data like in video or sound editing, you would just keep the data in shared memory

Re: Ascii codec can't encode

2008-10-30 Thread luca72
the arror are: Error in sys.excepthook: Traceback (most recent call last): File /usr/lib/python2.5/site-packages/eric4/DebugClients/Python/ DebugClientBase.py, line 1006, in __unhandled_exception self.mainThread.user_exception(None, (exctype,excval,exctb), 1) File

Re: Graphical object browser

2008-10-30 Thread Propad
On Oct 30, 2:10 am, Jason [EMAIL PROTECTED] wrote: Hooray! I discovered PyCrust. I made this script (for Linux - under Win, you could just have all but the first line as a python file and run it directly): #!/usr/bin/python import wx import wx.py.PyCrust if __name__ == '__main__' :    

Re: How to open a shell prompt from an existing shell prompt

2008-10-30 Thread Tino Wildenhain
gaurav kashyap wrote: Dear Tino, I am using python 2.3.5. on POSIX system,I have the simple query as: I log into the shell as root.Can i issue some command that will open another terminal?(i.e I get a duplicate copy of the shell prompt already opened) I'd say so but what would that have to do

Re: open a shell prompt froma python program

2008-10-30 Thread [EMAIL PROTECTED]
On Oct 30, 11:53 am, gaurav kashyap [EMAIL PROTECTED] wrote: HI, I am getting the following error: konsole: cannot connect to X server do i need to install the related files. Do you have an x-server running? I assume so, because you have a terminal window opened. If you became root using

Re: Tkinter: How to get Label wraplength functionality in Text Box

2008-10-30 Thread Mudcat
I'm not sure why my tkinter would not be compiled against 8.5 since I have the latest version. I assumed that Python 2.6 would have it without requiring me to do an extra compile. However I was able to get it working using the code you gave me. Thanks for that. The only problem is that it seems

Re: Graphical object browser

2008-10-30 Thread Mike Driscoll
On Oct 30, 8:33 am, Propad [EMAIL PROTECTED] wrote: On Oct 30, 2:10 am, Jason [EMAIL PROTECTED] wrote: Hooray! I discovered PyCrust. I made this script (for Linux - under Win, you could just have all but the first line as a python file and run it directly): #!/usr/bin/python import wx

Re: Finding the instance reference of an object

2008-10-30 Thread Dale Roberts
On Oct 29, 9:13 pm, Joe Strout [EMAIL PROTECTED] wrote: On Oct 29, 2008, at 4:52 PM, Fuzzyman wrote: You're pretty straightforwardly wrong. In Python the 'value' of a variable is not the reference itself. That's the misconception that is leading some folks around here into   tangled nots

Re: how to get full-text search of pysqlite3 work in python2.5.2

2008-10-30 Thread hawk
On Oct 30, 8:21 pm, Guilherme Polo [EMAIL PROTECTED] wrote: On 10/30/08, hawk [EMAIL PROTECTED] wrote: Hi,  my environment is debian, python 2.5.2.  when i call con.enable_load_extension(True), the following message  prompt out.  debian:~# python2.5  Python 2.5 (release25-maint,

how can i get the fts2.so?

2008-10-30 Thread hawk
Hello, everybody, i already have python2.5.2 on my debian box. i checked whole file system for fts.so. but there is no fts3.so anymore. then i downloaded the full source code of latest sqlite, and compiled it. but also, no fts2.so exists under build folder. finally, i downloaded sqlite-

Re: Is ctypes appropriate in my case?

2008-10-30 Thread Terry Reedy
[EMAIL PROTECTED] wrote: On Wed, Oct 29, 2008 at 6:51 PM, Terry Reedy [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi, I've a dll and its header file that controls an hardware. I want to write a wrapper for

Re: how can i get the fts2.so?

2008-10-30 Thread hawk
sorry, all fts2 is fts3. On Oct 30, 10:06 pm, hawk [EMAIL PROTECTED] wrote: Hello, everybody, i already have python2.5.2 on my debian box. i checked whole file system for fts.so. but there is no fts3.so anymore. then i downloaded the full source code of latest sqlite, and compiled it. but

Re: how to get full-text search of pysqlite3 work in python2.5.2

2008-10-30 Thread hawk
sorry, all fts2 is fts3. On Oct 30, 10:04 pm, hawk [EMAIL PROTECTED] wrote: On Oct 30, 8:21 pm, Guilherme Polo [EMAIL PROTECTED] wrote: On 10/30/08, hawk [EMAIL PROTECTED] wrote: Hi,  my environment is debian, python 2.5.2.  when i call con.enable_load_extension(True), the

Simple ElementTree Help

2008-10-30 Thread Heston James - Cold Beans
Hello Guys, I have a small element tree task here whereby I need to crack open an XML file, modify the text for one element and then resave it back again. I'm currently trying to do this like follows: # Parse the XML file. application_settings =

Re: Tkinter: How to get Label wraplength functionality in Text Box

2008-10-30 Thread Guilherme Polo
On 10/30/08, Mudcat [EMAIL PROTECTED] wrote: I'm not sure why my tkinter would not be compiled against 8.5 since I have the latest version. I assumed that Python 2.6 would have it without requiring me to do an extra compile. It is not really python's fault if tkinter is compiled against

Single string vs list of strings

2008-10-30 Thread Scott Sharkey
Hi All, I have a need to determine whether a passed variable is a single string, or a list of strings. What is the most pythonic way to do this? Thanks. -Scott -- http://mail.python.org/mailman/listinfo/python-list

Re: py2exe

2008-10-30 Thread Mike Driscoll
On Oct 30, 7:19 am, Gandalf [EMAIL PROTECTED] wrote: I'm new to py2exe. i'm using python 2.5 on XP and py2exe 0.6.6 does someone know what may be wrong with this script: from distutils.core import setup import py2exe setup(console=['babylon.py'], options = { py2exe: { packages:

xxx.has_key(a) vs a in xxx

2008-10-30 Thread Łukasz Ligowski
Hi, There is small inconsistency (or I don't understand it right) between python 2.5 docs and python 2.6 docs. 2.5 docs say that: a.has_key(k) Equivalent to k in a, use that form in new code 2.6 docs say that: dict.has_key(key) is equivalent to key in d, but deprecated. which is true? L

Re: Is ctypes appropriate in my case?

2008-10-30 Thread dudeja . rajat
For CPython, an importable module written in C. There is a doc Extending and Embedding the Python Interpreter. But I expect you can write the class in Python with ctypes. Thanks Terry. I'll be using ctypes now and have started writing the class. But the problem is that there are some 150

Is psyco available for python 2.6?

2008-10-30 Thread sert
I used the windows installer for the latest version of psyco, which is labeled as compatible with 2.5, but it gives the following error: ImportError: DLL load failed: The specified module could not be found. (check that the compiled extension 'C:\Python26\lib\site- packages\psyco\_psyco.pyd'

Re: xxx.has_key(a) vs a in xxx

2008-10-30 Thread Terry Reedy
Łukasz Ligowski wrote: Hi, There is small inconsistency (or I don't understand it right) between python 2.5 docs and python 2.6 docs. 2.5 docs say that: a.has_key(k) Equivalent to k in a, use that form in new code 2.6 docs say that: dict.has_key(key) is equivalent to key in d, but

Re: xxx.has_key(a) vs a in xxx

2008-10-30 Thread Kurt Smith
On Thu, Oct 30, 2008 at 9:37 AM, Łukasz Ligowski [EMAIL PROTECTED]wrote: Hi, There is small inconsistency (or I don't understand it right) between python 2.5 docs and python 2.6 docs. 2.5 docs say that: a.has_key(k) Equivalent to k in a, use that form in new code Meaning: don't use

Re: how to get full-text search of pysqlite3 work in python2.5.2

2008-10-30 Thread Guilherme Polo
On 10/30/08, hawk [EMAIL PROTECTED] wrote: On Oct 30, 8:21 pm, Guilherme Polo [EMAIL PROTECTED] wrote: On 10/30/08, hawk [EMAIL PROTECTED] wrote: Hi, my environment is debian, python 2.5.2. when i call con.enable_load_extension(True), the following message prompt

Re: Single string vs list of strings

2008-10-30 Thread Grant Edwards
On 2008-10-30, Scott Sharkey [EMAIL PROTECTED] wrote: I have a need to determine whether a passed variable is a single string, or a list of strings. What is the most pythonic way to do this? type('asdf') is list False type(['asdf','qwer']) is list True The question you might want to asked

Re: Finding the instance reference of an object

2008-10-30 Thread Joe Strout
On Oct 30, 2008, at 7:56 AM, Dale Roberts wrote: That's the misconception that is leading some folks around here into tangled nots of twisty mislogic, ultimately causing them to make up new terms for what every other modern language is perfectly happy calling Call-By-Value. Doesn't this logic

Re: Single string vs list of strings

2008-10-30 Thread Joe Strout
On Oct 30, 2008, at 8:55 AM, Grant Edwards wrote: The question you might want to asked is whether the parameter is a single string or a sequence of strings. That way your code will also work with an iterator that returns strings. type('asdf') is str True I agree with the general approach,

Re: xxx.has_key(a) vs a in xxx

2008-10-30 Thread D'Arcy J.M. Cain
On Thu, 30 Oct 2008 09:50:57 -0500 Kurt Smith [EMAIL PROTECTED] wrote: 2.5 docs say that: a.has_key(k) Equivalent to k in a, use that form in new code Meaning: don't use 'a.has_key(k)'. 2.6 docs say that: dict.has_key(key) is equivalent to key in d, but deprecated. Meaning,

Re: Ascii codec can't encode

2008-10-30 Thread Ulrich Eckhardt
luca72 wrote: UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 8: ordinal not in range(128) I have solve in this way: file_ricerca = codecs.open('ri', 'wb', 'ISO-8859-15', 'repalce') That should be 'replace' instead of 'repalce', I assume you just mistyped it

Re: open a shell prompt froma python program

2008-10-30 Thread Derek Martin
On Thu, Oct 30, 2008 at 03:53:52AM -0700, gaurav kashyap wrote: HI, I am getting the following error: konsole: cannot connect to X server do i need to install the related files. Maybe, but given that error message, probably not. You would do yourself a great favor by providing a lot more

Re: xxx.has_key(a) vs a in xxx

2008-10-30 Thread Łukasz Ligowski
Hi, On Thursday 30 of October 2008 16:11:07 you wrote: On Thu, 30 Oct 2008 09:50:57 -0500 Wow! That is so badly written. Both those statements could easily be read the opposite by someone reading the docs. Granted the latter is better and it is correct but it could be clearer the the

Re: Is psyco available for python 2.6?

2008-10-30 Thread bearophileHUGS
sert: I used the windows installer for the latest version of psyco, which is labeled as compatible with 2.5, but it gives the following error: ImportError: DLL load failed: The specified module could not be found. (check that the compiled extension 'C:\Python26\lib\site-

Fwd: how to get full-text search of pysqlite3 work in python2.5.2

2008-10-30 Thread hawk gao
actually, the latest situation is debian:~/pysqlite-2.5.0/doc# python from pysqlite2 import dbapi2 as sqlite3 con = sqlite3.connect(:memory:) con.execute(CREATE VIRTUAL TABLE posts using FTS3(title, body);) Traceback (most recent call last): File stdin, line 1, in module

Re: 2.6, 3.0, and truly independent intepreters

2008-10-30 Thread Andy O'Meara
On Oct 28, 6:11 pm, Martin v. Löwis [EMAIL PROTECTED] wrote: Because then we're back into the GIL not permitting threads efficient core use on CPU bound scripts running on other threads (when they otherwise could). Why do you think so? For C code that is carefully written, the GIL allows

Re: HTML File Parsing

2008-10-30 Thread Felipe De Bene
On Oct 28, 6:18 pm, Stefan Behnel [EMAIL PROTECTED] wrote: Felipe De Bene wrote: I'm having problems parsing anHTMLfile with the following syntax : TABLE cellspacing=0 cellpadding=0 ALIGN=CENTER BORDER=1 width='100%' TH BGCOLOR='#c0c0c0' Width='3%'User ID/TH TH Width='10%'

Re: open a shell prompt froma python program

2008-10-30 Thread Grant Edwards
On 2008-10-30, Derek Martin [EMAIL PROTECTED] wrote: On Thu, Oct 30, 2008 at 03:53:52AM -0700, gaurav kashyap wrote: HI, I am getting the following error: konsole: cannot connect to X server do i need to install the related files. Maybe, but given that error message, probably not. You

Re: Is psyco available for python 2.6?

2008-10-30 Thread Gerhard Häring
[EMAIL PROTECTED] wrote: sert: I used the windows installer for the latest version of psyco, which is labeled as compatible with 2.5, but it gives the following error: ImportError: DLL load failed: The specified module could not be found. (check that the compiled extension

Re: Tkinter: How to get Label wraplength functionality in Text Box

2008-10-30 Thread Mudcat
Awesome...there it goes. I guess my main problem was trying to evaluate the box before it had been displayed (or all the frame propagations were finished). The key was getting the Map binding in there once I got the count functionality to work. After all that...such a simple function: def

Re: 2.6, 3.0, and truly independent intepreters

2008-10-30 Thread Jesse Noller
On Thu, Oct 30, 2008 at 12:05 PM, Andy O'Meara [EMAIL PROTECTED] wrote: On Oct 28, 6:11 pm, Martin v. Löwis [EMAIL PROTECTED] wrote: Because then we're back into the GIL not permitting threads efficient core use on CPU bound scripts running on other threads (when they otherwise could).

Re: beutifulsoup

2008-10-30 Thread luca72
hello Another stupit question instead of use sito = urllib.urlopen('http://www.prova.com/') esamino = BeautifulSoup(sito) i do sito = urllib.urlopen('http://onlygame.helloweb.eu/') file_sito = open('sito.html', 'wb') for line in sito : file_sito.write(line) file_sito.close() how can i

Re: Is ctypes appropriate in my case?

2008-10-30 Thread Terry Reedy
[EMAIL PROTECTED] wrote: For CPython, an importable module written in C. There is a doc Extending and Embedding the Python Interpreter. But I expect you can write the class in Python with ctypes. Thanks Terry. I'll be using ctypes now and have started writing the class. But

Re: beutifulsoup

2008-10-30 Thread Kay Schluehr
On 30 Okt., 18:28, luca72 [EMAIL PROTECTED] wrote: hello Another stupit question instead of use sito = urllib.urlopen('http://www.prova.com/') esamino = BeautifulSoup(sito) i do  sito = urllib.urlopen('http://onlygame.helloweb.eu/')  file_sito = open('sito.html', 'wb')  for line in sito :

Re: 2.6, 3.0, and truly independent intepreters

2008-10-30 Thread VanL
Jesse Noller wrote: Even luminaries such as Brian Goetz and many, many others have pointed out that threading, as it exists today is fundamentally difficult to get right. Ergo the renaissance (read: echo chamber) towards Erlang-style concurrency. I think this is slightly missing what Andy is

Re: xxx.has_key(a) vs a in xxx

2008-10-30 Thread Terry Reedy
D'Arcy J.M. Cain wrote: On Thu, 30 Oct 2008 09:50:57 -0500 Kurt Smith [EMAIL PROTECTED] wrote: 2.5 docs say that: a.has_key(k) Equivalent to k in a, use that form in new code Meaning: don't use 'a.has_key(k)'. 2.6 docs say that: dict.has_key(key) is equivalent to key in d, but deprecated.

Re: 2.6, 3.0, and truly independent intepreters

2008-10-30 Thread Andy O'Meara
On Oct 30, 1:00 pm, Jesse Noller [EMAIL PROTECTED] wrote: Multiprocessing is written in C, so as for the less agile - I don't see how it's any less agile then what you've talked about. Sorry for not being more specific there, but by less agile I meant that an app's codebase is less agile if

In search for a simple build tool

2008-10-30 Thread Orestis Markou
Hello, as many of you probably know anyway, there's been a lot of talk about Python build tools and solutions these days. The thing is, now with so many tools to choose from, I can't choose! Hopefully people with more experience can help me. My requirements are: * Simple filesystem

Re: 2.6, 3.0, and truly independent intepreters

2008-10-30 Thread Jesse Noller
On Thu, Oct 30, 2008 at 1:54 PM, Andy O'Meara [EMAIL PROTECTED] wrote: On Oct 30, 1:00 pm, Jesse Noller [EMAIL PROTECTED] wrote: Multiprocessing is written in C, so as for the less agile - I don't see how it's any less agile then what you've talked about. Sorry for not being more specific

Re: 2.6, 3.0, and truly independent intepreters

2008-10-30 Thread Paul Boddie
On 30 Okt, 14:12, Andy O'Meara [EMAIL PROTECTED] wrote: 3) Start a new python implementation, let's call it CPythonES [...] 4) Drop python, switch to Lua. Have you looked at tinypy? I'm not sure about the concurrency aspects of the implementation, but the developers are not completely

Re: 2.6, 3.0, and truly independent intepreters

2008-10-30 Thread Terry Reedy
Andy O'Meara wrote: On Oct 28, 6:11 pm, Martin v. Löwis [EMAIL PROTECTED] wrote: You should really reconsider writing performance-critical code in Python. I don't follow you there... Performance-critical code in Python?? Martin meant what he said better later Again, if you do

Code not work - DESPERATE HELP :(

2008-10-30 Thread fx5900
Hi, i am trying to convert an .osm (openstreetmap) file into gml format and finally to shapefile given this wiki info http://wiki.openstreetmap.org/index.php/GML. I'm using windows and when i entered the following commands osm2gml.py map_01_data.osm map_01_data.gml on my dos prompt i get

Re: Python suitable for Midi ?

2008-10-30 Thread Chuckk Hubbard
On Wed, Oct 29, 2008 at 10:32 PM, J Kenneth King [EMAIL PROTECTED] wrote: One also has access to nice-levels on unix systems. True enough, but it's not so much a problem for me, as I'm pretty okay at tuning my own system, but I believe most of the people who'd be interested in my app (if any)

Re: Finding the instance reference of an object

2008-10-30 Thread Dale Roberts
On Oct 30, 11:03 am, Joe Strout [EMAIL PROTECTED] wrote: ... Are you saying that C++ is capable of using the Call By Reference idiom, but C is not, because C does not have a reference designation for formal function parameters? It's been a LONG time since I did anything in C, but yes, I

PyCon 2009 (US) - Call for tutorials Extended to 11/3

2008-10-30 Thread Greg Lindstrom
We have had requests to extend the deadline for submitting Tutorial Proposals for PyCon 2009 (US) through the weekend and are willing to do so. We will accept tutorial proposals through Monday, November 3. --greg == The period for submitting tutorial proposals

Re: 2.6, 3.0, and truly independent intepreters

2008-10-30 Thread Martin v. Löwis
Why do you think so? For C code that is carefully written, the GIL allows *very well* to write CPU bound scripts running on other threads. (please do get back to Jesse's original remark in case you have lost the thread :-) I don't follow you there. If you're referring to multiprocessing

Re: [PyCon-Organizers] PyCon 2009 (US) - Call for tutorials Extended to 11/3

2008-10-30 Thread Douglas Napoleone
We should get an announcement out on the blog: http://pycon.blogspot.com/ and note that the deadline is approaching for both talks and tutorials. For some reason blogger does not like my google account, so I cant seem to do it :-( -Doug On Thu, Oct 30, 2008 at 3:28 PM, Greg Lindstrom

Re: 2.6, 3.0, and truly independent intepreters

2008-10-30 Thread Patrick Stinson
On Wed, Oct 29, 2008 at 4:05 PM, Glenn Linderman [EMAIL PROTECTED] wrote: On approximately 10/29/2008 3:45 PM, came the following characters from the keyboard of Patrick Stinson: If you are dealing with lots of data like in video or sound editing, you would just keep the data in shared memory

Printing with interspersed element

2008-10-30 Thread Paulo J. Matos
Hi all, I guess this is a recurring issue for someone who doesn't really know the python lib inside out. There must be a simple way to do this. I have a list of objects [x1, x2, x3, ..., xn] and I have defined a print method for them print_obj(). Now I want to print them intersepersed by an

Re: Printing with interspersed element

2008-10-30 Thread Grant Edwards
On 2008-10-30, Paulo J. Matos [EMAIL PROTECTED] wrote: Hi all, I guess this is a recurring issue for someone who doesn't really know the python lib inside out. There must be a simple way to do this. I have a list of objects [x1, x2, x3, ..., xn] and I have defined a print method for them

  1   2   3   >