From 7a43162b1d47e753bbafbc5778f7001ba71ee195 Mon Sep 17 00:00:00 2001 From: JacobBenSchwartz Date: Sat, 22 Feb 2025 23:36:57 +0000 Subject: [PATCH 1/5] Began homework --- file-io.ipynb | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/file-io.ipynb b/file-io.ipynb index 5560737..187bcb1 100644 --- a/file-io.ipynb +++ b/file-io.ipynb @@ -155,6 +155,36 @@ " with open(iliad_file, \"r\") as f:\n", " a.write(f.read() + \"\\n\")\n" ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Homework\n", + "--------" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "with open(\"./pope-iliad.txt\", \"r\") as f:\n", + " iliad=f.read()\n", + "\n", + "all_lines = iliad.splitlines()\n", + "diomedes = all_lines[5542:6542]\n", + "\n", + "from pathlib import Path\n", + "\n", + "out_dir = Path(\"iliad_files\")\n", + "\n", + "\n", + "for index in range(len(diomedes)):\n", + " with open(f\"./iliad_book_V_{index}.txt\", \"w\") as a:\n", + " a.write(diomedes[index])\n" + ] } ], "metadata": { From 45dd449bd182005bee2d7845031ce1a3bdbed65d Mon Sep 17 00:00:00 2001 From: JacobBenSchwartz Date: Sun, 23 Feb 2025 02:35:34 +0000 Subject: [PATCH 2/5] Did more work. About to experiment with outfile. --- file-io.ipynb | 1067 +++++++++++++++++++++++++++++++++++++++- my_files/all_lines.txt | 8 + 2 files changed, 1051 insertions(+), 24 deletions(-) diff --git a/file-io.ipynb b/file-io.ipynb index 187bcb1..08486ab 100644 --- a/file-io.ipynb +++ b/file-io.ipynb @@ -27,7 +27,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ @@ -43,7 +43,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 4, "metadata": {}, "outputs": [], "source": [ @@ -55,7 +55,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ @@ -70,7 +70,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 6, "metadata": {}, "outputs": [ { @@ -99,7 +99,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 7, "metadata": {}, "outputs": [], "source": [ @@ -108,7 +108,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 8, "metadata": {}, "outputs": [], "source": [ @@ -119,20 +119,9 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 9, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 33, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "from pathlib import Path\n", "\n", @@ -146,7 +135,7 @@ }, { "cell_type": "code", - "execution_count": 50, + "execution_count": 10, "metadata": {}, "outputs": [], "source": [ @@ -166,24 +155,1054 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 11, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "['But Pallas now Tydides’ soul inspires,[143]',\n", + " 'Fills with her force, and warms with all her fires,',\n", + " 'Above the Greeks his deathless fame to raise,',\n", + " 'And crown her hero with distinguish’d praise.',\n", + " 'High on his helm celestial lightnings play,',\n", + " 'His beamy shield emits a living ray;',\n", + " 'The unwearied blaze incessant streams supplies,',\n", + " 'Like the red star that fires the autumnal skies,',\n", + " 'When fresh he rears his radiant orb to sight,',\n", + " 'And, bathed in ocean, shoots a keener light.',\n", + " 'Such glories Pallas on the chief bestow’d,',\n", + " 'Such, from his arms, the fierce effulgence flow’d:',\n", + " 'Onward she drives him, furious to engage,',\n", + " 'Where the fight burns, and where the thickest rage.',\n", + " '',\n", + " 'The sons of Dares first the combat sought,',\n", + " 'A wealthy priest, but rich without a fault;',\n", + " 'In Vulcan’s fane the father’s days were led,',\n", + " 'The sons to toils of glorious battle bred;',\n", + " 'These singled from their troops the fight maintain,',\n", + " 'These, from their steeds, Tydides on the plain.',\n", + " 'Fierce for renown the brother-chiefs draw near,',\n", + " 'And first bold Phegeus cast his sounding spear,',\n", + " 'Which o’er the warrior’s shoulder took its course,',\n", + " 'And spent in empty air its erring force.',\n", + " 'Not so, Tydides, flew thy lance in vain,',\n", + " 'But pierced his breast, and stretch’d him on the plain.',\n", + " 'Seized with unusual fear, Idæus fled,',\n", + " 'Left the rich chariot, and his brother dead.',\n", + " 'And had not Vulcan lent celestial aid,',\n", + " 'He too had sunk to death’s eternal shade;',\n", + " 'But in a smoky cloud the god of fire',\n", + " 'Preserved the son, in pity to the sire.',\n", + " 'The steeds and chariot, to the navy led,',\n", + " 'Increased the spoils of gallant Diomed.',\n", + " '',\n", + " 'Struck with amaze and shame, the Trojan crew,',\n", + " 'Or slain, or fled, the sons of Dares view;',\n", + " 'When by the blood-stain’d hand Minerva press’d',\n", + " 'The god of battles, and this speech address’d:',\n", + " '',\n", + " '“Stern power of war! by whom the mighty fall,',\n", + " 'Who bathe in blood, and shake the lofty wall!',\n", + " 'Let the brave chiefs their glorious toils divide;',\n", + " 'And whose the conquest, mighty Jove decide:',\n", + " 'While we from interdicted fields retire,',\n", + " 'Nor tempt the wrath of heaven’s avenging sire.”',\n", + " '',\n", + " 'Her words allay the impetuous warrior’s heat,',\n", + " 'The god of arms and martial maid retreat;',\n", + " 'Removed from fight, on Xanthus’ flowery bounds',\n", + " 'They sat, and listen’d to the dying sounds.',\n", + " '',\n", + " 'Meantime, the Greeks the Trojan race pursue,',\n", + " 'And some bold chieftain every leader slew:',\n", + " 'First Odius falls, and bites the bloody sand,',\n", + " 'His death ennobled by Atrides’ hand:',\n", + " '',\n", + " 'As he to flight his wheeling car address’d,',\n", + " 'The speedy javelin drove from back to breast.',\n", + " 'In dust the mighty Halizonian lay,',\n", + " 'His arms resound, the spirit wings its way.',\n", + " '',\n", + " 'Thy fate was next, O Phæstus! doom’d to feel',\n", + " 'The great Idomeneus’ protended steel;',\n", + " 'Whom Borus sent (his son and only joy)',\n", + " 'From fruitful Tarne to the fields of Troy.',\n", + " 'The Cretan javelin reach’d him from afar,',\n", + " 'And pierced his shoulder as he mounts his car;',\n", + " 'Back from the car he tumbles to the ground,',\n", + " 'And everlasting shades his eyes surround.',\n", + " '',\n", + " 'Then died Scamandrius, expert in the chase,',\n", + " 'In woods and wilds to wound the savage race;',\n", + " 'Diana taught him all her sylvan arts,',\n", + " 'To bend the bow, and aim unerring darts:',\n", + " 'But vainly here Diana’s arts he tries,',\n", + " 'The fatal lance arrests him as he flies;',\n", + " 'From Menelaus’ arm the weapon sent,',\n", + " 'Through his broad back and heaving bosom went:',\n", + " 'Down sinks the warrior with a thundering sound,',\n", + " 'His brazen armour rings against the ground.',\n", + " '',\n", + " 'Next artful Phereclus untimely fell;',\n", + " 'Bold Merion sent him to the realms of hell.',\n", + " 'Thy father’s skill, O Phereclus! was thine,',\n", + " 'The graceful fabric and the fair design;',\n", + " 'For loved by Pallas, Pallas did impart',\n", + " 'To him the shipwright’s and the builder’s art.',\n", + " 'Beneath his hand the fleet of Paris rose,',\n", + " 'The fatal cause of all his country’s woes;',\n", + " 'But he, the mystic will of heaven unknown,',\n", + " 'Nor saw his country’s peril, nor his own.',\n", + " 'The hapless artist, while confused he fled,',\n", + " 'The spear of Merion mingled with the dead.',\n", + " 'Through his right hip, with forceful fury cast,',\n", + " 'Between the bladder and the bone it pass’d;',\n", + " 'Prone on his knees he falls with fruitless cries,',\n", + " 'And death in lasting slumber seals his eyes.',\n", + " '',\n", + " 'From Meges’ force the swift Pedaeus fled,',\n", + " 'Antenor’s offspring from a foreign bed,',\n", + " 'Whose generous spouse, Theanor, heavenly fair,',\n", + " 'Nursed the young stranger with a mother’s care.',\n", + " 'How vain those cares! when Meges in the rear',\n", + " 'Full in his nape infix’d the fatal spear;',\n", + " 'Swift through his crackling jaws the weapon glides,',\n", + " 'And the cold tongue and grinning teeth divides.',\n", + " '',\n", + " 'Then died Hypsenor, generous and divine,',\n", + " 'Sprung from the brave Dolopion’s mighty line,',\n", + " 'Who near adored Scamander made abode,',\n", + " 'Priest of the stream, and honoured as a god.',\n", + " 'On him, amidst the flying numbers found,',\n", + " 'Eurypylus inflicts a deadly wound;',\n", + " 'On his broad shoulders fell the forceful brand,',\n", + " 'Thence glancing downwards, lopp’d his holy hand,',\n", + " 'Which stain’d with sacred blood the blushing sand.',\n", + " 'Down sunk the priest: the purple hand of death',\n", + " 'Closed his dim eye, and fate suppress’d his breath.',\n", + " '',\n", + " 'Thus toil’d the chiefs, in different parts engaged.',\n", + " 'In every quarter fierce Tydides raged;',\n", + " 'Amid the Greek, amid the Trojan train,',\n", + " 'Rapt through the ranks he thunders o’er the plain;',\n", + " 'Now here, now there, he darts from place to place,',\n", + " 'Pours on the rear, or lightens in their face.',\n", + " 'Thus from high hills the torrents swift and strong',\n", + " 'Deluge whole fields, and sweep the trees along,',\n", + " 'Through ruin’d moles the rushing wave resounds,',\n", + " 'O’erwhelm’s the bridge, and bursts the lofty bounds;',\n", + " 'The yellow harvests of the ripen’d year,',\n", + " 'And flatted vineyards, one sad waste appear![144]',\n", + " 'While Jove descends in sluicy sheets of rain,',\n", + " 'And all the labours of mankind are vain.',\n", + " '',\n", + " 'So raged Tydides, boundless in his ire,',\n", + " 'Drove armies back, and made all Troy retire.',\n", + " 'With grief the leader of the Lycian band',\n", + " 'Saw the wide waste of his destructive hand:',\n", + " 'His bended bow against the chief he drew;',\n", + " 'Swift to the mark the thirsty arrow flew,',\n", + " 'Whose forky point the hollow breastplate tore,',\n", + " 'Deep in his shoulder pierced, and drank the gore:',\n", + " 'The rushing stream his brazen armour dyed,',\n", + " 'While the proud archer thus exulting cried:',\n", + " '',\n", + " '“Hither, ye Trojans, hither drive your steeds!',\n", + " 'Lo! by our hand the bravest Grecian bleeds,',\n", + " 'Not long the deathful dart he can sustain;',\n", + " 'Or Phœbus urged me to these fields in vain.”',\n", + " 'So spoke he, boastful: but the winged dart',\n", + " 'Stopp’d short of life, and mock’d the shooter’s art.',\n", + " 'The wounded chief, behind his car retired,',\n", + " 'The helping hand of Sthenelus required;',\n", + " 'Swift from his seat he leap’d upon the ground,',\n", + " 'And tugg’d the weapon from the gushing wound;',\n", + " 'When thus the king his guardian power address’d,',\n", + " 'The purple current wandering o’er his vest:',\n", + " '',\n", + " '“O progeny of Jove! unconquer’d maid!',\n", + " 'If e’er my godlike sire deserved thy aid,',\n", + " 'If e’er I felt thee in the fighting field;',\n", + " 'Now, goddess, now, thy sacred succour yield.',\n", + " 'O give my lance to reach the Trojan knight,',\n", + " 'Whose arrow wounds the chief thou guard’st in fight;',\n", + " 'And lay the boaster grovelling on the shore,',\n", + " 'That vaunts these eyes shall view the light no more.”',\n", + " '',\n", + " 'Thus pray’d Tydides, and Minerva heard,',\n", + " 'His nerves confirm’d, his languid spirits cheer’d;',\n", + " 'He feels each limb with wonted vigour light;',\n", + " 'His beating bosom claim’d the promised fight.',\n", + " '“Be bold, (she cried), in every combat shine,',\n", + " 'War be thy province, thy protection mine;',\n", + " 'Rush to the fight, and every foe control;',\n", + " 'Wake each paternal virtue in thy soul:',\n", + " 'Strength swells thy boiling breast, infused by me,',\n", + " 'And all thy godlike father breathes in thee;',\n", + " 'Yet more, from mortal mists I purge thy eyes,[145]',\n", + " 'And set to view the warring deities.',\n", + " 'These see thou shun, through all the embattled plain;',\n", + " 'Nor rashly strive where human force is vain.',\n", + " 'If Venus mingle in the martial band,',\n", + " 'Her shalt thou wound: so Pallas gives command.”',\n", + " '',\n", + " 'With that, the blue-eyed virgin wing’d her flight;',\n", + " 'The hero rush’d impetuous to the fight;',\n", + " 'With tenfold ardour now invades the plain,',\n", + " 'Wild with delay, and more enraged by pain.',\n", + " 'As on the fleecy flocks when hunger calls,',\n", + " 'Amidst the field a brindled lion falls;',\n", + " 'If chance some shepherd with a distant dart',\n", + " 'The savage wound, he rouses at the smart,',\n", + " 'He foams, he roars; the shepherd dares not stay,',\n", + " 'But trembling leaves the scattering flocks a prey;',\n", + " 'Heaps fall on heaps; he bathes with blood the ground,',\n", + " 'Then leaps victorious o’er the lofty mound.',\n", + " 'Not with less fury stern Tydides flew;',\n", + " 'And two brave leaders at an instant slew;',\n", + " 'Astynous breathless fell, and by his side,',\n", + " 'His people’s pastor, good Hypenor, died;',\n", + " 'Astynous’ breast the deadly lance receives,',\n", + " 'Hypenor’s shoulder his broad falchion cleaves.',\n", + " 'Those slain he left, and sprung with noble rage',\n", + " 'Abas and Polyidus to engage;',\n", + " 'Sons of Eurydamus, who, wise and old,',\n", + " 'Could fate foresee, and mystic dreams unfold;',\n", + " 'The youths return’d not from the doubtful plain,',\n", + " 'And the sad father tried his arts in vain;',\n", + " 'No mystic dream could make their fates appear,',\n", + " 'Though now determined by Tydides’ spear.',\n", + " '',\n", + " 'Young Xanthus next, and Thoon felt his rage;',\n", + " 'The joy and hope of Phaenops’ feeble age:',\n", + " 'Vast was his wealth, and these the only heirs',\n", + " 'Of all his labours and a life of cares.',\n", + " 'Cold death o’ertakes them in their blooming years,',\n", + " 'And leaves the father unavailing tears:',\n", + " 'To strangers now descends his heapy store,',\n", + " 'The race forgotten, and the name no more.',\n", + " '',\n", + " 'Two sons of Priam in one chariot ride,',\n", + " 'Glittering in arms, and combat side by side.',\n", + " 'As when the lordly lion seeks his food',\n", + " 'Where grazing heifers range the lonely wood,',\n", + " 'He leaps amidst them with a furious bound,',\n", + " 'Bends their strong necks, and tears them to the ground:',\n", + " 'So from their seats the brother chiefs are torn,',\n", + " 'Their steeds and chariot to the navy borne.',\n", + " '',\n", + " 'With deep concern divine Æneas view’d',\n", + " 'The foe prevailing, and his friends pursued;',\n", + " 'Through the thick storm of singing spears he flies,',\n", + " 'Exploring Pandarus with careful eyes.',\n", + " 'At length he found Lycaon’s mighty son;',\n", + " 'To whom the chief of Venus’ race begun:',\n", + " '',\n", + " '“Where, Pandarus, are all thy honours now,',\n", + " 'Thy winged arrows and unerring bow,',\n", + " 'Thy matchless skill, thy yet unrivall’d fame,',\n", + " 'And boasted glory of the Lycian name?',\n", + " 'O pierce that mortal! if we mortal call',\n", + " 'That wondrous force by which whole armies fall;',\n", + " 'Or god incensed, who quits the distant skies',\n", + " 'To punish Troy for slighted sacrifice;',\n", + " '(Which, oh avert from our unhappy state!',\n", + " 'For what so dreadful as celestial hate)?',\n", + " 'Whoe’er he be, propitiate Jove with prayer;',\n", + " 'If man, destroy; if god, entreat to spare.”',\n", + " '',\n", + " 'To him the Lycian: “Whom your eyes behold,',\n", + " 'If right I judge, is Diomed the bold:',\n", + " 'Such coursers whirl him o’er the dusty field,',\n", + " 'So towers his helmet, and so flames his shield.',\n", + " 'If ’tis a god, he wears that chief’s disguise:',\n", + " 'Or if that chief, some guardian of the skies,',\n", + " 'Involved in clouds, protects him in the fray,',\n", + " 'And turns unseen the frustrate dart away.',\n", + " 'I wing’d an arrow, which not idly fell,',\n", + " 'The stroke had fix’d him to the gates of hell;',\n", + " 'And, but some god, some angry god withstands,',\n", + " 'His fate was due to these unerring hands.',\n", + " 'Skill’d in the bow, on foot I sought the war,',\n", + " 'Nor join’d swift horses to the rapid car.',\n", + " 'Ten polish’d chariots I possess’d at home,',\n", + " 'And still they grace Lycaon’s princely dome:',\n", + " 'There veil’d in spacious coverlets they stand;',\n", + " 'And twice ten coursers wait their lord’s command.',\n", + " 'The good old warrior bade me trust to these,',\n", + " 'When first for Troy I sail’d the sacred seas;',\n", + " 'In fields, aloft, the whirling car to guide,',\n", + " 'And through the ranks of death triumphant ride.',\n", + " 'But vain with youth, and yet to thrift inclined,',\n", + " 'I heard his counsels with unheedful mind,',\n", + " 'And thought the steeds (your large supplies unknown)',\n", + " 'Might fail of forage in the straiten’d town;',\n", + " 'So took my bow and pointed darts in hand',\n", + " 'And left the chariots in my native land.',\n", + " '',\n", + " '“Too late, O friend! my rashness I deplore;',\n", + " 'These shafts, once fatal, carry death no more.',\n", + " 'Tydeus’ and Atreus’ sons their points have found,',\n", + " 'And undissembled gore pursued the wound.',\n", + " 'In vain they bleed: this unavailing bow',\n", + " 'Serves, not to slaughter, but provoke the foe.',\n", + " 'In evil hour these bended horns I strung,',\n", + " 'And seized the quiver where it idly hung.',\n", + " 'Cursed be the fate that sent me to the field',\n", + " 'Without a warrior’s arms, the spear and shield!',\n", + " 'If e’er with life I quit the Trojan plain,',\n", + " 'If e’er I see my spouse and sire again,',\n", + " 'This bow, unfaithful to my glorious aims,',\n", + " 'Broke by my hand, shall feed the blazing flames.”',\n", + " '',\n", + " 'To whom the leader of the Dardan race:',\n", + " '“Be calm, nor Phœbus’ honour’d gift disgrace.',\n", + " 'The distant dart be praised, though here we need',\n", + " 'The rushing chariot and the bounding steed.',\n", + " 'Against yon hero let us bend our course,',\n", + " 'And, hand to hand, encounter force with force.',\n", + " 'Now mount my seat, and from the chariot’s height',\n", + " 'Observe my father’s steeds, renown’d in fight;',\n", + " 'Practised alike to turn, to stop, to chase,',\n", + " 'To dare the shock, or urge the rapid race;',\n", + " 'Secure with these, through fighting fields we go;',\n", + " 'Or safe to Troy, if Jove assist the foe.',\n", + " 'Haste, seize the whip, and snatch the guiding rein;',\n", + " 'The warrior’s fury let this arm sustain;',\n", + " 'Or, if to combat thy bold heart incline,',\n", + " 'Take thou the spear, the chariot’s care be mine.”',\n", + " '',\n", + " '“O prince! (Lycaon’s valiant son replied)',\n", + " 'As thine the steeds, be thine the task to guide.',\n", + " 'The horses, practised to their lord’s command,',\n", + " 'Shall bear the rein, and answer to thy hand;',\n", + " 'But, if, unhappy, we desert the fight,',\n", + " 'Thy voice alone can animate their flight;',\n", + " 'Else shall our fates be number’d with the dead,',\n", + " 'And these, the victor’s prize, in triumph led.',\n", + " 'Thine be the guidance, then: with spear and shield',\n", + " 'Myself will charge this terror of the field.”',\n", + " '',\n", + " 'And now both heroes mount the glittering car;',\n", + " 'The bounding coursers rush amidst the war;',\n", + " 'Their fierce approach bold Sthenelus espied,',\n", + " 'Who thus, alarm’d, to great Tydides cried:',\n", + " '',\n", + " '“O friend! two chiefs of force immense I see,',\n", + " 'Dreadful they come, and bend their rage on thee:',\n", + " 'Lo the brave heir of old Lycaon’s line,',\n", + " 'And great Æneas, sprung from race divine!',\n", + " 'Enough is given to fame. Ascend thy car!',\n", + " 'And save a life, the bulwark of our war.”',\n", + " '',\n", + " 'At this the hero cast a gloomy look,',\n", + " 'Fix’d on the chief with scorn; and thus he spoke:',\n", + " '',\n", + " '“Me dost thou bid to shun the coming fight?',\n", + " 'Me wouldst thou move to base, inglorious flight?',\n", + " 'Know, ’tis not honest in my soul to fear,',\n", + " 'Nor was Tydides born to tremble here.',\n", + " 'I hate the cumbrous chariot’s slow advance,',\n", + " 'And the long distance of the flying lance;',\n", + " 'But while my nerves are strong, my force entire,',\n", + " 'Thus front the foe, and emulate my sire.',\n", + " 'Nor shall yon steeds, that fierce to fight convey',\n", + " 'Those threatening heroes, bear them both away;',\n", + " 'One chief at least beneath this arm shall die;',\n", + " 'So Pallas tells me, and forbids to fly.',\n", + " 'But if she dooms, and if no god withstand,',\n", + " 'That both shall fall by one victorious hand,',\n", + " 'Then heed my words: my horses here detain,',\n", + " 'Fix’d to the chariot by the straiten’d rein;',\n", + " 'Swift to Æneas’ empty seat proceed,',\n", + " 'And seize the coursers of ethereal breed;',\n", + " 'The race of those, which once the thundering god[146]',\n", + " 'For ravish’d Ganymede on Tros bestow’d,',\n", + " 'The best that e’er on earth’s broad surface run,',\n", + " 'Beneath the rising or the setting sun.',\n", + " 'Hence great Anchises stole a breed unknown,',\n", + " 'By mortal mares, from fierce Laomedon:',\n", + " 'Four of this race his ample stalls contain,',\n", + " 'And two transport Æneas o’er the plain.',\n", + " 'These, were the rich immortal prize our own,',\n", + " 'Through the wide world should make our glory known.”',\n", + " '',\n", + " 'Thus while they spoke, the foe came furious on,',\n", + " 'And stern Lycaon’s warlike race begun:',\n", + " '',\n", + " '“Prince, thou art met. Though late in vain assail’d,',\n", + " 'The spear may enter where the arrow fail’d.”',\n", + " '',\n", + " 'He said, then shook the ponderous lance, and flung;',\n", + " 'On his broad shield the sounding weapon rung,',\n", + " 'Pierced the tough orb, and in his cuirass hung,',\n", + " '“He bleeds! the pride of Greece! (the boaster cries,)',\n", + " 'Our triumph now, the mighty warrior lies!”',\n", + " '“Mistaken vaunter! (Diomed replied;)',\n", + " 'Thy dart has erred, and now my spear be tried;',\n", + " 'Ye ’scape not both; one, headlong from his car,',\n", + " 'With hostile blood shall glut the god of war.”',\n", + " '',\n", + " 'He spoke, and rising hurl’d his forceful dart,',\n", + " 'Which, driven by Pallas, pierced a vital part;',\n", + " 'Full in his face it enter’d, and betwixt',\n", + " 'The nose and eye-ball the proud Lycian fix’d;',\n", + " 'Crash’d all his jaws, and cleft the tongue within,',\n", + " 'Till the bright point look’d out beneath the chin.',\n", + " 'Headlong he falls, his helmet knocks the ground:',\n", + " 'Earth groans beneath him, and his arms resound;',\n", + " 'The starting coursers tremble with affright;',\n", + " 'The soul indignant seeks the realms of night.',\n", + " '',\n", + " 'To guard his slaughter’d friend, Æneas flies,',\n", + " 'His spear extending where the carcase lies;',\n", + " 'Watchful he wheels, protects it every way,',\n", + " 'As the grim lion stalks around his prey.',\n", + " 'O’er the fall’n trunk his ample shield display’d,',\n", + " 'He hides the hero with his mighty shade,',\n", + " 'And threats aloud! the Greeks with longing eyes',\n", + " 'Behold at distance, but forbear the prize.',\n", + " 'Then fierce Tydides stoops; and from the fields',\n", + " 'Heaved with vast force, a rocky fragment wields.',\n", + " 'Not two strong men the enormous weight could raise,',\n", + " 'Such men as live in these degenerate days:[147]',\n", + " 'He swung it round; and, gathering strength to throw,',\n", + " 'Discharged the ponderous ruin at the foe.',\n", + " 'Where to the hip the inserted thigh unites,',\n", + " 'Full on the bone the pointed marble lights;',\n", + " 'Through both the tendons broke the rugged stone,',\n", + " 'And stripp’d the skin, and crack’d the solid bone.',\n", + " 'Sunk on his knees, and staggering with his pains,',\n", + " 'His falling bulk his bended arm sustains;',\n", + " 'Lost in a dizzy mist the warrior lies;',\n", + " 'A sudden cloud comes swimming o’er his eyes.',\n", + " 'There the brave chief, who mighty numbers sway’d,',\n", + " 'Oppress’d had sunk to death’s eternal shade,',\n", + " 'But heavenly Venus, mindful of the love',\n", + " 'She bore Anchises in the Idaean grove,',\n", + " 'His danger views with anguish and despair,',\n", + " 'And guards her offspring with a mother’s care.',\n", + " 'About her much-loved son her arms she throws,',\n", + " 'Her arms whose whiteness match the falling snows.',\n", + " 'Screen’d from the foe behind her shining veil,',\n", + " 'The swords wave harmless, and the javelins fail;',\n", + " 'Safe through the rushing horse, and feather’d flight',\n", + " 'Of sounding shafts, she bears him from the fight.',\n", + " '',\n", + " 'Nor Sthenelus, with unassisting hands,',\n", + " 'Remain’d unheedful of his lord’s commands:',\n", + " 'His panting steeds, removed from out the war,',\n", + " 'He fix’d with straiten’d traces to the car,',\n", + " 'Next, rushing to the Dardan spoil, detains',\n", + " 'The heavenly coursers with the flowing manes:',\n", + " 'These in proud triumph to the fleet convey’d,',\n", + " 'No longer now a Trojan lord obey’d.',\n", + " 'That charge to bold Deipylus he gave,',\n", + " '(Whom most he loved, as brave men love the brave,)',\n", + " 'Then mounting on his car, resumed the rein,',\n", + " 'And follow’d where Tydides swept the plain.',\n", + " '',\n", + " 'Meanwhile (his conquest ravished from his eyes)',\n", + " 'The raging chief in chase of Venus flies:',\n", + " 'No goddess she, commission’d to the field,',\n", + " 'Like Pallas dreadful with her sable shield,',\n", + " 'Or fierce Bellona thundering at the wall,',\n", + " 'While flames ascend, and mighty ruins fall;',\n", + " 'He knew soft combats suit the tender dame,',\n", + " 'New to the field, and still a foe to fame.',\n", + " 'Through breaking ranks his furious course he bends,',\n", + " 'And at the goddess his broad lance extends;',\n", + " 'Through her bright veil the daring weapon drove,',\n", + " 'The ambrosial veil which all the Graces wove;',\n", + " 'Her snowy hand the razing steel profaned,',\n", + " 'And the transparent skin with crimson stain’d,',\n", + " 'From the clear vein a stream immortal flow’d,',\n", + " 'Such stream as issues from a wounded god;[148]',\n", + " 'Pure emanation! uncorrupted flood!',\n", + " 'Unlike our gross, diseased, terrestrial blood:',\n", + " '(For not the bread of man their life sustains,',\n", + " 'Nor wine’s inflaming juice supplies their veins:)',\n", + " 'With tender shrieks the goddess fill’d the place,',\n", + " 'And dropp’d her offspring from her weak embrace.',\n", + " 'Him Phœbus took: he casts a cloud around',\n", + " 'The fainting chief, and wards the mortal wound.',\n", + " '',\n", + " 'Then with a voice that shook the vaulted skies,',\n", + " 'The king insults the goddess as she flies:',\n", + " '“Ill with Jove’s daughter bloody fights agree,',\n", + " 'The field of combat is no scene for thee:',\n", + " 'Go, let thy own soft sex employ thy care,',\n", + " 'Go, lull the coward, or delude the fair.',\n", + " 'Taught by this stroke renounce the war’s alarms,',\n", + " 'And learn to tremble at the name of arms.”',\n", + " '',\n", + " 'Tydides thus. The goddess, seized with dread,',\n", + " 'Confused, distracted, from the conflict fled.',\n", + " 'To aid her, swift the winged Iris flew,',\n", + " 'Wrapt in a mist above the warring crew.',\n", + " 'The queen of love with faded charms she found.',\n", + " 'Pale was her cheek, and livid look’d the wound.',\n", + " 'To Mars, who sat remote, they bent their way:',\n", + " 'Far, on the left, with clouds involved he lay;',\n", + " 'Beside him stood his lance, distain’d with gore,',\n", + " 'And, rein’d with gold, his foaming steeds before.',\n", + " 'Low at his knee, she begg’d with streaming eyes',\n", + " 'Her brother’s car, to mount the distant skies,',\n", + " 'And show’d the wound by fierce Tydides given,',\n", + " 'A mortal man, who dares encounter heaven.',\n", + " 'Stern Mars attentive hears the queen complain,',\n", + " 'And to her hand commits the golden rein;',\n", + " 'She mounts the seat, oppress’d with silent woe,',\n", + " 'Driven by the goddess of the painted bow.',\n", + " 'The lash resounds, the rapid chariot flies,',\n", + " 'And in a moment scales the lofty skies:',\n", + " 'They stopp’d the car, and there the coursers stood,',\n", + " 'Fed by fair Iris with ambrosial food;',\n", + " 'Before her mother, love’s bright queen appears,',\n", + " 'O’erwhelmed with anguish, and dissolved in tears:',\n", + " 'She raised her in her arms, beheld her bleed,',\n", + " 'And ask’d what god had wrought this guilty deed?',\n", + " '',\n", + " '',\n", + " '[Illustration: ] VENUS, WOUNDED IN THE HAND, CONDUCTED BY IRIS TO MARS',\n", + " '',\n", + " '',\n", + " 'Then she: “This insult from no god I found,',\n", + " 'An impious mortal gave the daring wound!',\n", + " 'Behold the deed of haughty Diomed!',\n", + " '’Twas in the son’s defence the mother bled.',\n", + " 'The war with Troy no more the Grecians wage;',\n", + " 'But with the gods (the immortal gods) engage.”',\n", + " '',\n", + " 'Dione then: “Thy wrongs with patience bear,',\n", + " 'And share those griefs inferior powers must share:',\n", + " 'Unnumber’d woes mankind from us sustain,',\n", + " 'And men with woes afflict the gods again.',\n", + " 'The mighty Mars in mortal fetters bound,[149]',\n", + " 'And lodged in brazen dungeons underground,',\n", + " 'Full thirteen moons imprison’d roar’d in vain;',\n", + " 'Otus and Ephialtes held the chain:',\n", + " 'Perhaps had perish’d had not Hermes’ care',\n", + " 'Restored the groaning god to upper air.',\n", + " 'Great Juno’s self has borne her weight of pain,',\n", + " 'The imperial partner of the heavenly reign;',\n", + " 'Amphitryon’s son infix’d the deadly dart,[150]',\n", + " 'And fill’d with anguish her immortal heart.',\n", + " 'E’en hell’s grim king Alcides’ power confess’d,',\n", + " 'The shaft found entrance in his iron breast;',\n", + " 'To Jove’s high palace for a cure he fled,',\n", + " 'Pierced in his own dominions of the dead;',\n", + " 'Where Paeon, sprinkling heavenly balm around,',\n", + " 'Assuaged the glowing pangs, and closed the wound.',\n", + " 'Rash, impious man! to stain the bless’d abodes,',\n", + " 'And drench his arrows in the blood of gods!',\n", + " '',\n", + " '',\n", + " '[Illustration: ] OTUS AND EPHIALTES HOLDING MARS CAPTIVE',\n", + " '',\n", + " '',\n", + " '“But thou (though Pallas urged thy frantic deed),',\n", + " 'Whose spear ill-fated makes a goddess bleed,',\n", + " 'Know thou, whoe’er with heavenly power contends,',\n", + " 'Short is his date, and soon his glory ends;',\n", + " 'From fields of death when late he shall retire,',\n", + " 'No infant on his knees shall call him sire.',\n", + " 'Strong as thou art, some god may yet be found,',\n", + " 'To stretch thee pale and gasping on the ground;',\n", + " 'Thy distant wife, Ægialé the fair,[151]',\n", + " 'Starting from sleep with a distracted air,',\n", + " 'Shall rouse thy slaves, and her lost lord deplore,',\n", + " 'The brave, the great, the glorious now no more!”',\n", + " '',\n", + " 'This said, she wiped from Venus’ wounded palm',\n", + " 'The sacred ichor, and infused the balm.',\n", + " 'Juno and Pallas with a smile survey’d,',\n", + " 'And thus to Jove began the blue-eyed maid:',\n", + " '',\n", + " '“Permit thy daughter, gracious Jove! to tell',\n", + " 'How this mischance the Cyprian queen befell,',\n", + " 'As late she tried with passion to inflame',\n", + " 'The tender bosom of a Grecian dame;',\n", + " 'Allured the fair, with moving thoughts of joy,',\n", + " 'To quit her country for some youth of Troy;',\n", + " 'The clasping zone, with golden buckles bound,',\n", + " 'Razed her soft hand with this lamented wound.”',\n", + " '',\n", + " 'The sire of gods and men superior smiled,',\n", + " 'And, calling Venus, thus address’d his child:',\n", + " '“Not these, O daughter are thy proper cares,',\n", + " 'Thee milder arts befit, and softer wars;',\n", + " 'Sweet smiles are thine, and kind endearing charms;',\n", + " 'To Mars and Pallas leave the deeds of arms.”',\n", + " '',\n", + " 'Thus they in heaven: while on the plain below',\n", + " 'The fierce Tydides charged his Dardan foe,',\n", + " 'Flush’d with celestial blood pursued his way,',\n", + " 'And fearless dared the threatening god of day;',\n", + " 'Already in his hopes he saw him kill’d,',\n", + " 'Though screen’d behind Apollo’s mighty shield.',\n", + " 'Thrice rushing furious, at the chief he strook;',\n", + " 'His blazing buckler thrice Apollo shook:',\n", + " 'He tried the fourth: when, breaking from the cloud,',\n", + " 'A more than mortal voice was heard aloud.',\n", + " '',\n", + " '“O son of Tydeus, cease! be wise and see',\n", + " 'How vast the difference of the gods and thee;',\n", + " 'Distance immense! between the powers that shine',\n", + " 'Above, eternal, deathless, and divine,',\n", + " 'And mortal man! a wretch of humble birth,',\n", + " 'A short-lived reptile in the dust of earth.”',\n", + " '',\n", + " 'So spoke the god who darts celestial fires:',\n", + " 'He dreads his fury, and some steps retires.',\n", + " 'Then Phœbus bore the chief of Venus’ race',\n", + " 'To Troy’s high fane, and to his holy place;',\n", + " 'Latona there and Phoebe heal’d the wound,',\n", + " 'With vigour arm’d him, and with glory crown’d.',\n", + " 'This done, the patron of the silver bow',\n", + " 'A phantom raised, the same in shape and show',\n", + " 'With great Æneas; such the form he bore,',\n", + " 'And such in fight the radiant arms he wore.',\n", + " 'Around the spectre bloody wars are waged,',\n", + " 'And Greece and Troy with clashing shields engaged.',\n", + " 'Meantime on Ilion’s tower Apollo stood,',\n", + " 'And calling Mars, thus urged the raging god:',\n", + " '',\n", + " '“Stern power of arms, by whom the mighty fall;',\n", + " 'Who bathest in blood, and shakest the embattled wall,',\n", + " 'Rise in thy wrath! to hell’s abhorr’d abodes',\n", + " 'Despatch yon Greek, and vindicate the gods.',\n", + " 'First rosy Venus felt his brutal rage;',\n", + " 'Me next he charged, and dares all heaven engage:',\n", + " 'The wretch would brave high heaven’s immortal sire,',\n", + " 'His triple thunder, and his bolts of fire.”',\n", + " '',\n", + " 'The god of battle issues on the plain,',\n", + " 'Stirs all the ranks, and fires the Trojan train;',\n", + " 'In form like Acamas, the Thracian guide,',\n", + " 'Enraged to Troy’s retiring chiefs he cried:',\n", + " '',\n", + " '“How long, ye sons of Priam! will ye fly,',\n", + " 'And unrevenged see Priam’s people die?',\n", + " 'Still unresisted shall the foe destroy,',\n", + " 'And stretch the slaughter to the gates of Troy?',\n", + " 'Lo, brave Æneas sinks beneath his wound,',\n", + " 'Not godlike Hector more in arms renown’d:',\n", + " 'Haste all, and take the generous warrior’s part.',\n", + " 'He said;—new courage swell’d each hero’s heart.',\n", + " 'Sarpedon first his ardent soul express’d,',\n", + " 'And, turn’d to Hector, these bold words address’d:',\n", + " '',\n", + " '“Say, chief, is all thy ancient valour lost?',\n", + " 'Where are thy threats, and where thy glorious boast,',\n", + " 'That propp’d alone by Priam’s race should stand',\n", + " 'Troy’s sacred walls, nor need a foreign hand?',\n", + " 'Now, now thy country calls her wonted friends,',\n", + " 'And the proud vaunt in just derision ends.',\n", + " 'Remote they stand while alien troops engage,',\n", + " 'Like trembling hounds before the lion’s rage.',\n", + " 'Far distant hence I held my wide command,',\n", + " 'Where foaming Xanthus laves the Lycian land;',\n", + " 'With ample wealth (the wish of mortals) bless’d,',\n", + " 'A beauteous wife, and infant at her breast;',\n", + " 'With those I left whatever dear could be:',\n", + " 'Greece, if she conquers, nothing wins from me;',\n", + " 'Yet first in fight my Lycian bands I cheer,',\n", + " 'And long to meet this mighty man ye fear;',\n", + " 'While Hector idle stands, nor bids the brave',\n", + " 'Their wives, their infants, and their altars save.',\n", + " 'Haste, warrior, haste! preserve thy threaten’d state,',\n", + " 'Or one vast burst of all-involving fate',\n", + " 'Full o’er your towers shall fall, and sweep away',\n", + " 'Sons, sires, and wives, an undistinguish’d prey.',\n", + " 'Rouse all thy Trojans, urge thy aids to fight;',\n", + " 'These claim thy thoughts by day, thy watch by night;',\n", + " 'With force incessant the brave Greeks oppose;',\n", + " 'Such cares thy friends deserve, and such thy foes.”',\n", + " '',\n", + " 'Stung to the heart the generous Hector hears,',\n", + " 'But just reproof with decent silence bears.',\n", + " 'From his proud car the prince impetuous springs,',\n", + " 'On earth he leaps, his brazen armour rings.',\n", + " 'Two shining spears are brandish’d in his hands;',\n", + " 'Thus arm’d, he animates his drooping bands,',\n", + " 'Revives their ardour, turns their steps from flight,',\n", + " 'And wakes anew the dying flames of fight.',\n", + " 'They turn, they stand; the Greeks their fury dare,',\n", + " 'Condense their powers, and wait the growing war.',\n", + " '',\n", + " 'As when, on Ceres’ sacred floor, the swain',\n", + " 'Spreads the wide fan to clear the golden grain,',\n", + " 'And the light chaff, before the breezes borne,',\n", + " 'Ascends in clouds from off the heapy corn;',\n", + " 'The grey dust, rising with collected winds,',\n", + " 'Drives o’er the barn, and whitens all the hinds:',\n", + " 'So white with dust the Grecian host appears,',\n", + " 'From trampling steeds, and thundering charioteers.',\n", + " 'The dusky clouds from labour’d earth arise,',\n", + " 'And roll in smoking volumes to the skies.',\n", + " 'Mars hovers o’er them with his sable shield,',\n", + " 'And adds new horrors to the darken’d field:',\n", + " 'Pleased with his charge, and ardent to fulfil,',\n", + " 'In Troy’s defence, Apollo’s heavenly will:',\n", + " 'Soon as from fight the blue-eyed maid retires,',\n", + " 'Each Trojan bosom with new warmth he fires.',\n", + " 'And now the god, from forth his sacred fane,',\n", + " 'Produced Æneas to the shouting train;',\n", + " 'Alive, unharm’d, with all his peers around,',\n", + " 'Erect he stood, and vigorous from his wound:',\n", + " 'Inquiries none they made; the dreadful day',\n", + " 'No pause of words admits, no dull delay;',\n", + " 'Fierce Discord storms, Apollo loud exclaims,',\n", + " 'Fame calls, Mars thunders, and the field’s in flames.',\n", + " '',\n", + " 'Stern Diomed with either Ajax stood,',\n", + " 'And great Ulysses, bathed in hostile blood.',\n", + " 'Embodied close, the labouring Grecian train',\n", + " 'The fiercest shock of charging hosts sustain.',\n", + " 'Unmoved and silent, the whole war they wait',\n", + " 'Serenely dreadful, and as fix’d as fate.',\n", + " 'So when the embattled clouds in dark array,',\n", + " 'Along the skies their gloomy lines display;',\n", + " 'When now the North his boisterous rage has spent,',\n", + " 'And peaceful sleeps the liquid element:',\n", + " 'The low-hung vapours, motionless and still,',\n", + " 'Rest on the summits of the shaded hill;',\n", + " 'Till the mass scatters as the winds arise,',\n", + " 'Dispersed and broken through the ruffled skies.',\n", + " '',\n", + " 'Nor was the general wanting to his train;',\n", + " 'From troop to troop he toils through all the plain,',\n", + " '“Ye Greeks, be men! the charge of battle bear;',\n", + " 'Your brave associates and yourselves revere!',\n", + " 'Let glorious acts more glorious acts inspire,',\n", + " 'And catch from breast to breast the noble fire!',\n", + " 'On valour’s side the odds of combat lie,',\n", + " 'The brave live glorious, or lamented die;',\n", + " 'The wretch who trembles in the field of fame,',\n", + " 'Meets death, and worse than death, eternal shame!”',\n", + " '',\n", + " 'These words he seconds with his flying lance,',\n", + " 'To meet whose point was strong Deicoon’s chance:',\n", + " 'Æneas’ friend, and in his native place',\n", + " 'Honour’d and loved like Priam’s royal race:',\n", + " 'Long had he fought the foremost in the field,',\n", + " 'But now the monarch’s lance transpierced his shield:',\n", + " 'His shield too weak the furious dart to stay,',\n", + " 'Through his broad belt the weapon forced its way:',\n", + " 'The grisly wound dismiss’d his soul to hell,',\n", + " 'His arms around him rattled as he fell.',\n", + " '',\n", + " 'Then fierce Æneas, brandishing his blade,',\n", + " 'In dust Orsilochus and Crethon laid,',\n", + " 'Whose sire Diocleus, wealthy, brave and great,',\n", + " 'In well-built Pheræ held his lofty seat:[152]',\n", + " 'Sprung from Alpheus’ plenteous stream, that yields',\n", + " 'Increase of harvests to the Pylian fields.',\n", + " 'He got Orsilochus, Diocleus he,',\n", + " 'And these descended in the third degree.',\n", + " 'Too early expert in the martial toil,',\n", + " 'In sable ships they left their native soil,',\n", + " 'To avenge Atrides: now, untimely slain,',\n", + " 'They fell with glory on the Phrygian plain.',\n", + " 'So two young mountain lions, nursed with blood',\n", + " 'In deep recesses of the gloomy wood,',\n", + " 'Rush fearless to the plains, and uncontroll’d',\n", + " 'Depopulate the stalls and waste the fold:',\n", + " 'Till pierced at distance from their native den,',\n", + " 'O’erpowered they fall beneath the force of men.',\n", + " 'Prostrate on earth their beauteous bodies lay,',\n", + " 'Like mountain firs, as tall and straight as they.',\n", + " 'Great Menelaus views with pitying eyes,',\n", + " 'Lifts his bright lance, and at the victor flies;',\n", + " 'Mars urged him on; yet, ruthless in his hate,',\n", + " 'The god but urged him to provoke his fate.',\n", + " 'He thus advancing, Nestor’s valiant son',\n", + " 'Shakes for his danger, and neglects his own;',\n", + " 'Struck with the thought, should Helen’s lord be slain,',\n", + " 'And all his country’s glorious labours vain.',\n", + " 'Already met, the threatening heroes stand;',\n", + " 'The spears already tremble in their hand:',\n", + " 'In rush’d Antilochus, his aid to bring,',\n", + " 'And fall or conquer by the Spartan king.',\n", + " 'These seen, the Dardan backward turn’d his course,',\n", + " 'Brave as he was, and shunn’d unequal force.',\n", + " 'The breathless bodies to the Greeks they drew,',\n", + " 'Then mix in combat, and their toils renew.',\n", + " '',\n", + " 'First, Pylæmenes, great in battle, bled,',\n", + " 'Who sheathed in brass the Paphlagonians led.',\n", + " 'Atrides mark’d him where sublime he stood;',\n", + " 'Fix’d in his throat the javelin drank his blood.',\n", + " 'The faithful Mydon, as he turn’d from fight',\n", + " 'His flying coursers, sunk to endless night;',\n", + " 'A broken rock by Nestor’s son was thrown:',\n", + " 'His bended arm received the falling stone;',\n", + " 'From his numb’d hand the ivory-studded reins,',\n", + " 'Dropp’d in the dust, are trail’d along the plains:',\n", + " 'Meanwhile his temples feel a deadly wound;',\n", + " 'He groans in death, and ponderous sinks to ground:',\n", + " 'Deep drove his helmet in the sands, and there',\n", + " 'The head stood fix’d, the quivering legs in air,',\n", + " 'Till trampled flat beneath the coursers’ feet:',\n", + " 'The youthful victor mounts his empty seat,',\n", + " 'And bears the prize in triumph to the fleet.',\n", + " '',\n", + " 'Great Hector saw, and, raging at the view,',\n", + " 'Pours on the Greeks: the Trojan troops pursue:',\n", + " 'He fires his host with animating cries,',\n", + " 'And brings along the furies of the skies,',\n", + " 'Mars, stern destroyer! and Bellona dread,',\n", + " 'Flame in the front, and thunder at their head:',\n", + " 'This swells the tumult and the rage of fight;',\n", + " 'That shakes a spear that casts a dreadful light.',\n", + " 'Where Hector march’d, the god of battles shined,',\n", + " 'Now storm’d before him, and now raged behind.',\n", + " '',\n", + " 'Tydides paused amidst his full career;',\n", + " 'Then first the hero’s manly breast knew fear.',\n", + " 'As when some simple swain his cot forsakes,',\n", + " 'And wide through fens an unknown journey takes:',\n", + " 'If chance a swelling brook his passage stay,',\n", + " 'And foam impervious ’cross the wanderer’s way,',\n", + " 'Confused he stops, a length of country pass’d,',\n", + " 'Eyes the rough waves, and tired, returns at last.',\n", + " 'Amazed no less the great Tydides stands:',\n", + " 'He stay’d, and turning thus address’d his bands:',\n", + " '',\n", + " '“No wonder, Greeks! that all to Hector yield;',\n", + " 'Secure of favouring gods, he takes the field;',\n", + " 'His strokes they second, and avert our spears.',\n", + " 'Behold where Mars in mortal arms appears!',\n", + " 'Retire then, warriors, but sedate and slow;',\n", + " 'Retire, but with your faces to the foe.',\n", + " 'Trust not too much your unavailing might;',\n", + " '’Tis not with Troy, but with the gods ye fight.”',\n", + " '',\n", + " 'Now near the Greeks the black battalions drew;',\n", + " 'And first two leaders valiant Hector slew:',\n", + " 'His force Anchialus and Mnesthes found,',\n", + " 'In every art of glorious war renown’d;',\n", + " 'In the same car the chiefs to combat ride,',\n", + " 'And fought united, and united died.',\n", + " 'Struck at the sight, the mighty Ajax glows',\n", + " 'With thirst of vengeance, and assaults the foes.',\n", + " 'His massy spear with matchless fury sent,',\n", + " 'Through Amphius’ belt and heaving belly went;',\n", + " 'Amphius Apæsus’ happy soil possess’d,',\n", + " 'With herds abounding, and with treasure bless’d;',\n", + " 'But fate resistless from his country led',\n", + " 'The chief, to perish at his people’s head.',\n", + " 'Shook with his fall his brazen armour rung,',\n", + " 'And fierce, to seize it, conquering Ajax sprung;',\n", + " 'Around his head an iron tempest rain’d;',\n", + " 'A wood of spears his ample shield sustain’d:',\n", + " 'Beneath one foot the yet warm corpse he press’d,',\n", + " 'And drew his javelin from the bleeding breast:',\n", + " 'He could no more; the showering darts denied',\n", + " 'To spoil his glittering arms, and plumy pride.',\n", + " 'Now foes on foes came pouring on the fields,',\n", + " 'With bristling lances, and compacted shields;',\n", + " 'Till in the steely circle straiten’d round,',\n", + " 'Forced he gives way, and sternly quits the ground.',\n", + " '',\n", + " 'While thus they strive, Tlepolemus the great,[153]',\n", + " 'Urged by the force of unresisted fate,',\n", + " 'Burns with desire Sarpedon’s strength to prove;',\n", + " 'Alcides’ offspring meets the son of Jove.',\n", + " 'Sheathed in bright arms each adverse chief came on.',\n", + " 'Jove’s great descendant, and his greater son.',\n", + " 'Prepared for combat, ere the lance he toss’d,',\n", + " 'The daring Rhodian vents his haughty boast:',\n", + " '',\n", + " '“What brings this Lycian counsellor so far,',\n", + " 'To tremble at our arms, not mix in war!',\n", + " 'Know thy vain self, nor let their flattery move,',\n", + " 'Who style thee son of cloud-compelling Jove.',\n", + " 'How far unlike those chiefs of race divine,',\n", + " 'How vast the difference of their deeds and thine!',\n", + " 'Jove got such heroes as my sire, whose soul',\n", + " 'No fear could daunt, nor earth nor hell control.',\n", + " 'Troy felt his arm, and yon proud ramparts stand',\n", + " 'Raised on the ruins of his vengeful hand:',\n", + " 'With six small ships, and but a slender train,',\n", + " 'He left the town a wide-deserted plain.',\n", + " 'But what art thou, who deedless look’st around,',\n", + " 'While unrevenged thy Lycians bite the ground!',\n", + " 'Small aid to Troy thy feeble force can be;',\n", + " 'But wert thou greater, thou must yield to me.',\n", + " 'Pierced by my spear, to endless darkness go!',\n", + " 'I make this present to the shades below.”',\n", + " '',\n", + " 'The son of Hercules, the Rhodian guide,',\n", + " 'Thus haughty spoke. The Lycian king replied:',\n", + " '',\n", + " '“Thy sire, O prince! o’erturn’d the Trojan state,',\n", + " 'Whose perjured monarch well deserved his fate;',\n", + " 'Those heavenly steeds the hero sought so far,',\n", + " 'False he detain’d, the just reward of war.',\n", + " 'Nor so content, the generous chief defied,',\n", + " 'With base reproaches and unmanly pride.',\n", + " 'But you, unworthy the high race you boast,',\n", + " 'Shall raise my glory when thy own is lost:',\n", + " 'Now meet thy fate, and by Sarpedon slain,',\n", + " 'Add one more ghost to Pluto’s gloomy reign.”',\n", + " '',\n", + " 'He said: both javelins at an instant flew;',\n", + " 'Both struck, both wounded, but Sarpedon’s slew:',\n", + " 'Full in the boaster’s neck the weapon stood,',\n", + " 'Transfix’d his throat, and drank the vital blood;',\n", + " 'The soul disdainful seeks the caves of night,',\n", + " 'And his seal’d eyes for ever lose the light.',\n", + " '',\n", + " 'Yet not in vain, Tlepolemus, was thrown',\n", + " 'Thy angry lance; which piercing to the bone',\n", + " 'Sarpedon’s thigh, had robb’d the chief of breath;',\n", + " 'But Jove was present, and forbade the death.',\n", + " 'Borne from the conflict by his Lycian throng,',\n", + " 'The wounded hero dragg’d the lance along.',\n", + " '(His friends, each busied in his several part,',\n", + " 'Through haste, or danger, had not drawn the dart.)',\n", + " 'The Greeks with slain Tlepolemus retired;',\n", + " 'Whose fall Ulysses view’d, with fury fired;',\n", + " 'Doubtful if Jove’s great son he should pursue,',\n", + " 'Or pour his vengeance on the Lycian crew.',\n", + " 'But heaven and fate the first design withstand,',\n", + " 'Nor this great death must grace Ulysses’ hand.',\n", + " 'Minerva drives him on the Lycian train;',\n", + " 'Alastor, Cronius, Halius, strew’d the plain,',\n", + " 'Alcander, Prytanis, Noëmon fell:[154]',\n", + " 'And numbers more his sword had sent to hell,',\n", + " 'But Hector saw; and, furious at the sight,',\n", + " 'Rush’d terrible amidst the ranks of fight.',\n", + " 'With joy Sarpedon view’d the wish’d relief,',\n", + " 'And, faint, lamenting, thus implored the chief:',\n", + " '',\n", + " '“O suffer not the foe to bear away',\n", + " 'My helpless corpse, an unassisted prey;',\n", + " 'If I, unbless’d, must see my son no more,',\n", + " 'My much-loved consort, and my native shore,',\n", + " 'Yet let me die in Ilion’s sacred wall;',\n", + " 'Troy, in whose cause I fell, shall mourn my fall.”',\n", + " '',\n", + " 'He said, nor Hector to the chief replies,',\n", + " 'But shakes his plume, and fierce to combat flies;',\n", + " 'Swift as a whirlwind, drives the scattering foes;',\n", + " 'And dyes the ground with purple as he goes.',\n", + " '',\n", + " 'Beneath a beech, Jove’s consecrated shade,',\n", + " 'His mournful friends divine Sarpedon laid:',\n", + " 'Brave Pelagon, his favourite chief, was nigh,',\n", + " 'Who wrench’d the javelin from his sinewy thigh.',\n", + " 'The fainting soul stood ready wing’d for flight,',\n", + " 'And o’er his eye-balls swam the shades of night;',\n", + " 'But Boreas rising fresh, with gentle breath,',\n", + " 'Recall’d his spirit from the gates of death.',\n", + " '',\n", + " 'The generous Greeks recede with tardy pace,',\n", + " 'Though Mars and Hector thunder in their face;',\n", + " 'None turn their backs to mean ignoble flight,',\n", + " 'Slow they retreat, and even retreating fight.',\n", + " 'Who first, who last, by Mars’ and Hector’s hand,',\n", + " 'Stretch’d in their blood, lay gasping on the sand?',\n", + " 'Tenthras the great, Orestes the renown’d',\n", + " 'For managed steeds, and Trechus press’d the ground;',\n", + " 'Next Œnomaus and OEnops’ offspring died;',\n", + " 'Oresbius last fell groaning at their side:',\n", + " 'Oresbius, in his painted mitre gay,',\n", + " 'In fat Bœotia held his wealthy sway,',\n", + " 'Where lakes surround low Hylè’s watery plain;',\n", + " 'A prince and people studious of their gain.',\n", + " '',\n", + " 'The carnage Juno from the skies survey’d,',\n", + " 'And touch’d with grief bespoke the blue-eyed maid:',\n", + " '“Oh, sight accursed! Shall faithless Troy prevail,',\n", + " 'And shall our promise to our people fail?',\n", + " 'How vain the word to Menelaus given',\n", + " 'By Jove’s great daughter and the queen of heaven,',\n", + " 'Beneath his arms that Priam’s towers should fall,',\n", + " 'If warring gods for ever guard the wall!',\n", + " 'Mars, red with slaughter, aids our hated foes:',\n", + " 'Haste, let us arm, and force with force oppose!”',\n", + " '',\n", + " 'She spoke; Minerva burns to meet the war:',\n", + " 'And now heaven’s empress calls her blazing car.',\n", + " 'At her command rush forth the steeds divine;',\n", + " 'Rich with immortal gold their trappings shine.',\n", + " 'Bright Hebe waits; by Hebe, ever young,',\n", + " 'The whirling wheels are to the chariot hung.',\n", + " 'On the bright axle turns the bidden wheel',\n", + " 'Of sounding brass; the polished axle steel.',\n", + " 'Eight brazen spokes in radiant order flame;',\n", + " 'The circles gold, of uncorrupted frame,',\n", + " 'Such as the heavens produce: and round the gold',\n", + " 'Two brazen rings of work divine were roll’d.',\n", + " 'The bossy naves of sold silver shone;',\n", + " 'Braces of gold suspend the moving throne:',\n", + " 'The car, behind, an arching figure bore;',\n", + " 'The bending concave form’d an arch before.',\n", + " 'Silver the beam, the extended yoke was gold,',\n", + " 'And golden reins the immortal coursers hold.',\n", + " 'Herself, impatient, to the ready car,',\n", + " 'The coursers joins, and breathes revenge and war.',\n", + " '',\n", + " 'Pallas disrobes; her radiant veil untied,',\n", + " 'With flowers adorn’d, with art diversified,',\n", + " '(The laboured veil her heavenly fingers wove,)',\n", + " 'Flows on the pavement of the court of Jove.',\n", + " 'Now heaven’s dread arms her mighty limbs invest,',\n", + " 'Jove’s cuirass blazes on her ample breast;',\n", + " 'Deck’d in sad triumph for the mournful field,',\n", + " 'O’er her broad shoulders hangs his horrid shield,',\n", + " 'Dire, black, tremendous! Round the margin roll’d,',\n", + " 'A fringe of serpents hissing guards the gold:',\n", + " 'Here all the terrors of grim War appear,',\n", + " 'Here rages Force, here tremble Flight and Fear,',\n", + " 'Here storm’d Contention, and here Fury frown’d,',\n", + " 'And the dire orb portentous Gorgon crown’d.']" + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "with open(\"./pope-iliad.txt\", \"r\") as f:\n", " iliad=f.read()\n", "\n", "all_lines = iliad.splitlines()\n", "diomedes = all_lines[5542:6542]\n", - "\n", + "diomedes\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [], + "source": [ "from pathlib import Path\n", "\n", "out_dir = Path(\"iliad_files\")\n", "\n", + "outfile = out_dir / Path(\"iliad_book_V_*.txt\")\n", "\n", + "if not out_dir.exists():\n", + " out_dir.mkdir()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ "for index in range(len(diomedes)):\n", " with open(f\"./iliad_book_V_{index}.txt\", \"w\") as a:\n", - " a.write(diomedes[index])\n" + " a.write(diomedes[index])" ] } ], diff --git a/my_files/all_lines.txt b/my_files/all_lines.txt index 4b9ed27..0366d42 100644 --- a/my_files/all_lines.txt +++ b/my_files/all_lines.txt @@ -22,3 +22,11 @@ With tame content, and thou possess’d of thine? Great as thou art, and like a god in fight, Such as a king might ask; and let it be Then thus the king: “Shall I my prize resign +At thy demand shall I restore the maid? +A treasure worthy her, and worthy me. +First let the just equivalent be paid; +Think not to rob me of a soldier’s right. +With tame content, and thou possess’d of thine? +Great as thou art, and like a god in fight, +Such as a king might ask; and let it be +Then thus the king: “Shall I my prize resign From e84f4f9dfecef0af8b2bad4782e34b0aaaae73a2 Mon Sep 17 00:00:00 2001 From: JacobBenSchwartz Date: Sun, 23 Feb 2025 02:44:50 +0000 Subject: [PATCH 3/5] About to test code. --- file-io.ipynb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/file-io.ipynb b/file-io.ipynb index 08486ab..7953af5 100644 --- a/file-io.ipynb +++ b/file-io.ipynb @@ -1180,7 +1180,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -1188,8 +1188,6 @@ "\n", "out_dir = Path(\"iliad_files\")\n", "\n", - "outfile = out_dir / Path(\"iliad_book_V_*.txt\")\n", - "\n", "if not out_dir.exists():\n", " out_dir.mkdir()" ] @@ -1201,7 +1199,8 @@ "outputs": [], "source": [ "for index in range(len(diomedes)):\n", - " with open(f\"./iliad_book_V_{index}.txt\", \"w\") as a:\n", + " outfile = out_dir / Path(f\"iliad_book_V_{index}.txt\")\n", + " with open(outfile, \"a\") as a:\n", " a.write(diomedes[index])" ] } From 5cd1b2682d830b42aa4094a38716dca6ca52e7d0 Mon Sep 17 00:00:00 2001 From: JacobBenSchwartz Date: Sun, 23 Feb 2025 03:07:00 +0000 Subject: [PATCH 4/5] Changed append to write, about to retest code. --- file-io.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/file-io.ipynb b/file-io.ipynb index 7953af5..bb5f09d 100644 --- a/file-io.ipynb +++ b/file-io.ipynb @@ -1200,7 +1200,7 @@ "source": [ "for index in range(len(diomedes)):\n", " outfile = out_dir / Path(f\"iliad_book_V_{index}.txt\")\n", - " with open(outfile, \"a\") as a:\n", + " with open(outfile, \"w\") as a:\n", " a.write(diomedes[index])" ] } From 7ca8224180307f50e0fda48e25a0b2b9133796a1 Mon Sep 17 00:00:00 2001 From: JacobBenSchwartz Date: Sun, 23 Feb 2025 03:08:08 +0000 Subject: [PATCH 5/5] Completed homework. --- file-io.ipynb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/file-io.ipynb b/file-io.ipynb index bb5f09d..3b0bddb 100644 --- a/file-io.ipynb +++ b/file-io.ipynb @@ -155,7 +155,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 16, "metadata": {}, "outputs": [ { @@ -1163,7 +1163,7 @@ " 'And the dire orb portentous Gorgon crown’d.']" ] }, - "execution_count": 11, + "execution_count": 16, "metadata": {}, "output_type": "execute_result" } @@ -1180,7 +1180,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 17, "metadata": {}, "outputs": [], "source": [ @@ -1194,7 +1194,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 18, "metadata": {}, "outputs": [], "source": [