Re: [Tutor] Trouble installing Python on Win7 (not a valid Win 32 app)

2011-11-14 Thread Wayne Watson
Note that I did not install some libraries like numpy before uninstall/install. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Trouble installing Python on Win7 (not a valid Win 32 app)

2011-11-14 Thread Wayne Watson
On 11/14/2011 6:17 PM, Marc Tompkins wrote: On Mon, Nov 14, 2011 at 4:55 PM, Wayne Watson wrote: On 11/14/2011 4:04 PM, Marc Tompkins wrote:

Re: [Tutor] Trouble installing Python on Win7 (not a valid Win 32 app)

2011-11-14 Thread Marc Tompkins
On Mon, Nov 14, 2011 at 4:55 PM, Wayne Watson wrote: > > > On 11/14/2011 4:04 PM, Marc Tompkins wrote: > > On Mon, Nov 14, 2011 at 4:00 PM, Wayne Watson < > sierra_mtnv...@sbcglobal.net> wrote: > >> I do not see Python listed there. I see Word Pad, Winamp, Paint, ... >> >> I'm at CP/All CP Items/

Re: [Tutor] Trouble installing Python on Win7 (not a valid Win 32 app)

2011-11-14 Thread Wayne Watson
Hi, I'm going to short circuit my post of about an hour ago that had a jpg file attached.  It may catch up later. What I discovered is that changing the env variable made no difference. On 11/14/2011 2:25 PM, Wayne Werner wrote: On Mon, Nov 14, 2011

Re: [Tutor] going big (in terms of code base)

2011-11-14 Thread Alan Gauld
On 15/11/11 01:01, Rance Hall wrote: I think perhaps we are talking past each other here. I'm thinking a sort of skeleton directory that already has the basic code to create a basic main window, with a menubar and status message box at the bottom. That includes basic functions of db connectivi

Re: [Tutor] going big (in terms of code base)

2011-11-14 Thread Rance Hall
On Mon, Nov 14, 2011 at 5:01 PM, Wayne Werner wrote: > On Mon, Nov 14, 2011 at 2:49 PM, Rance Hall wrote: >> >> GUIs add a lot of code bloat and lots of chances for bugs that have >> nothing to do with the logic of your program. > > I'm not sure that I would entirely agree with this statement.

Re: [Tutor] Trouble installing Python on Win7 (not a valid Win 32 app)

2011-11-14 Thread Wayne Watson
On 11/14/2011 4:04 PM, Marc Tompkins wrote: On Mon, Nov 14, 2011 at 4:00 PM, Wayne Watson wrote: I do not see Python listed there. I see Word Pad, Winamp, Paint, ...

Re: [Tutor] going big (in terms of code base)

2011-11-14 Thread Alan Gauld
On 14/11/11 20:49, Rance Hall wrote: There are lots of new concepts to grasp here: From basic GUI stuff like event handlers to understanding class layout and what things go in this class and what things go in that one. Try the "event driven programming" and OOP topics in my tutor... Before p

Re: [Tutor] Trouble installing Python on Win7 (not a valid Win 32 app)

