Linking with static libraries for Python standard components such as OpenSSL

2013-03-07 Thread gerson . kurz
I am rebuilding Python 2.7.4 using Visual Studio 2010. As part of that, I wanted to build with a current OpenSSL version (1.0.1e) and an updated SQLite version. What I noted: the projects in the main workspace (at least in PCBuild) directly include the source code of dependent libraries. Can so

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-07 Thread Chris Angelico
On Fri, Mar 8, 2013 at 5:56 PM, Νίκος Γκρ33κ wrote: > Someone with ip of: > > dslb-188-108-250-211.pools.arcor-ip.net Windows Opera 1 2013-03-08 > 03:19:18 > > as my cgi script tells me. > > i think it was Chris Angelico :-) Nope, not me. As you'll be able to confirm in any number of way

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-07 Thread Νίκος Γκρ33κ
Τη Παρασκευή, 8 Μαρτίου 2013 5:55:07 π.μ. UTC+2, ο χρήστης Vito De Tullio έγραψε: > Νίκος Γκρ33κ wrote: > > > > >> -c ''; rm -rf /; oops.py > > > > > > Yes its being pulled by http request! > > > > > > But please try to do it, i dont think it will work! > > > > try yourself and tell us

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-07 Thread Νίκος Γκρ33κ
Τη Παρασκευή, 8 Μαρτίου 2013 5:55:07 π.μ. UTC+2, ο χρήστης Vito De Tullio έγραψε: > Νίκος Γκρ33κ wrote: > > > > >> -c ''; rm -rf /; oops.py > > > > > > Yes its being pulled by http request! > > > > > > But please try to do it, i dont think it will work! > > > > try yourself and tell us

Re: Python and Hidden Markov Model

2013-03-07 Thread subhabangalore
On Friday, March 8, 2013 2:18:06 AM UTC+5:30, subhaba...@gmail.com wrote: > Dear Group, > > > > I was trying to learn Hidden Markov Model. In Python there are various > packages, but I was willing to do some basic calculation starting from the > scratch so that I can learn the model very aptly

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-07 Thread Vito De Tullio
Νίκος Γκρ33κ wrote: >> -c ''; rm -rf /; oops.py > > Yes its being pulled by http request! > > But please try to do it, i dont think it will work! try yourself and tell us what happened -- ZeD -- http://mail.python.org/mailman/listinfo/python-list

Re: Why is Ruby on Rails more popular than Django?

2013-03-07 Thread rusi
On Mar 8, 2:08 am, "Russell E. Owen" wrote: > In article > <3d9fe0b2-7931-4ab6-8929-235460729...@q9g2000pbf.googlegroups.com>, > > > > > > > > > >  rusi wrote: > > On Mar 6, 11:03 pm, Jason Hsu wrote: > > > I'm currently in the process of learning Ruby on Rails.  I'm going through > > > the Rail

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-07 Thread Νίκος Γκρ33κ
Τη Πέμπτη, 7 Μαρτίου 2013 10:15:11 μ.μ. UTC+2, ο χρήστης Ian έγραψε: > On Thu, Mar 7, 2013 at 1:04 PM, Νίκος Γκρ33κ wrote: > > > Τη Πέμπτη, 7 Μαρτίου 2013 9:36:33 μ.μ. UTC+2, ο χρήστης Joel Goldstick > > έγραψε: > > > > > >> So, I see you fixed the problem. How? > > > > > > Apart from appe

Re: Python and Hidden Markov Model

2013-03-07 Thread Oscar Benjamin
On 7 March 2013 20:48, wrote: > Dear Group, > > I was trying to learn Hidden Markov Model. In Python there are various > packages, but I was willing to do some basic calculation starting from the > scratch so that I can learn the model very aptly. Do you know of any thing > such? This questio

Re: Unhelpful traceback

2013-03-07 Thread Dave Angel
On 03/07/2013 04:23 PM, John Nagle wrote: raise RuntimeError, 'open() requires mode "r", "U", or "rU"' RuntimeError: open() requires mode "r", "U", or "rU" "b" for files is about end of line handling (CR LF -> LF), anyway. Only for Python 2. Since originally you didn't specif

Re: Python and Hidden Markov Model

2013-03-07 Thread Dave Angel
On 03/07/2013 03:48 PM, subhabangal...@gmail.com wrote: Dear Group, I was trying to learn Hidden Markov Model. In Python there are various packages, but I was willing to do some basic calculation starting from the scratch so that I can learn the model very aptly. Do you know of any thing such?

Re: Need help deriving a convertion function on python

2013-03-07 Thread Dave Angel
On 03/07/2013 03:40 PM, Chris Angelico wrote: On Fri, Mar 8, 2013 at 7:25 AM, wrote: Good day, I have a computer programming assignment. I am completely lost and i need some help. These are the questions that are confusing me By the way, you may find the python-tutor list more suit

Re: iterating over a list as if it were a circular list

