How to get time (milisecond) of a python IO execution

2013-09-14 Thread Tal Bar-Or
Hi All i am trying to test measure some IO execution in milliseconds , but bit confuse about best method achive that under windows 7 i am using following code but not sure if its best or correct way since i have two different results, which one should i take as results and which is best way plea

Re: Language design

2013-09-14 Thread Mark Janssen
Really? Are you saying you (and the community at-large) always derive from Object as your base class? >>> >>> Not directly, that would be silly. >> >> Silly? "Explicit is better than implicit"... right? > > If I'm inheriting from str, I inherit from str explicitly: > > class MyStr(str):

Re: Monitor key presses in Python?

2013-09-14 Thread Dave Angel
On 14/9/2013 14:10, eamonn...@gmail.com wrote: > I didnt wanna say that, in case people threw a fit and stuff. > > So yeah, how would I monitor the key presses? There's a huge difference between monitoring key presses within your own process, and intercepting them system-wide. if you need to see

Re: better and user friendly IDE recommended?

2013-09-14 Thread memilanuk
On 09/12/2013 02:15 PM, Adrián Espinosa wrote: I suggest you to use IntelliJ IDEA. It has a plugin for Python and Django (web framework). It works flawlessly. If one were inclined to go that route, wouldn't PyCharm typically be a better choice? -- https://mail.python.org/mailman/listinfo/

Re: Python + LÖVE?

2013-09-14 Thread Terry Reedy
On 9/14/2013 1:39 PM, eamonn...@gmail.com wrote: As you may know, there is a fantastic Lua game development engine called LÖVE. There is also a way to integrate Lua and Python. So, is it possible to use LÖVE and Python together? Have you asked the LÖVE folks? -- Terry Jan Reedy -- https:/

Re: Monitor key presses in Python?

2013-09-14 Thread Paul Rubin
eamonn...@gmail.com writes: > I'd need this to run without the user knowing. You are asking for programming advice when you should probably be asking for legal advice instead, about interception of electronic communications. We are not qualified to give legal advice here. -- https://mail.python.

Re: Monitor key presses in Python?

2013-09-14 Thread eamonnrea
I didnt wanna say that, in case people threw a fit and stuff. So yeah, how would I monitor the key presses? -- https://mail.python.org/mailman/listinfo/python-list

Re: Monitor key presses in Python?

2013-09-14 Thread Roy Smith
In article <5c59400c-45ca-40f0-846c-05bef3eb0...@googlegroups.com>, eamonn...@gmail.com wrote: > It might sound strange, but I'd need this to run without the user knowing. It's called a keylogger. And after all the revelations about the NSA over the past few weeks, it doesn't sound strange at

Re: Monitor key presses in Python?

2013-09-14 Thread eamonnrea
It might sound strange, but I'd need this to run without the user knowing.I believe I can do this by making the file a .pyw file, and use a GUI library to monitor the key presses. I think I could use PyGame, PyGlet and/or Cocos2d as well. -- https://mail.python.org/mailman/listinfo/python-list

Python + LÖVE?

2013-09-14 Thread eamonnrea
As you may know, there is a fantastic Lua game development engine called LÖVE. There is also a way to integrate Lua and Python. So, is it possible to use LÖVE and Python together? Thanks! -- https://mail.python.org/mailman/listinfo/python-list

Re: Appending data to an excel sheet by python code

2013-09-14 Thread petmertens
Did you consider using xlrd and xlwt? I guess these package provide a solution to your problem. -- https://mail.python.org/mailman/listinfo/python-list

Re: Python GUI?

2013-09-14 Thread Wolfgang Keller
> As complexity rises, though, I'd rather just code the creative parts > of things, and not busy-code, which is what gui code becomes. Much > of it is boiler-plate, cut and pasted, etc. If much of the code for a GUI is boiler-plate, busy-code etc. than I would suggest that the framework is not re

Re: Appending data to an excel sheet by python code

2013-09-14 Thread MRAB
On 14/09/2013 12:33, Manoj Rout wrote: hi i want to append some data to an existing excel sheet by reading from file.But here i am facing 2 problem.first is when i am reading from file. import re It's a good idea to use raw string literals for file paths on Windows. Alternatively, you co

Issue in installing xlwt package

2013-09-14 Thread varun nayyar
Hello,I am using windows 7 32 bit and installed python 2.7.5When i am trying to install xlwt 0.7.5 package from cmd prompt it shows Access Denied.When i run the cmd in administrator mode I am getting the following error: Fatal Python error: Py_Initialize: can't initialize sys standard streamsImp

Re: Need help to sort out the below code...

