Re: Puzzled

2015-11-06 Thread Chris Gonnerman
Wendy said: I installed Python 3.5.0 64-bit for Windows yesterday and tried some basic programs successfully. This morning I rebooted my computer and can't get a single one to work. The interpreter seems to be fine and the environment variables look correct. But every py file I try to run at

Re: Shebang line on Windows?

2013-02-25 Thread Chris Gonnerman
On 02/25/2013 06:35 AM, Sells, Fred wrote: When moving from windows to unix you need to run "dos2unix" on any programs that use shebang (at least with python 2.6) that is installed on some platforms but must be installed on others like CentOs but it is in their repository. Or edit it in Vi

Re: cannot concatenate 'str' and 'list' objects

2012-09-15 Thread Chris Gonnerman
On 09/15/2012 10:23 AM, Νικόλαος Κούρας wrote: I swicthed back my code to: f = open( '../' + page ) and http://superhost.gr works which means that line gets parsed correctly. Only when i post data to the text area boxes iam getting the error: cannot concatenate 'str' and 'list' objects how i

Re: cannot concatenate 'str' and 'list' objects

2012-09-15 Thread Chris Gonnerman
I moved to HostGaot because i heard there were the best in the hosting business. They are pretty good. However, you have to understand the site layout to do CGI safely. So long as your script are .cgi, putting them in ~/public_html is fine. If you need to deploy .py files, you need to pu

Re: [Python] Re: PyPI question, or, maybe I'm just stupid

2012-07-30 Thread Chris Gonnerman
On 07/29/2012 11:00 PM, Ben Finney wrote: Your post is showing up as a reply to a thread about IEEE-784 floats, because you created your message as a reply. Consequently, it's rather confusing why you suddenly start talking about PollyReports. If you want to attract attention to an unrelated to

Re: [Python] Re: PyPI question, or, maybe I'm just stupid

2012-07-30 Thread Chris Gonnerman
On 07/30/2012 04:20 AM, Dieter Maurer wrote: "CHANGES.txt" is not automatically presented. If necessary, you must integrate it into the "long description". However, personally, I am not interested in all the details (typically found in "CHANGES.txt") but some (often implicit) information is suff

PyPI question, or, maybe I'm just stupid

2012-07-29 Thread Chris Gonnerman
I've been making some minor updates to the PollyReports module I announced a while back, and I've noticed that when I upload it to PyPI, my changelog (CHANGES.txt) doesn't appear to be integrated into the site at all. Do I have to put the changes into the README, or have I missed something her

RE: How to safely maintain a status file

2012-07-13 Thread Chris Gonnerman
On 07/13/2012 12:59 PM, Prasad, Ramit wrote: I lean slightly towards the POSIX handling with the addition that any additional write should throw an error. You are now saving to a file that will not exist the moment you close it and that is probably not expected. Ramit But if I created, then del

Re: [Python] RE: How to safely maintain a status file

