[Tutor] CPU Scheduling
Need help trying to implement a CPU scheduling algorithm.I am not even sure where to start on this. Can someone please guide me and walk me through the steps for this? Assignment: The Simulation. Simulating the scheduling of a single CPU is a type of discrete event simulation in which you iterate over discrete steps of time and handle events as they occur. The simulation continues for a given amount of time or until all data has been processed. Add the processes to the ready queue. cpu = None curTime = 0 while ready queue is not empty : handle events that occur during the current time step curTime = curTime + 1 For this project, the simulation will continue while there are still processes that need to use the CPU. There are three types of events that can occur: the CPU is initially empty, the time slice for the current process on the CPU has expired or the process has completed execution before the time slice has expired. • If the CPU is initially empty, select the next process from the ready queue and assign it to the CPU. 1 CS 112 – Spring 2015 Programming Assignment Four – 2 • If a process completes execution, it’s removed from the system and it’s total wait time is added to a running total. • If a process has used its time slice, the process is removed from the CPU and the next process is selected from the ready queue and assigned to the CPU. The process that was removed is added back to the ready queue to wait its turn before it can again use the CPU. Note that the next process has to be dequeued before the current process is added back to the queue. Text File. The simulation data will be contained in a text file that has the following format: 2 15 8 35 0 25 10 5 5 5 2 7 12 30 7 10 0 3 8 15 where each line contains information for a single process. The first value is the priority and the second value is the amount of processing time required (i.e. the total amount of time the processor needs to use the CPU). Note that the lower the priority value, the higher the priority. Assume the first line contains the information for process 1, the second line for process 2, and so on. The Algorithms. You are to implement two priority based scheduling algorithms. For the first algorithm, the next process selected from the ready queue is simply the one with the highest priority. For the second algorithm, you are to make a slight modification. Each time a process is put back into the ready queue, after being removed from the CPU, reduce the priority level by 5. Results. Your program should produce output similar to the following: Number of processes: 10 Time slice: 10 Total time: 150 Algorithm 1 Avg wait time: 60.10 Algorithm 2 Avg wait time: 62.80 To compute the average wait time over all of the processes, you will need to keep track of how much time each process spends in the ready queue and then compute the average of those times. Assume that all processes are started at the exact same time. CS 112 – Spring 2015 Programming Assignment Four – 3 Requirements. Your program should be placed within a driver named cpu.py. Your program should be well structured and commented appropriately as indicated in the programming style guide provided on the course web page. Some important points to keep in mind: • A linked list implementation of the Priority Queue ADT is provided in the course directory. • You must use a top-down design with functions. • Your program should read from the user the name of the text file that contains the simulation data and the length of a time slice (as an integer). • Use a variable (cpu) to hold a reference to the process object (your storage object) for the process that is currently assigned to the cpu. • In addition to the curTime variable, you should use a second time variable that indicates the time when a process needs to be switched off the cpu. This variable acts as an alarm or the time an alarm goes off to signal an event. When a process is assigned to the cpu, compute the time when it should be switched off (current time + time slice or current time + time remaining for the process). • To compute the wait time, you will need to keep track of the current time when the process is added to the ready queue. Then each time a process is removed from the ready queue, compute how much time it spent in the queue and add that to the processes total wait time. • You will need to use a storage object to store the information for a single process. It should contain the process number, the priority, the remaining CPU time required for that process, its total wait time, and the time it was added to the ready queue. The data in the storage object must be stored as integer values. • Each time the process is added back to the ready queue, you should add the storage objects to the priority queue and update the remaining CPU time ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] CPU Scheduling
On 27/04/15 02:18, alex gonsalez wrote: Need help trying to implement a CPU scheduling algorithm.I am not even sure where to start on this. Can someone please guide me and walk me through the steps for this? Your assignment gives a pretty thorough description of what needs to be done. Maybe you can start by drafting a pseudo code description of the main scheduling algorithm? Also you could think about the data structures you need. It mentions a linked list although in Python I'd think a normal list would do just as well. What variables are you going to need? What historic data are you going to store? And how will that be represented? It describes two separate algorithms you need to implement. Can you define those in pseudo code? Assignment: The Simulation. Simulating the scheduling of a single CPU is a type of discrete event simulation in which you iterate over discrete steps of time and handle events as they occur. The simulation continues for a given amount of time or until all data has been processed -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
[Tutor] plz help me
Hi guys: I need help for consume .NET web service in python code from Ubuntu OS thanks alot G/kirstos ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
[Tutor] Adding consecutive numbers
Hi, I am trying to build a python mini program to solve a math problem . I wanted my program to ask two number from the operator and it can add those number as a integer but as consecutive number in range. For example, if num1 entry =1 & num2 entry = 100 , the program should be adding number from 1 to 100 together(which should equal to 5050). I thought that I could use range() to use it for any given input from the user. However, there are few argumentation error and I don't know why my bool function did not work in while loop. Is there any way to make the program more concise. I have uploaded my code file below. Please, note that I am fairly new to programming and donot use complex modules, therefore, suggest me where I was wrong with the code. I have checked for indentation error, however, there were no error. So, I don't have any idea about the error. Thanks. ##Goal: Building a math program, which allows addition of two numbers in range in consequitive ## sequence e.g. 1+2...+n if __name__=='__main__': interact() def iteract(): print('''Welcome to My new Math program!! With this program, you can find the sum of any consequitive numbers.''') print('So Just add your numbers in following spaces') x =int(input('Please enter your first number: ')) y =int(input('Please enter your second number: ')) while True: if x___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] plz help me
On 27/04/15 10:32, Gebrekirstos G/meskel wrote: Hi guys: I need help for consume .NET web service in python code from Ubuntu OS OK, But to help you we need you to help us. What does this web service look like? What version of Python are you using? What have tyou tried so far , if anything? What experience of programming 9ion Python) do you have? Web services come in all kinds of shapes and sizes from XMLRPC to SOAP to RESTful services. give us a clue. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Adding consecutive numbers
On 27/04/15 11:37, Whom Isac wrote: num1 entry =1 & num2 entry = 100 , the program should be adding number from 1 to 100 together(which should equal to 5050). I have uploaded my code file below. Infortunately we can't see it. Since it is presumably quite short please just send it in the body of your email. Also include the full error text that you refer to, Also tell us the Python version and OS you are using. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Adding consecutive numbers
On 04/27/2015 06:37 AM, Whom Isac wrote: Hi, I am trying to build a python mini program to solve a math problem . I wanted my program to ask two number from the operator and it can add those number as a integer but as consecutive number in range. For example, if num1 entry =1 & num2 entry = 100 , the program should be adding number from 1 to 100 together(which should equal to 5050). I thought that I could use range() to use it for any given input from the user. However, there are few argumentation error and I don't know why my bool function did not work in while loop. Is there any way to make the program more concise. I have uploaded my code file below. Please, note that I am fairly new to programming and donot use complex modules, therefore, suggest me where I was wrong with the code. I have checked for indentation error, however, there were no error. So, I don't have any idea about the error. Thanks. You really shouldn't use attachments on this list, since many cannot see them. I happen to be able to, so I'll try to comment. In addition, each time you start a new thread, you should specify what Python version you're trying to use, and what OS. I never heard of an "argumentation error" so you'll really have to show the exact error. Just copy/paste it from your user shell. And exact for syntax errors, show the complete traceback. Your code has many errors in it, and is unnecessarily complex. At its simplest, you could use some simple algebra, and write: x =int(input('Please enter your first number: ')) y =int(input('Please enter your second number: ')) print (x+y) * (y-x + 1) / 2 But if you really have to do the sum, then you need to build a list, and sum it. That's not very hard either, since range() returns a list, and the sum() function is built-in. But now, let's look at your code, and identify a few of the problems with it. Your second line calls function interact(), which isn't defined yet. And in fact, when it is defined, it is spelled differently. Put your top-level code (those two lines, anyway) at the *end* of the file, after the function(s) it needs are defined. In function iteract (spelled inconsistently), you have a while True loop, with a break in the else clause. But if xforever, since neither one changes, and if x>=y, you'll hit the break without defining z, so print z will throw an exception. Also in that function you call a function called adding_sum_in(), but there's no function by that name. In function find_range(), the first thing you do is trash your arguments. So whatever else is in that function probably doesn't matter much. In the loop: for num in x: x.append(num) you're modifying the same thing you're looping over. Not generally a good idea, so I have no idea if it'll do anything useful or not. Probably not. return R = range({0},{1}).format(x,y) is a syntax error. def adding_sum_in_range(x, y): c= find_range(x,y) Total_sum = 0 for i in c: Total_sum += i return Total_sum You have an indentation problem there, as this will return the first time through the loop. def addition(x, y): num1=(x) num2=(y) return num1+num2 Another indentation problem. -- DaveA ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Adding consecutive numbers
On 27/04/2015 13:41, Dave Angel wrote: On 04/27/2015 06:37 AM, Whom Isac wrote: But if you really have to do the sum, then you need to build a list, and sum it. That's not very hard either, since range() returns a list, and the sum() function is built-in. range() only returns a list in Python 2 but it doesn't matter here as sum() accepts any iterable, not just a list. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Adding consecutive numbers
Hi, and welcome! My answers are below. On Mon, Apr 27, 2015 at 08:37:54PM +1000, Whom Isac wrote: > Hi, I am trying to build a python mini program to solve a math problem . I > wanted my program to ask two number from the operator and it can add those > number as a integer but as consecutive number in range. For example, if > num1 entry =1 & num2 entry = 100 , the program should be adding number from > 1 to 100 together(which should equal to 5050). I thought that I could use > range() to use it for any given input from the user. However, there are few > argumentation error and I don't know why my bool function did not work in > while loop. Is there any way to make the program more concise. > I have uploaded my code file below. Please, note that I am fairly new to > programming and donot use complex modules, therefore, suggest me where I > was wrong with the code. I have checked for indentation error, however, > there were no error. So, I don't have any idea about the error. > Thanks. Thank you very much for sending the code you have so far! Unfortunately, I wish I had good news but I don't -- nearly everything about it is wrong. You have a good idea of what you want the program to do, and you have made a good attempt at splitting it into separate functions, but sadly the details are wrong and that prevents your code from working. Let's see if we can fix that. The first, and most important, thing is that Python can only run code it has already seen. So if I write this: do_something() # Call the function. def do_something(): # Define the function. print("Working really hard...") it will fail because at the time Python tries to call do_something() it doesn't exist yet. This is your very first problem: > if __name__=='__main__': > interact() > > def iteract(): When you try to call interact(), the function doesn't exist! Rule 1: Put your function definitions at the top of the file. Put the if __name__ == '__main__' block at the bottom of the file. That way, by the time Python reaches that block and calls the functions, they will have already been created and are ready to use. Now, let's think about good program design. A well-designed program will separate the program logic from the user-interface. In other words, the part of the program which calculates the result should be kept apart from the part of the program which communicates with the user. That makes it much easier to test each half separately, in case of any problems. So, let's start with a simple function that takes two integers as arguments, and adds all the numbers between then. Python gives you the tools to make this easy: cut here - def add_range(start, end): """Add the numbers between start and end inclusive.""" the_range = range(start, end+1) return sum(the_range) print(add_range(1, 7)) # Should print 28 print(add_range(8, 20)) # Should print 128 cut here There is a function, sum(), which is used for adding up a sequence of numbers, and another function, range(), which creates a sequence of numbers from start to one less than the end. So we add one more to the end, create the range, then use sum() to add up the numbers. Now let's have another function to get a number from the user. We will use that function to get the starting number, then re-use it to get the ending number, then finally pass those two number to the add_range() function we created above. cut here def get_user_number(message): """Get an int from the user.""" while True: # Keep trying forever. answer = input(message) if answer.isdigit(): return int(answer) else: print("Sorry, that is not a number!") start = get_user_number("Please enter your starting number: ") end = get_user_number("Please enter your ending number: ") print("start is", start, "; end is", end) print(add_range(start, end)) cut here And that's nearly all you need! Any questions? -- Steve ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] plz help me
On Mon, Apr 27, 2015 at 12:32:16PM +0300, Gebrekirstos G/meskel wrote: > Hi guys: > > I need help for > > consume .NET web service in python code from Ubuntu OS Show us the code you have, and the error it is producing, and well try to help. -- Steve ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] CPU Scheduling
> On 27/04/15 02:18, alex gonsalez wrote: >> >> Need help trying to implement a CPU scheduling algorithm. Hi Alex, Unfortunately, this is way out of scope for Python-tutor; I think you'll be better off discussing with your classmates and professor. You'll get more productive answers that way. One reason that here is probably not the right place for this question is because, essentially, you're asking a classroom full of programming beginners, many of us who are still learning how to do things like loops, variables, and values, how to do a hard-core operating system homework exercise. Another reason is that most academic institutions have an honor code which prohibits or discourages certain activities. As an example of one, see a random one, like the GMU CS honor code: http://cs.gmu.edu/wiki/pmwiki.php/HonorCode/CSHonorCodePolicies ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] CPU Scheduling
On 04/27/2015 01:13 PM, Danny Yoo wrote: On 27/04/15 02:18, alex gonsalez wrote: Need help trying to implement a CPU scheduling algorithm. Can I recommend that you read this: http://www.dabeaz.com/coroutines/Coroutines.pdf About half way through it has a Excellent example of how an OS schedules processes. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
[Tutor] MTIE calculation
Hello, Need help with how to calculate MTIE using Python. I have imported numpy and allantools, please help. Thanks -- Kind Regards; *Durray * ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] MTIE calculation
On 27/04/15 19:10, Durrayshehwar Farooqi wrote: Need help with how to calculate MTIE using Python. I have imported numpy and allantools, please help. You probably need to tell us exactly what MTIE is and how it works. You also need to tell us which Python version, which OS and show us any code you have written already. This list is for people learning Python and its standard library, don't assume we know anything about your particular area of study. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Python tkinter. Opening another script from main window stop main window from functioning. Looking for Help
On 26 April 2015 at 04:23, Spencer For Friends wrote: > Hi all. I'm new to Python and I'm trying my best to learn, but I'm really > struggling with some problems. > > I'm using a tkinter window with a button on it to open another Python > script. When the button is clicked and the new script loads it opens up > it's own window over top of my tkinter window. The problem is, when I > switch back to my tkinter window, none of the buttons are click-able > anymore. The whole windows is unresponsive. The click animation on the > button doesn't even function. Any help to resolve this would be greatly > appreciated. Here is my code. Hi Spencer, The problem is that you're trying to run a long running task within your applications event loop. You have to understand that the main loop in a GUI program looks something like this: while True: event = get_event_from_queue() if event == button_pressed: call_button_callback() elif event == key_pressed: respond_to_keypress() elif event == close_button_clicked: close_windows() break # etc. Your callback function takes a long time to run and during that time the event loop is still waiting for call_button_callback() to finish. The result is that it doesn't respond to anything during that time. You can test the same effect with a simpler program: from Tkinter import Tk, Button, S from tkMessageBox import showinfo def callback(): total = sum(1 for _ in xrange(10**8)) # <-- slow showinfo(str(total)) root = Tk() button1 = Button(text='Click me', command=callback) button1.config(height=3, width=25) button1.grid(row=1, column=0, sticky=S) root.mainloop() When you run this program and click the button it will freeze for 5-10 seconds while running the slow callback() function. If you click something during this time then your click will go into the event queue. The event loop will retrieve that click message once it has finished waiting for the callback function to finish. You can test this by clicking the 'Click me' button and then clicking the close button before it has finished. As soon as the callback finishes the program will close. The solution to this is to use threads or subprocesses. On the face of it this is quite simple but actually writing multi-threaded code is quite tricky. Here's how to modify the above program to run the slow callback function in a thread: from Tkinter import Tk, Button, S from tkMessageBox import showinfo from threading import Thread def callback_threaded(): Thread(target=callback).start() def callback(): total = sum(1 for _ in xrange(10**8)) # <-- slow showinfo(str(total)) root = Tk() button1 = Button(text='Click me', command=callback_threaded) button1.config(height=3, width=25) button1.grid(row=1, column=0, sticky=S) root.mainloop() This program will create a separate execution thread to run the callback. It's quite simple if you just want to run execfile in parallel with your GUI. Where it gets trickier is if you need the threads to interact and you need to pass data between them. -- Oscar ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
[Tutor] pip install M2crypto
Good Evening, I am trying to install the M2crypto package via pip and receive an error. Python version is 2.7.4, any ideas on how to fix the SWIG error? Jon$ sudo -H pip install M2crypto /Library/Python/2.7/site-packages/pip-6.1.1-py2.7.egg/pip/_vendor/requests/packages/urllib3/util/ssl_.py:79: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning . InsecurePlatformWarning Collecting M2crypto /Library/Python/2.7/site-packages/pip-6.1.1-py2.7.egg/pip/_vendor/requests/packages/urllib3/util/ssl_.py:79: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning . InsecurePlatformWarning Downloading M2Crypto-0.22.3.tar.gz (74kB) 100% || 77kB 784kB/s Installing collected packages: M2crypto Running setup.py install for M2crypto Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-covxwD/M2crypto/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-NWsSZ5-record/install-record.txt --single-version-externally-managed --compile: running install running build running build_py creating build creating build/lib.macosx-10.10-intel-2.7 creating build/lib.macosx-10.10-intel-2.7/M2Crypto copying M2Crypto/__init__.py -> build/lib.macosx-10.10-intel-2.7/M2Crypto copying M2Crypto/ASN1.py -> build/lib.macosx-10.10-intel-2.7/M2Crypto copying M2Crypto/AuthCookie.py -> build/lib.macosx-10.10-intel-2.7/M2Crypto copying M2Crypto/BIO.py -> build/lib.macosx-10.10-intel-2.7/M2Crypto copying M2Crypto/BN.py -> build/lib.macosx-10.10-intel-2.7/M2Crypto copying M2Crypto/callback.py -> build/lib.macosx-10.10-intel-2.7/M2Crypto copying M2Crypto/DH.py -> build/lib.macosx-10.10-intel-2.7/M2Crypto copying M2Crypto/DSA.py -> build/lib.macosx-10.10-intel-2.7/M2Crypto copying M2Crypto/EC.py -> build/lib.macosx-10.10-intel-2.7/M2Crypto copying M2Crypto/Engine.py -> build/lib.macosx-10.10-intel-2.7/M2Crypto copying M2Crypto/Err.py -> build/lib.macosx-10.10-intel-2.7/M2Crypto copying M2Crypto/EVP.py -> build/lib.macosx-10.10-intel-2.7/M2Crypto copying M2Crypto/ftpslib.py -> build/lib.macosx-10.10-intel-2.7/M2Crypto copying M2Crypto/httpslib.py -> build/lib.macosx-10.10-intel-2.7/M2Crypto copying M2Crypto/m2.py -> build/lib.macosx-10.10-intel-2.7/M2Crypto copying M2Crypto/m2urllib.py -> build/lib.macosx-10.10-intel-2.7/M2Crypto copying M2Crypto/m2urllib2.py -> build/lib.macosx-10.10-intel-2.7/M2Crypto copying M2Crypto/m2xmlrpclib.py -> build/lib.macosx-10.10-intel-2.7/M2Crypto copying M2Crypto/Rand.py -> build/lib.macosx-10.10-intel-2.7/M2Crypto copying M2Crypto/RC4.py -> build/lib.macosx-10.10-intel-2.7/M2Crypto copying M2Crypto/RSA.py -> build/lib.macosx-10.10-intel-2.7/M2Crypto copying M2Crypto/SMIME.py -> build/lib.macosx-10.10-intel-2.7/M2Crypto copying M2Crypto/threading.py -> build/lib.macosx-10.10-intel-2.7/M2Crypto copying M2Crypto/util.py -> build/lib.macosx-10.10-intel-2.7/M2Crypto copying M2Crypto/X509.py -> build/lib.macosx-10.10-intel-2.7/M2Crypto creating build/lib.macosx-10.10-intel-2.7/M2Crypto/SSL copying M2Crypto/SSL/__init__.py -> build/lib.macosx-10.10-intel-2.7/M2Crypto/SSL copying M2Crypto/SSL/cb.py -> build/lib.macosx-10.10-intel-2.7/M2Crypto/SSL copying M2Crypto/SSL/Checker.py -> build/lib.macosx-10.10-intel-2.7/M2Crypto/SSL copying M2Crypto/SSL/Cipher.py -> build/lib.macosx-10.10-intel-2.7/M2Crypto/SSL copying M2Crypto/SSL/Connection.py -> build/lib.macosx-10.10-intel-2.7/M2Crypto/SSL copying M2Crypto/SSL/Context.py -> build/lib.macosx-10.10-intel-2.7/M2Crypto/SSL copying M2Crypto/SSL/Session.py -> build/lib.macosx-10.10-intel-2.7/M2Crypto/SSL copying M2Crypto/SSL/ssl_dispatcher.py -> build/lib.macosx-10.10-intel-2.7/M2Crypto/SSL copying M2Crypto/SSL/SSLServer.py -> build/lib.macosx-10.10-intel-2.7/M2Crypto/SSL copying M2Crypto/SSL/timeout.py -> build/lib.macosx-10.10-intel-2.7/M2Crypto/SSL copying M2Crypto/SSL/TwistedProtocolWrapper.py -> build/lib.macosx-10.10-intel-2.7/M2Crypto/SSL running build_ext building 'M2Crypto.__m2crypto' extension swigging SWIG/_m2crypto.i to SWIG/_m2crypto_wrap.c swig -python -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/usr/include -I/usr/include/openssl -includeall -modern -o SWIG/_m2crypto_wr