how does not work nested comment in python?

2013-09-03 Thread vnkumbhani
example: print "hello" # print comment +"world"=> single line comment print "hello" '''print comment''' +"world" => multiple line comment -- https://mail.python.org/mailman/listinfo/python-list

how to detect comment in source code file ?

2013-09-03 Thread vnkumbhani
how works python interpreter for finding comment ? if possible find nested comment ? -- https://mail.python.org/mailman/listinfo/python-list

Beginner's guide to Python

2013-09-03 Thread Steve Hayes
Can anyone recommend a web site that gives a good beginner's guide to Python? One that tells one, especially -- -- what kind of projects Python is good for -- what kind of projects it is not good for -- a simple explanation of how it works -- a kind of beginner's tutotial and guide to its syntax

Re: can't find win32api from embedded pyrun call

2013-09-03 Thread David M. Cotter
note that when the script is called, i DO see this in the output window: > 'kJams 2 Debug.exe': Loaded 'C:\Python27\Lib\site-packages\win32\win32api.pyd' > 'kJams 2 Debug.exe': Loaded 'C:\Windows\SysWOW64\pywintypes27.dll' > 'kJams 2 Debug.exe': Unloaded > 'C:\Python27\Lib\site-packages\win32\win

Re: PyPi Module Removal

2013-09-03 Thread Brian Rak
On 9/3/2013 10:49 PM, Skip Montanaro wrote: > Ah, Unix users. Who else would imagine that the way to install something > called "wxPython" was to use "install wx"? I'm not a wxPython user, but it seems the package/module you import in your programs is "wx". Not an unreasonable guess at the P

Re: PyPi Module Removal

2013-09-03 Thread Skip Montanaro
> Ah, Unix users. Who else would imagine that the way to install something > called "wxPython" was to use "install wx"? I'm not a wxPython user, but it seems the package/module you import in your programs is "wx". Not an unreasonable guess at the PyPI package name. Skip -- https://mail.python.or

Re: to be pythonic: should caller or callee log?

2013-09-03 Thread Ethan Furman
On 09/03/2013 09:07 AM, Gildor Oronar wrote: What would you choose? Do you put logging routine into caller or callee? My intuitive answer is "callee does the logging, because that's where action takes place", like this: class Account(): def transaction(self, amount, target): loggi

Re: PyPi Module Removal

2013-09-03 Thread Steven D'Aprano
On Tue, 03 Sep 2013 16:15:07 -0400, Brian Rak wrote: > I was trying to install wxPython earlier today. Not RTFMing, I tried > 'easy_install wx', which ended up installing this strange module: > https://pypi.python.org/pypi/wx > > Looking at the download stats, it seems to be confusing ~1000 user

Re: Cannot form correctly the FORM part of the header when sending mail

2013-09-03 Thread Piet van Oostrum
Ferrous Cranus writes: > Hello, > i have written the following snipper of code to help me send mail: > [snip] > # prepare mail data > TO = "ni...@superhost.gr" > > SUBJECT = u"Mail από τον επισκέπτη: ( %s )" % FROM > > MESSAGE = "From: %s\r\n" + "

Conflict between Python 2.5 and 2.7

2013-09-03 Thread Errol Anderson
I look after a Delphi program that uses Python 2.5 (via Python for Delphi). A customer who uses a modeling program that requires Python 2.7 experiences a Python conflict when trying to run the Delphi program. I have installed both Python 2.5 and 2.7 on a test-bed computer and can run the Delphi pr

Re: unbound method () must be called with ... instance as first argument (got nothing instead)

2013-09-03 Thread Mohsen Pahlevanzadeh
Solved, i changed my connect function to: QtCore.QObject.connect(self.pushButtonAdd, QtCore.SIGNAL(_fromUtf8("clicked()")),self.showHideConstructor.showFindMaterials) On Wed, 2013-09-04 at 02:00 +0430, Mohsen Pahlevanzadeh wrote: > Dear all, > > I have the following two lines code in my setup fram

unbound method () must be called with ... instance as first argument (got nothing instead)

2013-09-03 Thread Mohsen Pahlevanzadeh
Dear all, I have the following two lines code in my setup frame: // self.showHideConstructor = ui.interface.interface.ShowHide() QtCore.QObject.connect(self.pushButtonAdd, QtCore.SIGNAL(_fromUtf8("clicked()")),self.showHideConstructor,ui.interface.interface.ShowHide.showFin

PyPi Module Removal

2013-09-03 Thread Brian Rak
I was trying to install wxPython earlier today. Not RTFMing, I tried 'easy_install wx', which ended up installing this strange module: https://pypi.python.org/pypi/wx Looking at the download stats, it seems to be confusing ~1000 users a month, while not providing any significant functionality

Re: to be pythonic: should caller or callee log?

2013-09-03 Thread Terry Reedy
On 9/3/2013 12:07 PM, Gildor Oronar wrote: What would you choose? Do you put logging routine into caller or callee? My intuitive answer is "callee does the logging, because that's where action takes place", like this: class Account(): def transaction(self, amount, target): logging.

