Re: [Tutor] Data conversion

2011-05-19 Thread Joe Aquilina
On 19/05/11 17:26, Andre Engels wrote: On Thu, May 19, 2011 at 8:15 AM, Joe Aquilina wrote: I realised after I read your response that I probably hadn't included enough information, partly due to my inexperience in Python and partly due to haste on my part. AFter my original post, I had a li

Re: [Tutor] Writing OpenOffice/LibreOffice doc with python

2011-05-19 Thread Karim
On 05/19/2011 10:57 PM, Karim wrote: Hello All, Is it possible to write document in ODP or DOC format with a python API? Do you know an easy one and popular one which works with python 2.7.1? Cheers Karim ___ Tutor maillist - Tutor@python.org To u

[Tutor] Writing OpenOffice/LibreOffice doc with python

2011-05-19 Thread Karim
Hello All, Is it possible to write document in ODP or DOC format with a python API? Do you know an easy one and popular one which works with python 2.7.1? Cheers Karim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription opti

Re: [Tutor] Error in executing 'Python Filename.py'.

2011-05-19 Thread Neha P
Hey all, got the solution... Thanks for the help :) :) Just needed to from  C:\Python26>Python hello.py Its working fine... From: Neha P To: "tutor@python.org" Sent: Thursday, May 19, 2011 4:14 PM Subject: [Tutor] Error in executing 'Python Filename.py'. C:\>p

Re: [Tutor] Error in executing 'Python Filename.py'.

