search for: __future__

Displaying 17 results from an estimated 17 matches for "__future__".

2015 Oct 09
3
Python version for scripts in LLVM?
...mail/llvm-dev/attachments/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&g...
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...
2012 Dec 04
0
[LLVMdev] Minimum Python Version
...omment more. - Daniel 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 &quo...
2012 Dec 04
5
[LLVMdev] Minimum Python Version
...; number of people running 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/pyp...
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...
2012 Dec 04
0
[LLVMdev] Minimum Python Version
...example. Is this really 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/in...
2018 Dec 06
2
Re: Libvirt api for esx
...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...
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 >>
2018 Dec 12
1
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: >>> &...
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=&q...
2012 Dec 04
2
[LLVMdev] Minimum Python Version
...> 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 weig...
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] = S...
2018 Dec 12
0
Re: Libvirt api for esx
...gt;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]...
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
2010 Jan 21
1
Rgeneric.py assists in rearranging generic function definitions
I've attached a script I wrote that pulls all the setGeneric definitions out of a set of R files and puts them in a separate file, default allGenerics.R. I thought it might help others who find themselves in a similar situation. The "situation" was that I had to change the order in which files in my package were parsed; the scheme in which the generic definition is in the
2010 May 17
0
strace log
...0480) = 20480 read(6, "i\0\4\0\0s\v\0\0\0****** val=i\0\0\0\0(\0\0\0\0(\0"..., 4096) = 697 read(6, ""..., 4096) = 0 close(6) = 0 munmap(0x7f731ad05000, 4096) = 0 stat("/usr/lib/xen-3.2-1/bin/../lib/python/xen/xend/__future__", 0x7ffffffefcb0) = -1 ENOENT (No such file or directory) open("/usr/lib/xen-3.2-1/bin/../lib/python/xen/xend/__future__.so", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib/xen-3.2-1/bin/../lib/python/xen/xend/__future__module.so", O_RDONLY) = -1 ENOENT (N...