Re: PyPi Module Removal

2013-09-03 Thread Terry Reedy
On 9/3/2013 4:15 PM, Brian Rak wrote: I was trying to install wxPython earlier today. Not RTFMing, I tried 'easy_install wx', which ended up installing this strange module: https://pypi.python.org/pypi/wx Looking at the download stats, it seems to be confusing ~1000 users a month, while not pro

Re: PyPi Module Removal

2013-09-03 Thread Brian Rak
Thanks! Wasn't really sure where I should have reported that. On 9/3/2013 4:56 PM, Skip Montanaro wrote: I don't really have any way to contact the author of the module. Is there any way to have this deleted/renamed? Not directly, but I opened a ticked in the PyPI bug tracker. Skip -- https

Re: PyPi Module Removal

2013-09-03 Thread Joel Goldstick
On Tue, Sep 3, 2013 at 4:15 PM, Brian Rak wrote: > I was trying to install wxPython earlier today. Not RTFMing, I tried > 'easy_install wx', which ended up installing this strange module: > https://pypi.python.org/pypi/wx > > Looking at the download stats, it seems to be confusing ~1000 users a m

Re: PyPi Module Removal

2013-09-03 Thread Joel Goldstick
On Tue, Sep 3, 2013 at 4:52 PM, Joel Goldstick wrote: > On Tue, Sep 3, 2013 at 4:15 PM, Brian Rak wrote: >> I was trying to install wxPython earlier today. Not RTFMing, I tried >> 'easy_install wx', which ended up installing this strange module: >> https://pypi.python.org/pypi/wx >> >> Looking a

Re: can't find win32api from embedded pyrun call

2013-09-03 Thread David M. Cotter
I find i'm having this problem, but the solution you found isn't quite specific enough for me to be able to follow it. I'm embedding Python27 in my app. I have users install ActivePython27 in order to take advantage of python in my app, so the python installation can't be touched as it's on a

Re: PyPi Module Removal

2013-09-03 Thread Skip Montanaro
> I don't really have any way to contact the author of the module. Is there > any way to have this deleted/renamed? Not directly, but I opened a ticked in the PyPI bug tracker. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: semicolon at end of python's statements

2013-09-03 Thread Neil Cerutti
On 2013-09-03, Neil Cerutti wrote: > 3.2 and above provide contextlib.ExitStack, which I just now > learned about. > > with contextlib.ExitStack() as stack: > _in = stack.enter_context(open('some_file')) > _out = stack.enter_context(open('another_file', 'w')) > > It ain't beautiful, but it

Re: How to split with "\" character, and licence copyleft mirror of ©

2013-09-03 Thread random832
On Tue, Sep 3, 2013, at 6:31, Tim Chase wrote: > I'd contend that the two primary purposes of raw strings (this is > starting to sound like a Spanish Inquisition sketch) are regexes and > DOS/Win32 file path literals. And I hit this trailing-backslash case > all the time, as Vim's path-completion

Re: semicolon at end of python's statements

