Are continuous self-bijections of connected spaces homeomorphisms? I hope this doesn't turn out to be a silly question.
There are lots of nice examples of continuous bijections $X\to Y$ between topological spaces that are not homeomorphisms.  But in the examples I know, either $X$ and $Y$ are not homeomorphic to one another, or they are (homeomorphic) disconnected spaces.  
My Question: Is there a connected topological space $X$ and a continuous bijection $X\to X$ that is not a homeomorphism?  
For the record, my example of a continuous bijection $X\to X$ that is not a homeomorphism is the following.  Roughly, the idea is to find an ordered family of topologies $\tau_i$ (
$i\in \mathbb Z$) on a set $S$ and use the shift map to create a continuous bijection from $\coprod_{i\in \mathbb Z} (S, \tau_i)$ to itself.  Let $S = \mathbb{Z} \coprod \mathbb Z$.  The topology $\tau_i$ is as follows: if $i<0$, then the left-hand copy of $\mathbb Z$ is topologized as the disjoint union of the discrete topology on $[-n, n]$ and the indiscrete topology on its complement, while the right-hand copy of $\mathbb Z$ is indiscrete.  The space $(S, \tau_0)$ is then indiscrete.  For $i>0$, the left-hand copy of $\mathbb Z$ is indiscrete, while the right-hand copy is the disjoint union of the indiscrete topology on $[-n, n]$ with the discrete topology on its complement.  Now the map $\coprod_{i\in \mathbb Z} (S, \tau_i)\to \coprod_{i\in \mathbb Z} (S, \tau_i)$ sending $(S, \tau_i) \to (S, \tau_{i+1})$ by the identity map of $S$ is a continuous bijection, but not a homeomorphism.
 A: Yes (to your body question, not your title question; it is confusing when people do this). Take $X = \mathbb{Z}$ with the topology generated by an open set containing $n$ for every positive integer $n$. (This space is connected because the smallest open set containing a non-positive integer is the entire space.) Consider the continuous bijection given by sending $x$ to $x - 1$. 
Here is what might be a Hausdorff example: take $X = \mathbb{R}$ with the topology generated by the usual topology together with the open set $(0, \infty) \cap \mathbb{Q}$, and again consider the continuous bijection $x \to x-1$. Unfortunately I am not sure if $X$ is connected.
The most general situation I know where a continuous bijection $X \to Y$ is automatically a homeomorphism is if $X$ is compact and $Y$ is Hausdorff. This is a nice exercise and extremely useful.
A: Here's a nice geometric example.  Let $X\subset\mathbb{R}^2$ be the union of the $x$-axis, the line segments $\{n\}\times[0,2\pi)$ for $n\in \{\ldots,-3,-2,-1,0\}$, and circles in the upper half plane of radius $1/3$ tangent to the $x$-axis at the points $(1,0),(2,0),\ldots$.

Note that $X$ is connected.
Define a map $f\colon X\to X$ by
$$
f(x,y) \;=\; \begin{cases}(x+1,y) & \text{if }x\ne 0 \\ \left(1+\frac{\sin y}{3},\frac{1-\cos y}{3}\right) & \text{if }x=0\end{cases}.
$$
That is, $f$ translates most points to the right by $1$, and maps the line segment $\{0\}\times[0,2\pi)$ onto the circle that's tangent to the $x$-axis at the point $(1,0)$.  Then $f$ is continuous and bijective, but is not a homeomorphism.
A: Zipping up halfway gives a continuous bijection from your pants with the fly down to your pants with the fly at half mast and this is not a homeomorphism. However, the two spaces are homeomorphic no?

One can well-imagine this phenomena persists for various other "manifolds with tears" - even in higher dimensions.
A: Consider the topology on $\mathbb R$ in which the open sets are $\varnothing,\mathbb R$ and $(a,\infty)$ such that $a\geq 0$.
Is this a topology?
$\varnothing$ and $\mathbb R$ are open.
If we take $(a,\infty)$ and $(b,\infty)$ with $a,b\geq 0$ without loss of generality $a<b$ and so $(a,\infty) \cap (b,\infty) = (b,\infty)$. If one of the intersecands is $\mathbb R$ or $\varnothing$ it is easy. When one of the intersecands is $\mathbb R$ or $\varnothing$ the situation is easy.
The union of an arbitraty union of sets is only interesting when none of the sets are $\varnothing$ or $\mathbb R$ and in that case if the intervals are $(a_i,\infty)$ our union is $(\inf a_i, \infty)$ which is also open.
This set is connected because there is right-interval such that its complement is also open.
Now consider the bijection $f: \mathbb R \rightarrow \mathbb R$ given by $f(x) = (x-1)$. Notice that the preimage of the interval $(a,\infty)$ with $a\geq 1$. is the interval $(a+1,\infty)$ which is also open. hence the function is continuous. However, the function is not open as $f((0,\infty)) = (-1,\infty)$ which is not open.
