Re: remote read eval print loop

2012-08-17 Thread Chris Angelico
On Fri, Aug 17, 2012 at 12:27 PM, Steven D'Aprano wrote: > There is already awesome protocols for running Python code remotely over > a network. Please do not re-invent the wheel without good reason. > > See pyro, twisted, rpyc, rpclib, jpc, and probably many others. But they're all tools for bui

Re: Top-posting &c. (was Re: [ANNC] pybotwar-0.8)

2012-08-17 Thread rusi
On Aug 17, 3:36 am, Chris Angelico wrote: > On Fri, Aug 17, 2012 at 1:40 AM, Ramchandra Apte > wrote: > > On 16 August 2012 21:00, Mark Lawrence wrote: > >> and "bottom" reads better than "top" > > > Look you are the only person complaining about top-posting. > > GMail uses top-posting by defau

Re: Top-posting &c. (was Re: [ANNC] pybotwar-0.8)

2012-08-17 Thread Jurko Gospodnetić
Hi. As a lurker, I agree completely with Chris's sentiments. +1 Best regards, Jurko Gospodnetić -- http://mail.python.org/mailman/listinfo/python-list

python-list@python.org

2012-08-17 Thread Ulrich Eckhardt
I that Outlook & Co are guilty. That and the fact that few people even think about this. Even today that makes sense, because it provides an exact context. Without that, you wouldn't be able to really understand what exactly a person is referring to. Also, it helps people to structure their tho