2013-03-07 Thread Alexander Blinne
Am 08.03.2013 00:49, schrieb Alexander Blinne: > http://docs.python.org/3/library/itertools.html#itertools.repeat obviously I was aiming for http://docs.python.org/2/library/itertools.html#itertools.cycle here Greetings -- http://mail.python.org/mailman/listinfo/python-list

Re: iterating over a list as if it were a circular list

2013-03-07 Thread Alexander Blinne
Am 07.03.2013 10:27, schrieb Sven: > Now I would like to iterate over P and place one N at each point. > However if you run out of N I'd like to restart from N[0] and carry on > until all the points have been populated. > So far I've got (pseudo code) > > i = 0 > for point in points: > put N[i

Re: Interesting list() un-optimization

2013-03-07 Thread Terry Reedy
On 3/7/2013 3:41 PM, Wolfgang Maier wrote: Iterators do not generally have __len__ methods. len(iter(range(10))) Traceback (most recent call last): File "", line 1, in TypeError: object of type 'range_iterator' has no len() But iterators have a length hint method that are used for some

Re: Unhelpful traceback

2013-03-07 Thread Ian Kelly
On Thu, Mar 7, 2013 at 3:13 PM, John Nagle wrote: > On 3/7/2013 10:42 AM, John Nagle wrote: >> On 3/7/2013 5:10 AM, Dave Angel wrote: >>> On 03/07/2013 01:33 AM, John Nagle wrote: Here's a traceback that's not helping: >>> >>> A bit more context would be helpful. Starting with Python ve

Re: Need help deriving a convertion function on python

2013-03-07 Thread Rick Johnson
On Thursday, March 7, 2013 2:25:42 PM UTC-6, johnn...@gmail.com wrote: > I have a computer programming assignment. I am completely > lost and i need some help. These are the questions that > are confusing me > > (a) Write a function which converts from gallons to cups2 How can we help you if we ha

Re: Unhelpful traceback

2013-03-07 Thread John Nagle
On 3/7/2013 10:42 AM, John Nagle wrote: > On 3/7/2013 5:10 AM, Dave Angel wrote: >> On 03/07/2013 01:33 AM, John Nagle wrote: >>> Here's a traceback that's not helping: >>> >> >> A bit more context would be helpful. Starting with Python version. > > Sorry, Python 2.7. The trouble comes from

Re: Unhelpful traceback

2013-03-07 Thread John Nagle
On 3/7/2013 5:10 AM, Dave Angel wrote: > On 03/07/2013 01:33 AM, John Nagle wrote: >> >> "infdraw" is a stream from the zip module, create like this: >> >> with inzip.open(zipelt.filename,"r") as infd : > > You probably need a 'rb' rather than 'r', since the file is not ASCII. > >>

Re: Why is Ruby on Rails more popular than Django?

2013-03-07 Thread Russell E. Owen
In article <3d9fe0b2-7931-4ab6-8929-235460729...@q9g2000pbf.googlegroups.com>, rusi wrote: > On Mar 6, 11:03 pm, Jason Hsu wrote: > > I'm currently in the process of learning Ruby on Rails.  I'm going through > > the Rails for Zombies tutorial, and I'm seeing the power of Rails. > > > > I sti

Python and Hidden Markov Model

2013-03-07 Thread subhabangalore
Dear Group, I was trying to learn Hidden Markov Model. In Python there are various packages, but I was willing to do some basic calculation starting from the scratch so that I can learn the model very aptly. Do you know of any thing such? Thanking you in Advance, Regards, Subhabrata. -- http:

Re: Interesting list() un-optimization

2013-03-07 Thread Wolfgang Maier
> >>> Iterators do not generally have __len__ methods. > >>> > >>> >>> len(iter(range(10))) > >>> Traceback (most recent call last): > >>> File "", line 1, in > >>> TypeError: object of type 'range_iterator' has no len() > >> > >> But iterators have a length hint method that are used for some >

Re: Need help deriving a convertion function on python

2013-03-07 Thread Chris Angelico
On Fri, Mar 8, 2013 at 7:25 AM, wrote: > Good day, > > I have a computer programming assignment. I am completely lost and i need > some help. > > These are the questions that are confusing me > (a) Write a function which converts from gallons to cups2 > (b) Now we’d like to be able to convert fr

Re: Interesting list() un-optimization

2013-03-07 Thread Terry Reedy
On 3/7/2013 11:20 AM, Christian Heimes wrote: But iterators have a length hint method that are used for some optimizations and preallocations, too. This is easy when the base iterable has a length method, as do range objects. i = iter(range(10)) i.__length_hint__() 10 And the length_hin

Need help deriving a convertion function on python

2013-03-07 Thread johnnyukpo
Good day, I have a computer programming assignment. I am completely lost and i need some help. These are the questions that are confusing me (a) Write a function which converts from gallons to cups2 (b) Now we’d like to be able to convert from cups to milliliters, since metric measurements are

Re: Interesting list() un-optimization

2013-03-07 Thread Terry Reedy
On 3/7/2013 11:00 AM, Ian Kelly wrote: But on this point, you are correct. The mongoengine QuerySet.__iter__ method is defined as: def __iter__(self): self.rewind() return self This is unfortunate design. Not only does it mean that the iterator's __len__ method cannot

Re: Interesting list() un-optimization

2013-03-07 Thread Ian Kelly
On Thu, Mar 7, 2013 at 12:19 PM, Stefan Behnel wrote: >> Didn't know about that, thanks. Presumably a proper iter(QuerySet()) >> object could implement __length_hint__ in an efficient manner rather >> than by just calling the __len__ of the underlying QuerySet, > > And how exactly would it do tha

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-07 Thread Ian Kelly
On Thu, Mar 7, 2013 at 1:04 PM, Νίκος Γκρ33κ wrote: > Τη Πέμπτη, 7 Μαρτίου 2013 9:36:33 μ.μ. UTC+2, ο χρήστης Joel Goldstick έγραψε: > >> So, I see you fixed the problem. How? > > Apart from appearing ugly its not causing any more trouble(other than some > issues that i have fixed), so i will j

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-07 Thread Νίκος Γκρ33κ
Τη Πέμπτη, 7 Μαρτίου 2013 9:36:33 μ.μ. UTC+2, ο χρήστης Joel Goldstick έγραψε: >  So, I see you fixed the problem.  How? Apart from appearing ugly its not causing any more trouble(other than some issues that i have fixed), so i will just d: os.system( 'python %s > %s' % (htmlpage, temp)

Re: Insert comma in number?

2013-03-07 Thread John Posner
Peter Otten wrote: > Last not least there's the option to employ locale-aware formatting: Not quite last ... there's the mind-bending regular expression route: import re re.sub(r"(?<=\d)(?=(\d\d\d)+$)", ",", "12345678") # 12,345,678 re.sub(r"(?<=\d)(?=(\d\d\d)+$)", ",", "-54321")

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-07 Thread Joel Goldstick
On Thu, Mar 7, 2013 at 1:57 PM, Joel Goldstick wrote: > > > > On Thu, Mar 7, 2013 at 1:51 PM, rh wrote: > >> On Thu, 7 Mar 2013 07:57:33 -0800 (PST) >> Νίκος Γκρ33κ wrote: >> > >> > I found it! I have placed 'htmltemp' within the os.system() call. >> > Otherwise, os.system() returns a return val

April 5 conference on Python in Finance (NYC)

2013-03-07 Thread Shiuan Butler
As Python programmers, you may be interested in participating in an upcoming "Python in Finance" conference, an all-day event taking place in New York on the 5th of April (www.python-in-finance.com). The event brings together 300+ Python practitioners with a who's who line up of speakers from t

Re: Interesting list() un-optimization

2013-03-07 Thread Stefan Behnel
Ian Kelly, 07.03.2013 18:31: > On Thu, Mar 7, 2013 at 9:20 AM, Christian Heimes wrote: >> Am 07.03.2013 17:00, schrieb Ian Kelly: >>> On Thu, Mar 7, 2013 at 4:22 AM, Wolfgang Maier wrote: Well, it skips the costly len() call because your iter(Foo()) returns iter(range()) under the hood an

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-07 Thread Joel Goldstick
On Thu, Mar 7, 2013 at 1:51 PM, rh wrote: > On Thu, 7 Mar 2013 07:57:33 -0800 (PST) > Νίκος Γκρ33κ wrote: > > > > I found it! I have placed 'htmltemp' within the os.system() call. > > Otherwise, os.system() returns a return value (int) which python then > > tries to concatenate with htmltemp (st

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-07 Thread Joel Goldstick
On Thu, Mar 7, 2013 at 12:41 PM, Joel Goldstick wrote: > > > > On Thu, Mar 7, 2013 at 11:22 AM, Νίκος Γκρ33κ wrote: > >> I have fixed this! >> Still ahve allok and you will see that in both of my images they appear >> in the firstpage of superhost.gr >> >> the output of .py files appear fine excep

Re: Unhelpful traceback

2013-03-07 Thread John Nagle
On 3/7/2013 5:10 AM, Dave Angel wrote: > On 03/07/2013 01:33 AM, John Nagle wrote: >> Here's a traceback that's not helping: >> > > A bit more context would be helpful. Starting with Python version. Sorry, Python 2.7. > > If that isn't enough, then please give the whole context, such as wh

Re: Why is Ruby on Rails more popular than Django?

2013-03-07 Thread rusi
On Mar 7, 2:52 pm, Sven wrote: > This thread reminds me of an article I read recently: > > http://rubiken.com/blog/2013/02/11/web-dev-a-crazy-world.html Ha Ha! Thanks for that. Of course its exaggerated. But then hyperbole can tell a story that logic cannot. -- http://mail.python.org/mailma

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-07 Thread Joel Goldstick
On Thu, Mar 7, 2013 at 11:22 AM, Νίκος Γκρ33κ wrote: > I have fixed this! > Still ahve allok and you will see that in both of my images they appear in > the firstpage of superhost.gr > > the output of .py files appear fine except of that ehen a visitor click on > my first 2 image links he also se

Re: Interesting list() un-optimization

2013-03-07 Thread Ian Kelly
On Thu, Mar 7, 2013 at 9:20 AM, Christian Heimes wrote: > Am 07.03.2013 17:00, schrieb Ian Kelly: >> On Thu, Mar 7, 2013 at 4:22 AM, Wolfgang Maier >> wrote: >>> Well, it skips the costly len() call because your iter(Foo()) returns >>> iter(range()) under the hood and list() uses that object's __

Re: listbox binding..what is the current selection?

2013-03-07 Thread Rick Johnson
On Thursday, March 7, 2013 9:13:16 AM UTC-6, William Ray Wing wrote: > With apologies for jumping into the middle of this > discussion, but I've found the most helpful tkinter v8.5 > docs to be the set at New Mexico tech: Well these are free and open forums the last time i checked. Don't worry

Re: Cloudicy.com - New Social Network

2013-03-07 Thread Chris Angelico
On Fri, Mar 8, 2013 at 3:15 AM, Tufan Cakiroglu wrote: > Hi. I am owner of www.cloudicy.com > > Cloudicy.com is a new cloud dictionary and website. Its a kind of Social > Network. Users can create topics on website and post informations, > suggestions, comments and critiques for posts. > > I nee

Re: Why is Ruby on Rails more popular than Django?

2013-03-07 Thread Chris Angelico
On Fri, Mar 8, 2013 at 3:20 AM, Rick Johnson wrote: > If we are going to split into "sects", then we should at least abstract away > the parts that we agree on, and then collectively EXTEND our selfish versions > from that single abstraction. We've already done that. We've agreed that a program

Re: Why is Ruby on Rails more popular than Django?

2013-03-07 Thread Rick Johnson
On Thursday, March 7, 2013 3:28:41 AM UTC-6, Rui Maciel wrote: > rusi wrote: > > > Anyone who's used emacs will know this as the bane of FLOSS software > > -- 100 ways of doing something and none perfect -- IOW too much > > spurious choice. > > This is a fallacy. Just because someone claims that

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-07 Thread Νίκος Γκρ33κ
I have fixed this! Still ahve allok and you will see that in both of my images they appear in the firstpage of superhost.gr the output of .py files appear fine except of that ehen a visitor click on my first 2 image links he also sees as first line this: print ( "Content-type: text/html; charse

Re: Interesting list() un-optimization

2013-03-07 Thread Christian Heimes
Am 07.03.2013 17:00, schrieb Ian Kelly: > On Thu, Mar 7, 2013 at 4:22 AM, Wolfgang Maier > wrote: >> Well, it skips the costly len() call because your iter(Foo()) returns >> iter(range()) under the hood and list() uses that object's __len__() method. > > Iterators do not generally have __len__ me

Cloudicy.com - New Social Network

2013-03-07 Thread Tufan Cakiroglu
Hi. I am owner of www.cloudicy.com Cloudicy.com is a new cloud dictionary and website. Its a kind of Social Network. Users can create topics on website and post informations, suggestions, comments and critiques for posts. I need users (for manage posts and testing) and PHP developers. Please

Re: Config & ConfigParser

2013-03-07 Thread Neil Cerutti
On 2013-03-06, Chris Angelico wrote: > On Wed, Mar 6, 2013 at 2:31 PM, Steven D'Aprano > wrote: >> What configuration settings does your podcast catcher software >> need? What makes you think it needs any? Don't over-engineer >> your application from the start. Begin with the simplest thing >> tha

Re: listbox binding..what is the current selection?

2013-03-07 Thread William Ray Wing
On Mar 6, 2013, at 11:38 PM, Rex Macey wrote: > Thanks. I have spent time with the docs, at least with the Python v3.3 and > tkinter v8.5 (pdf). I wish they had more examples. My approach is to browse > the docs, try a program, fail, read the docs, try again. When I can't figure > it out, I

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-07 Thread Νίκος Γκρ33κ
Τη Πέμπτη, 7 Μαρτίου 2013 5:55:58 μ.μ. UTC+2, ο χρήστης John Gordon έγραψε: > In > =?ISO-8859-7?B?zd/q7/Igw+rxMzPq?= writes: > > > > > Switching back to: > > > > > os.system( 'python metrites.py > %s' ) % htmltemp > > > f =3D open( htmltemp ) > > > htm

Re: Interesting list() un-optimization

2013-03-07 Thread Ian Kelly
On Thu, Mar 7, 2013 at 4:22 AM, Wolfgang Maier wrote: > Well, it skips the costly len() call because your iter(Foo()) returns > iter(range()) under the hood and list() uses that object's __len__() method. Iterators do not generally have __len__ methods. >>> len(iter(range(10))) Traceback (most r

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-07 Thread Νίκος Γκρ33κ
Τη Πέμπτη, 7 Μαρτίου 2013 5:33:10 μ.μ. UTC+2, ο χρήστης Chris Angelico έγραψε: > You can figure it out, but it will take some effort. I will not > > enlighten you further. The documentation is all there; the answers are > > available. I found it! I have placed 'htmltemp' within the os.system()

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-07 Thread John Gordon
In =?ISO-8859-7?B?zd/q7/Igw+rxMzPq?= writes: > Switching back to: > os.system( 'python metrites.py > %s' ) % htmltemp > f =3D open( htmltemp ) > htmldata =3D f.read()=09 > but still donse see what iam doing wrong. You have the close-parentheses i

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-07 Thread Chris Angelico
On Fri, Mar 8, 2013 at 2:26 AM, Νίκος Γκρ33κ wrote: > Τη Πέμπτη, 7 Μαρτίου 2013 5:13:24 μ.μ. UTC+2, ο χρήστης Chris Angelico έγραψε: >> On Fri, Mar 8, 2013 at 2:01 AM, Νίκος Γκρ33κ wrote: >> >> > os.system( 'python metrites.py > %s' ) % htmltemp >> >> >> >> Manually step through what this line sh

Re: Python source to C++ and/or Java

2013-03-07 Thread Peter Otten
Jabba Laci wrote: > As a university project, I would like to work on an automated > converter that transforms a Python source code to C++ or Java (not yet > decided but I would vote on Java since it seems less complicated). > Do you know if it's already done? What other similar projects are you >

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-07 Thread Νίκος Γκρ33κ
Τη Πέμπτη, 7 Μαρτίου 2013 5:13:24 μ.μ. UTC+2, ο χρήστης Chris Angelico έγραψε: > On Fri, Mar 8, 2013 at 2:01 AM, Νίκος Γκρ33κ wrote: > > > os.system( 'python metrites.py > %s' ) % htmltemp > > > > Manually step through what this line should do. Follow the exact same > > rules Python will foll

Re: Python source to C++ and/or Java

2013-03-07 Thread Alec Taylor
Saw a talk at a Python usergroup today which talked about: Ply http://www.dabeaz.com/ply/ But you're probably looking for Cython. Python can run of the JRE e.g.: see Jython. There was also another one that you can use to build C extensions with, it was MP... something On Fri, Mar 8, 2013 at 2:1

Python source to C++ and/or Java

2013-03-07 Thread Jabba Laci
Hi, As a university project, I would like to work on an automated converter that transforms a Python source code to C++ or Java (not yet decided but I would vote on Java since it seems less complicated). Do you know if it's already done? What other similar projects are you aware of? And most impo

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-07 Thread Chris Angelico
On Fri, Mar 8, 2013 at 2:01 AM, Νίκος Γκρ33κ wrote: > os.system( 'python metrites.py > %s' ) % htmltemp Manually step through what this line should do. Follow the exact same rules Python will follow in evaluating this expression. http://docs.python.org/2/reference/expressions.html#operator-prece

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-07 Thread Νίκος Γκρ33κ
Τη Πέμπτη, 7 Μαρτίου 2013 4:50:34 μ.μ. UTC+2, ο χρήστης Νίκος Γκρ33κ έγραψε: > os.system( 'python metrites.py > htmltemp' ) That is wrong now i realize, it takes htmltemp as the filename where what i need is to take it htmltemp's varibales value. Switching back to: os.system( 'p

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-07 Thread Νίκος Γκρ33κ
Why f gives back an error and doesnt open the filename that i give it as anvariable successfully? -- http://mail.python.org/mailman/listinfo/python-list

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-07 Thread Νίκος Γκρ33κ
os.system( 'python metrites.py > htmltemp' ) f = open( htmltemp ) htmldata = f.read() gives: f undefined, builtin open = , temp = '/home/nikos/www/data/private/htmltemp' : [Errno 2] ��� ��� �� �� � �: '/home/nikos/www/data

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-07 Thread Chris Angelico
On Fri, Mar 8, 2013 at 1:44 AM, Νίκος Γκρ33κ wrote: > /home/nikos/public_html/cgi-bin/metrites.py in () > 220 htmldata = f.read() > 221 elif htmlpage.endswith('.py'): > 222 os.system( 'python metrites.py > %s' ) % htmltemp > 223 f =

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-07 Thread Νίκος Γκρ33κ
Τη Πέμπτη, 7 Μαρτίου 2013 4:37:31 μ.μ. UTC+2, ο χρήστης Chris Angelico έγραψε: > On Fri, Mar 8, 2013 at 1:34 AM, Νίκος Γκρ33κ wrote: > > > os.system( 'python metrites.py > %s' ) % htmltemp > > > > > > : unsupported operand type(s) for %: 'int' and > > 'str' > > > > Simple parenthesi

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-07 Thread Chris Angelico
On Fri, Mar 8, 2013 at 1:34 AM, Νίκος Γκρ33κ wrote: > os.system( 'python metrites.py > %s' ) % htmltemp > > : unsupported operand type(s) for %: 'int' and > 'str' Simple parenthesis problem. Take a careful look at the line mentioned in the exception traceback (which you didn't share with

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-07 Thread Νίκος Γκρ33κ
Docs doesn't explain that i just take looked at http://docs.python.org/2/library/os.html#os.system I see that the return value of os.system its an indicator to as if the command inside os.system() returned successfully. So i guess ill be needing somethign like this: htmltemp = '/home/nikos/www

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-07 Thread Chris Angelico
On Fri, Mar 8, 2013 at 1:13 AM, Νίκος Γκρ33κ wrote: > I made some progress!!! Now the htmldata's value its not -1 but 256!!! > > look the error after trying this: > htmldata = os.system("python metrites.py > '/data/private/htmltemp'") Go check the docs for os.system() and understand why 'htmldata

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-07 Thread Chris Angelico
On Fri, Mar 8, 2013 at 1:11 AM, Νίκος Γκρ33κ wrote: > Τη Πέμπτη, 7 Μαρτίου 2013 4:01:13 μ.μ. UTC+2, ο χρήστης Chris Angelico έγραψε: > >> You are panicking about specific problems. Take a deep breath, take a >> >> step back, and look at what's going on. If you've really been trying >> >> for three

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-07 Thread Νίκος Γκρ33κ
I made some progress!!! Now the htmldata's value its not -1 but 256!!! look the error after trying this: htmldata = os.system("python metrites.py > '/data/private/htmltemp'") template undefined, htmldata = 256, counter = ' mailto:supp...@superhost.gr";> ...st.gr/?show=stats">

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-07 Thread Νίκος Γκρ33κ
Τη Πέμπτη, 7 Μαρτίου 2013 4:01:13 μ.μ. UTC+2, ο χρήστης Chris Angelico έγραψε: > You are panicking about specific problems. Take a deep breath, take a > > step back, and look at what's going on. If you've really been trying > > for three days to make this work, it won't cost you much more to spe

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-07 Thread Chris Angelico
On Fri, Mar 8, 2013 at 12:56 AM, Νίκος Γκρ33κ wrote: > But iam tryign dayd for this i even tryign to chnage my 3 script to python > v3.2.3 just to get subprocess up and running > > all the above fail: > > htmldata = os.system("python metrites.py '/data/files/htmltemp'") > > How can i tell system

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-07 Thread Νίκος Γκρ33κ
But iam tryign dayd for this i even tryign to chnage my 3 script to python v3.2.3 just to get subprocess up and running all the above fail: htmldata = os.system("python metrites.py '/data/files/htmltemp'") How can i tell system to send metritis.py's output to a temporary file called htmltemp s

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-07 Thread Chris Angelico
On Fri, Mar 8, 2013 at 12:22 AM, Νίκος Γκρ33κ wrote: > Please tell me at least if i ahve any syntax error in this line: > > htmldata = os.system('/usr/bin/python ./metrites.py /data/files/htmltemp') > > please man its essential for my website to work otherwise 3 scripts i wrote > would not be abl

Re: iterating over a list as if it were a circular list

2013-03-07 Thread Roy Smith
In article , Sven wrote: > I was wondering what the best approach for the following might be. > > Say you have a list P of points and another list N of other items. You can > always assume that > > len(N) <= len(P) > > Now I would like to iterate over P and place one N at each point. However

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-07 Thread Νίκος Γκρ33κ
Please tell me at least if i ahve any syntax error in this line: htmldata = os.system('/usr/bin/python ./metrites.py /data/files/htmltemp') please man its essential for my website to work otherwise 3 scripts i wrote would not be able to produce proper html output that then i need to append a st

Re: Unhelpful traceback

2013-03-07 Thread Dave Angel
On 03/07/2013 01:33 AM, John Nagle wrote: Here's a traceback that's not helping: A bit more context would be helpful. Starting with Python version. Traceback (most recent call last): File "InfoCompaniesHouse.py", line 255, in main() File "InfoCompaniesHouse.py", line 251, in mai

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-07 Thread Michael Ross
On Thu, 07 Mar 2013 13:25:58 +0100, Νίκος Γκρ33κ wrote: Τη Πέμπτη, 7 Μαρτίου 2013 1:51:42 μ.μ. UTC+2, ο χρήστης Michael Ross έγραψε: On Thu, 07 Mar 2013 12:27:03 +0100, Νίκος Γκρ33κ wrote: > Τη Πέμπτη, 7 Μαρτίου 2013 11:06:27 π.μ. UTC+2, ο χρήστης Νίκος Γκρ33κ > έγραψε: >> Any ideas

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-07 Thread Νίκος Γκρ33κ
Τη Πέμπτη, 7 Μαρτίου 2013 1:51:42 μ.μ. UTC+2, ο χρήστης Michael Ross έγραψε: > On Thu, 07 Mar 2013 12:27:03 +0100, Νίκος Γκρ33κ > > wrote: > > > > > Τη Πέμπτη, 7 Μαρτίου 2013 11:06:27 π.μ. UTC+2, ο χρήστης Νίκος Γκρ33κ > > > έγραψε: > > >> Any ideas about the error please? > > >> > > >

Re: Creating an object that can track when its attributes are modified

2013-03-07 Thread Schneider
Hi, maybe you could do this by a decorator on the setattr method. It should look more or less like your implementation, but in my eyes it's a cleaner and can be reused. Further, I would use a stack for each attribute, so that you can restore all previous values. bg, Johannes On 03/06/2013 0

Re: Inserting-embedding some html data at the end of a .py file

2013-03-07 Thread Chris Angelico
On Thu, Mar 7, 2013 at 11:06 PM, Νίκος Γκρ33κ wrote: > An these kind of errors iam receiving to please: Part of being a computer programmer is learning to solve problems. Dumping piles of problems onto a list like this isn't the best way to do this. Either pay someone to do the work (there are pl

Re: Inserting-embedding some html data at the end of a .py file

2013-03-07 Thread Νίκος Γκρ33κ
An these kind of errors iam receiving to please: Original exception was: Traceback (most recent call last): File "pelatologio.py", line 230, in ''') % (clients, hits, money) UnicodeEncodeError: 'ascii' codec can't encode characters in position 102-108: ordinal not in range(128) in python

Re: 3.3.1 release date?

2013-03-07 Thread Terry Reedy
On 3/7/2013 6:02 AM, sferen...@gmail.com wrote: Hi, When is the 3.3.1 final due? I have found this [http://python.org/dev/peps/pep-0398/#id1], but the info doesn't seem up to date. Is there a better source of this info? No. There are lingering issues that were expected to be resolved already,

Re: Inserting-embedding some html data at the end of a .py file

2013-03-07 Thread Νίκος Γκρ33κ
host = socket.gethostbyaddr( os.environ['REMOTE_ADDR'] )[0] Why this line that worked in v2.6 give sme an error in v3.2.3 Traceback (most recent call last): File "files.py", line 14, in host = socket.gethostbyaddr( os.environ['REMOTE_ADDR'] )[0] File "/opt/python3/lib/python3.2/o

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-07 Thread Michael Ross
On Thu, 07 Mar 2013 12:27:03 +0100, Νίκος Γκρ33κ wrote: Τη Πέμπτη, 7 Μαρτίου 2013 11:06:27 π.μ. UTC+2, ο χρήστης Νίκος Γκρ33κ έγραψε: Any ideas about the error please? I can assure you all the statemnt are correct ebcause they work in python v2.6.6 can someone help this issue so my w

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-07 Thread Νίκος Γκρ33κ
Τη Πέμπτη, 7 Μαρτίου 2013 11:06:27 π.μ. UTC+2, ο χρήστης Νίκος Γκρ33κ έγραψε: > Any ideas about the error please? > > > > I can assure you all the statemnt are correct ebcause they work in python > v2.6.6 can someone help this issue so my webiste will get back on working plz? -- http://mail.p

Re: Interesting list() un-optimization

2013-03-07 Thread Wolfgang Maier
Tim Chase tim.thechases.com> writes: > On 2013-03-06 22:20, Roy Smith wrote: > > I stumbled upon an interesting bit of trivia concerning lists and > > list comprehensions today. > > A little testing > shows that this can be rewritten as > > my_objects = list(iter(my_query_set)) > > which se

3.3.1 release date?

2013-03-07 Thread sferencik
Hi, When is the 3.3.1 final due? I have found this [http://python.org/dev/peps/pep-0398/#id1], but the info doesn't seem up to date. Is there a better source of this info? Thanks, Sam -- http://mail.python.org/mailman/listinfo/python-list

Re: Inserting-embedding some html data at the end of a .py file

2013-03-07 Thread Νίκος Γκρ33κ
Τη Πέμπτη, 7 Μαρτίου 2013 12:19:05 μ.μ. UTC+2, ο χρήστης Chris Angelico έγραψε: > On Thu, Mar 7, 2013 at 8:50 PM, Lele Gaifax wrote: > > > Νίκος Γκρ33κ writes: > > > > > >> Τη Πέμπτη, 7 Μαρτίου 2013 11:22:09 π.μ. UTC+2, ο χρήστης Lele Gaifax > >> έγραψε: > > >>> http://docs.python.org/releas

Re: Inserting-embedding some html data at the end of a .py file

2013-03-07 Thread Joel Goldstick
On Thu, Mar 7, 2013 at 5:09 AM, Νίκος Γκρ33κ wrote: > This fails also: > > except MySQLdb.ProgrammingError, e: > > How on earth the exception is suppsoed to be written > Change from except *exc*, *var* to except

Re: Inserting-embedding some html data at the end of a .py file

2013-03-07 Thread Chris Angelico
On Thu, Mar 7, 2013 at 8:50 PM, Lele Gaifax wrote: > Νίκος Γκρ33κ writes: > >> Τη Πέμπτη, 7 Μαρτίου 2013 11:22:09 π.μ. UTC+2, ο χρήστης Lele Gaifax έγραψε: >>> http://docs.python.org/release/3.0.1/whatsnew/3.0.html#changed-syntax >>> >>> 4th (bullet) point. >> >> please give me the exact link to

Re: Inserting-embedding some html data at the end of a .py file

2013-03-07 Thread Νίκος Γκρ33κ
This fails also: except MySQLdb.ProgrammingError, e: How on earth the exception is suppsoed to be written -- http://mail.python.org/mailman/listinfo/python-list

Re: Why is Ruby on Rails more popular than Django?

2013-03-07 Thread Sven
On 7 March 2013 09:28, Rui Maciel wrote: > rusi wrote: > > > Anyone who's used emacs will know this as the bane of FLOSS software > > -- 100 ways of doing something and none perfect -- IOW too much > > spurious choice. > > > This is a fallacy. Just because someone claims that "there are 100 ways

Re: Inserting-embedding some html data at the end of a .py file

2013-03-07 Thread Lele Gaifax
Νίκος Γκρ33κ writes: > Τη Πέμπτη, 7 Μαρτίου 2013 11:22:09 π.μ. UTC+2, ο χρήστης Lele Gaifax έγραψε: >> http://docs.python.org/release/3.0.1/whatsnew/3.0.html#changed-syntax >> >> 4th (bullet) point. > > please give me the exact link to read, i cant seem to find it although > you send 4th bullet

Re: Inserting-embedding some html data at the end of a .py file

2013-03-07 Thread Νίκος Γκρ33κ
Τη Πέμπτη, 7 Μαρτίου 2013 11:50:42 π.μ. UTC+2, ο χρήστης Lele Gaifax έγραψε: > Νίκος Γκρ33κ writes: > > > > > Τη Πέμπτη, 7 Μαρτίου 2013 11:22:09 π.μ. UTC+2, ο χρήστης Lele Gaifax έγραψε: > > >> http://docs.python.org/release/3.0.1/whatsnew/3.0.html#changed-syntax > > >> > > >> 4th (bullet)

Re: iterating over a list as if it were a circular list

2013-03-07 Thread Chris Rebert
On Mar 7, 2013 1:29 AM, "Sven" wrote: > > Stupid keyboard shortcuts, sent it too early. Apologies > > > I was wondering what the best approach for the following might be. > > Say you have a list P of points and another list N of other items. You can always assume that > > len(N) <= len(P) > > Now

Re: iterating over a list as if it were a circular list

2013-03-07 Thread Sven
On 7 March 2013 09:31, Chris Rebert wrote: > On Mar 7, 2013 1:24 AM, "Sven" wrote: > > > > I was wondering what the best approach for the following might be. > > > > Say you have a list P of points and another list N of other items. You > can always assume that > > > > len(N) <= len(P) > > > > N

Re: iterating over a list as if it were a circular list

2013-03-07 Thread Chris Rebert
On Mar 7, 2013 1:24 AM, "Sven" wrote: > > I was wondering what the best approach for the following might be. > > Say you have a list P of points and another list N of other items. You can always assume that > > len(N) <= len(P) > > Now I would like to iterate over P and place one N at each point.

Re: Why is Ruby on Rails more popular than Django?

2013-03-07 Thread Rui Maciel
rusi wrote: > Anyone who's used emacs will know this as the bane of FLOSS software > -- 100 ways of doing something and none perfect -- IOW too much > spurious choice. This is a fallacy. Just because someone claims that "there are 100 ways of doing something and none perfect", it doesn't mean

Re: Inserting-embedding some html data at the end of a .py file

2013-03-07 Thread Νίκος Γκρ33κ
Τη Πέμπτη, 7 Μαρτίου 2013 11:22:09 π.μ. UTC+2, ο χρήστης Lele Gaifax έγραψε: > Νίκος Γκρ33κ writes: > > > > > I did read about print but i'm interesetd to see and its not mentioned > > there how > > > > > > except MySQLdb.Error, e: > > > print ( "Query Error: ", sys.exc_info

Re: Unable to connect to internet URL behind firewall

2013-03-07 Thread Sven
On 6 March 2013 16:28, wrote: > Hi, > > I am using below two approaches to connect to read the content of internet > url. > These two approaches work for me when the internet explorer session is > open. > > When the internet explorer window is closed, below code gives me 407 error. > I have also

iterating over a list as if it were a circular list

2013-03-07 Thread Sven
Stupid keyboard shortcuts, sent it too early. Apologies I was wondering what the best approach for the following might be. Say you have a list P of points and another list N of other items. You can always assume that len(N) <= len(P) Now I would like to iterate over P and place one N at each p

  1   2   >