search for: print_function

Displaying 15 results from an estimated 15 matches for "print_function".

2015 Oct 09
3
Python version for scripts in LLVM?
...chments/20151009/dbb54b3a/attachment.html> -------------- next part -------------- Index: DSAclean.py =================================================================== --- DSAclean.py (revision 249819) +++ DSAclean.py (working copy) @@ -1,5 +1,7 @@ #! /usr/bin/python +from __future__ import print_function + #changelog: #10/13/2005b: replaced the # in tmp(.#*)* with alphanumeric and _, this will then remove #nodes such as %tmp.1.i and %tmp._i.3 @@ -11,7 +13,7 @@ import re import sys if( len(sys.argv) < 3 ): - print 'usage is: ./DSAclean <dot_file_to_be_cleaned> <out_put_file&gt...
2012 Dec 04
3
[LLVMdev] Minimum Python Version
So, I just tried, and basically it's difficult to make progress due to the print statements (since they induce an immediate syntax error). Since 2.4 doesn't support `from __future__ import print_function`, the only alternative I guess is shimming in a print function. This is a maintenance effort that I don't want to do right now (and, TBQH, I feel that the proper maintainer should be responsible for). ddunbar, how does this weight against your "causing large problems with the code" c...
2012 Dec 04
0
[LLVMdev] Minimum Python Version
...aniel On Tue, Dec 4, 2012 at 9:15 AM, Sean Silva <silvas at purdue.edu> wrote: > So, I just tried, and basically it's difficult to make progress due to > the print statements (since they induce an immediate syntax error). > Since 2.4 doesn't support `from __future__ import print_function`, the > only alternative I guess is shimming in a print function. This is a > maintenance effort that I don't want to do right now (and, TBQH, I > feel that the proper maintainer should be responsible for). > > ddunbar, how does this weight against your "causing large proble...
2018 Dec 05
2
Re: Libvirt api for esx
Hi Martin, Could you please help me with below issue, I am not sure what’s wrong here. Please find below code and error snippet. Thanks for help. Code Snippet: - from __future__ import print_function import sys import libvirt SASL_USER = <username> SASL_PASS = <password> def request_cred(credentials, user_data): for credential in credentials: if credential[0] == libvirt.VIR_CRED_AUTHNAME: credential[4] = SASL_USER elif credential[0] == libvirt.VIR_CRE...
2012 Dec 04
0
[LLVMdev] Minimum Python Version
...eally any different than forcing people running older versions to upgrade? The primary difference is that while the number of people running older versions is declining, the number of people running python3 will only increase. I believe that 2.6 was the first version that had the __future__ import print_function available, which means that python 2.4 and 2.5 would not be able to use print statements if they are to interoperate with py3k. There is also __cmp__() which has been removed in python3 and I saw in a couple places. The bottom line is that basically every guide to porting/interoperating with pyth...
2018 Dec 06
2
Re: Libvirt api for esx
...IT SINGH wrote: > >Hi Martin, > > > >Could you please help me with below issue, I am not sure what’s wrong > here. > >Please find below code and error snippet. > > > >Thanks for help. > > > >Code Snippet: - > > > >from __future__ import print_function > >import sys > >import libvirt > >SASL_USER = <username> > >SASL_PASS = <password> > >def request_cred(credentials, user_data): > > for credential in credentials: > > if credential[0] == libvirt.VIR_CRED_AUTHNAME: > >...
2012 Dec 04
2
[LLVMdev] Minimum Python Version
On 12/04/2012 12:28 AM, Sean Silva wrote: > On Mon, Dec 3, 2012 at 6:56 AM, Tobias Grosser<tobias at grosser.es> wrote: >> The gcc compile farm currently only has python 2.4 and 2.5. I know Duncan is >> using it quiet extensively, especially all dragonegg buildbots run on it. >> >> I very much agree we should ensure our python scripts are valid python 2.7 >>
2012 Dec 04
5
[LLVMdev] Minimum Python Version
...ing older versions is declining, the number of > people running python3 will only increase. I am not against python3 support. I am against unnecessarily forcing people to move to a different python 2.x version. > I believe that 2.6 was the first version that had the __future__ > import print_function available, which means that python 2.4 and 2.5 > would not be able to use print statements if they are to interoperate > with py3k. This is a very valid point. There are other options like e.g. the six python 2&3 compatibility library http://pypi.python.org/pypi/six, which supports pytho...
2018 Dec 12
1
Re: Libvirt api for esx
...please help me with below issue, I am not sure what’s wrong >>> here. >>> >Please find below code and error snippet. >>> > >>> >Thanks for help. >>> > >>> >Code Snippet: - >>> > >>> >from __future__ import print_function >>> >import sys >>> >import libvirt >>> >SASL_USER = <username> >>> >SASL_PASS = <password> >>> >def request_cred(credentials, user_data): >>> > for credential in credentials: >>> > if credenti...
2012 Dec 04
0
[LLVMdev] Minimum Python Version
On Tue, Dec 4, 2012 at 4:27 AM, Tobias Grosser <tobias at grosser.es> wrote: > Why don't you give it a try. This will also help us to understand where > the biggest > problems are and if the necessary changes make supporting python 2.4 > hard. I'll see what I can do. Since on that machine I only have python3 and python2.7, I can't easily verify that my changes still
2016 Aug 07
0
Proper XML for compareCPU method
All - What is the proper XML to supply to the Python Connections compareCPU method? I have looked at the cpu_map.xml file and I believe I have the proper XML configured but the method always throws an exception with a missing CPU architecture error. Here is the code. from __future__ import print_function import sys import libvirt conn = libvirt.open('qemu:///system') if conn == None: print('Failed to open connection to qemu:///system', file=sys.stderr) exit(1) retc = conn.compareCPU('<cpu><arch name="x86"><model name="kvm64"/>&l...
2012 Dec 04
2
[LLVMdev] Minimum Python Version
...4, 2012 at 9:15 AM, Sean Silva <silvas at purdue.edu> wrote: >> >> So, I just tried, and basically it's difficult to make progress due to >> the print statements (since they induce an immediate syntax error). >> Since 2.4 doesn't support `from __future__ import print_function`, the >> only alternative I guess is shimming in a print function. This is a >> maintenance effort that I don't want to do right now (and, TBQH, I >> feel that the proper maintainer should be responsible for). >> >> ddunbar, how does this weight against your "...
2018 Dec 06
0
Re: Libvirt api for esx
On Wed, Dec 05, 2018 at 09:44:17PM +0530, ROHIT SINGH wrote: >Hi Martin, > >Could you please help me with below issue, I am not sure what’s wrong here. >Please find below code and error snippet. > >Thanks for help. > >Code Snippet: - > >from __future__ import print_function >import sys >import libvirt >SASL_USER = <username> >SASL_PASS = <password> >def request_cred(credentials, user_data): > for credential in credentials: > if credential[0] == libvirt.VIR_CRED_AUTHNAME: > credential[4] = SASL_USER > e...
2018 Dec 12
0
Re: Libvirt api for esx
...> > >> >Could you please help me with below issue, I am not sure what’s wrong >> here. >> >Please find below code and error snippet. >> > >> >Thanks for help. >> > >> >Code Snippet: - >> > >> >from __future__ import print_function >> >import sys >> >import libvirt >> >SASL_USER = <username> >> >SASL_PASS = <password> >> >def request_cred(credentials, user_data): >> > for credential in credentials: >> > if credential[0] == libvirt.VIR_CRED_AU...
2018 Nov 29
2
Re: Libvirt api for esx
On Wed, Nov 28, 2018 at 10:24:55PM +0530, ROHIT SINGH wrote: >Hi Martin, > >Could you please point me to any example codes in python present for esx? >Suppose, I have to power off and power on esx virtual machine, can i get >this code somewhere on python to develop some understanding. > https://www.mail-archive.com/libvir-list@redhat.com/msg17903.html >Actually, I am not