On Dec 13, 6:32 pm, "Ian F. Hood" <[EMAIL PROTECTED]> wrote:
> Hi
> In typically windows environments I have used:
> if 'Windows' in os.environ['OS']...
> to prove it, but now I need to properly support different environments.
> To do so I must accurately determine what system the python inst
On Mar 12, 4:49 am, "Bert Heymans" <[EMAIL PROTECTED]> wrote:
> On Mar 12, 3:02 am, Alberto Vieira Ferreira Monteiro
>
> <[EMAIL PROTECTED]> wrote:
> > Hi, I am new to Python, how stupid can be the questions I ask?
>
> > For example, how can I add (mathematically) two tuples?
> > x = (1,2)
> > y =
On Mar 25, 6:36 pm, "ianaré" <[EMAIL PROTECTED]> wrote:
> yeah the subject doesn't really make sense does it?
>
> anyway want I want to do is this:
> if n == 1:
>
> self.operations.insert(pos, operations.Replace.Panel(self, main))
>
> elif n == 2:
>
> self.operations.insert(pos, operations.
On Apr 10, 10:23 am, "Lucas Malor" <[EMAIL PROTECTED]> wrote:
> Peter Otten wrote:
> > Lucas Malor wrote:
>
> >> The problem is options is an instance, so options."delete", for example,
> >> is wrong; I should pass options.delete . How can I do?
>
> > Use getattr():
>
> Thank you. Do you know also
On Sep 27, 1:34 pm, Peter Otten <[EMAIL PROTECTED]> wrote:
...
> >>> args
>
> ['-123']
>
> Without the "--" arg you will get an error:
>
> >>> parser.parse_args(["-123"])
>
> Usage: [options]
>
> : error: no such option: -1
> $
>
> Peter
Passing -a-123 works
>>> options, args = parser.parse_args(
Try:
l = [i+x for i in l]
OR
l = map(lambda i: i+x, l)
-N
Gert Cuykens wrote:
> is there a other way then this to loop trough a list and change the values
>
> i=-1
> for v in l:
> i=i+1
> l[i]=v+x
>
> something like
>
> for v in l:
>
My first thought:
Check if you have /usr/local/lib/svn-python/ in your PYTHONPATH
environment variable (echo $PYTHONPATH).
If its missing, set it in the environment.
export PYTHONPATH=$PYTHONPATH:/usr/local/lib/svn-python
-N
[EMAIL PROTECTED] wrote:
> Hi,
>
> i have a simple test which tries to
>
> if __name__ == '__main__':
> gert=Db('localhost','root','**','gert')
> gert.excecute('select * from person')
> for x in range(0,gert.rowcount):
> print gert.fetchone()
> gert.close()
>
> [EMAIL PROTECTED]:~$ python ./Desktop/svn/db/Py/db.py
> Traceback (most recent c
> Are there any sprintf in Python?
Refer module StringIO - just like file input/output operations.
cStringIO is another module (faster)
Quick intro:
from StringIO import StringIO
s = StringIO()
s.write('hello')
s.seek(0)
print s.read()
-N
--
http://mail.python.org/mailman/listinfo/python-lis
BJörn Lindqvist wrote:
> I want to use Python to connect to a SSH account over a HTTP proxy to
> automate some operations. I thought paramiko would be able to do that,
> but it can not (it seems).
>
> Is there some other Python module that can do what I want?
>
> --
> mvh Björn
Did you take a loo
> problem. I do not want to create my own SSH client and, AFAICT, there
> is no SSH client in Twisted. The library also seem to have some
> problems with handling HTTP proxies in a transparent
> way:http://twistedmatrix.com/trac/ticket/1774
>
> --
> mvh Björn
There is a ssh implementation in t
On Dec 11, 1:05 pm, dwhall <[EMAIL PROTECTED]> wrote:
> filters. Is there any way to write the filter to make this work?
>
> thanks,
>
> !!Dean
turn off python buffering & it should work.
export PYTHONUNBUFFERED=t
n'joy
-N
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 10, 4:46 pm, "Adrian Wood" <[EMAIL PROTECTED]> wrote:
> Hi al! I'm new to the list, and reasonably new to Python, so be gentle.
>
> Long story short, I'm having a hard time finding a way to call a
> function on every object of a class at once. Example:
>
> I have a class Person, which has a
On Jan 11, 1:50 pm, teddyber <[EMAIL PROTECTED]> wrote:
> Hello,
>
> first i'm a newbie to python (but i searched the Internet i swear).
> i'm looking for some way to split up a string into a list of pairs
> 'key=value'. This code should be able to handle this particular
> example string :
>
> qop=
On Jan 10, 5:32 pm, "Steven Clark" <[EMAIL PROTECTED]> wrote:
> > l = []
> > l.append(man)
> > l.append(woman)
>
> > # Print the state.
> > for item in l:
> > print item.state()
>
> Small, off-topic nitpick:
> please don't use "l" (lower-case el) as a variable name.
>
> >Fromhttp://www.python.or
On Feb 24, 10:39 am, Olaf Schwarz <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am trying to run this
> applicationhttp://svn.navi.cx/misc/trunk/python/bemused/
> on uNSLUng Linux 6.10 using the optware python packages.
>
> As I obtained segmentation faults using Python 2.4, I have upgraded to
> 2.5.2. N
On Mar 3, 3:40 pm, Mensanator <[EMAIL PROTECTED]> wrote:
> Notice anything funny about the "random" choices?
>
> import sympy
> import time
> import random
>
> f = [i for i in sympy.primerange(1000,1)]
>
> for i in xrange(10):
> f1 = random.choice(f)
> print f1,
> f2 = random.choice(f)
>
On Mar 4, 12:51 pm, jefm <[EMAIL PROTECTED]> wrote:
> How can I print the unicode box drawing characters in python:
>
> print u'\u2500'
> print u'\u2501'
> print u'\u2502'
> print u'\u2503'
> print u'\u2504'
>
> Traceback (most recent call last):
> File "\test.py", line 3, in ?
> print u'\u25
On Mar 4, 3:13 pm, Mensanator <[EMAIL PROTECTED]> wrote:
> On Mar 4, 12:32 pm, Nanjundi <[EMAIL PROTECTED]> wrote:
>
>
> > Does seeding ( random.seed ) random with time fix this? It should.
>
> I suppose that depends on how long it takes factorint() to
> pr
On Mar 5, 3:34 pm, Mensanator <[EMAIL PROTECTED]> wrote:
> On Mar 5, 9:29 am, Nanjundi <[EMAIL PROTECTED]> wrote:
>
> > On Mar 4, 3:13 pm, Mensanator <[EMAIL PROTECTED]> wrote:
>
> > > On Mar 4, 12:32 pm, Nanjundi <[EMAIL PROTECTED]> wrote:
>
&g
On Apr 2, 9:22 am, [EMAIL PROTECTED] wrote:
> On 2 Apr, 15:15, [EMAIL PROTECTED] wrote:
>
>
>
> > On 2 Apr, 15:12, [EMAIL PROTECTED] wrote:
>
> > > On Apr 2, 3:06 pm, [EMAIL PROTECTED] wrote:
>
> > > > Hi,
>
> > > > I found the following code on the net -
>
> > > > http://mail-archives.apache.org/m
On Oct 14, 1:05 pm, mattia wrote:
> Any particular difference in using for a simple collection of element ()
> over [] or vice-versa?
>
> Thanks, Mattia
From: http://www.faqs.org/docs/diveintopython/odbchelper_tuple.html
1 You can’t add elements to a tuple. Tuples have no append or extend
On Sep 2, 1:12 pm, Virgil Stokes wrote:
> Has anyone written code or worked with Python software for downloading
> financial time series data (e.g. from Yahoo financial)? If yes, would you
> please contact me.
>
> --Thanks,
> V. Stokes
matplotlib has a finance module you can refer to.
(matplot
23 matches
Mail list logo