2013-09-03 Thread Neil Cerutti
On 2013-09-02, Roy Smith wrote: > In article , > "albert visser" wrote: > >> I like being able to do e.g. >> >> with open('some_file') as _in, open('another_file', 'w') as _out: > > It would be nice if you could write that as: > > with open('some_file'), open('another_file, 'w') as _

Re: Editing tabular data

2013-09-03 Thread rusi
On Friday, August 2, 2013 12:05:53 PM UTC+5:30, Ben Finney wrote: > Skip Montanaro writes: > > > I really love Emacs, however... […] > > > > This is clearly a case where choosing the proper tool is important. I > > agree that using a spreadsheet to edit a 3x5 CSV file is likely > > overkill (might

Re: Unable to redirect the subprocess CMD.exe to txt file. Please help !!!

2013-09-03 Thread random832
On Tue, Sep 3, 2013, at 9:54, Venkatesh wrote: > Hello comp.lang.python Group, > > I am trying to invoke a subprocess in Python as below > > import sys > import time > import os > import subprocess > DETACHED_PROCESS = 0x0008 > > path = r'C:\Windows\System32\cmd.exe /k ping www.google.com

Re: UnicodeDecodeError issue

2013-09-03 Thread wxjmfauth
Le lundi 2 septembre 2013 16:44:34 UTC+2, MRAB a écrit : > On 02/09/2013 13:24, Dave Angel wrote: > > > On 2/9/2013 07:56, MRAB wrote: > > > > > >> On 02/09/2013 12:38, Dave Angel wrote: > > > > > > > > > > > >>> ¶γνωστοόνομα συστήματος > > >>> > > >>> I don't have a clue what it migh

to be pythonic: should caller or callee log?

2013-09-03 Thread Gildor Oronar
What would you choose? Do you put logging routine into caller or callee? My intuitive answer is "callee does the logging, because that's where action takes place", like this: class Account(): def transaction(self, amount, target): logging.info("Start transaction of %s to %s" % (amou

Re: Unable to redirect the subprocess CMD.exe to txt file. Please help !!!

2013-09-03 Thread William Ray Wing
On Sep 3, 2013, at 9:54 AM, Venkatesh wrote: > Hello comp.lang.python Group, > > I am trying to invoke a subprocess in Python as below > > import sys > import time > import os > import subprocess > DETACHED_PROCESS = 0x0008 > > path = r'C:\Windows\System32\cmd.exe /k ping www.google.com -

Re: UnicodeDecodeError issue

2013-09-03 Thread Steven D'Aprano
On Tue, 03 Sep 2013 08:45:00 +1000, Chris Angelico wrote: > On Tue, Sep 3, 2013 at 12:44 AM, MRAB > wrote: >> I don't know Greek either, and I don't think there's any other language >> that uses the Greek alphabet. > > Assuming you don't count mathematics as a language. There are a few languag

Re: How to execute command on remote windows machine

2013-09-03 Thread 88888 Dihedral
gauran...@gmail.com於 2013年9月3日星期二UTC+8下午12時45分57秒寫道: > Hi Guys, > > > > I have a requirement where i need to kill one process on remote windows > machine. > > Following command just works fine if i have to kill process on local machine > > > > os.system('taskkill /f /im processName.exe')

Re: How to execute command on remote windows machine

2013-09-03 Thread Jean-Michel Pichavant
- Original Message - > I tried it, however it seems really complicated. > If you have used it before, can you show me how can i do it ? > Gaurang Shah > Blog: qtp-help.blogspot.com > Mobile: +91 738756556 Please don't ask question off-list. It's not complicated at all. The documenta

Unable to redirect the subprocess CMD.exe to txt file. Please help !!!

2013-09-03 Thread Venkatesh
Hello comp.lang.python Group, I am trying to invoke a subprocess in Python as below import sys import time import os import subprocess DETACHED_PROCESS = 0x0008 path = r'C:\Windows\System32\cmd.exe /k ping www.google.com -n 4 >> temp.txt' p = subprocess.Popen("%s"%(path), stdout = subproces

Re: How to execute command on remote windows machine

2013-09-03 Thread random832
On Tue, Sep 3, 2013, at 0:45, gaurangns...@gmail.com wrote: > Hi Guys, > > I have a requirement where i need to kill one process on remote windows > machine. > Following command just works fine if i have to kill process on local > machine > > os.system('taskkill /f /im processName.exe') > > H

Re: sqlite issue in 2.7.5

2013-09-03 Thread Alister
On Mon, 02 Sep 2013 22:13:27 +, Joseph L. Casale wrote: > I have been battling an issue hopefully someone here has insight with. > > I have a database with a few tables I perform a query against with some > joins against columns collated with NOCASE that leverage = comparisons. > > Running t

Re: Cannot form correctly the FORM part of the header when sending mail

2013-09-03 Thread Ferrous Cranus
Στις 3/9/2013 12:33 μμ, ο/η feedthetr...@gmx.de έγραψε: Am Dienstag, 3. September 2013 09:48:13 UTC+2 schrieb Ferrous Cranus: Hello, i have written the following snipper of code to help me send mail: ... server.login("nikos.gr...@gmail.com", "..") HE DID IT AGAIN! The login wo

Re: How to split with "\" character, and licence copyleft mirror of ©

2013-09-03 Thread Tim Chase
On 2013-09-03 02:06, Steven D'Aprano wrote: >> So the real bug is with the parser. > > It is likely that nobody noticed this bug in the first place > because the current behaviour doesn't matter for regexes, which is > the primary purpose of raw strings. You can't end a regex with an > unescaped b

Re: How to execute command on remote windows machine

2013-09-03 Thread Jean-Michel Pichavant
- Original Message - > Hi alex > > I tried the command you suggested however it is giving me following > error. > > ERROR: The RPC server is unavailable. Hi, Please do not top post :) If python is installed on the remote machine, using execnet http://codespeak.net/execnet/ is very ea

Re: Cannot form correctly the FORM part of the header when sending mail

2013-09-03 Thread feedthetroll
Am Dienstag, 3. September 2013 09:48:13 UTC+2 schrieb Ferrous Cranus: > Hello, > i have written the following snipper of code to help me send mail: > ... > server.login("nikos.gr...@gmail.com", "..") HE DID IT AGAIN! The login works with the posted password! Nikos, you should chang

Cannot form correctly the FORM part of the header when sending mail

2013-09-03 Thread Ferrous Cranus
Hello, i have written the following snipper of code to help me send mail: = # if html form is submitted then send user mail #===

Re: semicolon at end of python's statements

2013-09-03 Thread Antoon Pardon
Op 03-09-13 01:17, Modulok schreef: > > So? Indeed there are too many people looking at these things as fighting > for the one true way. That is IMO part a big part of the problem. I have > no problem if someone else uses a different style than I do. Python as > a language tries t