sqlalchemy.exc.ProgrammingError: (ProgrammingError) ('42000', "[42000] [Microsoft][ODBC SQL Server Driver][SQL Server]'f2f68'

2012-08-17 Thread nepaul
===case1==: import sqlalchemy test1 = "631f2f68-8731-4561-889b-88ab1ae7c95a" cmdTest1 = "select * from analyseresult where uid = " + test1 engine = sqlalchemy.create_engine("mssql+pyodbc://DumpResult:123456@localhost/DumpResult") c = engine.execute(

Re: sqlalchemy.exc.ProgrammingError: (ProgrammingError) ('42000', "[42000] [Microsoft][ODBC SQL Server Driver][SQL Server]'f2f68'

2012-08-17 Thread Alain Ketterlin
nepaul writes: > ===case1==: > import sqlalchemy > test1 = "631f2f68-8731-4561-889b-88ab1ae7c95a" > cmdTest1 = "select * from analyseresult where uid = " + test1 > engine = > sqlalchemy.create_engine("mssql+pyodbc://DumpResult:123456@localhost/Dum

Re: sqlalchemy.exc.ProgrammingError: (ProgrammingError) ('42000', "[42000] [Microsoft][ODBC SQL Server Driver][SQL Server]'f2f68'

2012-08-17 Thread Peter Otten
nepaul wrote: > ===case1==: > import sqlalchemy > test1 = "631f2f68-8731-4561-889b-88ab1ae7c95a" > cmdTest1 = "select * from analyseresult where uid = " + test1 > engine = > sqlalchemy.create_engine("mssql+pyodbc://DumpResult:123456@localhost/DumpRe

Re: remote read eval print loop

2012-08-17 Thread rusi
On Aug 17, 12:25 pm, Chris Angelico wrote: > On Fri, Aug 17, 2012 at 12:27 PM, Steven D'Aprano > > wrote: > > There is already awesome protocols for running Python code remotely over > > a network. Please do not re-invent the wheel without good reason. > > > See pyro, twisted, rpyc, rpclib, jpc,

Re: Dynamically determine base classes on instantiation

2012-08-17 Thread Richard Thomas
On Thursday, 16 August 2012 19:49:43 UTC+2, Steven D'Aprano wrote: > On Thu, 16 Aug 2012 10:03:51 -0700, Richard Thomas wrote: > > > > > class Foo(object): > > > def __new__(cls, arg): > > > if isinstance(arg, list): > > > cls = FooList > > > elif isinstance(

Re: set and dict iteration

2012-08-17 Thread Ulrich Eckhardt
Am 17.08.2012 03:01, schrieb Paul Rubin: Ian Kelly writes: With regard to key insertion and deletion while iterating over a dict or set, though, there is just no good reason to be doing that (especially as the result is very implementation-specific), and I wouldn't mind a more complete low-leve

Re: [ANNC] pybotwar-0.8

2012-08-17 Thread Hans Mulder
On 16/08/12 23:34:25, Walter Hurry wrote: > On Thu, 16 Aug 2012 17:20:29 -0400, Terry Reedy wrote: > >> On 8/16/2012 11:40 AM, Ramchandra Apte wrote: >> >>> Look you are the only person complaining about top-posting. >> >> No he is not. Recheck all the the responses. >> >>> GMail uses top-posting

Re: Top-posting &c. (was Re: [ANNC] pybotwar-0.8)

2012-08-17 Thread Grant Edwards
On 2012-08-16, Chris Angelico wrote: > On Fri, Aug 17, 2012 at 1:40 AM, Ramchandra Apte > wrote: >> On 16 August 2012 21:00, Mark Lawrence wrote: >> >>> and "bottom" reads better than "top" >> >> Look you are the only person complaining about top-posting. That may have been true -- in this thr

Re: remote read eval print loop

2012-08-17 Thread Eric Frederich
What I wanted to implement was a debugging console that runs right on the client rather than on the server. You'd have to be logged into the application to do anything meaningful or even start it up. All of the C functions that I created bindings for respect the security of the logged in user. Wit

[CGI] Why is HTML not rendered?

2012-08-17 Thread Gilles
Hello I'm learning how to call Python scripts through the different solutions available. For some reason, this CGI script that I found on Google displays the contents of the variable but the HTML surrounding it is displayed as-is by the browser instead of being rendered: -- #

Re: [CGI] Why is HTML not rendered?

2012-08-17 Thread Rob Day
On 17 August 2012 14:27, Gilles wrote: > > print "Content-Type: text/plain;charset=utf-8" > print > Here's the problem - you're telling the browser to display in plain text. Try 'text/html' instead. -- Robert K. Day robert@merton.oxon.org -- http://mail.python.org/mailman/listinfo/python

Re: [CGI] Why is HTML not rendered?

2012-08-17 Thread Dan Sommers
On 2012-08-17 at 15:27:59 +0200, Regarding "[CGI] Why is HTML not rendered?," Gilles wrote: > For some reason, this CGI script that I found on Google displays the > contents of the variable but the HTML surrounding it is displayed > as-is by the browser instead of being rendered: ... [with all d

Re: [CGI] Why is HTML not rendered?

2012-08-17 Thread Robert Kern
On 8/17/12 2:27 PM, Gilles wrote: Hello I'm learning how to call Python scripts through the different solutions available. For some reason, this CGI script that I found on Google displays the contents of the variable but the HTML surrounding it is displayed as-is by the browser instead

Re: [CGI] Why is HTML not rendered?

2012-08-17 Thread Alexander Blinne
On 17.08.2012 15:27, Gilles wrote: > For some reason, this CGI script that I found on Google displays the > contents of the variable but the HTML surrounding it is displayed > as-is by the browser instead of being rendered: > print "Content-Type: text/plain;charset=utf-8" With this line you tell

Re: remote read eval print loop

2012-08-17 Thread Chris Angelico
On Fri, Aug 17, 2012 at 11:28 PM, Eric Frederich wrote: > Within the debugging console, after importing all of the bindings, there > would be no reason to import anything whatsoever. > With just the bindings I created and the Python language we could do > meaningful debugging. > So if I block the

Re: Crashes always on Windows 7

2012-08-17 Thread Dave Angel
On 08/17/2012 09:38 AM, zmagi...@gmail.com wrote: > Hi, > > Downloaded ActiveSync ActivePython on my Windows 7 machine. Worked for a > little while and now it crashes every time I try to boot the IDLE or open a > program, it crashes. Help please? Thanks I'm not aware of any boot option for Windo

pythonic interface to SAPI5?

2012-08-17 Thread Vojtěch Polášek
Hi, I am developing audiogame for visually impaired users and I want it to be multiplatform. I know, that there is library called accessible_output but it is not working when used in Windows for me. I tried pyttsx, which should use Espeak on Linux and SAPI5 on Windows. It works on Windows, on Linux

Re: [CGI] Why is HTML not rendered?

2012-08-17 Thread Gilles
On Fri, 17 Aug 2012 14:44:37 +0100, Robert Kern wrote: >> For some reason, this CGI script that I found on Google displays the >> contents of the variable but the HTML surrounding it is displayed >> as-is by the browser instead of being rendered Thanks all. I (obviously) combined two scripts but

Re: Top-posting &c. (was Re: [ANNC] pybotwar-0.8)

2012-08-17 Thread rusi
On Aug 17, 10:19 am, Dennis Lee Bieber wrote: > On Thu, 16 Aug 2012 15:42:54 -0700 (PDT), Madison May > declaimed the following in > gmane.comp.python.general: > > > > > As a lurker, I agree completely with Chris's sentiments. > >         I've been holding back on quoting the "netiquette RFC"...

Re: Crashes always on Windows 7

2012-08-17 Thread Ian Kelly
On Aug 17, 2012 8:58 AM, "Dave Angel" wrote: > > Also, please tell us the versions involved, and in the case of > ActiveSync, where you got it. > > http://sourceforge.net/apps/trac/unattended/wiki/ActiveSync > seems to be perl related, not Python. > > Presumably you mean the Microsoft product

Re: How do I display unicode value stored in a string variable using ord()

2012-08-17 Thread wxjmfauth
Le vendredi 17 août 2012 01:59:31 UTC+2, Terry Reedy a écrit : > a = '…' > > print(ord(a)) > > >>> > > 8230 > > Most things with unicode are easier in 3.x, and some are even better in > > 3.3. The current beta is good enough for most informal work. 3.3.0 will > > be out in a month. > > >

Re: set and dict iteration

2012-08-17 Thread Aaron Brady
On Thursday, August 16, 2012 6:07:40 PM UTC-5, Ian wrote: > On Thu, Aug 16, 2012 at 4:55 PM, Ian Kelly wrote: > > > On Thu, Aug 16, 2012 at 12:00 PM, Aaron Brady wrote: > > >> The inconsistency is, if we remove an element from a set and add another > >> during iteration, the new element might

Re: set and dict iteration

2012-08-17 Thread Aaron Brady
On Thursday, August 16, 2012 8:01:39 PM UTC-5, Paul Rubin wrote: > Ian Kelly writes: > > > With regard to key insertion and deletion while iterating over a dict > > > or set, though, there is just no good reason to be doing that > > > (especially as the result is very implementation-specific),

Re: set and dict iteration

2012-08-17 Thread Aaron Brady
On Thursday, August 16, 2012 9:30:42 PM UTC-5, Paul Rubin wrote: > Steven D'Aprano writes: > > > Luckily, Python is open source. If anyone thinks that sets and dicts > > > should include more code protecting against mutation-during-iteration, > > > they are more than welcome to come up with a

Re: How do I display unicode value stored in a string variable using ord()

2012-08-17 Thread Jerry Hill
On Fri, Aug 17, 2012 at 1:49 PM, wrote: > The character '…', Unicode name 'HORIZONTAL ELLIPSIS', > is one of these characters existing in the cp1252, mac-roman > coding schemes and not in iso-8859-1 (latin-1) and obviously > not in ascii. It causes Py3.3 to work a few 100% slower > than Py<3.3 ve

Re: set and dict iteration

2012-08-17 Thread Aaron Brady
On Thursday, August 16, 2012 9:24:44 PM UTC-5, Steven D'Aprano wrote: > On Thu, 16 Aug 2012 19:11:19 -0400, Dave Angel wrote: > > > > > On 08/16/2012 05:26 PM, Paul Rubin wrote: > > >> Dave Angel writes: > > >>> Everything else is implementation defined. Why should an > > >>> implementation

Re: How do I display unicode value stored in a string variable using ord()

2012-08-17 Thread wxjmfauth
Le vendredi 17 août 2012 20:21:34 UTC+2, Jerry Hill a écrit : > On Fri, Aug 17, 2012 at 1:49 PM, wrote: > > > The character '…', Unicode name 'HORIZONTAL ELLIPSIS', > > > is one of these characters existing in the cp1252, mac-roman > > > coding schemes and not in iso-8859-1 (latin-1) and obvio

Re: SSLSocket.getpeercert() doesn't return issuer, serial number, etc

2012-08-17 Thread Gustavo Baratto
Awesome guys! Thank you very much! I ended up using "binary_form=True" and using M2Crypto to parse the cert. Cheers, g. On Thu, Aug 16, 2012 at 4:48 AM, Antoine Pitrou wrote: > > Hello, > > Gustavo Baratto gmail.com> writes: > > > > SSL.Socket.getpeercert() doesn't return essential informatio

Re: ONLINE SERVER TO STORE AND RUN PYTHON SCRIPTS

2012-08-17 Thread Ian Kelly
On Fri, Aug 17, 2012 at 6:46 AM, coldfire wrote: > I would like to know that where can a python script be stored on-line from > were it keep running and can be called any time when required using internet. > I have used mechanize module which creates a webbroswer instance to open a > website and

Python 2.7 import socket urllib fails to load, module not found

2012-08-17 Thread wdtate
Just installed python 2.7 and using with web2py. When running python from command line to bring up web2py server, get errors that python socket and urllib modules cannot be found, can't be loaded. This is not a web2py issue. No other python versions are on the my machine. Pythonpath has the

Re: Python 2.7 import socket urllib fails to load, module not found

2012-08-17 Thread Emile van Sebille
On 8/17/2012 12:20 PM wdt...@comcast.net said... Just installed python 2.7 and using with web2py. When running python from command line to bring up web2py server, get errors that python socket and urllib modules cannot be found, can't be loaded. This is not a web2py issue. So, on my system

Re: Python 2.7 import socket urllib fails to load, module not found

2012-08-17 Thread wdtate
> > So, on my system I get: > > ActivePython 2.7.0.2 (ActiveState Software Inc.) based on > > Python 2.7 (r27:82500, Aug 23 2010, 17:18:21) [MSC v.1500 32 bit > > (Intel)] on win32 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> import urllib > > >>> imp

Re: How do I display unicode value stored in a string variable using ord()

2012-08-17 Thread Dave Angel
On 08/17/2012 02:45 PM, wxjmfa...@gmail.com wrote: > Le vendredi 17 août 2012 20:21:34 UTC+2, Jerry Hill a écrit : >> >> >> I don't understand what any of this has to do with Python. Just >> >> output your text in UTF-8 like any civilized person in the 21st >> >> century, and none of that is a pr

Re: Python 2.7 import socket urllib fails to load, module not found

2012-08-17 Thread Emile van Sebille
On 8/17/2012 1:41 PM wdt...@comcast.net said... From cmd prompt - I get this: Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. import urllib Traceback (most recent call last): File "",

Re: Python 2.7 import socket urllib fails to load, module not found

2012-08-17 Thread wdtate
> > So, try the following in both environments: > import sys > for ii in sys.path: print ii > > You'll likely find diffferences between the two. > In the pythonwin environment, try: > > > > import socket > > print socket.__file__ > > > Chances are the __file__'s director

Re: Python 2.7 import socket urllib fails to load, module not found

2012-08-17 Thread wdtate
On Friday, August 17, 2012 5:15:35 PM UTC-4, (unknown) wrote: > > > > > So, try the following in both environments: > > > import sys > > > for ii in sys.path: print ii > > > > > > You'll likely find diffferences between the two. > > > > > In the pythonwin environment, try: > > >

Re: Python 2.7 import socket urllib fails to load, module not found

2012-08-17 Thread wdtate
On Friday, August 17, 2012 3:20:48 PM UTC-4, (unknown) wrote: > Just installed python 2.7 and using with web2py. > > > > When running python from command line to bring up web2py server, get errors > that python socket and urllib modules cannot be found, can't be loaded. This > is not a web2p

Re: set and dict iteration

2012-08-17 Thread Chris Angelico
On Sat, Aug 18, 2012 at 4:37 AM, Aaron Brady wrote: > Is there a problem with hacking on the Beta? Nope. Hack on the beta, then when the release arrives, rebase your work onto it. I doubt that anything of this nature will be changed between now and then. ChrisA -- http://mail.python.org/mailman

Re: Python 2.7 import socket urllib fails to load, module not found

2012-08-17 Thread Emile van Sebille
On 8/17/2012 2:22 PM wdt...@comcast.net said... Done - tail end of the python path had a missing bit...gr... thanks so much Well it's bizarre - now it doesn't. did an import sys from within interpreter, then did import socket. Worked the first time. Restarted and it happened again. Th

Re: Python 2.7 import socket urllib fails to load, module not found

2012-08-17 Thread Christian Heimes
Am 17.08.2012 21:20, schrieb wdt...@comcast.net: > Just installed python 2.7 and using with web2py. > > When running python from command line to bring up web2py server, get errors > that python socket and urllib modules cannot be found, can't be loaded. This > is not a web2py issue. > > No ot

Re: How do I display unicode value stored in a string variable using ord()

2012-08-17 Thread Ian Kelly
On Aug 17, 2012 2:58 PM, "Dave Angel" wrote: > > The internal coding described in PEP 393 has nothing to do with latin-1 > encoding. It certainly does. PEP 393 provides for Unicode strings to be represented internally as any of Latin-1, UCS-2, or UCS-4, whichever is smallest and sufficient to con

Re: Top-posting &c. (was Re: [ANNC] pybotwar-0.8)

2012-08-17 Thread Steven D'Aprano
On Fri, 17 Aug 2012 09:36:04 -0700, rusi wrote: > I was in a corporate environment for a while. And carried my > 'trim&interleave' habits there. > And got gently scolded for seeming to hide things!! Corporate email users are generally incompetent at email no matter what email conventions you us

Re: Dynamically determine base classes on instantiation

2012-08-17 Thread Steven D'Aprano
On Fri, 17 Aug 2012 04:50:43 -0700, Richard Thomas wrote: > On Thursday, 16 August 2012 19:49:43 UTC+2, Steven D'Aprano wrote: >> On Thu, 16 Aug 2012 10:03:51 -0700, Richard Thomas wrote: >> >> > class Foo(object): >> > def __new__(cls, arg): >> > if isinstance(arg, list): >> >

Re: Top-posting &c. (was Re: [ANNC] pybotwar-0.8)

2012-08-17 Thread Zero Piraeus
: On 17 August 2012 21:43, Steven D'Aprano wrote: > There are cultures that marry five year old girls to sixty year old men, > cultures that treat throwing acid in the faces of women as acceptable > behaviour, cultures that allow war heroes to die of hunger and cold > homeless in the street, and

Re: Crashes always on Windows 7

2012-08-17 Thread zmagic11
On Friday, August 17, 2012 9:38:16 PM UTC+8, zmag...@gmail.com wrote: > Hi, > > > > Downloaded ActiveSync ActivePython on my Windows 7 machine. Worked for a > little while and now it crashes every time I try to boot the IDLE or open a > program, it crashes. Help please? Thanks Hi Hi, sorry fo

Re: How do I display unicode value stored in a string variable using ord()

2012-08-17 Thread Dave Angel
On 08/17/2012 08:21 PM, Ian Kelly wrote: > On Aug 17, 2012 2:58 PM, "Dave Angel" wrote: >> The internal coding described in PEP 393 has nothing to do with latin-1 >> encoding. > It certainly does. PEP 393 provides for Unicode strings to be represented > internally as any of Latin-1, UCS-2, or UCS-

Re: How do I display unicode value stored in a string variable using ord()

2012-08-17 Thread Steven D'Aprano
On Fri, 17 Aug 2012 11:45:02 -0700, wxjmfauth wrote: > Le vendredi 17 août 2012 20:21:34 UTC+2, Jerry Hill a écrit : >> On Fri, Aug 17, 2012 at 1:49 PM, wrote: >> >> > The character '…', Unicode name 'HORIZONTAL ELLIPSIS', >> > is one of these characters existing in the cp1252, mac-roman >> > c

Re: How do I display unicode value stored in a string variable using ord()

2012-08-17 Thread Steven D'Aprano
On Fri, 17 Aug 2012 23:30:22 -0400, Dave Angel wrote: > On 08/17/2012 08:21 PM, Ian Kelly wrote: >> On Aug 17, 2012 2:58 PM, "Dave Angel" wrote: >>> The internal coding described in PEP 393 has nothing to do with >>> latin-1 encoding. >> It certainly does. PEP 393 provides for Unicode strings to

Regex Question

2012-08-17 Thread Frank Koshti
Hi, I'm new to regular expressions. I want to be able to match for tokens with all their properties in the following examples. I would appreciate some direction on how to proceed. @foo1 @foo2() @foo3(anything could go here) Thanks- Frank -- http://mail.python.org/mailman/listinfo/python-list

Re: Regex Question

2012-08-17 Thread Chris Angelico
On Sat, Aug 18, 2012 at 2:41 PM, Frank Koshti wrote: > Hi, > > I'm new to regular expressions. I want to be able to match for tokens > with all their properties in the following examples. I would > appreciate some direction on how to proceed. > > > @foo1 > @foo2() > @foo3(anything could go here)

python-list@python.org

2012-08-17 Thread Ben Finney
Grant Edwards writes: > On 2012-08-16, Chris Angelico wrote: > > And FWIW, I add my voice to those who prefer to read replies > > underneath the original text. > > Same here. I often skip reading top-posted articles entirely, since I > don't really care to take the time to start reading at the

Re: Crashes always on Windows 7

2012-08-17 Thread zmagic11
On Friday, August 17, 2012 9:38:16 PM UTC+8, zmag...@gmail.com wrote: > Hi, > > > > Downloaded ActiveSync ActivePython on my Windows 7 machine. Worked for a > little while and now it crashes every time I try to boot the IDLE or open a > program, it crashes. Help please? Thanks Open using File

Re: Crashes always on Windows 7

2012-08-17 Thread Terry Reedy
On 8/17/2012 11:09 PM, zmagi...@gmail.com wrote: Hi Hi, sorry for the confusion. Yes, I meant ActiveState ActivePython. It worked fine for a few hours and now every time I open up the IDLE Shell, it opens fine. Then when I try to open a previously made file, the shell immediately closes and noth