Re: Can someone explain 2to3?

2012-01-14 Thread Noah Hall
On Sat, Jan 14, 2012 at 5:06 PM, Joshua Miller wrote: > Ok i'm trying to convert https://github.com/rdeaton/spyral to python3 > but i'm at a loss on how to actually use 2to3. Can someone explain > it's proper use to me so i can do the conversion? prefereably where i > can take "C:\Python32\Lib\sit

Re: Can someone explain 2to3?

2012-01-14 Thread Noah Hall
On Sat, Jan 14, 2012 at 7:08 PM, Joshua Miller wrote: > I've looked there and it didn't worki may've made all the nesscary > changes manually anyways though i'm not sure... What about it didn't work? Have a read of this too - http://wiki.python.org/moin/PortingPythonToPy3k and if you're still

Re: Installing Python on CentOS 6 - a big pain

2012-01-19 Thread Noah Hall
On Thu, Jan 19, 2012 at 10:47 AM, Steven D'Aprano wrote: > On Thu, 19 Jan 2012 20:43:23 +1100, Chris Angelico wrote: > >> On Thu, Jan 19, 2012 at 3:36 PM, Steven D'Aprano >> wrote: >>> With all the tools installed, it's a matter of a few minutes effort to >>> build from scratch: > > [...] >> Now,

Re: How do you implement this Python idiom in C++

2006-07-27 Thread Noah Roberts
[EMAIL PROTECTED] wrote: > I am no C++ expert but i guess there might be some in the Python and > C++ newsgroups. > Provide compilable code that exibits your problem. The technique is sound; you must be screwing up somehow. #include using namespace std; template class counted { static i

Re: How do you implement this Python idiom in C++

2006-07-27 Thread Noah Roberts
[EMAIL PROTECTED] wrote: > Rob Williscroft wrote: > > > If this is more than idle curiosity I strongly suggest you post > > a version of the python code you need to translate to C++. > > For the moment this is just healthy curiosity but i will still post the > code i would like to see translated:

Re: Unpacking sequences and keywords in one function call

2006-11-13 Thread Noah Rawlins
t;", line 1 > f(*[1,2], a=1) > ^ > SyntaxError: invalid syntax > > Thanks, > Rick > I don't know if it's because there's some potential ambiguity (that I'm not seeing), but yeah, you just can't do that. This should work though... >>> f(*[1, 2], **{'a':1}) noah -- http://mail.python.org/mailman/listinfo/python-list

image sequence to Quicktime movie

2006-06-07 Thread Noah Gift
on doing things in pure python for now as a learning excercise. Thanks, Noah Gift -- http://mail.python.org/mailman/listinfo/python-list

smtplib problem for newbie

