Re: [Tutor] How to convert string to date time format?

2019-07-20 Thread johnf
Try python-dateutil - I found it to be one of the better python modules for dealing with dates.  You may have to replace or strip some of the string. Johnf On 7/19/19 7:44 PM, C W wrote: Hello all, I have a date time string that looks like the following. 02015-07-01 00:01:44.538420-08

Re: [Tutor] replacing a loop

2019-06-24 Thread johnf
tempt to do create the comprehension.  But after seeing your code I realized that I had the '[' and the '{' confused.  I believed I had to use '{'.  I just reviewed a tutorial off the net and that was what they were using. Thanks again, Johnf Just because this

Re: [Tutor] replacing a loop

2019-06-24 Thread johnf
many of these loops I thought it might be best if I tried using comprehensions. Johnf On 6/24/19 10:48 AM, Mats Wichmann wrote: On 6/24/19 10:15 AM, johnf wrote: . Since I use a lot of similar loops to populate many dropdown controls I started investigating the use of list comprehensions. 

[Tutor] replacing a loop

2019-06-24 Thread johnf
and wonder if it will improve the performance.  The data is not very big - about a thousand rows - give or take. So what do you guys think? Johnf ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] sub-modules and python3

2017-05-31 Thread johnf
e end (all I need is a good editor to make the changes) but I was hoping to find something that would work in a more universal way. Johnf On 05/31/2017 12:03 PM, Peter Otten wrote: john wrote: Hi folks, In the past I used a simple "import filename" for sub-modules in python 2.

Re: [Tutor] Best Python Editor

2009-06-15 Thread johnf
On Sunday 14 June 2009 07:31:53 pm Michael Powe wrote: > > However, I will say that while following this thread, it occurred to > me that the one feature that VS and even the VBA editor in MS Office > has, is the ability to pop you into the debugger on error. This > feature is so useful that it s

Re: [Tutor] Best Python Editor

2009-06-14 Thread johnf
On Saturday 13 June 2009 02:44:53 am Eddie wrote: > Hi guys, > > What would you regard as the best free Python editor to use on Windows > for a new guy? Searching Google i see that there is quite a few out > there and is "VIM" the best one to go with? > > Regards > Eddie > _

Re: [Tutor] understanding urllib.urlopen

2009-04-23 Thread johnf
On Thursday 23 April 2009 08:44:07 am Emile van Sebille wrote: > johnf wrote: > > > > But if I attempt this > > urllib.urlopen( "http://maps.google.com?q='18 Tadlock Place Woodland CA'" > > ) it always fails. > &

[Tutor] understanding urllib.urlopen

2009-04-23 Thread johnf
I'm trying to comfirm an address is a good address via google. Meaning does google report that the address exist. If I do urllib.urlopen( "http://maps.google.com/maps/geo?%s"; % params ) with the address in params. I get the longitude and latitude correctly. If I use the following in the addr

Re: [Tutor] PDF to text conversion

2009-04-21 Thread johnf
On Tuesday 21 April 2009 11:05:32 am Dinesh B Vadhia wrote: > Hi Robert > > I don't have an answer but can have my sympathy. I've been looking for a > quality pdf to text convertor for months and not turned up anything useful. > I've tried many free programs which are poor. I too wanted a Python

Re: [Tutor] PDF to text conversion

2009-04-21 Thread johnf
On Tuesday 21 April 2009 10:36:59 am Robert Berman wrote: > Bob, > > Thank you for the quick reply. I am acquainted with that method, and > that will certainly work to do some really serious testing; but, the > data collection is an ongoing process and the users are requesting that > every month t

Re: [Tutor] list to string and string to list

2009-04-16 Thread johnf
On Thursday 16 April 2009 05:04:39 pm Alan Gauld wrote: > "johnf" wrote > > >> I want to save the list to the field and when I retrieve the string > >> convert > >> it back to a list. > >> > >> But this does NOT work. > >>

Re: [Tutor] list to string and string to list

2009-04-16 Thread johnf
On Thursday 16 April 2009 03:52:02 pm johnf wrote: > I am dealing with a database field that can only store strings. > I want to save the list to the field and when I retrieve the string convert > it back to a list. > > But this does NOT work. > mylist=[1,2,3,4] > mystr=st

