Re: Newbie to python --- why should i learn !

2008-05-08 Thread Krishnakant Mane
hello, I have programmed co insidentally in all the 3 languages. so out of my experience of 10 + years, I got my personal share of reasons to prefer python over the other 2 namely c++ and java. firstly as every one has already explained, python is easy, fun to learn and can do many things much

question relateding to parsing dbf files.

2008-06-18 Thread Krishnakant Mane
hello all. I need to parse some dbf files through python. the reason being that I have to migrate some old data from dbf files to postgresql. all that I need to know is if some one has got a working code sample using dbfpy. I found this module suitable for my work but can't figure out how to use

inspite of proper package structure, no module named xyz error.

2007-07-12 Thread krishnakant Mane
hello all, can some one suggest me the best solution for a package? I have a package folder called idm and there are the following files in there. __init__.py which is right now empty. mainwindow.py which has a single class called MainWindow which is an MDI Parent frame from wxpython. student.py

how good does PyGTK work on windows?

2007-07-16 Thread krishnakant Mane
hello, I will be writing some code in PyGTK to run on linux. but I want to know if there are any installers or distutils available for PyGTK on windows? I have heard that installing gimp or even pygtk is next to impossible and is very tedious if at all one gets success. can any one share their

problems playing with dates from any month.

2007-08-02 Thread krishnakant Mane
hello, I have a very strange problem and I can't find any solution for that. I am working on an accounting package which I wish to develop in python. the simple problem is that I want to knoe how I can know if the given date is the nth day of a month. for example if a customer is supposed to pay

Re: problems playing with dates from any month.

2007-08-02 Thread krishnakant Mane
On 02/08/07, Ian Clark [EMAIL PROTECTED] wrote: http://docs.python.org/lib/node85.html I looked there even before. but could not figure out what the code did. I know in that variable called s there was a string in a valid date format. but when datetime.strptime was used, I did not understand

difflib confusion

2008-01-22 Thread krishnakant Mane
hello all, I have a bit of a confusing question. firstly I wanted a library which can do an svn like diff with two files. let's say I have file1 and file2 where file2 contains some thing which file1 does not have. now if I do readlines() on both the files, I have a list of all the lines. I now

Re: difflib confusion

2008-01-23 Thread krishnakant Mane
On 23/01/2008, Paul Hankin [EMAIL PROTECTED] wrote: On Jan 22, 6:57 pm, krishnakant Mane [EMAIL PROTECTED] wrote: hello all, I have a bit of a confusing question. firstly I wanted a library which can do an svn like diff with two files. let's say I have file1 and file2 where file2 contains

Re: Python Written in C?

2008-07-21 Thread Krishnakant Mane
On 21/07/2008, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I'm just learning about Python now and it sounds interesting. But I just read (on the Wiki page) that mainstream Python was written in C. That's what I was searching for: Python was written in what other language? Are you a PH.d

Re: programming toolbox

2008-08-22 Thread Krishnakant Mane
hi william, I am slightly more experienced in python than you (2 years to be presise). Before this I handled pritty heavy as in coding and as in usage projects in java. Untill I came into the wonderful and powerful world of free software, I programmed in c++ using borlands c++ compiler and IDE.

confused on calculating date difference in days.

2007-10-16 Thread krishnakant Mane
hello, I am strangely confused with a date calculation problem. the point is that I want to calculate difference in two dates in days. there are two aspects to this problem. firstly, I can't get a way to convert a string like 1/2/2005 in a genuan date object which is needed for calculation. now

Re: confused on calculating date difference in days.

2007-10-16 Thread krishnakant Mane
hello, thanks all of you for providing valuable help. right now I am confused about the delta object. how can I extract the difference between two dates in terms of day using the delta object? I tried reading the python docs but did not understand the concept of delta object and how can I measure

how to creating html files with python

2007-10-27 Thread krishnakant Mane
hello, I have one strange requirement, I need to create html files through python and add some data from the database. it is a GUI based application developed in WX python. and the reports need to come out in html for some strange reason which is off topic to discuss here. but the point is that

Re: how to creating html files with python

2007-10-27 Thread krishnakant Mane
hi George, On 27/10/2007, George Sakkis [EMAIL PROTECTED] wrote: On Oct 27, 12:12 pm, krishnakant Mane [EMAIL PROTECTED] wrote: I have one strange requirement, I need to create html files through python and add some data from the database. The only strange thing here is that you think

problem opening html file with webbrowser.open

