ProgressBar - Python and Powershell
Alec Taylor
alec.taylor6 at gmail.com
Mon Nov 21 08:08:29 EST 2011
More information about the Python-list mailing list
Mon Nov 21 08:08:29 EST 2011
- Previous message (by thread): ProgressBar - Python and Powershell
- Next message (by thread): Both Python 2.5.2 and 2.7.2 flop the same way under Win 7
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
New thread! On Mon, Nov 21, 2011 at 11:27 PM, <Nikunj.Badjatya at emc.com> wrote: > Hey Thanks. Will do that. > > Just a question in general. Is it possible that we have opened one file in r+ mode ( file1.txt ). We have 2 threads, thread1 will continuously only read the file in a loop. Thread2 will only update the data in the file. Now thread2 has called other script ( written in say Perl/Powershell ) and those scripts are inturn updating ( only writing ) into that file by their own file i/o mechanism. > Is it possible by any chance? One file being shared between different processes one is updating and other is reading ..? Will this work in practical and what can be the complications ? > > > > -----Original Message----- > From: Alec Taylor [mailto:alec.taylor6 at gmail.com] > Sent: Monday, November 21, 2011 5:23 PM > To: Badjatya, Nikunj > Subject: Re: ProgressBar - Python and Powershell > > WiX will manage all the progress bar stuff for you. > > Just wrap it all in > > On Mon, Nov 21, 2011 at 9:44 PM, <Nikunj.Badjatya at emc.com> wrote: >> Yes I am executing powershell commands into virtual machines. >> >> Will have a look at WiX. >> >> But please, Answer my questions: >> >>>> My questions are: >>>> >>>> 1. Can I have a better shared mechanism between python and >>>> powershell.? As I am using a file here. Reading + writing in python and >>>> writing only in powershell. ! >>>> >>>> 2. Does this thread mechanism work.? I am yet to implement and test >>>> it.! :P What can be the possible shortfalls.? >> >> Thanks >> Nikunj >> >> -----Original Message----- >> From: Alec Taylor [mailto:alec.taylor6 at gmail.com] >> Sent: Monday, November 21, 2011 11:59 AM >> To: Badjatya, Nikunj >> Cc: python-list at python.org >> Subject: Re: ProgressBar - Python and Powershell >> >> So you're executing Powershell commands into Virtual Machines? >> >> Add this into the installer (probably WiX is your best bet) >> >> On Mon, Nov 21, 2011 at 3:40 AM, <Nikunj.Badjatya at emc.com> wrote: >>> Thanks for reply. >>> Python and Powershell are required because the installer would deal in virtual machines ( VMware environment ). >>> Some prechecks and postconfig are required in both VMware and Windows environment. For dealing with VMware environment powershell has the best bonding. For windows I am using Python. >>> >>> I am new to this field and do not know if there is an alternative available.! Can you please suggest an alternative to Powershell in VM environment. ? >>> >>> The current look of the installer is completely command line based. >>> >>> >>> -----Original Message----- >>> From: Alec Taylor [mailto:alec.taylor6 at gmail.com] >>> Sent: Sunday, November 20, 2011 7:22 PM >>> To: Badjatya, Nikunj >>> Cc: python-list at python.org >>> Subject: Re: ProgressBar - Python and Powershell >>> >>> Why are you writing an installer in Python and Powershell? >>> >>> Just write an installer in WiX, NSIS or Inno like the rest of the sane world. >>> >>> Alternatively take a look at MakeMSI or the script python uses to >>> generate there .MSI. >>> >>> Anything else is WAY too non-standard to consider. >>> >>> On Mon, Nov 21, 2011 at 12:01 AM, <Nikunj.Badjatya at emc.com> wrote: >>>> Can anyone throw some light on this please ! ? >>>> >>>> >>>> >>>> >>>> >>>> From: python-list-bounces+nikunj.badjatya=emc.com at python.org >>>> [mailto:python-list-bounces+nikunj.badjatya=emc.com at python.org] On Behalf Of >>>> Nikunj.Badjatya at emc.com >>>> Sent: Thursday, November 17, 2011 4:10 PM >>>> To: python-list at python.org >>>> Subject: ProgressBar - Python and Powershell >>>> >>>> >>>> >>>> Hi All, >>>> >>>> >>>> >>>> I am using Python 2.7, windows Env. >>>> >>>> I have an Installer written in Python(45%) and Powershell(55%) which is used >>>> to install Virtual Machines at specific locations. It is single threaded. >>>> >>>> I am trying to implement a ProgressBar for this installer. So that the user >>>> will come to know the progress of the installation. >>>> >>>> I am using pypi progressbar module. >>>> >>>> The top script is in python which inturns calls powershell scripts using >>>> subprocess.call() and proceeds with the installation. >>>> >>>> >>>> >>>> I am taking a shared file between python and powershell, so that diff >>>> functions can update their %age completion level in to the file. Ex. Func1() >>>> updates it to 5%, func2() will add its own 5% to it.. and so on. >>>> >>>> At the start of the (main.py) script I am creating a thread whose sole >>>> purpose would be to keep "READ" a temp file for a new entry in it. >>>> >>>> Based on this entry I can have my thread update the progressbar on the >>>> console. >>>> >>>> >>>> >>>> My questions are: >>>> >>>> 1. Can I have a better shared mechanism between python and >>>> powershell.? As I am using a file here. Reading + writing in python and >>>> writing only in powershell. ! >>>> >>>> 2. Does this thread mechanism work.? I am yet to implement and test >>>> it.! :P What can be the possible shortfalls.? >>>> >>>> >>>> >>>> >>>> Thanks >>>> >>>> >>>> >>>> Nikunj >>>> >>>> Bangalore - India >>>> >>>> >>>> >>>> >>>> -- >>>> http://mail.python.org/mailman/listinfo/python-list >>>> >>> >> >
- Previous message (by thread): ProgressBar - Python and Powershell
- Next message (by thread): Both Python 2.5.2 and 2.7.2 flop the same way under Win 7
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list