2013-09-14 Thread John Gordon
In <9f6d4a88-4ae4-4e61-9f73-c074ec3f4...@googlegroups.com> mnishpsyched writes: > print """ > Please select from the following menu: > 1. pizza > 2. steak > 3. pasta > 4. burger > type in any number from above for selection.. > """ > pz = raw_input() > pz = int(pz) > st = raw_input() > st = in

Re: Python GUI?

2013-09-14 Thread Chris Angelico
On Sat, Sep 14, 2013 at 9:54 PM, wrote: > Also, this thread hasn't been a troll. I'm completely serious. Why is it when > I ask things like this people think I'm trolling?? :( This is python-list. We're used to duck-typing. If it looks like a file, we can write to it... if it looks like a troll

Re: Python GUI?

2013-09-14 Thread eamonnrea
On Saturday, September 14, 2013 2:23:03 AM UTC+1, Ben Finney wrote: > eamonn...@gmail.com writes: > > > > > But is it efficient to use an axe? > > > > Which criterion is more important to *you* — fun, or efficiency? > > > > > Is it sensible to use an axe when there is a chainsaw? No. > >

Appending data to an excel sheet by python code

2013-09-14 Thread Manoj Rout
hi i want to append some data to an existing excel sheet by reading from file.But here i am facing 2 problem.first is when i am reading from file. import re file=open("C:\Workspace\WS2\P1\Dave\Generated\src\UART001\UART001_Conf.c","r") strings=re.search(r'(?<=(.Mode = UART_))\w+',file.read()

Re: PEP-442 - Python 3.4 and finalizations (__del__)

2013-09-14 Thread Marco Buttu
On 09/14/2013 11:42 AM, Steven D'Aprano wrote: Perhaps you should try it and find out. Hi Steven, thanks for your answer. I tried it with Python 3.4a2, but I did not see any output from __del__(). [steve@ando ~]$ python3.4 -E Python 3.4.0a1+ (default:becbb65074e1, Aug 26 2013, 03:57:58) [

Re: How to display ReST properly on pypi?

2013-09-14 Thread Michel Albert
Ah... I understand. Makes sense. I was confused that it worked properly on github, but not on pypi, so I never even thought about checking it in rst2html. I thought I would need to specify somewhere manually that it was formatted as ReST instead of plain-text. Thanks for the info. On Saturday,

Re: How to display ReST properly on pypi?

2013-09-14 Thread Chris “Kwpolska” Warrick
On Sat, Sep 14, 2013 at 11:08 AM, Michel Albert wrote: > In general, I write my README files using the ReST syntax. But when I do, > they don't show up formatted on pypi (see for example > https://pypi.python.org/pypi/config_resolver/3.3.0). > > How do I get it to be formatted properly? > > Also

Re: PEP-442 - Python 3.4 and finalizations (__del__)

2013-09-14 Thread Steven D'Aprano
On Sat, 14 Sep 2013 10:14:27 +0200, Marco Buttu wrote: > Hi all. Will the following code in Python 3.4 print "Goodbye from B()" > and "Goodbye from A(): Perhaps you should try it and find out. [steve@ando ~]$ python3.4 -E Python 3.4.0a1+ (default:becbb65074e1, Aug 26 2013, 03:57:58) [GCC 4.1.2

How to display ReST properly on pypi?

2013-09-14 Thread Michel Albert
In general, I write my README files using the ReST syntax. But when I do, they don't show up formatted on pypi (see for example https://pypi.python.org/pypi/config_resolver/3.3.0). How do I get it to be formatted properly? Also, is there a way to specify that the "description" field in setup.py

Re: Need help to sort out the below code...

2013-09-14 Thread Jugurtha Hadjar
Hello, mnishpsyched.. You also want the VAT to be computed as a percentage _of_ something, and not hard-coded, so that if you change the price of the pizza, you only have to change one value (pr_pz) instead of two values pr_pz and tx_tz (as the second is computed from the first). You only mu

PEP-442 - Python 3.4 and finalizations (__del__)

2013-09-14 Thread Marco Buttu
Hi all. Will the following code in Python 3.4 print "Goodbye from B()" and "Goodbye from A(): class A: def __init__(self, a): self.a = a print('In A.__init__()') def __del__(self): print('Goodbye from A()') class B: def __init__(self): self.b = A(self

Re: Need help to sort out the below code...

2013-09-14 Thread Terry Reedy
On 9/14/2013 2:34 AM, mnishpsyched wrote: Hello guys, i am new to programming and trying to solve this small coding: my purpose is to take in values from the user based on a menu provided for selection the output looks like this... please select from the following menu: 1. pizza 2. steak 3. pa