2007-10-29 Thread krishnakant Mane
hello all, as I posted in my previous thread, I am generating html reports for my client software. I am yet to find a satisfactory module which can help me actually create headings, bold and italics etc without merging html with data variables. any ways I am right now doing the hamd coding myself.

attaching someconfusing results in webbrowser.open on gnulinux

2007-11-01 Thread krishnakant Mane
hello all, I had mentioned previously that I can't open html files in python. I have my username as krishna and there is a documents folder. so when I give webbrowser.open(file:///home/krishna/documents/tut.html) on python prompt I get true as return value but web browser (firefox ) opens with

webbrowser.open still gives problem with file://

2007-11-12 Thread krishnakant Mane
hello, some days bac I posted a problem about webbrowser.open() not opening the file on the local machine. I get a few responses and I tryed working it out. I also refered to the cookbook example posted on that thread. I still can't figure out why

problem with quoted strings while inserting into varchar field of database.

2007-05-06 Thread krishnakant Mane
hello, I finally got some code to push a pickled list into a database table. but now the problem is technically complex although possible to solve. the problem is that I can nicely pickle and store lists in a blob field with the help of dumps() for picklling into a string and then passing the

Re: problem with quoted strings while inserting into varchar field of database.

2007-05-07 Thread krishnakant Mane
On 6 May 2007 11:22:52 -0700, Daniele Varrazzo [EMAIL PROTECTED] Every serious database driver has a complete and solid SQL escaping mechanism. This mechanism tipically involves putting placeholders in your SQL strings and passing python data in a separate tuple or dictionary. Kinda

Latest errors on pickled objects and blob datatypes in mysql

2007-05-07 Thread krishnakant Mane
hello, finally the errors for my sql query have changed so I have even changed the thread subject because I feel now that this is not doable in mysql and this seams to be a bug, ither in python or the MySQLdb module or perhaps both. my table is called testobj and the blob field is called obj. now

which is the comprehencive module for postgresql?

2007-05-18 Thread krishnakant Mane
hello all, some times having many choices often confuses the users. can some one plese tell me which is the most comprehencive, well documented and widely used and tested module to connect from python to postgresql database? I looked around PYPgsql but there seams to be very little documentation.

newbi question on python rpc server, how it works?

2007-03-28 Thread krishnakant Mane
hello, searched a lot of places including google search but can't find answers to python-rpc. I am also very new to rpc. I am very clear about its meaning and where it is to be used, but not about how it is done. I have a need where I need to create a layer of business logic that will connect to

Re: newbi question on python rpc server, how it works?

2007-03-28 Thread krishnakant Mane
hello all, I have downloaded the entire twisted library. I am also trying to read the documentation but I have a couple of problems right now. firstly, I did not find any thing in twisted documentation that specifically talks about xml rpc. am I missing some thing? secondly, if I am writing an

how to pickle objects for database storage?

2007-04-11 Thread krishnakant Mane
hello, I have a strange but very interesting requirement? provided that a database can provide for an object data type like binary large object (blob), can I store a pickeled python object in it? I know oracle has blob and clob and believe that mysql/ postgre sql has some thing similar to store

is there a module to work with pickled objects storage in database?

2007-05-04 Thread krishnakant Mane
hello all, I am trying a very complex kind of a task in a project. I have a knowledge management system where I need to store a lot of objects (pickled). I have to store mostly lists and dictionaries into a rdbms. mostly I will be using mysql. I want to know if there is any module that can help

a newbi problem: can't find complete python curses library

2006-11-02 Thread krishnakant Mane
hello, I am a new member to this list. I am Krishnakant from India, Mumbai. I have been coding in python for quite some time and now I am at the intermediate level of programming as far as python is concerned. I am going to develop a accounting software that can work on the console and accessed

Re: Secure Python

2006-11-16 Thread krishnakant Mane
after reading all the mails on this thread, I have the following observations. I am relatively new to python at its development side but very old as far as using python is concerned. firstly, talking about gnu/linux there is no question about security. python, if at all it is non-secure wont harm

how to print pdf with python on a inkjet printer.

2006-11-16 Thread krishnakant Mane
hello all. I am developing an ncurses based python application that will require to create pdf reports for printing. I am not using py--qt or wx python. it is a consol based ui application and I need to make a pdf report and also send it to a lazer or ink jet printer. is it possible to do so with

python and accessibility issues.