2011-05-19 Thread Noah Hall
On Thu, May 19, 2011 at 9:14 PM, Neha P wrote: > C:\>python hello.py > 'python' is not recognized as an internal or external command, > operable program or batch file. This happens because "python.exe" is not in the system path. > C:\>cd python26 > C:\Python26>python > Python 2.6.4 (r264:75708,

[Tutor] BaseHTTPServer, how do catch/trap "broken pipe" errors?

2011-05-19 Thread ian douglas
Hey all, I released my short URL engine last night and it works great. The only problem I'm having now is that it's throwing LOTS of 'broken pipe' errors, which as I understand from looking at raw socket docs in Python, should throw a trappable exception. This might be a little more 'advance

Re: [Tutor] Error in executing 'Python Filename.py'.

2011-05-19 Thread James Reynolds
You're in the python interpreter. Hit control C to go back to cmd and then you can do "python hello.py" On Thu, May 19, 2011 at 4:14 PM, Neha P wrote: > C:\>python hello.py > 'python' is not recognized as an internal or external command, > operable program or batch file. > > C:\>cd python26 > >

[Tutor] Error in executing 'Python Filename.py'.

2011-05-19 Thread Neha P
C:\>python hello.py 'python' is not recognized as an internal or external command, operable program or batch file. C:\>cd python26 C:\Python26>python Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more in

Re: [Tutor] RuntimeError: file does not exist

2011-05-19 Thread Susana Iraiis Delgado Rodriguez
Hi Alan!! After I read your e-mail, I remebered that I run the scripts in a different way. The script worked properly when I run it from Python IDLE, I don't have any idea the reason why. 2011/5/19 Alan Gauld > > "Susana Iraiis Delgado Rodriguez" wrote > > > Well, I tried this code in other

Re: [Tutor] Program

2011-05-19 Thread Noah Hall
On Thu, May 19, 2011 at 7:23 PM, Johnson Tran wrote: > So I figured out how to use the loop method, thanks. I still cannot seem to > figure out how to use Len() to show the output of my answers (from all my > googling Len() seems to be used to count characters?) Also, I am not really > sure I u

Re: [Tutor] Program

2011-05-19 Thread Johnson Tran
So I figured out how to use the loop method, thanks. I still cannot seem to figure out how to use Len() to show the output of my answers (from all my googling Len() seems to be used to count characters?) Also, I am not really sure I understand how to use the append method of the list. Here's my

Re: [Tutor] RuntimeError: file does not exist

2011-05-19 Thread Alan Gauld
"Susana Iraiis Delgado Rodriguez" wrote Well, I tried this code in other computer and it worked just fine. But when I run the module in my computer it throws many errors, So what is different between the computers? What are the respective OS versions and Python versions? How exactly

Re: [Tutor] Data conversion

2011-05-19 Thread Alan Gauld
"Joe Aquilina" wrote I have a (single table) database file (SQLite3). It has one table, call it literature, with an integer, autoincrement primary key field. I have created a data entry form in Python that I want to use to enter new rows into this database file. On the data entry form I wil

Re: [Tutor] xrange() with start or stop > sys.maxint?

2011-05-19 Thread Alan Gauld
"Terry Carroll" wrote Is there any way to use xrange with a start or stop value that exceeds sys.maxint? Not in python v2(*), just use range(). In Python v3 xrange has been removed as has sys.maxint (*)Or at least up to 2.5, I don;t have 2.6 or 2.7... HTH, -- Alan Gauld Author of th

Re: [Tutor] Sequencing

2011-05-19 Thread Alan Gauld
"Cindy Lee" wrote Sorry I am still lost. Noah gave you a good breakdown to follow however... So I am suppose to use a string? You are supposed to use a string as a parameter of your function and process it to generate a new string which you return from the function. Do you understand

Re: [Tutor] string

2011-05-19 Thread Emile van Sebille
On 5/19/2011 7:45 AM naheed arafat said... why there is two way to represent strings in python ? single-coated ( ' ' ) and double-coated ( " " ) strings both serve the purpose of string. Then what is the difference? Convenience. Particularly when the strings contain quote characters. mystrin

Re: [Tutor] string

2011-05-19 Thread Joel Goldstick
On Thu, May 19, 2011 at 10:45 AM, naheed arafat wrote: > why there is two way to represent strings in python ? single-coated > ( ' ' ) and double-coated ( " " ) strings both serve the purpose of string. > Then what is the difference? > > ___ > Tutor mai

[Tutor] string

2011-05-19 Thread naheed arafat
why there is two way to represent strings in python ? single-coated ( ' ' ) and double-coated ( " " ) strings both serve the purpose of string. Then what is the difference? ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription opti

Re: [Tutor] RuntimeError: file does not exist

2011-05-19 Thread Susana Iraiis Delgado Rodriguez
Hello everyone! Well, I tried this code in other computer and it worked just fine. I changed the line: lyr.datasource = mapnik.Shapefile(base=filepath, file=filepath) for lyr.datasource = mapnik.Shapefile(base=ruta,file=archivo[0]) I also did hard coding to test my script: lyr.datasour

Re: [Tutor] Sequencing

2011-05-19 Thread Noah Hall
On Thu, May 19, 2011 at 11:10 AM, Cindy Lee wrote: > Sorry I am still lost. So I am suppose to use a string? Something like: > (just not sure is the right string...) Well, no. The assignment you've been given states the you need to define a function that takes a string as an argument, for example

Re: [Tutor] RuntimeError: file does not exist

2011-05-19 Thread Brad Posthumus
Susana Iraiis Delgado Rodriguez wrote: > > Hello Alan!! > Can you please tell me, how to rebuild my path? I've tried it, but I > didn't > succed =( > > The doctest for the Shapefile function includes this line: >>> shp = Shapefile(base='/home/mapnik/data',file='world_borders') This tell

Re: [Tutor] Sequencing

2011-05-19 Thread Cindy Lee
Sorry I am still lost. So I am suppose to use a string? Something like: (just not sure is the right string...) def ReceiveAndReturn():     str="I have 5 Apples and 6 oranges";     print "str._add1" ReceiveAndReturn() Want output to be: I have 6 Apples and 7 oranges __

Re: [Tutor] Data conversion

2011-05-19 Thread Andre Engels
On Thu, May 19, 2011 at 8:15 AM, Joe Aquilina wrote: > I realised after I read your response that I probably hadn't included enough > information, partly due to my  inexperience in Python and partly due to > haste on my part. > > AFter my original post, I had a little play in Python and was able

Re: [Tutor] can I walk or glob a website?

2011-05-19 Thread Marc Tompkins
On Thu, May 19, 2011 at 12:25 AM, Albert-Jan Roskam wrote: > Thank you, always useful to study other people's code. I wasn't planning to > create a Gui for my app. > It was necessary for the purpose - I didn't want all, or even most, of the mp3s on the site, but certainly enough of them that aut

Re: [Tutor] how to read two files and substitute

2011-05-19 Thread Eike Welk
Hello Lina! On Wednesday 18.05.2011 05:22:50 lina wrote: > May I ask another question: > > where I can get some advanced, terse and powerful python tutorials. > short but powerful and a bit hard to understand at first. The tutorial on Python's website is relatively terse, but it uses a simple

Re: [Tutor] Data conversion - Problem solved

2011-05-19 Thread Joe Aquilina
On 19/05/11 14:15, Joe Aquilina wrote: On 19/05/11 13:53, Andre Engels wrote: On Thu, May 19, 2011 at 6:36 AM, Joe Aquilina wrote: I am new to this list and very much a beginner to Python. Please excuse me if this is a silly question, but in all my searches this morning I have not been able

Re: [Tutor] can I walk or glob a website?

2011-05-19 Thread Albert-Jan Roskam
Thank you, always useful to study other people's code. I wasn't planning to create a Gui for my app. It struck me that the Gui class also contains all the methods that deal with the html parsing. But maybe that's what your warnings were about. ;-)  Cheers!! Albert-Jan