 Dobro, češčo, češčo, da je mi pričočnimo to. Zato češčimo... Sprav na svoj titul, ko so imel. Počuš njim, ko je, češči, ne znam, da je bilo vse, da je bilo vse, da je značil vse z tem, da ga po kajem vse zprav nimi vsi modljala. T pooro si jih reči? To je češčo ne znam, da imam svoj. Tako zelo ga ga izpravite na Python, da si izpravite po Pythonu, nezavel si svoje obržene projekte, sem autor vsev sdaj stp. framework, kaj je basit na Flask, in seberu, ko je vseh zlegi na Pythonu. Nadal bi se nasestel in od njih izgleda. Tako da sem izpravite na C-sharp, in vseh nezavel in In sem prigleda outletok in sajnegaosexuala v mnogu vstaj, zelo to vse c Sharp in F Sharp funkcionalne lene, v arrivecčenji. Tukaj sem vse vsi razložil, da ga doblizim na svoje lene, tako je tudi, da je dobro na vrste vzelajec, neč nekaj je vzela, kaj sem umožel, ampak od вrstv je zemljava, da noženje do materijali neko informacičneho platforma. Sem pomežel na vzelaj, da na vzelaj sa Vzelaj, je to nekaj je zemljava, s k pračenem vzelaj, da je in vzela. Ja, ja se obstravim vzelaj, in intervjertor všeč na sx, x10 host, kaj je včetno vrlo. In zato, da imam Python, sem jazil všeč, Python stak, stav, sem jazil vim na text hrediti, i-term, bash, x10, linux, kjer sem jazil v sx, kjer sem jazil vsega, tako sem tudi linux hacker. Kaj sem vzumel, da sem vzumel v vizuastudiju, ki je, da sem vzumel, nekaj ide, ali, da sem vzumel tekst, in da sem vzumel, da sem vzumel, da sem vzumel ide. Sve sem vzumel, da se to vzumel, da sem vzumel. Prejel sem vzumel vzumel vzumel v vizuastudiju, da se včešel vsem v vimkji vsega ideja, kjer si vzivljajte vzivstudi in vzivljajte, nekaj je učin, je zelo v Vim, je zelo vzivljava vzivstudi. Ja vzivljava v dronotniške vzivljave in vzivljava vzivljava vzivljave. To je bilo početno v mojj živ, vzivljava vzivljave vzivljave, nekaj napotaj, nekaj nekaj napotaj, nekaj napotaj, nekaj napotaj, nekaj napotaj, nekaj nekaj napotaj, nekaj napotaj, nekaj napotaj na pravdi platform. Zgledaj način, da smo v terzovoj, in kako se počutak vpračje z vseh tekst, tako, da znaš tudi, občutak v kuriožit, kaj so jih nekaj vpračari s vzelačke. Vsih nekaj vpračari s vzelačke? There are many people who have come to visit me. One of them is doing three things, and it's a very simple, but that's what we have to allow. I know some people who will be born after three years and they can take you in their houses with them, so it's very easy to do. It's very simple. One of them is their parents, they are the parents of their children, who are born after three years. in začeli se to. Mi so vidila, da počaj bi tudi še dirične, zezdajne, in objivno, nekaj sem bilozde, tako, da sem pozdravil površenje tudi tudi začeli. Vse njihova nama dojel, da so pričočni, ali pečen, in počatno, pričočnjo, in da je to vso červil, vse zapečne pretukne vse vapas, to je zapečno vyšal v vizuerstvu. In če,vedaj si vse danes vizuerstvi bo zapečno izgrišati z seesjarp se objevano, hani vse ne so ne vzbjela v vizuerstvu, samo,kakve in kajli se bil, ali,zvom,ko je broj objevno, ... občino v vženju... ... občino v vženju... ... nekako ... ... n provej pustitiva tak仔 ... ... za Python in ovako je ... ... v plantejne ... ... v elegeri v visual studio ... ... ampunca ... ... v visual studio, je uvolj člusive ... ... pustite, kokjo v gre pot determine ... ... katero so projekte v te ... ... je zelo daj dedaj ... ... z讜onj iz ogledenja v Microsoft. ... neko najtažena na vlasti, ... ... neče vsega k Montegardu. ... več nekako ... Dauer, če je pravda lovoritva prezentu Vizualne Vizualne Vizualne Vizualne. Zdaj je isponoveta pišenja tako, da teži prizvali kaja postačı prim malo, ki je zelo, nekaj ne obožal s neko sori. Vizualne vizualne vizualne vizualne vizualne vizualne, nekaj je sori, da verejooki iz Hardายka brez just, da bo vzelo, da se doživamo znak counter vanjev v vizualne. Zelo, da imamo vizualne vizualne vizualne našišanje, Niče odpravljenja do prospetja, tako delajo for mi. least je vse merg nogov. In tudi, po večjev, vzlušejstv je stitchinga v skončavnici, ko je nečo ono 3 % vse začačo. Mi je samo Kavijec, je nekaj vse, je kaj ta nečo začačjano nينan así, je kaj ta nečo začačjano vse za nene. Je tem da je prično očnevnja, nekaj, in se objevu se začajo za kvalit. so, jih vidimš še vzivning i vzivstudijo, imeš vziv tudi z počesku kameršelja, igraš vziv, in tudi očesku, do 5 ljudovt, nož alsi vziv na vzivstudijo. Vziv je, da je lime opravljena, da boš, da se on vzivo, dnem 20 ljudov, sve tako to odložilo vziv, potrafi, tako, da ne odložiti na vziv, ampak doki ne vziv na vzivstudijo, priživ na vzivstudijo, njak i mimo zelo pa za vziv Notice in mi opor. V mojej kompanii je tudi svoj, ki smo vzivati v vizierstudi in komunitivne odličenje. Vzivno je nezavršenje vzivne odličenje in profesionalne odličenje. Vzivno imaš vzivne odličenje v vizierstudi. Vzivno je vzivnja vzivnja vzivnja, kaj je večo vzivne opcije, ali je vzivnja vzivnja za vzivnje vzivnje, zelo, kaj je vzivnja vzivnja v Pythonu. Vzivno imaš vzivnja vzivnja, bo vzivno imaš vzivnja, začne pa složite, da sem je mobilno perročno se vzivnja in odličen mi nekaj. Tu je dela. Šta bomo odličeni, zelo pa kaj imaš vzivnja vzivnja vzivnja vizierstudi. In bomo za soj zvom nes, zelo vzivno, je neko zodm Profesionalne z vzivnjenja v vizierstudi. To je kot zapravenk vziv, ki, kaj nekiwurf na Madridu, je noko zavrčen, Vzprovunosti je to je popljano, ne lahko je značila se na korisi. встретemo s RPM brandedi. Napravljamo, da je popljano si na kore, in da je za gici na kamal, ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... Selo, da všeč nekaj ne zelo izgleda, dar lepo se počuče, da se vse nekaj opravite, tako, da se ga pričoče. Tako, tu sezne, da lahko sem ustaljala v srp, lahko sem podeljala, da počutim, da postočijo tudi. In tudi, razvoljimo, pa je tudi, da ne postali tudi na vse. Evalo, da postačijo tudi na vse, da je to še vse zelo, zelo, da je tudi, zelo, da je to srp, nekaj nekaj potrebej nekaj lepoj peton nekaj nekaj nekaj lepoj Peton nekaj lepoj Peton nekaj lepoj spreada kot si da ima inšlični tem bliznik, iznič po različen Ti, niča napreja strboljne konveče in nekaj problemi sobrebo v taking tega priletima in tudi v vladošljeni. In je ti v vladošljeni v tudi razlikošljeni, nudi njih povrchi, in nekaj na Resh, ki je ja bendem v verk川u in niče Jaz ne bomo bljeli nekaj strani vzpevati in izgledati, zelo se skupil za pythonov, in izgleda. Na pravdu bila se nekaj vizip, ali načo tudi nekaj vizip, to je zelo inšto, nači. Ispelj nekaj zelo tudi izgleda, zelo smo se v demoj, in površili. In zelo smo prikratnje zrpunjati, počkati in v vizorstudi, če so prikratni vzelo v izgledanje v izgledanjem projekte. In je vzelo vzelo vizorstudi, vzelo vzelo vizorstudi, prikratnje vzelo v izgledanje, vzelo vzelo v izgledanje. Se zelo vzelo vizorstudi. in biljamo na websitea z Pythona, s k仁 ovo zabijamo Most of you are Python guys, probably you know PyCharm, for example, which is a super cool, very nice, big shout out for PyCharm. It's a very nice project, but in my case I wanted to, what I do every day, as I told you, is C-sharp, so I wanted to use my own IDE for Python as well. But if you don't fancy Visual Studio, you can look at alternatives like PyCharm, which is very nice, or Visual Studio Code, for example, is a super nice product. It's not really an IDE, more a text editor, it's very powerful and it's retaining a lot of traction laterally, also in the Linux community, so very interesting. So if I start a new project, I get, and I installed the Python workload for Visual Studio. When I go to other languages, I can pick Python, and as you can see there are a number of templates. You see that there are templates for Botel, for Django, for Flask, and also of course console applications, stuff like that. There are a lot of them. I don't Python, if you fancy that, PyGame, et cetera. Now we are going to build a Flaskware project. As you can see there is a preview here. I just hit OK, and this is very nice in my opinion. As you can see, if I go here to the solution explorer, I can't because the windows is a model of course, but Visual Studio knows that I need to install some stuff from PIP, and it offers to create a virtual environment for me for my own project. So as you can see, the support for a virtual environment is built in, and I could click here, and it will ask me what do you want to call this virtual environment, and in this case, and I pick the interpreter version. It picks up the different Python version installed on my system. It should pick up 3.5 32 bits because the Visual Studio here is 32 bits, and as you can see here, it offers to download and install the packages for me. It can do that because the template includes requirements file, requirements.txt, as you probably know everything about it, so it will go and download the requirements for this project. Now I'm not going to do this right now here because I don't want to risk the Wi-Fi to crash on me. I have here... You can see that here, even if I abort the installation, I have my code ready, but let's go back to this one, EuroPython demo, basically the same exact project, but as you can see, if I go in Python environments, I have an environment based on Python 3.5, and if I open this branch here, all flash dependencies are already installed for me. And this is, of course, a local environment just for this project. I could go here, let me see if it works, and this would be an open folder in File Explorer. As you can see, we are in the EuroPython demo folder, and we have an AMP folder, and here are all the packages for my app. So just local to my own project, and you will do on the command line, on Linux, or on OS X, et cetera. And yeah, so you see full support. If I go back to Python environment, I could switch to another Python version for this project. I could go and look at the packages installed, or let me go back to my environment, actually. And if there were some updates for these packages, it will show up here, and I can just click on the packages and update the dependencies. So I don't have to, yes, I could, of course, go on the command line, do the same thing, but it is all supported by your IDE. And intelligence, we will see what it is. But if you know Visual Studio already, you know everything about intelligence. Let me switch back to the slides, so I don't forget anything. Probably not, okay. We can just go and look at this template. If I go back to my solution and click on Requirements, you see that the only requirement was Flask. Of course, Flask has a number of dependencies itself, and this is what got installed for me. Okay, let's go and look at packages again. I want to show you that you can also search PyPy directly into the IDE. For example, let's look for Django. Oh, sorry. No, no way, okay. So I can pipistar for PyPy. If I click here, it will just install Django for me into my virtual environment. So even for looking up into PyPy, I don't have to leave Visual Studio, I can do that directly within the IDE. Okay, let's look at the code now, which is probably more interesting. Run server.pi is a default launch script created by the template. And as you can see, if you know Flask, it's a very pretty standard code here. And what I want to show you is that in Visual Studio you are used to intelligence, which is basically code completion. And you get that in Visual Studio as well. For example, if I go here and import, I don't know why I can't switch. I don't know. Anyway, you see that I get a menu with the option. I don't know, let's import random, for example, and then a equal. Oh, this is horrible. Sorry about that. I don't know what's happening. I can't switch it off. Yes? Oh, it's going to take too long here. Let's just... Thank you, Randy. As you can see, I have intelligence, basically auto completion. How does it work? Since Python is dynamic language and Visual Studio usually works on compiled languages. And this is why I didn't install the project myself. I switched to the already installed one because when it unlocks the pip packages, it goes and scans them, builds a cache of the system, and then at that point it knows everything about the packages and it can offer intelligence for you. So when you install the first time, it will probably take a while before intelligence picks up because it has to actually build a cache about your system and every cache is specific for the environment. And so, of course, when you create a new project, you can use an old environment and in that case, it won't re-scan the environment. But this is a very nice method to get full code completion within Visual Studio for Python. Sorry, this is a random, so like this. Or maybe not. Now with this caps lock on, it's going to be a huge problem. Sorry about that, oh my god. Okay, this is a nice. Not really. Okay, if I manage to get out of this trap, okay, maybe it is starting to work again, no? Let's see if this... No. Oh my god. Okay, we are in trouble, guys, sorry. I don't know how to fix this. If anybody can help me, it will be appreciated. Oh my god, really? I should turn it off. It usually works, that's true. With Vitorbox, that's a good fix. But it is going to take a while. Let's try that. That's Vitorbox for you, guys. Maybe just logging out might do the trick, but I will just restart it and we are going to waste a lot of time. Restart. Luckily, we have the slides. Let's go back to the slides, because they are on Mac. So... Let's go back here. We will get back to the demo once it has restarted. We talked about intelligence already. And also, and hopefully I can show you, there is support for unit testing within Visual Studio, which is super nice. Unit testing with C-Sharp you can use the same interface and UI for testing in Python. So you have unit test support, pie test support, whatever you want to do with unit testing, you can do that with Python. And there is also, and this is super powerful, because one reason why Visual Studio is really appreciated around the world is because of its very powerful debugging tools. And the good news is that debugging in Python in Visual Studio is exactly the same experience you get with C-Sharp and F-Sharp and whatever else Visual Studio support, which means you can set breakpoints, you can inspect local variables, you can change the code as you write and see what happens and stuff like that. And also, it supports remote debugging before you ask. There is a nice article available here. If you Google it up, there is this debugging Python code on Linux. You just Google for Python tools for Visual Studio remote debugging. And here there is a very nice YouTube video on how to debug a Linux server attaching from a Visual Studio of course a Python app on a remote server on Linux. So you get really cool options here. Oh, look. Like, we might try again. And there is support for source control. This is not an option actually of Python tools, but Visual Studio itself supports source control so you can use Git and all the features from Git within the IDE as well. Hopefully I can show you in a few minutes. And in that half demo that we saw before we created a new project starting from a template. But what if I want to import a new code which is already existing somewhere for example on GitHub or in some remote repository on a local folder. You can do that. There is an import wizard. The reason you need an import wizard is because Visual Studio needs to build its own let's call it solution file for people coming from C sharp they know exactly what they mean. So it will create an additional Python. You can add it to your version control and check it out to commit it so people sharing your code don't have to reimport the code the next time. I will show you if we have time. And yes, I also wanted to show you an import. Let's see if at which point we are here. How many minutes we have, Stefan? We have how many? Oh, great. I can even drink some water. Ok, let's give it another shot. Now Visual Studio is slow starting up so it doesn't help. EuroPython. Also I am within a virtual box machine. Of course if you do this on a native windows machine it's going to be way faster. So don't get sad because I'm slow here. It's kind of wanted. So what I wanted to do is show you some features. For example, what can we start with? Let's say that we launch this application. So this is a typical Flask application. I am not going to show you how Flask works, of course. I just want to show you that we have a folder here. We have some HTML templates. We have a view.pi file here. As you can see with Flask you have some routes and here you see something a function called when the home page is hit by the browser etc. Now let's try and launch this app. As you can see I just use the usual Visual Studio stuff here. It will launch a command line and then it should probably open the browser. Yes, it takes a while and the first time then it becomes faster. As you can see the localhost is running. In this case Microsoft Edge has been launched on the port and here it is our website which is running of course on Python from within Visual Studio. Now, if we go back to the source code we can go to the Run server API for example. Maybe. What is this? Ok. Let's stop the program. Go back to the Layout HTML file which is basically the master page for HTML page and let's for example change again because you get IntelliSense support oh by the way I'm trying let's see if it works. I'm using VIM here as you can see. I typed the city and the space and again this is very interesting if you come from Bash or Linux and are used to VIM you don't have to change your habits I mean once you get into VIM you can get away from it. I mean I don't know if you share my experience but once you have that muscle memory you are doomed basically. You can't do without VIM. It is also based on the emulation of VIM and it is good enough I can use it. It is not good enough I can't use it. Very simple. Probably you have the same experience. VIM is super cool but do know that you are going to get addicted to it and you can't get away from it. It's just too powerful to be true. This one? No? Let's just go with this and relaunch. Let's also do something else. We saw we have an about page just to speed it up. Here we have the route for the about page. Let's say that we want to change pass a new value in this page. This is the Jinja to plate HTML as you can see with Jinja support here and again it's not really relevant what we are doing here what I want to do is show you that we have support for something like this. Let's call this variable I don't know EuroPython and then let's go back to the controller and add a new value to the tuple here and say that EuroPython equals Oh sorry. I'm using Oh nice. Hello. So basically I'm adding a new value to the page. Yes? Really? Here? Let me go back to the title tag. Oh, right. Let me go back and just do this. Okay. Let's see what we managed to crash or to break. You should never do demos while speaking but I can't resist the arts to do that. I mean it's boring if you don't do demos, right? As a programmer you don't want to see code. Live coding. So here it is. Too bad. Ah, yes. The title changed. This didn't change because I undid the feature. Let's see the about page. As you can see here we have this hello message that we just changed just to show you that this is just regular Python but then I think it's that we are in Windows within Visual Studio as we were doing C sharp Okay, let's go and look at this. I have this game I wrote with my I would like to say that my daughter wrote but actually we wrote it together. It's a very simple Python game, guess the number. So it is on GitHub. I want it to be to use it in Visual Studio, clone it and work on it. So let's go copy the link back into Windows. By the way, another very nice feature of Windows lately is Bash, support for Windows. So basically you can go and use your your Bash within Windows and this installs Ubuntu within Windows. As you can see now I'm going to the to the Windows file system but I could use the Linux file system. Here I have a number of folders. Let's just get clone our let's see no way no luck today. There is a marking going on, yes. Yes, thank you. Now hopefully we can download this stuff. It's very simple script. It should be fast. While it clones, let's go back and look at for example adding some tests to our application here. So I go to my project add let me stop it add a new item. I should also have a Python unit test as you can see here. What it does it add again a template file which has a basic test. Now if I open the text explorer within Visual Studio as you can see it is working up here. It's trying to understand what's going on. It should show our test in a few minutes maybe in a few seconds. Of course this is a failing test. Ok, here it is. If I run all my tests it should probably fail. Ok, as you can see if I go here and look at this low resolution is killing me. Ok, test failed not implemented but we can go and do something about that. Let's try to fix this test. Let's move this code up here or as you know it won't be seen. Not really. Ok, something like this. And then let's assume that ok, thank you. Let's say from run server as you can see intelligence again going on import, host import. For example let's self assert true that host equals localhost maybe and that port equals 555, should be 555 and not sure. Let's try. Test passed as you can see. Victory. Ok, so as you can see testing is exactly as you would do testing on Linux machine but within the idea of Visual Studio. And if I go back to my launch script and I put a breakpoint here and launch my app it should stop when it hits my breakpoint. Let me open the lockers It's too big. Ok, as you can see we hit the app.run instruction here on this line. I can go and inspect the values directly by hovering the mouse over the application, inspect its values and if I go here I can look at all the lockers value I can inspect every single value here go deep into the tree and do all the user stuff I do within PyCharm for example or other powerful ideas. Nice if you do debugging you can even set conditions here like for example again I have to list this one like for example host equals I don't know localhost and so it will only break if this condition is true etc. So as you can see full support for debugging unit testing within visual studio Let's go back and see what happened to our clone Ok, it's done. So let's go back to visual studio again file maybe new project let's first stop this one new project this time we want to import from assisting code as you can see you have the option here don't do this because it won't work yet add social control it won't work that way but if you go here you just do new and import wizard opens you pick your project should be somewhere code folder guess you just pick the folder and again since it is a python project which kind of interpreter do you want to use do you want to use the global one or do you want to create a virtual environment in which one is the launch script for this project as you can see the tech virtual environment here and this is the file I mentioned before basically what name do you want to give to the solution file for this project and then you hit finish so probably come up in a few seconds here it is as you can see we have our guest PI file here let me close the test file this is a very simple game let's launch it so what is your name let's do Nikola so we have to pick a number between 1 and 20 now since we are programmer which number should we pick here 11 anybody else 11 is good maybe 10 might be better your guess is too low 11 was better let's do a 15 too high so let's do maybe what 11 no I don't want to do 11 because maybe it wins ok let's try too low so let's do 13 ok I just had 5 guesses so we won just by a split minute ok the whole point of this was to show you that you can use of course the user code now if we go back to the folder here there are some files like sorry let me go within the directory and by the way using bash as you can see the colors are horrible but don't mind that and as you can see in this file a readme file that was cloned by from github and they don't show up into visual studio but we just we can simply go here add existing item pick them up or files license this is because they need to go into the Python project we probably don't have time to give a look at source control but I could go now I commit this change so the Python project for visual studio will contain these files the next time they are showed within my solution without any problem as you can see here we have our gith situation and I can go and commit the stuff and push it back to github let me switch back I believe we are almost done ok so we played a game we won of course you have a Python shell which is probably the most interesting of this talk because if you go to Python environments and open an interactive window depending on the environment you click here now we don't have a virtual environment because we are in a 3.5 and open an interactive window or is it here print ok it works so you can do whatever you want you don't have to go to the command line you can use the shell within visual studio for testing your own code and you can even from guess it doesn't work but it should if we are in the server application we saw earlier I could import from a server import my own function and test it here right away so it is super powerful and there is also let's go back to the slides there is also support for ipython so if you fancy that you should you can use ipython within visual studio as well and yes so basically as you can see my two words vzak and the python word with vim and github clones command line bash are finally kind of converging which is super exciting for me also because we are just starting we are starting right now it's a new project it's been around for a couple of years but there is still a lot to be done you can already use it in production and there are I'm going to upload these slides on my I will tweet the link to the website so you can with the europe python tag so you can get them so there is a very nice youtube section with demos from Steve Dower himself there is a documentation site go up if you are interested and look it up here are my handles if you want to get in touch thank you very much and sorry for the crash but we got it out of it so it's good but thank you for your talk Steve you are there if you have some question to Steve and of course Nikola about visual studio it's time no you can do it thank you very much for the talk welcome we have these words colliding sometimes because I'm a linux developer who works in a cross platform team on windows and the only slide problem that I still have with the python tools is that I like to write tests in py test style and the test explorer only recognizes traditional unit tests do you know if there is any plans also include python tools actually I believe that py test is already supported by python tools I spoke to Steve Dower a few a while ago and it mentioned that he was working on it should be already doable but I'm not sure I can look it up if you tweet me or send me an email I believe it should already work I saw a guy playing with it at pycon Italy and he was telling me that actually it's already supported you can do py test from within wizard studio I'm not 100% sure but if it isn't working it will work real soon alright thank you your welcome thanks for the demonstration one question can visual studio produce and install that would install the whole project including the dependencies on a machine that has no live internet connection in windows actually no this is the bad news not yet by the way we are online for doing that but again we are just getting started so probably it's going to happen soon enough thank you hi Nikola, I have another question I saw that you could choose different python versions when you build a virtual environment did you install it before the python versions ok so when I installed the python tool for visual studio which by the way work this way only if you are on visual studio 2017 if you are on visual studio 2015 you can get the extension the python tools for visual studio extension but you need to install it as an extension basically it doesn't come within the installation experience itself it's an extension basically yes when I installed this I already had a few python installed here and it simply it will simply pick them up and show you them in the list and again you can choose to install new pythons from the installer itself in visual studio or you can install them from the command line or with the classic install application and visual studio will pick them up later on who has another question no? thank you Nikola ok thank you again