2006-11-16 Thread krishnakant Mane
this question is streight forward, short and sweet. I am developing some applications and being blind myself, expect that including me, all other blind people must be able to use it. so my question is, is wx python complying with Microsoft Active Accessibility or MSAA for short? I will use wx

Re: how to print pdf with python on a inkjet printer.

2006-11-17 Thread krishnakant Mane
On 17/11/06, Tim Roberts [EMAIL PROTECTED] wrote: Making the PDF is easy. Go get ReportLab from www.reportlab.org. I consider it the best Python PDF solution. wow! you solved my major problem before I even asked it. seams that python programmers also have dynamic mind reading capability

Re: how to print pdf with python on a inkjet printer.

2006-11-17 Thread krishnakant Mane
On 17/11/06, Fredrik Lundh [EMAIL PROTECTED] wrote: http://tgolden.sc.sabren.com/python/win32_how_do_i/print.html or possibly: http://www.planetpdf.com/forumarchive/49365.asp I can't figure out where is the win32api module in my system. I think I need to download it. I tried to

please help me choose a proper gui library.

2006-11-18 Thread krishnakant Mane
hello all. after finishing a project in record time using python we have taken up one more project. this time however, we need to do a gui based project which will run on windows xp and 2000. now My question is which gui toolkit should I choose? I had initially raised some doubt about

Re: please help me choose a proper gui library.

2006-11-18 Thread krishnakant Mane
On 18/11/06, Phil Thompson [EMAIL PROTECTED] wrote: You have to install Qt first. You only need to install the run-time elements (ie. the DLLs) on the client's machine. Unless your application is licensed under the GPL (and you are using the GPL version of Qt and PyQt) then there are

Re: please help me choose a proper gui library.

2006-11-18 Thread krishnakant Mane
On 18 Nov 2006 12:40:57 -0800, sturlamolden [EMAIL PROTECTED] wrote: It's a matter of taste. I would recommend PyGTK (yes it runs on Windows). You can design the GUI in a fly with GLADE, and import it as an XML resource in Python with one single line of code. I also have to consider the issue

question on pygtk and accessibility on windows.

2006-11-30 Thread krishnakant Mane
has any one tried py gtk on windows? I tried to do a google search for accessibility related issues but did not find any thing specific to pygtk and windows accessibility. I even tried to search for just gtk and windows accessibility but again no result. so I am now posting this message as a last

Re: python vs java eclipse

2006-12-01 Thread krishnakant Mane
just used the py dev plugin for eclipse. it is great. auto indentation and intellisence. and all other things. so now how does it look from this end? python + productivity and eclipse + productivity = double productivity! only problem with the plugin is that I find it difficult to manage the

Re: good documentation about win32api ??

2006-12-01 Thread krishnakant Mane
On 1 Dec 2006 09:56:09 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: http://msdn.microsoft.com covers the API itself, although you need to transliterate from the C code to python. Exactly! that's where the problem lyes. I am pritty well to do with windows API, I am an a good python

Re: python vs java eclips

2006-12-01 Thread krishnakant Mane
may be emacs can provide code completion (intellicense) I have not used it so far so can't say. but the main reason I use eclipse is for the above feature. and yes indentation happens in eclipse python-mode so that is not a major feature eclipse offers any way. syntax highlighting is a very common

can't figure out how to create menus in urwid

2006-12-01 Thread krishnakant Mane
hello, I have been trying out urwid for creating ncurses based applications. I will like to know if any one has ever tried to create menu bar with drop down menus using urwid? any suggestion? Krishnakant. -- http://mail.python.org/mailman/listinfo/python-list

evaluating gui modules, any experience on tkinter?

2006-12-02 Thread krishnakant Mane
hello all, I seam to have noticed this a bit late but it appears to me that tkinter is being used very widely for gui development on all platform? is that right? since fredric lundh has written a very good introduction to tkinter (was that just an intro?), I have got keen interest to know the

wxpython worked out but can't find api docs for download.

2006-12-02 Thread krishnakant Mane
hello all. finally I got the accessibility issue out from wxpython. actually almost got it out, but that's another story. now my problem is that I can't gind a downloadable version of wxpython api reference for the latest version or the latest api reference at least. I found the on-line version

Re: wxpython worked out but can't find api docs for download.

2006-12-02 Thread krishnakant Mane
On 03/12/06, hg [EMAIL PROTECTED] wrote: http://www.wxpython.org/download.php I had the wxwidgets documentation on my computer as well. and I also have the demos. but I was wondering if there is some api reference on wxpython itself. the problem is that wx widgets is such a huge library that