2006-06-22 Thread Noah Gift
Hi, I am writing a few different scripts that need to send email confirmation and I wanted to use smtplib instead of cheating and using os.system('mail -s "foo") Some of the examples I have seen don't seem to work for me. (Note, I am new to Python and probably doing something stupid...thanks

Re: smtplib problem for newbie

2006-06-22 Thread Noah Gift
frameworks? I do plan on getting my head wrapped around writing python in the web application environment but am a bit confused still. Also, wondering how django compares to ruby on rails etc. Sorry, newbie bewilderment Noah On 6/22/06, Noah Gift <[EMAIL PROTECTED]> wrote: > Hi, > >

Re: re.match -- not greedy?

2006-11-19 Thread Noah Rawlins
E_Match object at 0xb7dd5820> >>> defPatt.match("#define foo_BarBaz").groups() ('foo_BarBaz',) In general '\w' is the same as [A-Za-z0-9_] There are other considerations too... I don't know if #define abc (x) But the main thing here is the use of

Re: Is time.time() < time.time() always true?

2006-11-21 Thread Noah Rawlins
Ben Finney wrote: > Really? Where does Python guarantee that the left side *must* be > evaluated before the right side of a comparison? (If the right side > were to be evaluated first, the left might end up with a greater > value.) > http://docs.python.org/ref/evalorder.html -- http://mail.pytho

Re: The Python Papers Edition One

2006-11-25 Thread Noah Slater
On Nov 22, 12:41 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Thanks for the comments. PDF is, to some extent, a requirement. To > preserve the entire journal as a single "entity" with a reasonably high > production quality, there seems to be no way around it. I could not > find a sufficie

Re: The Python Papers Edition One

2006-11-26 Thread Noah Slater
I do not think this thread is an embarrassment to the community. I think it speaks volumes about people's commitment to free software. While we can applaud such contributions it is no excuse to waiver on one's ethics and principles. Regardless of content, or even format, if the Python Papers are

Re: best way to align words?

2006-11-30 Thread Noah Rawlins
ll like to have') >>> [word for word in strList[0].split() if word in reduce(lambda x, y: x.intersection(y), [set(str.split()) for str in strList])] ['example', 'of', 'i', 'would', 'like', 'to', 'have'] but you still have issues with mutiple matches and how they are handled etc... noah -- http://mail.python.org/mailman/listinfo/python-list

Re: best way to align words?

2006-11-30 Thread Noah Rawlins
Noah Rawlins wrote: > > >>> strList = [] > >>> strList.append('this is an example of a thing i would like to have') > >>> strList.append('another example of something else i would like to > have') > >>> strList.appen

regular expression for nested parentheses

2007-12-09 Thread Noah Hoffman
I have been trying to write a regular expression that identifies a block of text enclosed by (potentially nested) parentheses. I've found solutions using other regular expression engines (for example, my text editor, BBEdit, which uses the PCRE library), but have not been able to replicate it using

Re: regular expression for nested parentheses

2007-12-09 Thread Noah Hoffman
On Dec 9, 1:41 pm, John Machin <[EMAIL PROTECTED]> wrote: > A pattern that can validly be described as a "regular expression" > cannot count and thus can't match balanced parentheses. Some "RE" > engines provide a method of tagging a sub-pattern so that a match must > include balanced () (or [] or

Re: Strict mode?

2007-12-18 Thread Noah Dain
of them are found and adjusted appropriately. . Homepage: http://bicyclerepair.sourceforge.net/ -- Noah Dain "The beatings will continue, until morale improves" - the Management -- http://mail.python.org/mailman/listinfo/python-list

Re: run shell commands

2008-01-10 Thread Noah Dain
ly by writing to a Popen pipe. A lot of people also use the pexpect python library to "drive" other programs, especially if you need python to act differently depending upon the output of the called programs. Either way, this list's archives do have some good examples as to the u

Re: Python programming

2010-12-22 Thread Noah Hall
The most Pythonic ways of checking if a value is within a list is to use the "in" keyword, for example, using your data - 5 in [2, 6, 5] Which will return True, as 5 is in the list. You can then use this in the following generic way - if variable in list: do_things Where variable is the varible y

Re: python only prints integers

2011-01-06 Thread Noah Hall
On Thu, Jan 6, 2011 at 10:49 PM, francesco wrote: > I'm pretty new in Python language. I have a problem with numbers: it > seems python doesn't know any more how to count! > I get only the down rounded integer > 20/8 = 2 > 8/3=2 > I probably changed some option to round the numbers, but I don't >

Re: python only prints integers

2011-01-06 Thread Noah Hall
On Fri, Jan 7, 2011 at 3:32 AM, Edward A. Falk wrote: > In article < > cd9d1c80-b1d2-4d20-9896-a6fd77bd7...@j25g2000yqa.googlegroups.com>, > Ian wrote: > > > >In Python 3, the '/' operator always performs true division. > > How can I get integer division? > > -- >-Ed Falk, f...@despams.

Re: newby qn about functions

2011-01-18 Thread Noah Hall
> """how can i use a return statement  to write a function that returns the > string "Testing Functions-lower case: "and the lowercase representation of > its string parameter""" If I uncomment the above, nothing outputs to > console:( def lower_case(s): return "Testing Functions-lower case: %

Re: WxPython versus Tkinter.

2011-01-23 Thread Noah Hall
On Sun, Jan 23, 2011 at 5:31 PM, rantingrick wrote: > So far only trolls (besides Terry, Octavian, D'Aprano) have replied. > In my time here within the Python community i have only met one person > who shares my in-depth knowledge of Tkinter. That person is Kevin > Waltzer. So outside of Python-de

Re: WxPython versus Tkinter.

2011-01-24 Thread Noah Hall
On Mon, Jan 24, 2011 at 5:57 PM, rantingrick wrote: > Why don't you just tell him to shut the hell up Mark? > accidentally quoting me too much. You guys are very disappointing to > this community. Everyone here needs a voice. We must never engage in > behaviors that would limit speech from our c

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-01 Thread Noah Hall
ll) > Bryan ? (annoying troll) > Corey Richarson > Nicholas Devenish > Alexander Kapps > rusi ? > Andre ? > Geremy Condra (troll-wagoneer) > Ethan Furman > Noah Hall > Adam Skutt > Arndt Rodger Schnieder > Mark Roseman (Tkinter's minion) These people, includi

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-02 Thread Noah Hall
On Wed, Feb 2, 2011 at 7:44 PM, rantingrick wrote: >> On Feb 1, 11:23 am, rantingrick wrote: >> > py> troll_group.append("Red John") > py> flamer_group.append(troll_group.pop("Corey Richardson")) Out of interest, what interpretor uses "py>"? I've never seen any. Just sayin'. -- http://mail.pyt

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-02 Thread Noah Hall
On Wed, Feb 2, 2011 at 9:25 PM, Emile van Sebille wrote: > ActivePython 2.6.1.1 (ActiveState Software Inc.) based on > Python 2.6.1 (r261:67515, Dec  5 2008, 13:58:38) [MSC v.1500 32 bit (Intel)] > on > win32 > Type "help", "copyright", "credits" or "license" for more information. import sys

Re: Newbie getting desperate with for

2011-02-18 Thread Noah Hall
On Fri, Feb 18, 2011 at 4:54 PM, Michael Torrie wrote: > On 02/17/2011 04:10 PM, Werner wrote: > Just for your information, your code is the equivalent of: > > while True: >    temp = range(2000) > > The for loop does absolutely nothing in your case.  After the range is > computed, the for loo

Re: Paramiko help - processing multiple commands

2009-06-24 Thread Noah Dain
    print stdout.read() >>>     client.close() >>> >>> #--Initialization- >>> if __name__ == "__main__": >>>     options() >>>     storagessh() >> >> Again, as you were asked on the original post -- full tracebacks and >> explain "what is not working". >> >> The use of global variables scares me -- why are those needed? >> -- >> http://mail.python.org/mailman/listinfo/python-list >> > -- > http://mail.python.org/mailman/listinfo/python-list > this works for me: def storagessh(): paramiko.util.log_to_file(plog) client = paramiko.SSHClient() client.load_system_host_keys() client.connect(hostname, sshport, suser) stdin, stdout, stderr = client.exec_command('ps') print stdout.read() stdin, stdout, stderr = client.exec_command('help') print stdout.read() client.close() 1) you reassign stdin, stdout, stderr so with your code you will never see the stdout of the first command ('show') 2) the 'show' command did not exist on my system, so no output. I substituted 'ps' and added the print statement also, using user 'root' for dev code is a Bad Thing. -- Noah Dain -- http://mail.python.org/mailman/listinfo/python-list

Re: Developing Commercial Applications in Python

2005-01-03 Thread Richards Noah (IFR LIT MET)
> <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Hello All, > > I am trying to convince my client to use Python in his new product. He > > is worried about the license issues. Can somebody there to point me any > > good commercial applications developed using python ?. The licenc

Re: Developing Commercial Applications in Python

2005-01-03 Thread Richards Noah (IFR LIT MET)
"It's me" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > "Richards Noah (IFR LIT MET)" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > > > Begging your pardon, but a better resource would be the brochure

Re: Bad Interpreter

2005-01-03 Thread Richards Noah (IFR LIT MET)
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I have seen some previous messages about such a problem. I have this > problem but it is not clear what the solution really was. > > I am running FC2, python 2.3.3 > > the script i have sock.py runs if i say something like : > > python s

Re: python to mssql

2005-01-14 Thread Richards Noah (IFR LIT MET)
mx-Extensions.html Don't be lazy, Brane. Your first point of reference should _always_ be google. The fact that "I'm Feeling Lucky" points you to pymssql shows that you didn't do any research before posting here. -Noah -- http://mail.python.org/mailman/listinfo/python-list

Re: BASIC vs Python

2004-12-17 Thread Richards Noah (IFR LIT MET)
"Christos TZOTZIOY Georgiou" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Fri, 17 Dec 2004 01:43:56 -0600, rumours say that Mike Meyer > <[EMAIL PROTECTED]> might have written: > > >Assembler was better - at least you had recursion with > >assembler. > > You had recursion with

<    1   2