Jontas

My digital notepad (notes etc)

Jontas

Main menu

Skip to primary content
Skip to secondary content
  • Home

Category Archives: Python

Python: Converting from string to integer/float

Posted on 2012 March 26 by jontas
myString = "545.2222"
float(myString) #545.2222
 
#or to round it of
int(float(myString)) #545
 
#or to keep us safe in case the myString should be checked for "funny" values
try:
    i = int(myString)
except ValueError:
    i = 0
Posted in Python | Tagged Python

Tags

3D printer Android apache apache2 apt-get asp.net C# charset cross browser testing debian email encoding Fermat Fermat assembly git html Internet Explorer j2me Java liftweb linux Magento magento admin mail mailserver MakerBot mobile mssql MVC3 MySQL OpenVPN org.w3c.dom php php5 PostgreSQL product SubVersion sudo ubuntu utf-8 uuid vb.net VirtualBox vpn xml

Categories

  • Android
  • Apache2
  • Arduino
  • ASP.NET
  • ASP.NET C#
  • Avant Browser
  • boinc
  • BSD
  • Build server
  • C#
  • Cisco
  • CSS
  • Currently Making / Made / Buildlog
  • Cygwin
  • DataBase
  • debian
  • Development
  • DOMElement
  • DOSBox
  • dotNet
  • Eclipse
  • exim4
  • Fermat
  • Firefox
  • Flock
  • gallery2
  • GetBoo
  • GIT – Fast Version Control System
  • Google Chrome
  • HTML
  • IDE
  • IIS
  • Internet Explorer
  • Java
  • JavaScript
  • JQuery
  • Laptops
  • LDraw
  • Lift
  • linux
  • Lynx
  • Magento
  • Makerbot
  • Making
  • md
  • MediaWiki
  • Mindset
  • MLCad
  • Mobile Phone
  • Modern Warfare 2
  • MVC3
  • MySQL
  • Netscape
  • OpenSSH
  • OpenVPN
  • OpenX
  • Opera
  • PHP
  • PHP4
  • PHP5
  • PHPMailer
  • PHPUnit
  • piwik
  • PostgreSQL
  • Programming
  • Python
  • RAID
  • remote desktop
  • ReplicatorG
  • rsync
  • Scala
  • SeaMonkey
  • sendmail
  • shorewall
  • SimpleXML
  • SQLServer
  • SubVersion
  • sudo
  • Survival
  • synergy
  • Systems (programs etc)
  • ubuntu
  • unix
  • vb.Net
  • VirtualBox
  • Visions / Hopes for the future
  • Visual Studio 2012
  • Web development
  • windows
  • Windows 2000
  • Windows 2003
  • Windows 7
  • Windows Vista
  • Windows XP
  • WordPress

AIS

  • AIS live Utlängen
  • Trelle.net AIS Skåne & Blekinge

Blogroll

  • Communications wiki
  • Computer (and computer related) Hardware wiki
  • Misc usefull items
  • Self Sufficient Folks – wiki

comics

  • Piled Higher and Deeper
  • User Friendly
Proudly powered by WordPress