A printer that performs printing to a print medium by using an ink ribbon, comprising: a printing unit configured to print on the print medium; the printing unit being supported by a support shaft so as to be swingable between a printing unit open position and a printing unit close position with respect to a casing; wherein in the printing unit close position, the printing unit is accommodated in the casing; the printing unit including a ribbon shaft configured to hold the ink ribbon to be supplied to a printing portion in a roll form; a ribbon roll up shaft configured to roll up the used ink ribbon; a partition member configured to partition the ink ribbon and the print medium, the partition member being supported by a swing shaft as a supporting point swingable with respect to the printing unit, both end portions of the ribbon shaft being supported by two support portions turnably and detachably with respect to the partition member; the partition member having guiding surfaces with which the print medium is brought into sliding contact; a lock mechanism; the partition member being provided swingable between a partition member close position where the ribbon shaft is accommodated in the printing unit and drive force of a motor can be transmitted to the ribbon shaft and a partition member open position where the ribbon shaft is attachable and detachable from the printing unit, when the printing unit is placed at the printing unit open position; the transmission being released in the partition member open position; swinging of the partition member to the partition member open position removes the ribbon shaft from the position where it is accommodated in the printing unit and at the same time a gear meshing is released; the lock mechanism being configured to hold the partition member with respect to the printing unit when the partition member is placed at the partition member close position; and the lock mechanism including: an engagement portion provided in the partition member and an engaged portion provided in the printing unit, the engagement portion and the engaged portion being configured to be engaged each other when the partition member is placed at the partition member close position; and the engagement portion and the engaged portion being configured to be released in the partition member open position. a printing unit configured to print on the print medium; the printing unit being supported by a support shaft so as to be swingable between a printing unit open position and a printing unit close position with respect to a casing; wherein in the printing unit close position, the printing unit is accommodated in the casing; the printing unit including a ribbon shaft configured to hold the ink ribbon to be supplied to a printing portion in a roll form; a ribbon roll up shaft configured to roll up the used ink ribbon; a partition member configured to partition the ink ribbon and the print medium, the partition member being supported by a swing shaft as a supporting point swingable with respect to the printing unit, both end portions of the ribbon shaft being supported by two support portions turnably and detachably with respect to the partition member; the partition member having guiding surfaces with which the print medium is brought into sliding contact; a lock mechanism; the partition member being provided swingable between a partition member close position where the ribbon shaft is accommodated in the printing unit and drive force of a motor can be transmitted to the ribbon shaft and a partition member open position where the ribbon shaft is attachable and detachable from the printing unit, when the printing unit is placed at the printing unit open position; the transmission being released in the partition member open position; swinging of the partition member to the partition member open position removes the ribbon shaft from the position where it is accommodated in the printing unit and at the same time a gear meshing is released; the lock mechanism being configured to hold the partition member with respect to the printing unit when the partition member is placed at the partition member close position; and the lock mechanism including: an engagement portion provided in the partition member and an engaged portion provided in the printing unit, the engagement portion and the engaged portion being configured to be engaged each other when the partition member is placed at the partition member close position; and the engagement portion and the engaged portion being configured to be released in the partition member open position. an engagement portion provided in the partition member and an engaged portion provided in the printing unit, the engagement portion and the engaged portion being configured to be engaged each other when the partition member is placed at the partition member close position; and the engagement portion and the engaged portion being configured to be released in the partition member open position.