I have a script that takes an which basically takes a command line
argument and prints after processing. If I don't give the argument to
the script, it gives me a ValueError:
ValueError: need more than 1 value to unpack
I was trying to utilizing this space, if there is no argument I want it
to sh
Dustin J. Mitchell wrote:
> Thanks for the second round of responses. I think this gives me some
> focus - concentrate on the API, talk to the framework developers, and
> start redrafting the PEP sooner rather than later.
That's mostly what you came in with, but talking to the framework
developer
Τη Σάββατο, 15 Σεπτεμβρίου 2012 11:28:47 μ.μ. UTC+3, ο χρήστης MRAB έγραψε:
> On 2012-09-15 20:26, οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½ οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½ wrote:
>
> > οΏ½οΏ½ οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½, 15 οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½ 2012
> > 10:05:49 οΏ½.οΏ½. UTC+3, οΏ½ οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½ Chris Rebert
On Friday, September 14, 2012 10:32:47 PM UTC-5, David Hutto wrote:
> On Fri, Sep 14, 2012 at 11:26 PM, Dwight Hutto wrote:
>
> > On Fri, Sep 14, 2012 at 10:59 PM, Aaron Brady wrote:
>
> >> Hello,
>
> >>
>
> >> I've developing a test script. There's a lot of repetition. I want to
> >> intr
On Sun, Sep 16, 2012 at 4:10 AM, Νικόλαος Κούρας wrote:
> ah yes in the index.html page yes...yes i totally forgot about that, that
> bwas before creating the python counter logging when i was thinking other
> ways of solving this matter.
So it's like I was saying, redundant. :)
> What about t
בתאריך יום רביעי, 12 בספטמבר 2012 17:24:50 UTC+3, מאת Dan Katorza:
> hello ,
>
>
>
> i'm new to Python and i searched the web and could not find an answer for my
> issue.
>
>
>
> i need to get an ip address from list of hostnames which are in a textfile.
>
>
>
> this is what i have so far
On 2012-09-15 20:26, Νικόλαος Κούρας wrote:
Τη Σάββατο, 15 Σεπτεμβρίου 2012 10:05:49 μ.μ. UTC+3, ο χρήστης Chris Rebert
έγραψε:
On Sat, Sep 15, 2012 at 10:33 AM, Νικόλαος Κούρας wrote:
> Hello again,
>
> one small matter too.
> # get some enviromental values
> locale.setlocale(locale.LC_ALL,
Τη Σάββατο, 15 Σεπτεμβρίου 2012 10:05:49 μ.μ. UTC+3, ο χρήστης Chris Rebert
έγραψε:
> On Sat, Sep 15, 2012 at 10:33 AM, Νικόλαος Κούρας
> wrote:
>
> > Hello again,
>
> >
>
> > one small matter too.
>
>
>
> > # get some enviromental values
>
> > locale.setlocale(locale.LC_ALL, 'el_GR')
>
On Sat, Sep 15, 2012 at 10:33 AM, Νικόλαος Κούρας wrote:
> Hello again,
>
> one small matter too.
>
> # get some enviromental values
> locale.setlocale(locale.LC_ALL, 'el_GR')
> date = datetime.datetime.now().strftime( '%y-%m-%d %H:%M:%S' )
>
> although iam setting greek as locale
Locales don't
> # get some enviromental values
> locale.setlocale(locale.LC_ALL, 'el_GR')
> date = datetime.datetime.now().strftime( '%y-%m-%d %H:%M:%S' )
>
> although iam setting greek as locale the time is 8 hours before, like in
> texas, us
> How can i change this to save the correct Greek time in variable
On 15/09/12 18:20:42, Dan Katorza wrote:
> בתאריך יום רביעי, 12 בספטמבר 2012 17:24:50 UTC+3, מאת Dan Katorza:
>> hello ,
>>
>>
>>
>> i'm new to Python and i searched the web and could not find an answer for my
>> issue.
>>
>>
>>
>> i need to get an ip address from list of hostnames which are in a
Τη Σάββατο, 15 Σεπτεμβρίου 2012 9:03:00 μ.μ. UTC+3, ο χρήστης Chris Angelico
έγραψε:
> On Sun, Sep 16, 2012 at 3:59 AM, Νικόλαος Κούρας
> wrote:
>
> > What hidden form value?
>
> >
>
> > you mean page variable does not needed? please clarify.
>
> >
>
> > Also i dont know what to do if someo
On Sun, Sep 16, 2012 at 3:59 AM, Νικόλαος Κούρας wrote:
> What hidden form value?
>
> you mean page variable does not needed? please clarify.
>
> Also i dont know what to do if someone enters a false entry as content for
> htmlpage.
You have this:
What is that for? Is it needed?
ChrisA
--
ht
What hidden form value?
you mean page variable does not needed? please clarify.
Also i dont know what to do if someone enters a false entry as content for
htmlpage.
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, Sep 16, 2012 at 3:26 AM, Νικόλαος Κούρας wrote:
> aahhh! alo it needed change to
>
> page = form.getvalue('htmlpage')
>
> now its working! at last!
>
> but can you please tell me what was wrong?
>
> Tha names of the variables was the same both in counter.py and the .htaccess
>
> But why wa
Hello again,
one small matter too.
# get some enviromental values
locale.setlocale(locale.LC_ALL, 'el_GR')
..
..
date = datetime.datetime.now().strftime( '%y-%m-%d %H:%M:%S' )
although iam setting greek as locale the time is 8 hours before, like in texas,
us
How can i change
On Sun, Sep 16, 2012 at 3:18 AM, Subhabrata wrote:
> Dear Group,
>
> I am going to ask two very silly questions, if any one can kindly tell me why
> this structure is taken?
>
> classifier.pseudocode(depth=4)
>
> from nltk.corpus import brown
Not sure what your question means. The first one is a
Τη Σάββατο, 15 Σεπτεμβρίου 2012 8:22:39 μ.μ. UTC+3, ο χρήστης Νικόλαος Κούρας
έγραψε:
> Τη Σάββατο, 15 Σεπτεμβρίου 2012 7:56:31 μ.μ. UTC+3, ο χρήστης Chris Angelico
> έγραψε:
>
> > On Sun, Sep 16, 2012 at 2:53 AM, Νικόλαος Κούρας
> > wrote:
>
> >
>
> > > The 'page' form field is of couse ne
On 2012-09-15 05:40, Dwight Hutto wrote:
On Fri, Sep 14, 2012 at 11:53 PM, Chris Angelico wrote:
On Sat, Sep 15, 2012 at 1:47 PM, Dwight Hutto wrote:
That's no problem, But some suported ad some opposed, it's a
democracy, but a dictatorship by the moderators. How much did I err in
their opini
Τη Σάββατο, 15 Σεπτεμβρίου 2012 7:56:31 μ.μ. UTC+3, ο χρήστης Chris Angelico
έγραψε:
> On Sun, Sep 16, 2012 at 2:53 AM, Νικόλαος Κούρας
> wrote:
>
> > The 'page' form field is of couse neccessary because how else the python
> > counter.py script would know which html file triggered it so to pr
Dear Group,
I am going to ask two very silly questions, if any one can kindly tell me why
this structure is taken?
classifier.pseudocode(depth=4)
from nltk.corpus import brown
Sorry to ask you these.
Actually everytime I get confused with the answers.
Regards,
Subhabrata
--
http://mail.
On Sun, Sep 16, 2012 at 2:53 AM, Νικόλαος Κούρας wrote:
> The 'page' form field is of couse neccessary because how else the python
> counter.py script would know which html file triggered it so to present it
> and do its log thing?(i intend to create a few html files)
>
> I still do not see why
Τη Σάββατο, 15 Σεπτεμβρίου 2012 7:25:15 μ.μ. UTC+3, ο χρήστης Chris Angelico
έγραψε:
First, decide whether or not you need the 'page' form
>
> field. Either it's redundant or it's necessary.
>
>
>
> 1) If it's redundant: Easy. Delete it. Your page will begin working again.
>
> 2) If it's nece
On 09/15/2012 10:23 AM, Νικόλαος Κούρας wrote:
I swicthed back my code to: f = open( '../' + page )
and http://superhost.gr works which means that line gets parsed correctly.
Only when i post data to the text area boxes iam getting the error:
cannot concatenate 'str' and 'list' objects
how i
On Sun, Sep 16, 2012 at 2:04 AM, Νικόλαος Κούρας wrote:
> I'am not sure what to do and i didnt quite understand what the problem is.
>
> Can you please tell me what parts need fixe so for the users to be able to
> leave remakrs in he text area boxes?
Your question demonstrates a more fundamental
בתאריך יום רביעי, 12 בספטמבר 2012 17:24:50 UTC+3, מאת Dan Katorza:
> hello ,
>
>
>
> i'm new to Python and i searched the web and could not find an answer for my
> issue.
>
>
>
> i need to get an ip address from list of hostnames which are in a textfile.
>
>
>
> this is what i have so far
I moved to HostGaot because i heard there were the best in the hosting
business.
They are pretty good. However, you have to understand the site layout
to do CGI safely.
So long as your script are .cgi, putting them in ~/public_html is fine.
If you need to deploy .py files, you need to pu
I'am not sure what to do and i didnt quite understand what the problem is.
Can you please tell me what parts need fixe so for the users to be able to
leave remakrs in he text area boxes?
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, Sep 16, 2012 at 1:33 AM, Νικόλαος Κούρας wrote:
> You are right but iam a new python learner and i created this logging system
> script as a poject to better learn the lalguage itself.
>
> I can always use google analytics for serious visitor logging.
>
> Apart from that i enjoy reading
On Sun, Sep 16, 2012 at 1:23 AM, Νικόλαος Κούρας wrote:
> I swicthed back my code to: f = open( '../' + page )
>
> and http://superhost.gr works which means that line gets parsed correctly.
>
> Only when i post data to the text area boxes iam getting the error:
>
> cannot concatenate 'str' and 'l
You are right but iam a new python learner and i created this logging system
script as a poject to better learn the lalguage itself.
I can always use google analytics for serious visitor logging.
Apart from that i enjoy reading my logs by typing:
http://superhost.gr/?show=log
:-)
--
http://m
I swicthed back my code to: f = open( '../' + page )
and http://superhost.gr works which means that line gets parsed correctly.
Only when i post data to the text area boxes iam getting the error:
cannot concatenate 'str' and 'list' objects
how is this possible to work before and NOT work when
On Sun, Sep 16, 2012 at 1:06 AM, Νικόλαος Κούρας wrote:
> Previous webhost has the same flaw as well, look:
>
> http://www.errorweb.gr/~nikos/cgi-bin/
>
> giving away all my scripts.
>
> Webhost misconfiguration in both hosts!
And when I look at the scripts, I see things that do not fill me with
Previous webhost has the same flaw as well, look:
http://www.errorweb.gr/~nikos/cgi-bin/
giving away all my scripts.
Webhost misconfiguration in both hosts!
--
http://mail.python.org/mailman/listinfo/python-list
In article ,
Íéêüëáïò Êïýñáò wrote:
> I cant beleive that my source code can be seen form ANYONE this easily
Which is why I pointed it out. I mean no disrespect, but you appear to
be in over your head. That's fine (we're all in over our heads at some
point, that's how we learn new thing
The .htaccess file works with HostGator because the page was working all day
rediecting all html requests fine to the counter.py script.
Only when i tried to post data to the text area boxes this problem made its
appearance.
--
http://mail.python.org/mailman/listinfo/python-list
Thank i will do that, ill inform the support right away!
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, Sep 16, 2012 at 12:51 AM, Νικόλαος Κούρας wrote:
> in my case an .htaccess file gives redirects all html requests to
> /cgi-bin/counter.py by also provide as an argument to the counter.py script
> the initical html file request
>
> RewriteEngine On
> RewriteCond %{REQUEST_FILENAME} -f
>
in my case an .htaccess file gives redirects all html requests to
/cgi-bin/counter.py by also provide as an argument to the counter.py script the
initical html file request
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^/?(.+\.html) /cgi-bin/counter.py?page=$1 [L,PT,QSA]
so th
On Sun, Sep 16, 2012 at 12:44 AM, Νικόλαος Κούρας wrote:
> Τη Σάββατο, 15 Σεπτεμβρίου 2012 5:21:22 μ.μ. UTC+3, ο χρήστης Roy Smith
> έγραψε:
>> Do you realize that the hosting service you're using (HostGator) is so
>> mis-configured that it is exposing your source code and credentials to
>> the e
Τη Σάββατο, 15 Σεπτεμβρίου 2012 5:21:22 μ.μ. UTC+3, ο χρήστης Roy Smith έγραψε:
> In article ,
>
>
>
> > i see you try to extract only the 1st element of the list, i tried that too
>
> > but it gives me now this weird message:
>
> >
>
> > if you visit my website http://superhost.gr
>
>
>
Νικόλαος Κούρας wrote:
> Τη Σάββατο, 15 Σεπτεμβρίου 2012 4:38:51 μ.μ. UTC+3, ο χρήστης Chris
> Angelico έγραψε:
>> On Sat, Sep 15, 2012 at 11:28 PM, Νικόλαος Κούρας
>> wrote:
>>
>> > Iam not using frameworks just plain python code written in Notepad++
>>
>> >
>>
>> > Can you please tell me how
In article ,
> i see you try to extract only the 1st element of the list, i tried that too
> but it gives me now this weird message:
>
> if you visit my website http://superhost.gr
Do you realize that the hosting service you're using (HostGator) is so
mis-configured that it is exposing your so
David Hutto於 2012年9月15日星期六UTC+8下午6時04分28秒寫道:
> On Sat, Sep 15, 2012 at 5:45 AM, 8 Dihedral
>
> wrote:
>
> > Steven D'Aprano於 2012年9月15日星期六UTC+8上午7時39分28秒寫道:
>
> >> On Fri, 14 Sep 2012 15:16:47 -0600, Ian Kelly wrote:
>
> >>
>
> >>
>
> >>
>
> >> > If only there were a conceptually simple
Τη Σάββατο, 15 Σεπτεμβρίου 2012 4:38:51 μ.μ. UTC+3, ο χρήστης Chris Angelico
έγραψε:
> On Sat, Sep 15, 2012 at 11:28 PM, Νικόλαος Κούρας
> wrote:
>
> > Iam not using frameworks just plain python code written in Notepad++
>
> >
>
> > Can you please tell me how to switch this line in order for
On Sat, Sep 15, 2012 at 11:28 PM, Νικόλαος Κούρας wrote:
> Iam not using frameworks just plain python code written in Notepad++
>
> Can you please tell me how to switch this line in order for this line to work?
f = open( '../' + page[0])
will possibly work. But do try to understand what's happen
f = open( '../' + page.pop() )
15.09.2012 17:32 пользователь "Νικόλαος Κούρας"
написал:
> Τη Σάββατο, 15 Σεπτεμβρίου 2012 3:34:34 μ.μ. UTC+3, ο χρήστης Chris
> Angelico έγραψε:
> > On Sat, Sep 15, 2012 at 10:22 PM, Νικόλαος Κούρας
> wrote:
> >
> > > Hello,
> >
> > >
> >
> > > I recently changed
Τη Σάββατο, 15 Σεπτεμβρίου 2012 3:34:34 μ.μ. UTC+3, ο χρήστης Chris Angelico
έγραψε:
> On Sat, Sep 15, 2012 at 10:22 PM, Νικόλαος Κούρας
> wrote:
>
> > Hello,
>
> >
>
> > I recently changed webhost and in the new one iam getting this error you
> > can see if you visit http://superhost.gr whe
That's a habit I'll make sure to avoid, then.
Thanks, Chris!
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, Sep 15, 2012 at 10:22 PM, Νικόλαος Κούρας wrote:
> Hello,
>
> I recently changed webhost and in the new one iam getting this error you can
> see if you visit http://superhost.gr when program execution reaches the line:
>
>f = open( '../' + page )
>
> In the previous host i wasn't gett
Sorry the problem appears when you try to input data botton down the page in
the text area boxes and click submit.
this is the error apperaing:
A problem occurred in a Python script. Here is the sequence of function calls
leading up to the error, in the order they occurred.
/home/nikos/public
Hello,
I recently changed webhost and in the new one iam getting this error you can
see if you visit http://superhost.gr when program execution reaches the line:
f = open( '../' + page )
In the previous host i wasn't getting this error.
page's contents is:
page = form.getvalue('page')
--
On 15/09/12 10:00:16, Nobody wrote:
> On Sat, 15 Sep 2012 04:36:00 +, jyoung79 wrote:
>
>> I am working in both OS X Snow Leopard and Lion (10.6.8 and 10.7.4).
>> I'm simply wanting to move folders (with their content) from various
>> servers to the hard drive and then back to different dir
On Sat, Sep 15, 2012 at 5:45 AM, 8 Dihedral
wrote:
> Steven D'Aprano於 2012年9月15日星期六UTC+8上午7時39分28秒寫道:
>> On Fri, 14 Sep 2012 15:16:47 -0600, Ian Kelly wrote:
>>
>>
>>
>> > If only there were a conceptually simpler way to do this. Actually,
>>
>> > there is. I give you: muman than humanetadec
Steven D'Aprano於 2012年9月15日星期六UTC+8上午7時39分28秒寫道:
> On Fri, 14 Sep 2012 15:16:47 -0600, Ian Kelly wrote:
>
>
>
> > If only there were a conceptually simpler way to do this. Actually,
>
> > there is. I give you: metadecorators!
>
> [code snipped but shown below]
>
> > Which I think is certain
On 14Sep2012 10:53, Chicken McNuggets wrote:
| On 14/09/2012 03:31, Cameron Simpson wrote:
| > On 13Sep2012 19:34, Chicken McNuggets wrote:
| > | I'm writing a simple library that communicates with a web service and am
| > | wondering if there are any generally well regarded methods for batching
Le vendredi 14 septembre 2012 22:45:05 UTC+2, Terry Reedy a écrit :
> On 9/14/2012 12:15 PM, wxjmfa...@gmail.com wrote:
>
>
>
> > PS Avoid Py3.3 :-)
>
>
>
> pps Start using 3.3 as soon as possible. It has Python's first fully
>
> portable non-buggy Unicode implementation. The second releas
On Sat, 15 Sep 2012 04:36:00 +, jyoung79 wrote:
> I am working in both OS X Snow Leopard and Lion (10.6.8 and 10.7.4).
> I'm simply wanting to move folders (with their content) from various
> servers to the hard drive and then back to different directories on the
> servers.
>
> I want to
[Sorry, my Firefox destroyed the indent...
Am 14.09.2012 22:29 schrieb Terry Reedy:
In other words
def make_wrapper(func, param):
def wrapper(*args, **kwds):
for i in range(param):
func(*args, **kwds)
return wrapper
def f(x): print(x)
f = make_wrapper(f, 2)
f('simple')
# is simpler, at least
Dwight Hutto wrote at 2012-9-14 23:42 -0400:
> ...
>Reduce redundancy, is argumentative.
>
>To me, a decorator, is no more than a logging function. Correct me if
>I'm wrong.
Well, it depends on how you are using decorators and how complex
your decorators are. If what you are using as decorating fu
60 matches
Mail list logo