2011-11-14 Thread Marc Tompkins
On Mon, Nov 14, 2011 at 4:00 PM, Wayne Watson wrote: > I do not see Python listed there. I see Word Pad, Winamp, Paint, ... > > I'm at CP/All CP Items/Default prgrms/Set Defaults > > My bad. It's Control Panel\Programs\Default Programs\Set Associations. (I could be wrong, but wasn't this all in

Re: [Tutor] Trouble installing Python on Win7 (not a valid Win 32 app)

2011-11-14 Thread Wayne Watson
I do not see Python listed there. I see Word Pad, Winamp, Paint, ... I'm at CP/All CP Items/Default prgrms/Set Defaults On 11/14/2011 2:18 PM, Marc Tompkins wrote: On Mon, Nov 14, 2011 at 2:08 PM, Wayne Watson wr

Re: [Tutor] interesting behaviour with postional output

2011-11-14 Thread Steven D'Aprano
Cranky Frankie wrote: I'm working on writing out postional output. When I use this statement: print('%-40s%s' % (element_list[0], element_list[1])) I get nice, lined up columns on the screen. When I write to a file like this: new_line = ('%-40s%s%s' % (element_list[0], element_list[1],'\n')

Re: [Tutor] Cython vs Python-C API

2011-11-14 Thread Steven D'Aprano
Jaidev Deshpande wrote: 1. I can either compile the C code into a module using the Python-C/C++ API, through which I can simple 'import' the required function. 2. I can use the Python code and extend it using Cython. Which will give me a better performance? The only way to be sure is to do bo

Re: [Tutor] going big (in terms of code base)

2011-11-14 Thread Wayne Werner
On Mon, Nov 14, 2011 at 2:49 PM, Rance Hall wrote: > So far Ive been a very procedural based coder. Ive not cared much > for Object Oriented stuff because I didn't learn to think/program that > way. (think Fortran/Pascal, etc) > There's always room for growth! I think that if you can understan

Re: [Tutor] Trouble installing Python on Win7 (not a valid Win 32 app)

2011-11-14 Thread Wayne Werner
On Mon, Nov 14, 2011 at 4:08 PM, Wayne Watson wrote: > I had py 2.5.2 installed (Yes, I know it's old) on my Win 7 64-bit PC > earlier this year, but it began to fail back in June. I tried a > uninstall/install, but that got me nowhere. I tried again yesterday. > Uninstalled, then puzzled over w

Re: [Tutor] Trouble installing Python on Win7 (not a valid Win 32 app)

2011-11-14 Thread Marc Tompkins
On Mon, Nov 14, 2011 at 2:08 PM, Wayne Watson wrote: > I had py 2.5.2 installed (Yes, I know it's old) on my Win 7 64-bit PC > earlier this year, but it began to fail back in June. I tried a > uninstall/install, but that got me nowhere. I tried again yesterday. > Uninstalled, then puzzled over w

[Tutor] Trouble installing Python on Win7 (not a valid Win 32 app)

2011-11-14 Thread Wayne Watson
I had py 2.5.2 installed (Yes, I know it's old) on my Win 7 64-bit PC earlier this year, but it began to fail back in June. I tried a uninstall/install, but that got me nowhere. I tried again yesterday. Uninstalled, then puzzled over whether I should delete the remaining python25 folder. The

Re: [Tutor] Handling a Unicode Return using Pyodbc

2011-11-14 Thread Marc Tompkins
On Mon, Nov 14, 2011 at 1:43 PM, Tony Pelletier wrote: > Good Afternoon, > > I'm writing a program that is essentially connecting to MS SQL Server and > dumping all the contents of the tables to separate csv's. I'm almost > complete, but now I'm running into a Unicode issue and I'm not sure how t

Re: [Tutor] Cython vs Python-C API

2011-11-14 Thread Jerry Hill
On Mon, Nov 14, 2011 at 3:30 PM, Jaidev Deshpande < deshpande.jai...@gmail.com> wrote: > Hi > > I need to perform cubic spline interpolation over a range of points, and I > have written the code for the same in C and in Python. > > The interpolation is part of a bigger project. I want to front end

[Tutor] Handling a Unicode Return using Pyodbc

2011-11-14 Thread Tony Pelletier
Good Afternoon, I'm writing a program that is essentially connecting to MS SQL Server and dumping all the contents of the tables to separate csv's. I'm almost complete, but now I'm running into a Unicode issue and I'm not sure how to resolve it. I have a ridiculous amount of tables but I managed

Re: [Tutor] interesting behaviour with postional output

2011-11-14 Thread Rance Hall
On Mon, Nov 14, 2011 at 3:16 PM, Joel Goldstick wrote: > So, as was stated, best to use mono space if you are writing to a terminal. > If you are writing web pages, of course you have lots of formatting options > > -- > Joel Goldstick One option I've used in the past for issues such as this is e

Re: [Tutor] interesting behaviour with postional output

2011-11-14 Thread Joel Goldstick
On Mon, Nov 14, 2011 at 2:26 PM, Chris Fuller wrote: > > Fonts can be categorized as "fixed" or "proportional" widths. Proportional > width fonts have different widths depending on the character. > > If you want to line up text, you must use fixed width fonts like courier, > or > use tabs, but t

[Tutor] going big (in terms of code base)

2011-11-14 Thread Rance Hall
Ive just finished a major project with python and database connectivity. It was cool, and the friend I wrote it for was happy. It was strictly a terminal based app. To GUI of any sort. Because I like to write cross platform apps as much as possible, tools like python and os common widget sets l

Re: [Tutor] interesting behaviour with postional output

2011-11-14 Thread Chris Fuller
Fonts can be categorized as "fixed" or "proportional" widths. Proportional width fonts have different widths depending on the character. If you want to line up text, you must use fixed width fonts like courier, or use tabs, but that can be unreliable. You can get fancy and measure the width

[Tutor] Cython vs Python-C API

2011-11-14 Thread Jaidev Deshpande
Hi I need to perform cubic spline interpolation over a range of points, and I have written the code for the same in C and in Python. The interpolation is part of a bigger project. I want to front end for the project to be Python. Ideally I want Python only to deal with data visualization and i/o,

Re: [Tutor] [OSX] "Executable" .py or pyc script (stuck at Applescript)

2011-11-14 Thread Alan Gauld
On 14/11/11 13:40, learner404 wrote: I will try to see if there's something like "inno setup" to make an installer. If anyone have something to recommend for this i'm interested. I'm no Mac/Python expert but I seem to recall the MacPython web page had info on how to create a Mac App bundle th

Re: [Tutor] interesting behaviour with postional output

2011-11-14 Thread Alan Gauld
On 14/11/11 18:58, Cranky Frankie wrote: I'm working on writing out postional output. When I use this statement: print('%-40s%s' % (element_list[0], element_list[1])) ... a very funny thing happens. When I open the file in Notepad, the columns are not lined up, however when I switch the fon

[Tutor] interesting behaviour with postional output

2011-11-14 Thread Cranky Frankie
I'm working on writing out postional output. When I use this statement: print('%-40s%s' % (element_list[0], element_list[1])) I get nice, lined up columns on the screen. When I write to a file like this: new_line = ('%-40s%s%s' % (element_list[0], element_list[1],'\n')) file_out.write(new_lin

Re: [Tutor] plot

2011-11-14 Thread lina
May I ask something I met during reading the graph links provided? For the case I faced now, ... [['76', '34', '76'], ['1', '5', '1']] [['64', '62', '58'], ['64', '58', '64'], ['13', '46', '64']] ... [['64', '75', '64'], ['62', '46', '13'], ['64', '75', '64'], ['64', '75', '62'], ['64', '75', '

Re: [Tutor] plot

2011-11-14 Thread lina
On Mon, Nov 14, 2011 at 10:12 PM, Walter Prins wrote: > Hi Lina, > > On 14 November 2011 12:39, lina wrote: >> >> I have not experienced in "plot a figure" with python. >> Try python-pygraphviz is a good choice? > > Graphviz is a library to help visualize graphs in the computer science > sense. 

Re: [Tutor] [OSX] "Executable" .py or pyc script (stuck at Applescript)

2011-11-14 Thread Dario Lopez-Kästen
Try PyInstaller http://www.pyinstaller.org/ /dario On Nov 14, 2011 2:43 PM, "learner404" wrote: > > On Fri, Nov 11, 2011 at 12:02 AM, Prasad, Ramit > wrote: > > It is probably easiest to keep myapp.py in the home directory (or >> subdirectory of it) and say "python ~/myapp.py" (or "python >>

Re: [Tutor] plot

2011-11-14 Thread Walter Prins
Hi Lina, On 14 November 2011 12:39, lina wrote: > I have not experienced in "plot a figure" with python. > Try python-pygraphviz is a good choice? > Graphviz is a library to help visualize graphs in the computer science sense. (See http://en.wikipedia.org/wiki/Graph_%28data_structure%29 or th

Re: [Tutor] [OSX] "Executable" .py or pyc script (stuck at Applescript)

2011-11-14 Thread learner404
On Fri, Nov 11, 2011 at 12:02 AM, Prasad, Ramit wrote: It is probably easiest to keep myapp.py in the home directory (or > subdirectory of it) and say "python ~/myapp.py" (or "python > ~/.roadierich/myapp.py) from the applescript > > I will go with that for now. My python script is using a bunch

[Tutor] plot

2011-11-14 Thread lina
Hi, I have not experienced in "plot a figure" with python. Just wonder: Try python-pygraphviz is a good choice? http://pzwart3.wdka.hro.nl/wiki/PythonGraphviz another question: pygrphviz can achieve a better effect than the one on the wikipage, such as can I change the round circle into somet