[Tutor] list to string and string to list

2009-04-16 Thread johnf
I am dealing with a database field that can only store strings. I want to save the list to the field and when I retrieve the string convert it back to a list. But this does NOT work. mylist=[1,2,3,4] mystr=str(mylist) newlist= list(mystr) I keep thinking there must be a simple way of get this d

Re: [Tutor] trouble understanding the difference

2009-04-10 Thread johnf
On Friday 10 April 2009 09:41:13 am johnf wrote: > On Friday 10 April 2009 08:35:13 am johnf wrote: > > I can get the following to work: > > os.system('lp -d printer invoice.pdf') > > > > but what I think is the correct way for the future is: > >

Re: [Tutor] trouble understanding the difference

2009-04-10 Thread johnf
On Friday 10 April 2009 08:35:13 am johnf wrote: > I can get the following to work: > os.system('lp -d printer invoice.pdf') > > but what I think is the correct way for the future is: > subprocess.Popen('lp -d printer invoice.pdf') > and it does not work???

[Tutor] trouble understanding the difference

2009-04-10 Thread johnf
I can get the following to work: os.system('lp -d printer invoice.pdf') but what I think is the correct way for the future is: subprocess.Popen('lp -d printer invoice.pdf') and it does not work??? Can someone explain what I'm doing wrong? Traceback (most recent call l

Re: [Tutor] wxPython vs PyQt

2009-03-04 Thread johnf
On Wednesday 04 March 2009 04:56:37 pm Alan Gauld wrote: > "Kent Johnson" wrote > > > I've heard good things about Dabo, never tried it myself though. > > http://dabodev.com/ > > I looked at Dabo but decided not to try it since it was yet another > framework. Although it's based on wxPython they h

Re: [Tutor] confused with dates and which way to start

2009-02-18 Thread johnf
On Wednesday 18 February 2009 03:10:41 pm johnf wrote: > Hi, > > I need to develope a routine that will provide the some dates between a > starting date and an ending date. The dates will be used to schedule > instructors for specific class dates from the list of available da

[Tutor] confused with dates and which way to start