Re: evaluating gui modules, any experience on tkinter?

2006-12-02 Thread krishnakant Mane
On 03/12/06, Gian Mario Tagliaretti [EMAIL PROTECTED] wrote: hg wrote: Tkinter is fine under *nix and Windows for a large range of applications. I think it has drawbacks and advantage compared to other toolkits. The major advantage being bundled with python, and the drawbacks include (I

Re: wxpython worked out but can't find api docs for download.

2006-12-03 Thread krishnakant Mane
hi pol, thanks for your helpful suggestion. I tried it but nothing seams to work. I can't get the folder containing html files as you suggested. can you kindly attach a .zip archive of your generated folder as a privat email to me? I will be really thankful. Krishnakant. --

problem formatting dates from text fields.

2006-12-03 Thread krishnakant Mane
hello all. thanks for the help and for pointing me to the proper url for wxpython related issues. I am so happy that I now have a very easy gui library that can do practically every thing with such ease (no flames intended but I was never at so much ease with java swing ). I however have a problem

please provide urls for some python success stories.

2006-12-03 Thread krishnakant Mane
hello all. actually I have been recently appointed as a technology consulltent at a huge company. and I have couple more such projects in the pypeline. unfortunately the officials out here are too much in favour of java and I have personally worked with both and find that python is heaven in

Re: problem formatting dates from text fields.

2006-12-03 Thread krishnakant Mane
On 04/12/06, Dennis Lee Bieber [EMAIL PROTECTED] wrote: You don't show us what format is used in the database, so there is nothing to base a conversion on. Is it year/month/day, month/day/year; months numeric or alpha (abbreviated or spelled out). Fields separated by space, comma, -, :,

Re: problem formatting dates from text fields.

2006-12-03 Thread krishnakant Mane
is there a soft copy of wxpython in action available for free download? I saw the book on my book store but since I am totally blind, I have to depend on soft copies. Krishnakant. -- http://mail.python.org/mailman/listinfo/python-list

is there a tutorial for creating packages in python?

2006-12-08 Thread krishnakant Mane
hello all, I have got a lot of sets of functions and classes that do related work. so just like we get python libraries I too need to create such libraries often called packages. I want to put my code to re-use so will create these libraries and put in the site-libs folder. can any one suggest me

Re: need guidance on sending emails with attachment with python.

2006-12-11 Thread krishnakant Mane
hi jonathan, it is understandable from your point of view I wont say you were rood. but my question was different. I am very new to doing programmed emails. all I need to know is that will I need to use outlook or any thing to send emails to pop3 or smtp? I want to know because I wont like to make

Re: need guidance on sending emails with attachment with python.

2006-12-11 Thread krishnakant Mane
: errstr = for recip in smtpresult.keys(): errstr = Could not delivery mail to: %s Server said: %s %s %s % (recip, smtpresult[recip][0], smtpresult[recip][1], errstr) raise smtplib.SMTPException, errstr krishnakant Mane a écrit : hello

issues with making a package. where do classes link?

2006-12-11 Thread krishnakant Mane
hello all, I am struggling a bit in making python packages. when I am doing a project I want to create all my python modules inside a single package. I want to know when I make a package, what are the basic things I must generally do in the __init__.py file? and how do I link all the modules in my

can't find a suitable application server

2006-12-30 Thread krishnakant Mane
hello, I have read about zope and found it very good. but right now I am a bit confused about one project I have just procured. it is supposed to be a simple 3 tear application. the front end will be a thin client which we will develop using wxpython. We are using MySQL for the database and I

how to mimik a main() function to start a program with entry point?

2007-01-19 Thread krishnakant Mane
hello all. I have one simple query and may be that's to stupid to answer but I am not finding the answer any ways. I have a set of modules in my package and out if which one is my actual starting point to my entire program. say for example I have an entire database application ready and I want a

confused on python rpc with apache, is it possible?

2007-01-19 Thread krishnakant Mane
hello all. I will like to know if the following combination is possible. I have looked around on google and did not find any thing productive so bothering the list: sorry. I am developing a distributed application which will have 3 layers namely the thin client written in wxpython, an application

Re: confused on python rpc with apache, is it possible?

2007-01-19 Thread krishnakant Mane
On 19/01/07, Diez B. Roggisch [EMAIL PROTECTED] wrote: I'm unclear why you want the apache in there in the first place. Why don't you just create an e.g. twisted-based XMLRPC-server, and simply let that run? What is the apache intended for? twisted-based? what is that? what is that. I am

Re: confused on python rpc with apache, is it possible?

2007-01-20 Thread krishnakant Mane
Use mod_python with some xmlrpc handler. There is more than one around. Google for them. That way you can keep Apache for both Python and PHP. I am confused. I have some documents on xml-rpc but none of them mentioned apache. Krishnakant. -- http://mail.python.org/mailman/listinfo/python-list

Re: confused on python rpc with apache, is it possible?

2007-01-20 Thread krishnakant Mane
On 20/01/07, Diez B. Roggisch [EMAIL PROTECTED] wrote: There is nothing an apache will do for you - except from possibly proxing python. Go read up upon xmlrpc and python, possibly doing it with twisted, but there are other options. Don't bother with the apache. well in that case I don't

python packages and __name__ query.

2007-01-20 Thread krishnakant Mane
hello all, I had previously mentioned my doubt and confusion about having a main() to be an entry point in my python based software. I am still having a particular doubt. I use cx freze for creating a python executable. my software is essentially a package containing a few modules and one file

strange problem using modules from my own package.

2007-02-08 Thread krishnakant Mane
hello all, I found a very strange kind of behaviour in python with my own package. I created a package in which there were 4 modules and one __init__.py file I created the entire project in eclipse (pydev). it works fine there with the ide. but now when I try running the code without eclipse, that

Re: strange problem using modules from my own package.

2007-02-08 Thread krishnakant Mane
On 09/02/07, Gabriel Genellina [EMAIL PROTECTED] wrote: At Friday 9/2/2007 02:10, you wrote: Please keep posting on the list - you'll reach a whole lot of people there... sorry, I had just hit the reply button and did not notice that python-list was not there. my crystal ball I can see this

can't find a way to display and print pdf through python.

2007-02-10 Thread krishnakant Mane
hello all, I am stuck with a strange requirement. I need a library that can help me display a pdf file as a report and also want a way to print the same pdf file in a platform independent way. if that's not possible then I at least need the code for useing some library for connecting to acrobat

Re: can't find a way to display and print pdf through python.

2007-02-10 Thread krishnakant Mane
On 11/02/07, Vishal Bhargava [EMAIL PROTECTED] wrote: Use Report Lab... I mentioned in my first email that I am already using reportlab. but I can only generate pdf out of that. I want to display it on screen and I also will be giving a print button which should do the printing job. by the way I

Re: can't find a way to display and print pdf through python.

2007-02-10 Thread krishnakant Mane
On 11/02/07, Vishal Bhargava [EMAIL PROTECTED] wrote: Are you trying to do real time or post real time. -Vishal post real time. I want to first display the report on screen by default and the user at his choice will click the print button and the report will be printed. regards. Krishnakant. --

Re: can't find a way to display and print pdf through python.

2007-02-11 Thread krishnakant Mane
well yes, I need to view reports on line and also print them from within my app. so yes I need to display the pdf in my app and print it as well. regards. Krishnakant -- http://mail.python.org/mailman/listinfo/python-list

Re: can't find a way to display and print pdf through python.

2007-02-12 Thread krishnakant Mane
os.start does not work.. attribute error. regards. Krishnakant. -- http://mail.python.org/mailman/listinfo/python-list

help developing an editor to view openoffice files.

2007-03-13 Thread krishnakant Mane
hello, right now I am involved on doing a very important accessibility work. as many people may or may not know that I am a visually handicap person and work a lot on accessibility. the main issue at hand is to create an accessible editor for open office. there are a lot of things remaining on

Re: Python in a desktop environment

2007-03-13 Thread krishnakant Mane
I have coded some complex programs in python in the recent past. I find it very robust and also not very slow (as is depicted by the starter of this thread ) I use wxpython on the gui side and testify that it is indeed very suitable for huge gui apps. may be pyqt is good enough too and I believe

Re: help developing an editor to view openoffice files.

2007-03-13 Thread krishnakant Mane
hello, well what I exactly need to do is firstly have a way to read .odt and .ods files. I have a lot of information in open office format which I need to access. The most important thing is that I completely want to avoid the use of microsoft office. so I need to firstly get access to open office

Re: help developing an editor to view openoffice files.

2007-03-14 Thread krishnakant Mane
On 14/03/07, Paul Hummer [EMAIL PROTECTED] wrote: I actually just read this in the O'Reilly book Python Cookbook, so I know this answer off the top of my head. OpenOffice files are merely zip files with well documented XML inside. Use the builtin zip module to open them, and then it's just