Page 1 of 1

Python: decodeh.py

Posted: Sat Dec 13, 2008 12:28 am
by The Punisher
Σε μια "μετατροπή encoding" που κάνω κατέληξα στο παρακάτω site (http://gizmojo.org/code/decodeh/). Πιστεύω ότι αυτό που κάνουν θα με βοηθήσει ιδιαιτέρως. Το θέμα είναι ότι δεν έχω ιδέα από Python, και δεν ξέρω πως μπορώ να το χρησιμοποιήσω αυτό, και τι πρέπει να έχω στο pc μου για να το χρησιμοποιήσω.

Όποια βοήθεια ... :smt023

Re: Python: decodeh.py

Posted: Sat Dec 13, 2008 12:36 am
by ultimate_aektzis
Τον interpreter της python οπωσδηποτε(σε διανομες ειναι προεγκατεστημενος συνηθως) και οποια αλλη βιβλιοθηκη τυχον χρησιμοποιει πχ pygame

Σε κονσολα python file.py και εφυγες :smt023

Re: Python: decodeh.py

Posted: Sat Dec 13, 2008 12:45 am
by The Punisher
Ok, thnx :)

Re: Python: decodeh.py

Posted: Sat Dec 13, 2008 12:45 am
by cyberpython
Λήψη του Python interpreter για Windows :
http://www.python.org/download/windows/

από εκεί και πέρα θα χρειαστείς τις βιβλιοθήκες (modules) που μπορεί ν έχεουν γίνει import (αλλά δε νομίζω να χρησιμοποιεί κάτι ιδιαίτερο για string handling...)

Re: Python: decodeh.py

Posted: Sat Dec 13, 2008 12:57 am
by The Punisher
cyberpython wrote:Λήψη του Python interpreter για Windows :
http://www.python.org/download/windows/
ok, το κατέβασα αυτό.

παίρνω τον κώδικα από το http://gizmojo.org/code/decodeh/ και τον κάνω paste σε ένα .py αρχείο και μου βγάζει syntax errors. μπορεί να το δοκιμάσει κάποιος από τους γνωρίζοντες? μάλλον κάνω κάτι λάθος :roll:

Re: Python: decodeh.py

Posted: Sat Dec 13, 2008 2:23 pm
by ultimate_aektzis
Μαλλον καποιες βιβλιοθηκες πρεπει να κατεβασεις.Δεν εχω linux διαθεσιμο να το κοιταξω και να σου πω λεπτομερως και ισως να μην εχω ολη μερα.Μαλλον αυριο θα το δω :roll:

Re: Python: decodeh.py

Posted: Mon Dec 29, 2008 5:28 pm
by rose
Έχεις κατεβάσει τις βιβλιοθήκες; http://gizmojo.org/download/

<οφφ>

Αλλα γιατί να γράψεις python; Δεν ψήνεσαι για κάτι πιο κουλτουριάρικο; Perl για παράδειγμα...γράφεις και ποιήματα. Ρώτα και τον wind αυτός ξέρει.
Βέβαια συνηθίζει να τα μοιράζει σε όλες τις κοπέλες...εσύ πρέπει να είσαι πιο προσεκτικός και επιλεκτικός :-p


Ενα παράδειγμα της μοναδικής αυτής τέχνης.
Wayne Myers ported this Yeats poem, The Coming Of Wisdom with Time, to Perl. I enjoyed his use of Perl functions to coincide with Yeats' word use. For example, this Yeats line:

Though leaves are many
became
while ($leaves > 1) {
This was exactly what I was hoping to see from the entries. I also enjoyed his tounge-in-cheek use of sway() to ensure that the poem will die() if not on a Sun was slick. Here is the original poem:

Though leaves are many, the root is one;
Through all the lying days of my youth
I swayed my leaves and flowers in the sun;
Now I may wither into the truth

And here is Myers' Perl version:

Code: Select all

while ($leaves > 1) {
	$root = 1;
}
foreach($lyingdays{'myyouth'}) {
	sway($leaves, $flowers);
}
while ($i > $truth) {
	$i--;
}
sub sway {
	my ($leaves, $flowers) = @_;
	die unless $^O =~ /sun/i
</οφφ>

Re: Python: decodeh.py

Posted: Mon Dec 29, 2008 5:45 pm
by The Punisher
το θέμα δεν είναι τι θέλω να γράψω (τίποτα από τα δύο είναι η αλήθεια) αλλά τι θέλω να χρησιμοποιήσω .. ready work

Re: Python: decodeh.py

Posted: Mon Dec 29, 2008 6:30 pm
by ~~Wind~~
:shock: έχω μείνει άφωνος. Image Image