2009-02-18 Thread johnf
Hi, I need to develope a routine that will provide the some dates between a starting date and an ending date. The dates will be used to schedule instructors for specific class dates from the list of available dates. Class is normally on Monday, Wedesday, and Friday (or any days of the week

[Tutor] can't import Danny.OOo.OOoLib.py

2009-02-10 Thread johnf
Hi, How silly of me to think I understood the import command. I'm trying to learn how to automate printing documents from OpenOffice using python. I found several ways and I was able to get some of them to work. But I found the Danny.OOo.OOoLib.py tools (kind of old 2005 but still on the wiki

Re: [Tutor] python parser

2008-12-22 Thread johnf
On Monday 22 December 2008 10:34:12 am Alan Gauld wrote: > "johnf" wrote > > > So I ask you guys is there a link to a practical tutorial that > > provides hands > > on information on the use of a python parser. > > One place to loook for all things to

Re: [Tutor] python parser

2008-12-22 Thread johnf
On Monday 22 December 2008 09:15:13 am bob gailer wrote: > johnf wrote: > > I've been in the programming business for over 20 years and I have never > > had a need for a parser. But recently I have need to convert code from > > one language to a my new language python.

[Tutor] python parser

2008-12-22 Thread johnf
I've been in the programming business for over 20 years and I have never had a need for a parser. But recently I have need to convert code from one language to a my new language python. What a better way to learn the new language python than a new project. I decided it might be time to learn

Re: [Tutor] need to clean a string

2008-12-15 Thread johnf
On Monday 15 December 2008 11:31:12 am Andreas Kostyrka wrote: > Am Mon, 15 Dec 2008 10:18:28 -0800 > > schrieb johnf : > > Hi, > > I have a string that I need to extract just the sql > > statement. The following is the string > > \000\000\000\000\000\000\00

[Tutor] need to clean a string

2008-12-15 Thread johnf
Hi, I have a string that I need to extract just the sql statement. The following is the string \000\000\000\000\000\000\000\000.\000\000\000\\000\000\000 \000$\000\000\000\000\000(\000\000\000\000X\000\000\000\000\000, \000\000\000\000P\000\000\000\000\000Q\000\00

Re: [Tutor] Python class at Foothill College

2008-09-12 Thread johnf
On Friday 12 September 2008 06:34:53 pm wesley chun wrote: > On Fri, Sep 12, 2008 at 5:59 PM, Wayne Watson > > <[EMAIL PROTECTED]> wrote: > > Interesting. I've been quite surprised that some community college in the > > Bay Area hasn't offered Python recently. However, I'm long gone from > > there

Re: [Tutor] PySQLite vs SQLalchemy

2008-09-12 Thread johnf
On Friday 12 September 2008 03:30:13 pm Patrick wrote: > I guess I am a Python framework burnout. I have tried so many of them > over the past two months, they are just not right for me right now. I am > trying to put together a program to generate my website offline via the > MVC paradigm, all I n

Re: [Tutor] ftplib.storbinary and using a progress bar

2008-09-07 Thread johnf
On Saturday 06 September 2008 06:49:39 pm johnf wrote: > Hi, > I'm currently using ftplib.storbinary() to upload a file to a FTP server. > However, I would like to inform the user of the progress being made during > the file transfer (it could be a very long transfer). But &g

[Tutor] ftplib.storbinary and using a progress bar

2008-09-06 Thread johnf
Hi, I'm currently using ftplib.storbinary() to upload a file to a FTP server. However, I would like to inform the user of the progress being made during the file transfer (it could be a very long transfer). But ftplib.storbinary() has no callback like retrbinary() so does anyone have a though

Re: [Tutor] Sending email as html

2008-09-05 Thread johnf
On Friday 05 September 2008 05:03:30 pm Ted Roche wrote: > On Fri, Sep 5, 2008 at 6:42 PM, Tim Johnson <[EMAIL PROTECTED]> wrote: > > I've been using smtplib for years to send plain text emails > > programmatically. Now I have a customer who is requesting that I (at > > least) investigate sending i

Re: [Tutor] What has Editor X got that PyWin32 hasn't?

2008-08-12 Thread johnf
On Tuesday 12 August 2008 11:31:44 am Jaggo wrote: > Hello. > > I haven't much experience with programming. > > I'd like to point this question to programmers who write in editors other > than the default PyWin32: > > Why do you use your editor rather than using Pywin? What feature has editor > X g

[Tutor] login using PAM

2008-07-28 Thread johnf
I have been attempting to research the web on how python-pam works. Does anyone have example code? -- John Fabiani ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] OT looking for help creating a thumbnail

2008-07-22 Thread johnf
a for Linux but I haven't found anything for windows.  Hopefully, someone has had to do this in the past and knows what has to be done. Thanks in Advance, Johnf ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Program Specification Request

2008-01-16 Thread johnf
On Wednesday 16 January 2008 02:44:25 pm Alan Gauld wrote: > >   It is, almost, (19 January 2008)GS cookie time in > > CA. > > Coming from Scotland I have no idea what that means! What no Girl Scout cookies in Scotland???:-) -- John Fabiani ___ Tutor m

Re: [Tutor] preventing SQL injection

2008-01-11 Thread johnf
On Friday 11 January 2008 11:19:43 am you wrote: > johnf wrote: > > I spoke to soon. Where can I find the DB-API for postgres? Because the > > only way I can get this to work is using ('%s') and it does not work with > > (%s). > > What module are you usin

Re: [Tutor] preventing SQL injection

