text
stringlengths
200
200k
source
stringclasses
2 values
# Is there a python package to interface with MS Cluster? ## Question I need to write a couple of python scripts to automate the installation of Microsoft Cluster Ressources. More specifically, I'll need to query MS Cluster to be able to get a list of ressources with their parameters. And I also need to be able to c...
stackoverflow-qa
# Terminating a Python script ## Question I am aware of the die() command in PHP which stops a script early. How can I do this in Python? ## Answer import sys sys.exit() details from the sys module documentation: sys.exit([arg]) Exit from Python. This is implemented by raising the SystemExit exce...
stackoverflow-qa
# Terminating a Python script ## Question I am aware of the die() command in PHP which stops a script early. How can I do this in Python? ## Answer Another way is: raise SystemExit Tags: python, termination
stackoverflow-qa
# Terminating a Python script ## Question I am aware of the die() command in PHP which stops a script early. How can I do this in Python? ## Answer from sys import exit exit() As a parameter you can pass an exit code, which will be returned to OS. Default is 0. Tags: python, termination
stackoverflow-qa
# Terminating a Python script ## Question I am aware of the die() command in PHP which stops a script early. How can I do this in Python? ## Answer While you should generally prefer sys.exit because it is more "friendly" to other code, all it actually does is raise an exception. If you are sure that you need to exi...
stackoverflow-qa
# Terminating a Python script ## Question I am aware of the die() command in PHP which stops a script early. How can I do this in Python? ## Answer A simple way to terminate a Python script early is to use the built-in function quit(). There is no need to import any library, and it is efficient and simple. Example:...
stackoverflow-qa
# Terminating a Python script ## Question I am aware of the die() command in PHP which stops a script early. How can I do this in Python? ## Answer You can also use simply exit(). Keep in mind that sys.exit(), exit(), quit(), and os._exit(0) kill the Python interpreter. Therefore, if it appears in a script called f...
stackoverflow-qa
# Terminating a Python script ## Question I am aware of the die() command in PHP which stops a script early. How can I do this in Python? ## Answer I'm a total novice but surely this is cleaner and more controlled def main(): try: Answer = 1/0 print Answer except: print 'Program ter...
stackoverflow-qa
# Sending mail via sendmail from python ## Question If I want to send mail not via SMTP, but rather via sendmail, is there a library for python that encapsulates this process? Better yet, is there a good library that abstracts the whole 'sendmail -versus- smtp' choice? I'll be running this script on a bunch of unix ...
stackoverflow-qa
# Sending mail via sendmail from python ## Question If I want to send mail not via SMTP, but rather via sendmail, is there a library for python that encapsulates this process? Better yet, is there a good library that abstracts the whole 'sendmail -versus- smtp' choice? I'll be running this script on a bunch of unix ...
stackoverflow-qa
# Sending mail via sendmail from python ## Question If I want to send mail not via SMTP, but rather via sendmail, is there a library for python that encapsulates this process? Better yet, is there a good library that abstracts the whole 'sendmail -versus- smtp' choice? I'll be running this script on a bunch of unix ...
stackoverflow-qa
# Sending mail via sendmail from python ## Question If I want to send mail not via SMTP, but rather via sendmail, is there a library for python that encapsulates this process? Better yet, is there a good library that abstracts the whole 'sendmail -versus- smtp' choice? I'll be running this script on a bunch of unix ...
stackoverflow-qa
# Sending mail via sendmail from python ## Question If I want to send mail not via SMTP, but rather via sendmail, is there a library for python that encapsulates this process? Better yet, is there a good library that abstracts the whole 'sendmail -versus- smtp' choice? I'll be running this script on a bunch of unix ...
stackoverflow-qa
# Is there a common way to check in Python if an object is any function type? ## Question I have a function in Python which is iterating over the attributes returned from dir(obj), and I want to check to see if any of the objects contained within is a function, method, built-in function, etc. Normally you could use c...
stackoverflow-qa
# Is there a common way to check in Python if an object is any function type? ## Question I have a function in Python which is iterating over the attributes returned from dir(obj), and I want to check to see if any of the objects contained within is a function, method, built-in function, etc. Normally you could use c...
stackoverflow-qa
# Is there a common way to check in Python if an object is any function type? ## Question I have a function in Python which is iterating over the attributes returned from dir(obj), and I want to check to see if any of the objects contained within is a function, method, built-in function, etc. Normally you could use c...
stackoverflow-qa
# Is there a common way to check in Python if an object is any function type? ## Question I have a function in Python which is iterating over the attributes returned from dir(obj), and I want to check to see if any of the objects contained within is a function, method, built-in function, etc. Normally you could use c...
stackoverflow-qa
# Random in python 2.5 not working? ## Question I am trying to use the import random statement in python, but it doesn't appear to have any methods in it to use. Am I missing something? ## Answer I think you need to give some more information. It's not really possible to answer why it's not working based on the inf...
stackoverflow-qa
# Random in python 2.5 not working? ## Question I am trying to use the import random statement in python, but it doesn't appear to have any methods in it to use. Am I missing something? ## Answer Python 2.5.2 (r252:60911, Jun 16 2008, 18:27:58) [GCC 3.3.4 (pre 3.3.5 20040809)] on linux2 Type "help", "copyright", "cr...
stackoverflow-qa
# Random in python 2.5 not working? ## Question I am trying to use the import random statement in python, but it doesn't appear to have any methods in it to use. Am I missing something? ## Answer You probably have a file named random.py or random.pyc in your working directory. That's shadowing the built-in random m...
stackoverflow-qa
# Random in python 2.5 not working? ## Question I am trying to use the import random statement in python, but it doesn't appear to have any methods in it to use. Am I missing something? ## Answer Is it possible that the script you run is called random.py itself? Tags: python
stackoverflow-qa
# Random in python 2.5 not working? ## Question I am trying to use the import random statement in python, but it doesn't appear to have any methods in it to use. Am I missing something? ## Answer This is happening because you have a random.py file in the python search path, most likely the current directory. Python...
stackoverflow-qa
# How do I get the name of a python class as a string? ## Question What method do I call to get the name of a class? ## Answer It's not a method, it's a field. The field is called __name__. class.__name__ will give the name of the class as a string. object.__class__.__name__ will give the name of the class of an o...
stackoverflow-qa
# How do I get the name of a python class as a string? ## Question What method do I call to get the name of a class? ## Answer In [1]: class test(object): ...: pass ...: In [2]: test.__name__ Out[2]: 'test' Tags: python
stackoverflow-qa
# How do I get the name of a python class as a string? ## Question What method do I call to get the name of a class? ## Answer In [8]: str('2'.__class__) Out[8]: "<type 'str'>" In [9]: str(len.__class__) Out[9]: "<type 'builtin_function_or_method'>" In [10]: str(4.6.__class__) Out[10]: "<type 'float'>" Or, as was ...
stackoverflow-qa
# How do I get the name of a python class as a string? ## Question What method do I call to get the name of a class? ## Answer I agree with Mr.Shark, but if you have an instance of a class, you'll need to use its __class__ member: >>> class test(): ... pass ... >>> a_test = test() >>> >>> a_test.__name__ Traceba...
stackoverflow-qa
# How to use form values from an unbound form ## Question I have a web report that uses a Django form (new forms) for fields that control the query used to generate the report (start date, end date, ...). The issue I'm having is that the page should work using the form's initial values (unbound), but I can't access th...
stackoverflow-qa
# How to use form values from an unbound form ## Question I have a web report that uses a Django form (new forms) for fields that control the query used to generate the report (start date, end date, ...). The issue I'm having is that the page should work using the form's initial values (unbound), but I can't access th...
stackoverflow-qa
# Django -vs- Grails -vs-? ## Question I'm wondering if there's such a thing as Django-like ease of web app development combined with good deployment, debugging and other tools? Django is a very productive framework for building content-heavy sites; the best I've tried and a breath of fresh air compared to some of t...
stackoverflow-qa
# Django -vs- Grails -vs-? ## Question I'm wondering if there's such a thing as Django-like ease of web app development combined with good deployment, debugging and other tools? Django is a very productive framework for building content-heavy sites; the best I've tried and a breath of fresh air compared to some of t...
stackoverflow-qa
# Django -vs- Grails -vs-? ## Question I'm wondering if there's such a thing as Django-like ease of web app development combined with good deployment, debugging and other tools? Django is a very productive framework for building content-heavy sites; the best I've tried and a breath of fresh air compared to some of t...
stackoverflow-qa
# Django -vs- Grails -vs-? ## Question I'm wondering if there's such a thing as Django-like ease of web app development combined with good deployment, debugging and other tools? Django is a very productive framework for building content-heavy sites; the best I've tried and a breath of fresh air compared to some of t...
stackoverflow-qa
# Django -vs- Grails -vs-? ## Question I'm wondering if there's such a thing as Django-like ease of web app development combined with good deployment, debugging and other tools? Django is a very productive framework for building content-heavy sites; the best I've tried and a breath of fresh air compared to some of t...
stackoverflow-qa
# Django -vs- Grails -vs-? ## Question I'm wondering if there's such a thing as Django-like ease of web app development combined with good deployment, debugging and other tools? Django is a very productive framework for building content-heavy sites; the best I've tried and a breath of fresh air compared to some of t...
stackoverflow-qa
# Django -vs- Grails -vs-? ## Question I'm wondering if there's such a thing as Django-like ease of web app development combined with good deployment, debugging and other tools? Django is a very productive framework for building content-heavy sites; the best I've tried and a breath of fresh air compared to some of t...
stackoverflow-qa
# Django -vs- Grails -vs-? ## Question I'm wondering if there's such a thing as Django-like ease of web app development combined with good deployment, debugging and other tools? Django is a very productive framework for building content-heavy sites; the best I've tried and a breath of fresh air compared to some of t...
stackoverflow-qa
# Django -vs- Grails -vs-? ## Question I'm wondering if there's such a thing as Django-like ease of web app development combined with good deployment, debugging and other tools? Django is a very productive framework for building content-heavy sites; the best I've tried and a breath of fresh air compared to some of t...
stackoverflow-qa
# Best way to access table instances when using SQLAlchemy's declarative syntax ## Question All the docs for SQLAlchemy give INSERT and UPDATE examples using the local table instance (e.g. tablename.update()... ) Doing this seems difficult with the declarative syntax, I need to reference Base.metadata.tables["tablena...
stackoverflow-qa
# Best way to access table instances when using SQLAlchemy's declarative syntax ## Question All the docs for SQLAlchemy give INSERT and UPDATE examples using the local table instance (e.g. tablename.update()... ) Doing this seems difficult with the declarative syntax, I need to reference Base.metadata.tables["tablena...
stackoverflow-qa
# Undo with GTK TextView ## Question I'm trying to keep dependencies to a minimum for a program I contribute to, it's a small text editor. GTK Textview doesn't seem to come with a built-in undo function. Is there any reference implementation I've been missing on so far? Is everyone writing their own undo function for...
stackoverflow-qa
# Undo with GTK TextView ## Question I'm trying to keep dependencies to a minimum for a program I contribute to, it's a small text editor. GTK Textview doesn't seem to come with a built-in undo function. Is there any reference implementation I've been missing on so far? Is everyone writing their own undo function for...
stackoverflow-qa
# Undo with GTK TextView ## Question I'm trying to keep dependencies to a minimum for a program I contribute to, it's a small text editor. GTK Textview doesn't seem to come with a built-in undo function. Is there any reference implementation I've been missing on so far? Is everyone writing their own undo function for...
stackoverflow-qa
# Which is faster, python webpages or php webpages? ## Question Does anyone know how the speed of pylons(or any of the other frameworks) compares to a similar website made with php? I know that serving a python base webpage via cgi is slower than php because of its long start up every time. I enjoy using pylons and ...
stackoverflow-qa
# Which is faster, python webpages or php webpages? ## Question Does anyone know how the speed of pylons(or any of the other frameworks) compares to a similar website made with php? I know that serving a python base webpage via cgi is slower than php because of its long start up every time. I enjoy using pylons and ...
stackoverflow-qa
# Which is faster, python webpages or php webpages? ## Question Does anyone know how the speed of pylons(or any of the other frameworks) compares to a similar website made with php? I know that serving a python base webpage via cgi is slower than php because of its long start up every time. I enjoy using pylons and ...
stackoverflow-qa
# Which is faster, python webpages or php webpages? ## Question Does anyone know how the speed of pylons(or any of the other frameworks) compares to a similar website made with php? I know that serving a python base webpage via cgi is slower than php because of its long start up every time. I enjoy using pylons and ...
stackoverflow-qa
# Which is faster, python webpages or php webpages? ## Question Does anyone know how the speed of pylons(or any of the other frameworks) compares to a similar website made with php? I know that serving a python base webpage via cgi is slower than php because of its long start up every time. I enjoy using pylons and ...
stackoverflow-qa
# Which is faster, python webpages or php webpages? ## Question Does anyone know how the speed of pylons(or any of the other frameworks) compares to a similar website made with php? I know that serving a python base webpage via cgi is slower than php because of its long start up every time. I enjoy using pylons and ...
stackoverflow-qa
# Which is faster, python webpages or php webpages? ## Question Does anyone know how the speed of pylons(or any of the other frameworks) compares to a similar website made with php? I know that serving a python base webpage via cgi is slower than php because of its long start up every time. I enjoy using pylons and ...
stackoverflow-qa
# Which is faster, python webpages or php webpages? ## Question Does anyone know how the speed of pylons(or any of the other frameworks) compares to a similar website made with php? I know that serving a python base webpage via cgi is slower than php because of its long start up every time. I enjoy using pylons and ...
stackoverflow-qa
# Which is faster, python webpages or php webpages? ## Question Does anyone know how the speed of pylons(or any of the other frameworks) compares to a similar website made with php? I know that serving a python base webpage via cgi is slower than php because of its long start up every time. I enjoy using pylons and ...
stackoverflow-qa
# What does BlazeDS Livecycle Data Services do, that something like PyAMF or RubyAMF not do? ## Question I'm doing a tech review and looking at AMF integration with various backends (Rails, Python, Grails etc). Lots of options are out there, question is, what do the Adobe products do (BlazeDS etc) that something like...
stackoverflow-qa
# What does BlazeDS Livecycle Data Services do, that something like PyAMF or RubyAMF not do? ## Question I'm doing a tech review and looking at AMF integration with various backends (Rails, Python, Grails etc). Lots of options are out there, question is, what do the Adobe products do (BlazeDS etc) that something like...
stackoverflow-qa
# What does BlazeDS Livecycle Data Services do, that something like PyAMF or RubyAMF not do? ## Question I'm doing a tech review and looking at AMF integration with various backends (Rails, Python, Grails etc). Lots of options are out there, question is, what do the Adobe products do (BlazeDS etc) that something like...
stackoverflow-qa
# What does BlazeDS Livecycle Data Services do, that something like PyAMF or RubyAMF not do? ## Question I'm doing a tech review and looking at AMF integration with various backends (Rails, Python, Grails etc). Lots of options are out there, question is, what do the Adobe products do (BlazeDS etc) that something like...
stackoverflow-qa
# 'id' is a bad variable name in Python ## Question Why is it bad to name a variable id in Python? ## Answer It's bad to name any variable after a built in function. One of the reasons is because it can be confusing to a reader that doesn't know the name is overridden. Tags: python
stackoverflow-qa
# 'id' is a bad variable name in Python ## Question Why is it bad to name a variable id in Python? ## Answer 'id' is a built-in method in Python. Assigning a value to 'id' will overwrite the method. It is best to use either an identifier before as in "some_id" or use it in a different capitalization method. The buil...
stackoverflow-qa
# 'id' is a bad variable name in Python ## Question Why is it bad to name a variable id in Python? ## Answer id() is a fundamental built-in: Help on built-in function id in module __builtin__: id(...) id(object) -> integer Return the identity of an object. This is guaranteed to be unique among ...
stackoverflow-qa
# 'id' is a bad variable name in Python ## Question Why is it bad to name a variable id in Python? ## Answer I might say something unpopular here: id() is a rather specialized built-in function that is rarely used in business logic. Therefore I don't see a problem in using it as a variable name in a tight and well-wr...
stackoverflow-qa
# 'id' is a bad variable name in Python ## Question Why is it bad to name a variable id in Python? ## Answer id is a built-in function that gives the memory address of an object. If you name one of your functions id, you will have to say __builtins__.id to get the original. Renaming id globally is confusing in anythi...
stackoverflow-qa
# 'id' is a bad variable name in Python ## Question Why is it bad to name a variable id in Python? ## Answer In PEP 8 - Style Guide for Python Code, the following guidance appears in the section Descriptive: Naming Styles : single_trailing_underscore_ : used by convention to avoid conflicts with Python keywo...
stackoverflow-qa
# iBATIS for Python? ## Question At my current gig, we use iBATIS through Java to CRUD our databases. I like the abstract qualities of the tool, especially when working with legacy databases, as it doesn't impose its own syntax on you. I'm looking for a Python analogue to this library, since the website only has Jav...
stackoverflow-qa
# iBATIS for Python? ## Question At my current gig, we use iBATIS through Java to CRUD our databases. I like the abstract qualities of the tool, especially when working with legacy databases, as it doesn't impose its own syntax on you. I'm looking for a Python analogue to this library, since the website only has Jav...
stackoverflow-qa
# What's the best way to calculate a 3D (or n-D) centroid? ## Question As part of a project at work I have to calculate the centroid of a set of points in 3D space. Right now I'm doing it in a way that seems simple but naive -- by taking the average of each set of points, as in: centroid = average(x), average(y), ave...
stackoverflow-qa
# What's the best way to calculate a 3D (or n-D) centroid? ## Question As part of a project at work I have to calculate the centroid of a set of points in 3D space. Right now I'm doing it in a way that seems simple but naive -- by taking the average of each set of points, as in: centroid = average(x), average(y), ave...
stackoverflow-qa
# What's the best way to calculate a 3D (or n-D) centroid? ## Question As part of a project at work I have to calculate the centroid of a set of points in 3D space. Right now I'm doing it in a way that seems simple but naive -- by taking the average of each set of points, as in: centroid = average(x), average(y), ave...
stackoverflow-qa
# What's the best way to calculate a 3D (or n-D) centroid? ## Question As part of a project at work I have to calculate the centroid of a set of points in 3D space. Right now I'm doing it in a way that seems simple but naive -- by taking the average of each set of points, as in: centroid = average(x), average(y), ave...
stackoverflow-qa
# OPENGL User Interface Programming ## Question I'm developing a graphical application to present data (not a game but a real workhorse app). It needs to be cross platform, so I have chosen: python openGL (I need 3D, blending, textures etc) pyopengl wx/pywx - windowing, dialogs etc. The last component - WX - raise...
stackoverflow-qa
# OPENGL User Interface Programming ## Question I'm developing a graphical application to present data (not a game but a real workhorse app). It needs to be cross platform, so I have chosen: python openGL (I need 3D, blending, textures etc) pyopengl wx/pywx - windowing, dialogs etc. The last component - WX - raise...
stackoverflow-qa
# OPENGL User Interface Programming ## Question I'm developing a graphical application to present data (not a game but a real workhorse app). It needs to be cross platform, so I have chosen: python openGL (I need 3D, blending, textures etc) pyopengl wx/pywx - windowing, dialogs etc. The last component - WX - raise...
stackoverflow-qa
# OPENGL User Interface Programming ## Question I'm developing a graphical application to present data (not a game but a real workhorse app). It needs to be cross platform, so I have chosen: python openGL (I need 3D, blending, textures etc) pyopengl wx/pywx - windowing, dialogs etc. The last component - WX - raise...
stackoverflow-qa
# OPENGL User Interface Programming ## Question I'm developing a graphical application to present data (not a game but a real workhorse app). It needs to be cross platform, so I have chosen: python openGL (I need 3D, blending, textures etc) pyopengl wx/pywx - windowing, dialogs etc. The last component - WX - raise...
stackoverflow-qa
# OPENGL User Interface Programming ## Question I'm developing a graphical application to present data (not a game but a real workhorse app). It needs to be cross platform, so I have chosen: python openGL (I need 3D, blending, textures etc) pyopengl wx/pywx - windowing, dialogs etc. The last component - WX - raise...
stackoverflow-qa
# OPENGL User Interface Programming ## Question I'm developing a graphical application to present data (not a game but a real workhorse app). It needs to be cross platform, so I have chosen: python openGL (I need 3D, blending, textures etc) pyopengl wx/pywx - windowing, dialogs etc. The last component - WX - raise...
stackoverflow-qa
# Redirect command to input of another in Python ## Question I would like to replicate this in python: gvimdiff <(hg cat file.txt) file.txt (hg cat file.txt outputs the most recently committed version of file.txt) I know how to pipe the file to gvimdiff, but it won't accept another file: $ hg cat file.txt | gvimd...
stackoverflow-qa
# Redirect command to input of another in Python ## Question I would like to replicate this in python: gvimdiff <(hg cat file.txt) file.txt (hg cat file.txt outputs the most recently committed version of file.txt) I know how to pipe the file to gvimdiff, but it won't accept another file: $ hg cat file.txt | gvimd...
stackoverflow-qa
# Redirect command to input of another in Python ## Question I would like to replicate this in python: gvimdiff <(hg cat file.txt) file.txt (hg cat file.txt outputs the most recently committed version of file.txt) I know how to pipe the file to gvimdiff, but it won't accept another file: $ hg cat file.txt | gvimd...
stackoverflow-qa
# Python ReportLab use of splitfirst/splitlast ## Question I'm trying to use Python with ReportLab 2.2 to create a PDF report. According to the user guide, Special TableStyle Indeces [sic] In any style command the first row index may be set to one of the special strings 'splitlast' or 'splitfirst' to indicate...
stackoverflow-qa
# Python ReportLab use of splitfirst/splitlast ## Question I'm trying to use Python with ReportLab 2.2 to create a PDF report. According to the user guide, Special TableStyle Indeces [sic] In any style command the first row index may be set to one of the special strings 'splitlast' or 'splitfirst' to indicate...
stackoverflow-qa
# Is there a benefit to defining a class inside another class in Python? ## Question What I'm talking about here are nested classes. Essentially, I have two classes that I'm modeling. A DownloadManager class and a DownloadThread class. The obvious OOP concept here is composition. However, composition doesn't necessari...
stackoverflow-qa
# Is there a benefit to defining a class inside another class in Python? ## Question What I'm talking about here are nested classes. Essentially, I have two classes that I'm modeling. A DownloadManager class and a DownloadThread class. The obvious OOP concept here is composition. However, composition doesn't necessari...
stackoverflow-qa
# Is there a benefit to defining a class inside another class in Python? ## Question What I'm talking about here are nested classes. Essentially, I have two classes that I'm modeling. A DownloadManager class and a DownloadThread class. The obvious OOP concept here is composition. However, composition doesn't necessari...
stackoverflow-qa
# Is there a benefit to defining a class inside another class in Python? ## Question What I'm talking about here are nested classes. Essentially, I have two classes that I'm modeling. A DownloadManager class and a DownloadThread class. The obvious OOP concept here is composition. However, composition doesn't necessari...
stackoverflow-qa
# Is there a benefit to defining a class inside another class in Python? ## Question What I'm talking about here are nested classes. Essentially, I have two classes that I'm modeling. A DownloadManager class and a DownloadThread class. The obvious OOP concept here is composition. However, composition doesn't necessari...
stackoverflow-qa
# How to check for memory leaks in Guile extension modules? ## Question I develop an extension module for Guile, written in C. This extension module embeds a Python interpreter. Since this extension module invokes the Python interpreter, I need to verify that it properly manages the memory occupied by Python objects...
stackoverflow-qa
# Testing GUI code: should I use a mocking library? ## Question Recently I've been experimenting with TDD while developing a GUI application in Python. I find it very reassuring to have tests that verify the functionality of my code, but it's been tricky to follow some of the recommened practices of TDD. Namely, writi...
stackoverflow-qa
# How do I get started processing email related to website activity? ## Question I am writing a web application that requires user interaction via email. I'm curious if there is a best practice or recommended source for learning about processing email. I am writing my application in Python, but I'm not sure what mai...
stackoverflow-qa
# How do I get started processing email related to website activity? ## Question I am writing a web application that requires user interaction via email. I'm curious if there is a best practice or recommended source for learning about processing email. I am writing my application in Python, but I'm not sure what mai...
stackoverflow-qa
# Unittest causing sys.exit() ## Question No matter what I do sys.exit() is called by unittest, even the most trivial examples. I can't tell if my install is messed up or what is going on. IDLE 1.2.2 ==== No Subprocess ==== >>> import unittest >>> >>> class Test(unittest.TestCase): def testA(self): ...
stackoverflow-qa
# Unittest causing sys.exit() ## Question No matter what I do sys.exit() is called by unittest, even the most trivial examples. I can't tell if my install is messed up or what is going on. IDLE 1.2.2 ==== No Subprocess ==== >>> import unittest >>> >>> class Test(unittest.TestCase): def testA(self): ...
stackoverflow-qa
# Unittest causing sys.exit() ## Question No matter what I do sys.exit() is called by unittest, even the most trivial examples. I can't tell if my install is messed up or what is going on. IDLE 1.2.2 ==== No Subprocess ==== >>> import unittest >>> >>> class Test(unittest.TestCase): def testA(self): ...
stackoverflow-qa
# Unittest causing sys.exit() ## Question No matter what I do sys.exit() is called by unittest, even the most trivial examples. I can't tell if my install is messed up or what is going on. IDLE 1.2.2 ==== No Subprocess ==== >>> import unittest >>> >>> class Test(unittest.TestCase): def testA(self): ...
stackoverflow-qa
# Unittest causing sys.exit() ## Question No matter what I do sys.exit() is called by unittest, even the most trivial examples. I can't tell if my install is messed up or what is going on. IDLE 1.2.2 ==== No Subprocess ==== >>> import unittest >>> >>> class Test(unittest.TestCase): def testA(self): ...
stackoverflow-qa
# Unittest causing sys.exit() ## Question No matter what I do sys.exit() is called by unittest, even the most trivial examples. I can't tell if my install is messed up or what is going on. IDLE 1.2.2 ==== No Subprocess ==== >>> import unittest >>> >>> class Test(unittest.TestCase): def testA(self): ...
stackoverflow-qa
# How do I convert local time to UTC in Python? ## Question How do I convert a datetime string in local time to a string in UTC time? I'm sure I've done this before, but can't find it and SO will hopefully help me (and others) do that in future. Clarification: For example, if I have 2008-09-17 14:02:00 in my local ...
stackoverflow-qa
# How do I convert local time to UTC in Python? ## Question How do I convert a datetime string in local time to a string in UTC time? I'm sure I've done this before, but can't find it and SO will hopefully help me (and others) do that in future. Clarification: For example, if I have 2008-09-17 14:02:00 in my local ...
stackoverflow-qa
# How do I convert local time to UTC in Python? ## Question How do I convert a datetime string in local time to a string in UTC time? I'm sure I've done this before, but can't find it and SO will hopefully help me (and others) do that in future. Clarification: For example, if I have 2008-09-17 14:02:00 in my local ...
stackoverflow-qa
# How do I convert local time to UTC in Python? ## Question How do I convert a datetime string in local time to a string in UTC time? I'm sure I've done this before, but can't find it and SO will hopefully help me (and others) do that in future. Clarification: For example, if I have 2008-09-17 14:02:00 in my local ...
stackoverflow-qa
# How do I convert local time to UTC in Python? ## Question How do I convert a datetime string in local time to a string in UTC time? I'm sure I've done this before, but can't find it and SO will hopefully help me (and others) do that in future. Clarification: For example, if I have 2008-09-17 14:02:00 in my local ...
stackoverflow-qa
# How do I convert local time to UTC in Python? ## Question How do I convert a datetime string in local time to a string in UTC time? I'm sure I've done this before, but can't find it and SO will hopefully help me (and others) do that in future. Clarification: For example, if I have 2008-09-17 14:02:00 in my local ...
stackoverflow-qa