2012-07-13 Thread Chris Gonnerman
On 07/13/2012 11:00 AM, Prasad, Ramit wrote: Well "neat tricks" aside, I am of the firm belief that deleting files should never be possible whilst they are open. This is one of the few instances I think Windows does something better than OS X. Windows will check before you attempt to delete (i.e

Re: ANN: PollyReports 1.5 -- Band-oriented PDF Report Generator

2012-07-12 Thread Chris Gonnerman
Wow, I posted this on Github weeks ago, and got no feedback; put it on PyPI at the same time, with the same results; but one day on the Python list and I have lots of excellent feedback. I've just posted PollyReports 1.5.1, with no operational changes. The package includes a corrected testpoll

Re: ANN: PollyReports 1.5 -- Band-oriented PDF Report Generator

2012-07-12 Thread Chris Gonnerman
Apparently my test hasn't kept up with my update. I'll get it revised soon and make a new release. BTW... who is Simon? I wrote the tutorial. (Solomoriah is an old handle I still use a lot since it's less common than Chris.) -- Chris. On 07/12/2012 03:32 AM, Johann Spies wrote: On 12 Jul

ANN: PollyReports 1.5 -- Band-oriented PDF Report Generator

2012-07-11 Thread Chris Gonnerman
lyReports and on Github: https://github.com/Solomoriah/PollyReports and I have a blog where I talk about it (like anyone cares): http://opensource.gonnerman.org/?cat=4 Here's the README: PollyReports.py Copyright (c) 2012 Chris Gonnerman All Rights Reserved See the LICENSE file for mo

Re: [Python] Why I need the parameter when the call doesn't use it?

2011-08-28 Thread Chris Gonnerman
On 08/28/2011 07:26 PM, Niklas Rosencrantz wrote: I modularize code for a webapp and I want to know what python makes that a need to define an argument called self? Here's some code where I'm modularizing a recaptcha test to a function and the I must add the parameter "self" to the function is

Re: [Python] Re: Windows service in production?

2011-08-18 Thread Chris Gonnerman
Chiming in late here, but I've been running a very simple Python service for some time now on a number of computers. It's my Raw Print Server, available at http://newcenturycomputers.net/projects/rawprintserver.html, and I have instructions on the page for installing the Windows service versio

Re: [Python] Re: Windows service in production?

2011-08-18 Thread Chris Gonnerman
Chiming in late here, but I've been running a very simple Python service for some time now on a number of computers. It's my Raw Print Server, available at http://newcenturycomputers.net/projects/rawprintserver.html, and I have instructions on the page for installing the Windows service versio

International translation of docs - is it a scam?

2011-06-07 Thread Chris Gonnerman
On the 30th of May, I received an email from a man (I'll leave out his name, but it was properly male) offering to translate the docs for the gdmodule (which I maintain) into Belorussian. He wanted my approval, and a link from my page to his. This seemed fair, so I told him to tell me when it

Re: [Python] how to tell if cursor is sqlite.Cursor or psycopg2.Cursor

2011-01-24 Thread Chris Gonnerman
You're looking at it wrong. It doesn't matter what type of cursor it is, only if you can get the correct number. So use a try...except: try: cursor.execute(""" select last_insert_rowid() """) except: cursor.execute(""" select currval('my_sequence') """) That's

Re: [Python] How can a function find the function that called it?

2010-12-24 Thread Chris Gonnerman
On 12/24/2010 10:24 AM, kj wrote: I want to implement a frozen and ordered dict. I thought I'd implement it as a subclass of collections.OrderedDict that prohibits all modifications to the dictionary after it has been initialized. In particular, calling this frozen subclass's update method shou

Re: [Python] scipy code runs in empty directory, not another

2010-11-13 Thread Chris Gonnerman
On 11/13/2010 07:52 AM, Beliavsky wrote: After installing numpy, scipy, and matplotlib for python 2.6 and running the code from http://www.scipy.org/Cookbook/OptimizationDemo1 (stored as xoptimize.py) in a directory with other python codes, I got the error messages C:\python\code\mycode>python x

Re: [Python] Unsupported Format Character '&' (0x26)

2010-08-19 Thread Chris Gonnerman
On 08/18/2010 06:35 PM, Andrew Evans wrote: I get an error message "Unsupported Format Character '&' (0x26)" I narrowed it down to these two variables any idea how to fix it? SEARCH_URL_0 = "http://search.yahoo.com/search;_ylt=A0oGdEf1XGxMJRoAUdml87UF;_ylc=X1MDMjE0MjQ3ODk0OARfcgMyBGZyA3NmcA

Re: [Python] favicon.ico problem

2010-08-09 Thread Chris Gonnerman
On 08/09/2010 11:32 PM, Navkirat Singh wrote: I am having this strange problem. I have programmed a very basic multiprocessing webserver using low level sockets. Each time the server receives a request it spawns a new process to handle the request. Now when through a web browser I type http://

Re: [Python] Hashbang error

2010-06-01 Thread Chris Gonnerman
pradeepbpin wrote: I use gVim as an editor to create python scripts on a windows machine. To run the same script on my ubuntu machine, I added a hashbang line to the script. Now when I run this script from command line of ubuntu, I get a bad interpreter error, like below /usr/bin/python^M: bad i

Re: [Python] Re: Printing plain text with exact positioning on Windows

2010-01-06 Thread Chris Gonnerman
KvS wrote: Ok, actually I quite like being able to print straightforward through your code, i.e. without any extra modules installed. I understand that sending text to the printer is in principle as simple as dc.TextOut(scale_factor * 72, -1 * scale_factor * 72, "Testing...") I didn't s

Re: [Python] Re: Printing plain text with exact positioning on Windows

2010-01-05 Thread Chris Gonnerman
KvS wrote: Sorry, one more. I completely forgot it's not exactly plain text, but occasionally also a limited number of non-ASCII characters (accents in names etc.). Would this be possible through your method? If Windows can print it, then MSWinPrint.py should be able to also. But I haven't tes

Re: [Python] Re: Printing plain text with exact positioning on Windows

2010-01-05 Thread Chris Gonnerman
KvS wrote: ... can I adjust the options normally appearing in the Printing Dialog through Python? Yes, if you use my method or my module, as I gave in my previous post. If you use Adobe Reader to print, I'm not sure how to automate the print settings. -- http://mail.python.org/mailman/list

Re: [Python] Printing plain text with exact positioning on Windows

2010-01-05 Thread Chris Gonnerman
KvS wrote: So now I'm looking for other ways to get this printing job done. I know of Tim Goldens page about Windows printing: http://timgolden.me.uk/python/win32_how_do_i/print.html and have been googling a lot, but I'm still not convinced what the best way to go is. E.g. I can't get clear wheth

Re: os.system('cls')

2008-12-25 Thread Chris Gonnerman
Depends on what operating system you are using. The list of possible commands would be unbounded, if not truly infinite. > From: Dennis van Oosterhout [mailto:de.slotenzwem...@gmail.com] > > Hi there! I was searching for a way to clear the 'DOS screen'/command > screen etc. and found that os.s

Re: [Python] Re: efficient data loading with Python, is that possible possible?

2007-12-14 Thread Chris Gonnerman
Neil Cerutti wrote: > An inefficient parsing technique is probably to blame. You first > inspect the line to make sure it is valid, then you inspect it > (number of column type) times to discover what data type it > contains, and then you inspect it *again* to finally translate > it. > I was thi

Re: Clearing a DOS terminal in a script

2007-12-14 Thread Chris Gonnerman
Stephen_B wrote: > This doesn't seem to work in a dos terminal at the start of a script: > > from os import popen > print popen('clear').read() > > Any idea why not? Thanks. > As others have mentioned, you should just do: os.system("cls") Or, you can use my WConio module for fancier work. htt

Why Python 3?

2007-12-04 Thread Chris Gonnerman
with the current Python release... and it's a pretty small module. I just don't see the point. I feel like we already have all we need in Python 2. I feel like the language is becoming less and less "friendly" and "readable" as it evolves. Just my two cents, I guess. -- Chris Gonnerman -- http://mail.python.org/mailman/listinfo/python-list

Re: Python on Vista installation issues

2007-05-24 Thread Chris Gonnerman
find one. -- ------- Chris Gonnerman <[EMAIL PROTECTED]> Owner, New Century Computers Phone 660-213-3822 Fax 660-213-3339 -- http://mail.python.org/mailman/listinfo/python-list

Re: Python on Vista installation issues

2007-05-23 Thread Chris Gonnerman
? Okay, that's off topic, but I had to vent. -- ------- Chris Gonnerman <[EMAIL PROTECTED]> Owner, New Century Computers Phone 660-213-3822 Fax 660-213-3339 -- http://mail.python.org/mailman/listinfo/python-list

Python on Vista installation issues

2007-05-22 Thread Chris Gonnerman
w to fix or avoid this problem? -- ------- Chris Gonnerman <[EMAIL PROTECTED]> Owner, New Century Computers Phone 660-213-3822 Fax 660-213-3339 -- http://mail.python.org/mailman/listinfo/python-list

Re: some suggestions about GUI toolkits?

2005-12-28 Thread Chris Gonnerman
iclinux wrote: > I have to build a GUI applicaiton that could run on different OS such > as windows and *nix, which GUI toolkit is better? > I've had good luck with both Tkinter and PyGTK. I don't really like the look and feel of Tkinter, though it has gotten better over time; but PyGTK invol

Re: Will python never intend to support private, protected and public?

2005-09-28 Thread Chris Gonnerman
could ildg wrote: >If private and protected is supported, python will be perfect. > Python IS perfect. Each new release makes it MORE perfect. :) There are two philosophies about programming: -- Make it hard to do wrong. -- Make it easy to do right. What you are promoting is the first philos

[ANN] Alternative Readline for Windows -- Binary Installer for Python 2.4 released

2005-03-05 Thread Chris Gonnerman
This is to announce the release of a binary installer for my Alternative Readline for Windows. This module provides interactive command-line editing for Python on Windows. I realize the console functions of Windows 2000, XP, and 2003 work in the newest Python versions, but it appears that many p

[ANN] WConio 1.5 Binary Installer for Python 2.4

2005-03-05 Thread Chris Gonnerman
At long last I've upgraded to Python 2.4 on my Windows development host, and as a direct result I have released a WConio 1.5 binary installer for Python 2.4. WConio is my Windows CONsole I/O for Python module. It emulates the conio.h functionality of Turbo C 2.0. This module is based heavily on

ANN: gdmodule 0.54

2005-03-03 Thread Chris Gonnerman
e on my website alongside the current version. You can download gdmodule from: http://newcenturycomputers.net/projects/gdmodule.html -- Chris Gonnerman -- http://mail.python.org/mailman/listinfo/python-list