2008-01-11 Thread johnf
On Friday 11 January 2008 10:20:13 am Alan Gauld wrote: > "johnf" <[EMAIL PROTECTED]> wrote > > > and should be doing > > tempCursor.execute ( "Select pg_get_serial_sequence ( %s, %s ) as > > seq", ( 'public.arcust', 'pkid' )

Re: [Tutor] preventing SQL injection

2008-01-11 Thread johnf
On Friday 11 January 2008 09:14:25 am Simone wrote: > johnf ha scritto: > > But the above does not work when I use variables instead of strings as in > > > > tempCursor.execute ( "Select pg_get_serial_sequence ( %s, %s ) as > > seq", ( tableName, fieldNa

Re: [Tutor] preventing SQL injection

2008-01-11 Thread johnf
On Friday 11 January 2008 10:20:13 am Alan Gauld wrote: > "johnf" <[EMAIL PROTECTED]> wrote > > > and should be doing > > tempCursor.execute ( "Select pg_get_serial_sequence ( %s, %s ) as > > seq", ( 'public.arcust', 'pkid' )

[Tutor] preventing SQL injection

2008-01-11 Thread johnf
Hi, I was recently told I was doing something wrong with my python sql statements. I was doing tempCursor.execute("Select pg_get_serial_sequence('%s','%s') as seq   " % ('public.arcust','pkid')) and should be doing tempCursor.execute ( "Select pg_get_serial_sequence ( %s, %s ) as   seq", ( 'publi

Re: [Tutor] is it legal to have a class within a def

2008-01-03 Thread johnf
On Thursday 03 January 2008 10:13:18 am Alan Gauld wrote: > "johnf" <[EMAIL PROTECTED]> wrote > > > If the user types in a partial of the key then the dialog > > appears and the user picks from the list. The details of the dialog > > are > >

Re: [Tutor] is it legal to have a class within a def

2008-01-03 Thread johnf
On Thursday 03 January 2008 12:22:25 am Alan Gauld wrote: > Are you sure you made it a modal dialog? > Any dialog will do that if it is opened modelessly, you need to > use the modal version to make it block the app. Yes. I believe the way I have coded the dialog causes a bug. If I create a sta

Re: [Tutor] is it legal to have a class within a def

2008-01-02 Thread johnf
On Wednesday 02 January 2008 09:31:19 pm you wrote: > johnf wrote: > > def someMethod(): > >class MyClass(object): > >. > > if something: > > . > > return someval > > Legal? Well the police won't come after y

[Tutor] is it legal to have a class within a def

2008-01-02 Thread johnf
def someMethod(): class MyClass(object): . if something: . return someval -- John Fabiani ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Choice of GUI builders

2008-01-02 Thread johnf
On Wednesday 02 January 2008 06:08:10 am Roy Chen wrote: > Hello all, > > I've been using PythonCard to build a GUI for a simple program I'm trying > to write. It's simple and easy to use, and rather intuitive. > > However, it seems that it hasn't been updated in some time, and so I would > like a

Re: [Tutor] Choice of GUI builders

2008-01-02 Thread johnf
On Wednesday 02 January 2008 09:41:46 am Alan Gauld wrote: > I tried to fined a decent GUI builder for wxPython but failed. > There are two or three available but none of them really worked > all that well. SPE seemed the best of a poor bunch. > > However... > > > Take a look at Dabo > > www.dabod

Re: [Tutor] Choice of GUI builders

2008-01-02 Thread johnf
On Wednesday 02 January 2008 06:56:54 am Michael Langford wrote: > While some people are Adobe haters("They hate the web...etc"), I think > a slick alternative available now is Flex2 calling python via XMLRPC. > > I've been doing so lately. It is fast to pick up and makes slick > looking GUI's rath

Re: [Tutor] Fw: what is the difference

2007-12-13 Thread johnf
On Thursday 13 December 2007 03:28:46 pm ALAN GAULD wrote: > Terry Carroll wrote: > > On Thu, 13 Dec 2007, Alan Gauld wrote: > >> > if self._inFlush: > >> > return > >> > self._inFlush = True > >> > > >> > > >> > I can not see the difference but the second one acts differently > > in >

[Tutor] what is the difference

2007-12-13 Thread johnf
if self._inFlush: return self._inFlush = True AND if not self._inFlush: ... self._inFlush = True else: return I can not see the difference but the second one acts differently in my code. -- John Fabiani ___ Tutor m

Re: [Tutor] Pythonic way to "try a few times, then raise exception"?

2007-10-26 Thread johnf
On Friday 26 October 2007 03:17:47 pm Alan Gauld wrote: > "Allen Fowler" <[EMAIL PROTECTED]> wrote > > > I have a block of code buried deep in a module > > that I expect to fail periodically. > > (Calls to other machines over slow network, and such.) > > > > Generally, though, trying it a second /

Re: [Tutor] Python Editors .. which do you reccomend for a amateur?

2007-08-04 Thread johnf
On Saturday 04 August 2007 08:34, Tony Noyeaux wrote: > I've been using Python IDLE,.. tried DrPython,.. had a try of ActiveState > Komodo IDE, Active Python,... > > What is a good python editor to use. I've seen good and bad with all of the > above from my newcomer perspective.. wondering what oth

Re: [Tutor] Which GUI?

2007-07-27 Thread johnf
On Friday 27 July 2007 14:29, scott wrote: > Hi, > > now that I have a very basic understanding of Python I would like to > take a look at programming in a GUI. Which GUI is generally the easiest > to learn? You might want to check out Dabo (www.dabodev.com) which uses wxPython but provide

Re: [Tutor] Python IDE

2007-06-11 Thread johnf
On Monday 11 June 2007 13:01, scott wrote: > Hi, > > I have been using Kdevelop so far to develop and a few bugs it inherits > from Kate/Kwrite are really annoying me. It does not collapse quotes > properly and there are other graphical glitches as well. > > Could someone suggest a few

Re: [Tutor] using re

2007-06-04 Thread johnf
On Monday 04 June 2007 03:10, you wrote: > johnf wrote: > > I have the following > > pattern='^([0-9]{0,%s})(\.[0-9]{0,%s})?$' % (self.IntegerWidth, > > self.DecimalWidth) > > You should use a raw string (prefix with r) to define pattern, though > that is

[Tutor] using re

2007-06-03 Thread johnf
I have the following pattern='^([0-9]{0,%s})(\.[0-9]{0,%s})?$' % (self.IntegerWidth, self.DecimalWidth) ) if re.match(pattern, self.GetValue())==None: self.BackColor == "pink" else: self.BackColor == "white" self.IntegerWidth = 2 self.DecimalWidth=2 the pr

Re: [Tutor] MSSQL Connection

2007-05-22 Thread johnf
On Tuesday 22 May 2007 06:35, Leon Keylin wrote: > Hi John, > > Here's the code (I do have permissions to truncate, works manually under > the same user. > > > import pymssql > > con = pymssql.connect > (host='server',user='user',password='pwd',database='DB_QA') > cur = con.cursor() > > > query="tr

Re: [Tutor] MS SQL Connection

2007-05-21 Thread johnf
On Monday 21 May 2007 16:21, Leon Keylin wrote: > Thanks Mike, unfortunately that's the mod I had problems with before. The > one that > can't do truncate. I've written about it before here and it was easier to > look for > another solution. > > Is there any other way? Should I be looking for a dif

Re: [Tutor] Visual Basic versus Python.. What to choose??

2007-02-20 Thread johnf
On Tuesday 20 February 2007 06:49, Don Taylor wrote: > Asrarahmed Kadri wrote: > > I want to develop an application which uses a database and some forms to > > enter/modify the database. > > The application should also generate reports based on some fields. > > > > What should I be using? Python or

Re: [Tutor] Python referrence

2007-02-09 Thread johnf
On Friday 09 February 2007 10:56, Christopher Arndt wrote: > Rikard Bosnjakovic schrieb: > > On 2/9/07, johnf <[EMAIL PROTECTED]> wrote: > >> Is there a Python tool/document that is similar? Just a simple way to > >> help understand. > > > > Yes, use

[Tutor] Python referrence

2007-02-09 Thread johnf
Hi, In the Visual Fox Pro world there is a help file that allows look ups / searchs for functions, etc... just plain reference infomation. I.e. if I were interested in the MAX() function I would just type Max() and get a page that contained a description of how to use MAX() and what it returned

Re: [Tutor] Optimal solution in dealing with huge databases inpython

2007-01-26 Thread johnf
On Friday 26 January 2007 00:40, Alan Gauld wrote: > "Shadab Sayani" <[EMAIL PROTECTED]> wrote > > > I got your point.But before inserting data I need to store it > > into a file in a format supported by postgresql.Wont this > > operation incur a performance hit as it includes writing > > to a fi

Re: [Tutor] Optimal solution in dealing with huge data bases in python

2007-01-25 Thread johnf
On Thursday 25 January 2007 14:36, Eric Walstad wrote: > Alan Gauld wrote: > > "Shadab Sayani" <[EMAIL PROTECTED]> wrote > > > >> The data I need to deal with is in 100s of GB. > >> I am using postgresql backend and SQLALCHEMY ORM. > > > > All ORMs will introduce a significant performance hit. > >

Re: [Tutor] Optimal solution in dealing with huge databases in python

2007-01-25 Thread johnf
On Wednesday 24 January 2007 19:22, Shadab Sayani wrote: > Hi, > I am working in a biodatabases project.The data I need to deal with is > in 100s of GB.I am using postgresql backend and SQLALCHEMY ORM.I need to > read the bio datafiles and parse them and then store them in database.I am > in t

Re: [Tutor] Tracking time

2007-01-24 Thread johnf
On Wednesday 24 January 2007 14:34, Michael Key wrote: > I am trying to develop a project tracking program that would allow you to > track hours and minutes spent on several different projects and store he > data in a database for printing. Any help would be appreciated. > > Mike Take a good look

Re: [Tutor] search a tuple of tuples

2007-01-21 Thread johnf
On Sunday 21 January 2007 10:30, you wrote: > johnf wrote: > > Hi, > > I want to find a item within a large tuple that contains tuples. > > mytuple = (('name',123,'value'),('first',345,'newvalue')) > > so a 'for loop' w

[Tutor] search a tuple of tuples

2007-01-21 Thread johnf
Hi, I want to find a item within a large tuple that contains tuples. mytuple = (('name',123,'value'),('first',345,'newvalue')) so a 'for loop' works istrue = False for i in range(len(mytuple)): if 'first' in mytuple[i]: istrue = True break if istrue: print " true" Is possible to us

[Tutor] which file runs

2006-12-01 Thread johnf
Hi, if there is a pyc and a py file within a module and the py file has a later date which file will python run? John -- John Fabiani ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Why SelectAll() cannot work well ?

2006-11-30 Thread johnf
On Thursday 30 November 2006 00:13, Jia Lu wrote: > import wx > > ComboList = ['Akari', 'Aika', 'Alice'] > > class MyApp(wx.App): >     def OnInit(self): >         frame = wx.Frame(None, -1, "ARIA", size=(250, 100)) >         frame.Show() > >         self.CBox = wx.ComboBox(frame, -1, "Alicia", pos

Re: [Tutor] Why SelectAll() cannot work well ?

2006-11-30 Thread johnf
On Thursday 30 November 2006 00:13, Jia Lu wrote: > Hi all > > I am using wx Py with FC6. I ran the program below but I found the method > SelectAll() cannot work well.(The last letter didnot be selected.!!) > -- > import wx > > ComboList = ['Akari', 'Aika', 'Alice'] > > class MyApp

Re: [Tutor] python exceptions

2006-11-26 Thread johnf
On Sunday 26 November 2006 16:17, John Fouhy wrote: > On 27/11/06, johnf <[EMAIL PROTECTED]> wrote: > > I can but it's not the issue - I think? I want to know how it works - > > exceptions not handled by python that is. Are there exception handled > > outside of p

Re: [Tutor] python exceptions

2006-11-26 Thread johnf
On Sunday 26 November 2006 15:43, Alan Gauld wrote: > "johnf" <[EMAIL PROTECTED]> wrote > > > My debugger comes up with lots of exceptions (builtin with my IDE > > wing) when I > > run code I have obtained from others. This is not a formating > > e

[Tutor] python exceptions

2006-11-26 Thread johnf
My debugger comes up with lots of exceptions (builtin with my IDE wing) when I run code I have obtained from others. This is not a formating error - but real unhandled exceptions. But the when the program/programs is/are run from the command line they work as expected. So does this mean tha

[Tutor] dump class question

2006-11-12 Thread johnf
Hi, Is it possible to a single that contains two classes: Myclass.py file contains: Class one(object): def needsomething(self): Class two (object): def dosomething(self): I want Class one's methods to access Class two methods? Class one(object): def needsomething(self): return dosom

[Tutor] Second attempt convert DateTimeTyep to datetime.datetime

2006-11-10 Thread johnf
Hi, I'm using FreeTDS (MS SQL database access lib) and for datetime fields it returns a type 'DateTimeType'. I need it in type 'datetime.datetime'. There is very little in the form of a tutorial that explains what I need to do. Can someone help me with this issue. John

[Tutor] datetimetype vs datetime.datetime

2006-11-09 Thread johnf
Hi I'm working on a python interface to freetds. And freetds can access MS SQL database engines. But I'm having trouble with datatime datatypes. The python module I'm using is MSSQL.py written back in 2003. After getting it compiled access to MS SQL works if I stay with simple datatypes (in

Re: [Tutor] Ruby Code Blocks vs. Python Lambdas

2006-11-07 Thread johnf
On Tuesday 07 November 2006 03:20, Andreas Kostyrka wrote: > That's bullshit. Python and Ruby are quite comparable Gee Andreas tell us how you really feel! BTW I agree that Python and Ruby are very close. John ___ Tutor maillist - Tutor@python.org h

Re: [Tutor] re-import

2006-10-29 Thread johnf
On Sunday 29 October 2006 18:25, jhl wrote: > Hi- > > How is the 1st import of a module removed so that new edits on the module > can be re-imported? > > DETAIL: > > I am working on a module/file and importing it into a python shell, trying > it out and then tweaking/editing the module. Then to se

Re: [Tutor] GUI new project

2006-10-22 Thread johnf
On Sunday 22 October 2006 20:03, Luke Paireepinart wrote: > > """Create the Second ListBox""" > > > > self.lbRSSItems = Listbox(self, exportselection=0 > > ,command=self.reveal > > , relief=SUNKEN) > > Because whitespace is

Re: [Tutor] Sharing data between modules

2006-10-19 Thread johnf
On Thursday 19 October 2006 02:41, [EMAIL PROTECTED] wrote: > Hi > > just starting to get to grips with writing GUIs in Python using wxPython > and not being a computer scientist, have a philosophical question about the > "best" way to pass data between various modules. For example, I anticipate >

Re: [Tutor] executing with double click on linux

2006-10-13 Thread johnf
On Friday 13 October 2006 12:33, Alfonso wrote: Could be wrong but can't you use file associations? I do on my SUSE system. John ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] SQL Queries For MySQL

2006-10-12 Thread johnf
On Thursday 12 October 2006 07:14, Jason Massey wrote: > On 10/12/06, johnf <[EMAIL PROTECTED]> wrote: > > On Thursday 12 October 2006 00:31, Alan Gauld wrote: > > > > query = "SELECT * FROM DB WHERE NAME = %s" % (name) > > > > cursor.execute(que

Re: [Tutor] SQL Queries For MySQL

2006-10-12 Thread johnf
On Thursday 12 October 2006 00:31, Alan Gauld wrote: > > query = "SELECT * FROM DB WHERE NAME = %s" % (name) > > cursor.execute(query) > > There can be security issues with this style, especially > if the parameters can be modified by users - for example > you read the values from a web page. > >

[Tutor] is there a tutorial on ez_install.py

2006-09-08 Thread johnf
Hi, Is there a location (web link) that explains the inner workings of setuptools, etc John ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Wondering is there a pyQT list

2006-06-12 Thread johnf
Hi, I was wondering if there is a pyqt list like the [EMAIL PROTECTED] list? Thanks John ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Truly generic database API

2006-06-06 Thread johnf
On Tuesday 06 June 2006 09:22, Smith, Jeff wrote: > I'm looking for a truly generic database API in that the underlying DB > could be text, XML, SQL engine, etc. > > For instance, initially, the underlying database will probably be text > files but we may at some point want to move to a real databa

[Tutor] seg fault from qt

2006-05-26 Thread johnf
Hi, For some reason I have lost qt. I'd like to know what I have to re-install to get python qt lib for SUSE 10.0. When I use YAST I see nothing like python-qt Right now I do import qt I get seg fault John ___ Tutor maillist - Tutor@python.org ht

Re: [Tutor] New programmer, need some help getting started on my first project

2006-05-18 Thread johnf
On Thursday 18 May 2006 16:19, Chris Delgado wrote: > import random > > heads = 0 > tails = 0 > flips = 0 > > if flips <= 100: > >     coin = random.randrange(2) > >     if coin = 0: >         heads += >     elif coin = 1: >         tails += > >     flips +=1 > > print "The coin was flipped 100 tim