Re: Will IronPython / WPF work on Mac OS X?

2014-08-04 Thread Benjamin Kaplan
On Aug 4, 2014 6:23 AM, danwgr...@gmail.com wrote: Hello, I am thinking of using IronPython to build an Python application. Using WPF in Visual Studio to draw the GUI and create the XAML. Can I then run this Python application on a Mac OS X (10.8)? Thanks. -- Nope. IronPython on Mac runs on

Re: What is the difference between 32 and 64 bit Python on Windows 7 64 bit?

2014-05-11 Thread Benjamin Kaplan
On Sat, May 10, 2014 at 11:56 PM, Ross Gayler r.gay...@gmail.com wrote: Hi, I want to install Python on a PC with 16GB of RAM and the 64 bit version of Windows 7. I want Python to be able to use as much as possible of the RAM. When I install the 64 bit version of Python I find that

Re: Functions help

2014-02-23 Thread Benjamin Kaplan
On Sun, Feb 23, 2014 at 5:39 PM, alex23 wuwe...@gmail.com wrote: On 24/02/2014 11:09 AM, Mark Lawrence wrote: On 24/02/2014 00:55, alex23 wrote: for _ in range(5): func() the obvious indentation error above Stupid cutpaste :( -- Your message came through fine for me

Re: python import error

2013-12-10 Thread Benjamin Kaplan
On Tue, Dec 10, 2013 at 9:45 PM, smilesonisa...@gmail.com wrote: On Wednesday, December 11, 2013 10:23:34 AM UTC+5:30, John Gordon wrote: In 93405ea9-6faf-4a09-9fd9-ed264e313...@googlegroups.com smilesonisa...@gmail.com writes: File aaa.py, line 5, in module from ccc.ddd import

Re: python programming help

2013-12-08 Thread Benjamin Kaplan
On Sun, Dec 8, 2013 at 10:32 AM, rafaella...@gmail.com wrote: On Sunday, December 8, 2013 6:27:34 PM UTC, bob gailer wrote: On 12/8/2013 12:59 PM, rafaella...@gmail.com wrote: i have a dictionary with names and ages for each name. I want to write a function that takes in an age and

Re: Trying tcompile an use the Python 3.4a

2013-11-14 Thread Benjamin Kaplan
On Nov 14, 2013 5:55 AM, Nick the Gr33k ni...@superhost.gr wrote: Will someone please tell me how to install 'pip' My website is not working because modules are missing and the only way i can install them is by installing python's module manager 'pip' but 'yum install python-pip' fails.

Re: Python Front-end to GCC

2013-10-22 Thread Benjamin Kaplan
On Tue, Oct 22, 2013 at 8:04 AM, Mark Janssen dreamingforw...@gmail.com wrote: I love it. Watch this... [context] A language specification in BNF is just syntax. It doesn't say anything about semantics. So how could this be used to produce executable C code for a program? BNF is used to

Re: Python GUI?

2013-09-17 Thread Benjamin Kaplan
On Tue, Sep 17, 2013 at 7:55 AM, rusi rustompm...@gmail.com wrote: On Thursday, September 12, 2013 10:21:49 PM UTC+5:30, Benjamin Kaplan wrote: The main difference between wx and qt is that qt looks native on every platform while wx *is* native on every platform (it uses native controls

Re: Python GUI?

2013-09-17 Thread Benjamin Kaplan
On Tue, Sep 17, 2013 at 9:51 AM, rusi rustompm...@gmail.com wrote: On Tuesday, September 17, 2013 9:49:28 PM UTC+5:30, Benjamin Kaplan wrote: On Tue, Sep 17, 2013 at 7:55 AM, rusi wrote: On Thursday, September 12, 2013 10:21:49 PM UTC+5:30, Benjamin Kaplan wrote: The main difference

Re: Python GUI?

2013-09-12 Thread Benjamin Kaplan
On Sep 12, 2013 9:06 AM, eamonn...@gmail.com wrote: On Thursday, September 12, 2013 6:05:14 AM UTC+1, Michael Torrie wrote: On 09/11/2013 02:55 PM, eamonn...@gmail.com wrote: PyQT -- You have a GUI designer, so I'm not going to count that What do you mean? Gtk has a GUI designer too.

Re: Language design

2013-09-11 Thread Benjamin Kaplan
On Wed, Sep 11, 2013 at 5:37 PM, Mark Janssen dreamingforw...@gmail.com wrote: Unicode is not 16-bit any more than ASCII is 8-bit. And you used the word encod[e], which is the standard way to turn Unicode into bytes anyway. No, a Unicode string is a series of codepoints - it's most similar to

Re: How to exit a cgi file after a download

2013-09-04 Thread Benjamin Kaplan
On Sep 4, 2013 1:29 PM, Ferrous Cranus ni...@superhost.gr wrote: Python help. I use the following code in a cgi file to give the client a download link to download a file. --- print %s % ('a href = Setup.zip Down Load /a') A click on Down Load opens a pop up browser window

Re: NameError: global name '' is not defined , but a bit differences

2013-09-04 Thread Benjamin Kaplan
On Wed, Sep 4, 2013 at 9:17 PM, Mohsen Pahlevanzadeh moh...@pahlevanzadeh.org wrote: Dear all , i get the error : NameError: global name 'ui' is not defined Complete question is at : http://stackoverflow.com/questions/18627608/nameerror-global-name-is-not-defined-but-differences Before

Re: can't get utf8 / unicode strings from embedded python

2013-08-24 Thread Benjamin Kaplan
On Sat, Aug 24, 2013 at 9:47 AM, David M. Cotter m...@davecotter.com wrote: What _are_ you using? i have scripts in a file, that i am invoking into my embedded python within a C++ program. there is no terminal involved. the print statement has been redirected (via sys.stdout) to my

Re: List getting extended when assigned to itself

2013-08-24 Thread Benjamin Kaplan
On Sat, Aug 24, 2013 at 8:52 PM, Krishnan Shankar i.am.song...@gmail.com wrote: Hi Python Friends, I came across an example which is as below, var = [1, 12, 123, 1234] var [1, 12, 123, 1234] var[:0] [] var[:0] = var var [1, 12, 123, 1234, 1, 12, 123, 1234] Here in var[:0] = var we

Re: New way of writing socket servers in #Linux kernel 3.9 (and in #Python too)

2013-08-24 Thread Benjamin Kaplan
On Sat, Aug 24, 2013 at 7:08 PM, Michael Torrie torr...@gmail.com wrote: #Linux, #Python? This this hash tag stuff is getting out of hand, don't you think? Didn't you hear? In an effort to redefine itself for the modern Internet, Usenet is adding support for hash tags and limiting posts to 140

Re: Resolving import errors reported by PyLint in modules using Python.NET

2013-08-08 Thread Benjamin Kaplan
On Thu, Aug 8, 2013 at 10:17 PM, adam.pre...@gmail.com wrote: PyLint can't figure out imports of .NET code being referenced in my Python scripts that use Python.NET. I can kind of see why; you have to evaluate some clr.AddReference calls for the imports to even succeed. I wonder if I

Re: GeoIP2 for retrieving city and region ?

2013-07-15 Thread Benjamin Kaplan
On Sat, Jul 13, 2013 at 10:43 AM, Νικόλας ni...@superhost.gr wrote: Στις 13/7/2013 7:54 μμ, ο/η Dennis Lee Bieber έγραψε: Are you paying for a fixed IP number? I suspect you are if you were running a world-accessible server. Obviously a fixed IP will be tied to a fixed

Re: Explain your acronyms (RSI?)

2013-07-06 Thread Benjamin Kaplan
On Sat, Jul 6, 2013 at 12:38 PM, Terry Reedy tjre...@udel.edu wrote: rms has crippling RSI (anonymous, as quoted by Skip). I suspect that 'rms' = Richard M Stallman (but why lower case? to insult him?). I 'know' that RSI = Roberts Space Industries, a game company whose Kickstarter project I

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-05 Thread Benjamin Kaplan
On Jul 5, 2013 12:12 AM, Lele Gaifax l...@metapensiero.it wrote: Νίκος Gr33k ni...@superhost.gr writes: try: host = socket.gethostbyaddr( os.environ['REMOTE_ADDR'] )[0] except Exception as e: host = Reverse DNS Failed How can the above code not be able to reeverse dns

Re: How to tell Script to use pythonw.exe ?

2013-07-03 Thread Benjamin Kaplan
On Jul 3, 2013 8:27 AM, Νίκος ni...@superhost.gr wrote: Στις 3/7/2013 6:43 πμ, ο/η Tim Roberts έγραψε: goldtech leeg...@operamail.com wrote: I just changed the file extension of the script file from .py to .pyw and it uses pythonw.exe. I didn't read it anywhere, just intuited it and tried

Re: Importing modules into IronPython

2013-07-03 Thread Benjamin Kaplan
On Wed, Jul 3, 2013 at 3:05 PM, HighBeliever akshay.k...@gmail.com wrote: Hi, I have to shift a Python 2.7 program to run in Windows. Doing that has forced me to use IronPython because my program is dependent on a .dll file that uses .NET framework. I moved all my code to Iron Python and

Re: Is this PEP-able? fwhile

2013-06-24 Thread Benjamin Kaplan
On Mon, Jun 24, 2013 at 8:54 PM, Chris Angelico ros...@gmail.com wrote: On Tue, Jun 25, 2013 at 12:01 PM, rusi rustompm...@gmail.com wrote: On Tuesday, June 25, 2013 3:08:57 AM UTC+5:30, Chris Angelico wrote: On Tue, Jun 25, 2013 at 5:52 AM, wrote: (NOTE: Many people are being taught to

Re: Variables versus name bindings [Re: A certainl part of an if() structure never gets executed.]

2013-06-17 Thread Benjamin Kaplan
On Mon, Jun 17, 2013 at 8:55 AM, Simpleton supp...@superhost.gr wrote: On 17/6/2013 5:22 μμ, Terry Reedy wrote: On 6/17/2013 7:34 AM, Simpleton wrote: On 17/6/2013 9:51 πμ, Steven D'Aprano wrote: Now, in languages like Python, Ruby, Java, and many others, there is no table of memory

Re: Eval of expr with 'or' and 'and' within

2013-06-14 Thread Benjamin Kaplan
On Jun 14, 2013 9:34 AM, Michael Torrie torr...@gmail.com wrote: On 06/14/2013 03:50 AM, Nick the Gr33k wrote: print(name or month or year) abcd print(name and month and year) ijkl Interesting. I'd have thought a boolean expression would return True or False, not a string. Learn

Re: Version Control Software

2013-06-13 Thread Benjamin Kaplan
On Jun 13, 2013 10:17 AM, Grant Edwards invalid@invalid.invalid wrote: On 2013-06-13, Ben Finney ben+pyt...@benfinney.id.au wrote: cutems93 ms2...@cornell.edu writes: I am looking for an appropriate version control software for python development, and need professionals' help to make a

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-09 Thread Benjamin Kaplan
On Sun, Jun 9, 2013 at 2:38 AM, Νικόλαος Κούρας nikos.gr...@gmail.com wrote: Τη Κυριακή, 9 Ιουνίου 2013 12:20:58 μ.μ. UTC+3, ο χρήστης Lele Gaifax έγραψε: How about a string i wonder? s = νίκος what_are these_bytes = s.encode('iso-8869-7').encode(utf-8') Ignoring the usual syntax error,

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-09 Thread Benjamin Kaplan
On Sun, Jun 9, 2013 at 2:20 AM, Νικόλαος Κούρας nikos.gr...@gmail.com wrote: Τη Κυριακή, 9 Ιουνίου 2013 12:12:36 μ.μ. UTC+3, ο χρήστης Cameron Simpson έγραψε: On 09Jun2013 02:00, =?utf-8?B?zp3Or866zr/PgiDOk866z4EzM866?= nikos.gr...@gmail.com wrote: | Steven wrote: | Since 1 byte can

Re: Re-using copyrighted code

2013-06-09 Thread Benjamin Kaplan
On Sun, Jun 9, 2013 at 1:32 PM, Mark Janssen dreamingforw...@gmail.com wrote: On Sun, Jun 9, 2013 at 12:50 PM, Michael Torrie torr...@gmail.com wrote: On 06/09/2013 11:18 AM, Mark Janssen wrote: You actually do not. Attaching a legal document is purely a secondary protection from those who

Re: Re-using copyrighted code

2013-06-09 Thread Benjamin Kaplan
On Sun, Jun 9, 2013 at 6:40 PM, Mark Janssen dreamingforw...@gmail.com wrote: Mark, ever watched TV? Or gone to the movies? Or walked into a bookshop? Listened to the radio? All these things publish copyrighted work. It is utter nonsense that merely publishing something in public gives up the

Re: Re-using copyrighted code

2013-06-08 Thread Benjamin Kaplan
On Sat, Jun 8, 2013 at 2:31 PM, Malte Forkel malte.for...@berlin.de wrote: Hello, I have written a small utility to locate errors in regular expressions that I want to upload to PyPI. Before I do that, I would like to learn a litte more about the legal aspects of open-source software. What

RE: Python #ifdef

2013-05-28 Thread Benjamin Kaplan
On May 28, 2013 1:10 PM, Carlos Nepomuceno carlosnepomuc...@outlook.com wrote: Thank you! I made it run like the following. What do you think about that? IS there a better way? #The following runs on Python 2.7 sc3=''' # Python 3 def original(n): m = 0 for b in n.to_bytes(6,

Re: in need of some help regarding my rock paper scissors game

2013-05-12 Thread Benjamin Kaplan
On Sun, May 12, 2013 at 12:33 PM, Alex Norton ayjayn1...@gmail.com wrote: im new to python and im in the middle of making a RPS game for a college unit. i have used PyQt to create the GUI and i have received help regarding adding the code to the buttons. but its missing something as the

Re: Why do Perl programmers make more money than Python programmers

2013-05-07 Thread Benjamin Kaplan
On May 7, 2013 5:42 PM, Neil Hodgson nhodg...@iinet.net.au wrote: jmfauth: 2) More critical, Py 3.3, just becomes non unicode compliant, (eg European languages or ascii typographers !) ... This is not demonstrating non-compliance. It is comparing performance, not compliance.

Re: Is Unicode support so hard...

2013-04-20 Thread Benjamin Kaplan
On Sat, Apr 20, 2013 at 10:22 AM, Ned Batchelder n...@nedbatchelder.com wrote: On 4/20/2013 1:12 PM, jmfauth wrote: In a previous post, http://groups.google.com/group/comp.lang.python/browse_thread/thread/6aec70817705c226# , Chris “Kwpolska” Warrick wrote: “Is Unicode support so hard,

Re: py2exe and 64/32 bit windows

2013-04-09 Thread Benjamin Kaplan
On Apr 9, 2013 12:53 PM, Grant Edwards invalid@invalid.invalid wrote: On 2013-04-09, Ian Kelly ian.g.ke...@gmail.com wrote: My Windows partition currently has a 64-bit Windows 7 Ultimate installation. I'm told that the executable I generate on that machine won't run on Win7 32-bit

Re: How to do a Lispy-esque read?

2013-04-08 Thread Benjamin Kaplan
There is no read in a stream until it's a valid literal function as far as I know, but ast.literal_eval will turn your string into an object. On Mon, Apr 8, 2013 at 12:45 AM, zeta.con...@gmail.com wrote: Suppose I want to read an object from some stream. How do I do it? For example, if the

Re: I hate you all

2013-04-05 Thread Benjamin Kaplan
On Fri, Apr 5, 2013 at 10:07 PM, Timothy Madden terminato...@gmail.com wrote: On 06.04.2013 03:35, Chris Angelico wrote: On Sat, Apr 6, 2013 at 11:22 AM, terminato...@gmail.com wrote: On Saturday, April 6, 2013 1:42:15 AM UTC+3, Ian wrote: [...] The def line has four spaces. The for

Re: Python class and variable issue(newby question!)

2013-03-29 Thread Benjamin Kaplan
On Fri, Mar 29, 2013 at 2:12 PM, Sam Berry sambez...@hotmail.co.uk wrote: Hey, Im new to object orientated programming and have an issue with using classes. Im using the kivy module, a GUI creator , so posting the actual code may confuse. But an example of what im trying to achieve is below

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread Benjamin Kaplan
On Thu, Mar 28, 2013 at 10:48 AM, jmfauth wxjmfa...@gmail.com wrote: On 28 mar, 17:33, Ian Kelly ian.g.ke...@gmail.com wrote: On Thu, Mar 28, 2013 at 7:34 AM, jmfauth wxjmfa...@gmail.com wrote: The flexible string representation takes the problem from the other side, it attempts to work with

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread Benjamin Kaplan
On Thu, Mar 28, 2013 at 2:11 PM, jmfauth wxjmfa...@gmail.com wrote: On 28 mar, 21:29, Benjamin Kaplan benjamin.kap...@case.edu wrote: On Thu, Mar 28, 2013 at 10:48 AM, jmfauth wxjmfa...@gmail.com wrote: On 28 mar, 17:33, Ian Kelly ian.g.ke...@gmail.com wrote: On Thu, Mar 28, 2013 at 7:34 AM

Re: [Python-ideas] Message passing syntax for objects

2013-03-18 Thread Benjamin Kaplan
On Mon, Mar 18, 2013 at 10:18 AM, Mark Janssen dreamingforw...@gmail.com wrote: Ian Cordasco wrote: On Sun, Mar 17, 2013 at 11:53 PM, Mark Janssen dreamingforw...@gmail.com wrote: Hello, I just posted an answers on quora.com about OOP (http://qr.ae/TM1Vb) and wanted to engage the python

Re: [Python-ideas] Message passing syntax for objects

2013-03-18 Thread Benjamin Kaplan
On Mon, Mar 18, 2013 at 1:24 PM, Mark Janssen dreamingforw...@gmail.com wrote: On Mon, Mar 18, 2013 at 12:06 PM, Georg Brandl g.bra...@gmx.net wrote: Am 18.03.2013 05:26, schrieb Mark Janssen: Continuing on this thread, there would be a new bunch of behaviors to be defined. Since everything

Re: PyWart: NameError trackbacks are superfluous

2013-03-16 Thread Benjamin Kaplan
On Sat, Mar 16, 2013 at 8:14 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sat, 16 Mar 2013 19:58:41 -0600, Michael Torrie wrote: On 03/16/2013 06:11 PM, Rick Johnson wrote: No, the ACTUAL PROBLEM is in the author. Surely any NameException can also be blamed on the

Re: Why is it impossible to create a compiler than can compile Python to machinecode like C?

2013-03-04 Thread Benjamin Kaplan
On Mar 4, 2013 3:02 PM, CM cmpyt...@gmail.com wrote: The main issue is that python has dynamic typing. The type of object that is referenced by a particular name can vary, and there's no way (in general) to know at compile time what the type of object foo is. That makes generating

Re: How to install development package on linux?

2013-03-02 Thread Benjamin Kaplan
On Sat, Mar 2, 2013 at 10:14 PM, Sarbjit singh sarbjit1...@gmail.com wrote: I searched on google and found these errors could be due to missing python header files which would be available in development package. So I am struggling to make it work. A development package is meaningless when

Re: In win32 and linux platform, os modules has diffreent output order, is it a bug?

2013-03-01 Thread Benjamin Kaplan
On Fri, Mar 1, 2013 at 12:43 AM, Honghe Wu leopards...@gmail.com wrote: env: python 2.7.3 6 test files' name in a directory as below: 12ab Abc Eab a1bc acd bc the following is test code: for root, dirs, files in os.walk(os.getcwd()): print files the output in win32 platform is:

Re: cymbalic reference?

2013-01-15 Thread Benjamin Kaplan
On Tue, Jan 15, 2013 at 8:56 PM, rh richard_hubb...@lavabit.com wrote: I have this working and I am curious to know how others do same. class Abc(object): def __init__(self): pass def good(self): print Abc good def better(self): print Abc better urls

Re: wiki.python.org

2013-01-09 Thread Benjamin Kaplan
On Wed, Jan 9, 2013 at 8:30 AM, Ken kensubu...@gmail.com wrote: On Wed, Jan 09, 2013 at 04:05:31PM +, Reed, Kevin wrote: Hello, I have been unable to access wiki.python.org for two days. Is there a problem with the server, or is it me? Thank you much, Kevin C. Reed New Python User

Re: How do you call a function several times in this context??

2013-01-06 Thread Benjamin Kaplan
On Jan 6, 2013 12:33 PM, kofi ghanashirts4s...@gmail.com wrote: Using python 3.1, I have written a function called isEvenDigit Below is the code for the isEvenDigit function: def isEvenDigit(): ste=input(Please input a single character string: ) li=[0,2,4, 6, 8] if ste in li:

Re: 3.2 can't extract tarfile produced by 2.7

2012-12-26 Thread Benjamin Kaplan
On Dec 26, 2012 11:00 AM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: I am converting some programs to python 3. These programs manipulate tarfiles. In order for the python3 programs to be really useful they need to be able to process the tarfiles produced by python2 that however seems to

Re: compile python 3.3 with bz2 support

2012-12-22 Thread Benjamin Kaplan
On Dec 21, 2012 1:31 AM, Isml 76069...@qq.com wrote: hi, everyone: I want to compile python 3.3 with bz2 support on RedHat 5.5 but fail to do that. Here is how I do it: 1. download bzip2 and compile it(make、make -f Makefile_libbz2_so、make install) 2.chang to python 3.3 source

Re: Unicode

2012-12-17 Thread Benjamin Kaplan
On Mon, Dec 17, 2012 at 12:59 AM, Anatoli Hristov toli...@gmail.com wrote: What happens when you do use UTF-8? This is the result when I encode the string: étroits, en utilisant un portable extrêmement puissant—le plus petit et le plus léger des HP EliteBook pleine puissance—avec un

Re:

2012-12-15 Thread Benjamin Kaplan
On Sat, Dec 15, 2012 at 5:49 PM, Dustin Guerri dustingue...@gmail.com wrote: Hi there, I'm new to Python and to programming. is this the right place for me to post a beginner question on Python use ? Many thanks. You could post questions here, but it would be better to use the

Re: How to import module whose filename starts number

2012-12-12 Thread Benjamin Kaplan
On Dec 12, 2012 9:47 AM, Yong Hu yhu221...@gmail.com wrote: I have a few scripts whose file names start with numbers. For example, 01_step1.py, 02_step2.py I tried to import them in another script by import 01_step1 or from 01_step1 import *. Both failed, saying SyntaxError: invalid syntax

Re: Robust regex

2012-11-19 Thread Benjamin Kaplan
On Nov 19, 2012 12:37 PM, Joseph L. Casale jcas...@activenetwerx.com wrote: Trying to robustly parse a string that will have key/value pairs separated by three pipes, where each additional key/value (if more than one exists) will be delineated by four more pipes. string =

Re: Nice solution wanted: Hide internal interfaces

2012-10-29 Thread Benjamin Kaplan
On Mon, Oct 29, 2012 at 9:33 AM, Johannes Bauer dfnsonfsdu...@gmx.de wrote: Hi there, I'm currently looking for a good solution to the following problem: I have two classes A and B, which interact with each other and which interact with the user. Instances of B are always created by A. Now

Re: Numpy module

2012-10-29 Thread Benjamin Kaplan
On Sun, Oct 28, 2012 at 10:40 PM, farrellpolym...@gmail.com wrote: Hello to the group! I've learned a lot about Ubuntu just trying to install numpy for Python 3.2.3. I've finally managed to put it in the Python3.2 directory but when I try to import it, I still get there's no module named

Re: Can't run any script without it failing due to calling tkinter for no reason

2012-10-14 Thread Benjamin Kaplan
On Sun, Oct 14, 2012 at 6:47 PM, pythonuse...@gmail.com wrote: Hello All, I'm running python 3.2 on Freebsd 9.0 Release and I must've screwed up my environment somehow, because now I can't run any script without it failing and throwing: ** IDLE can't import Tkinter. Your Python may not

Re: Can't import modules

2012-09-30 Thread Benjamin Kaplan
On Sun, Sep 30, 2012 at 12:42 PM, Peter Farrell peterfarrel...@gmail.com wrote: Hello! I'm still new to Python, so here's another easy one. After I save something I've done as a .py file, how do I import it into something else I work on? Every time I try to import something other than

Re: subprocess call is not waiting.

2012-09-19 Thread Benjamin Kaplan
On Sep 19, 2012 9:37 AM, andrea crotti andrea.crott...@gmail.com wrote: Well there is a process which has to do two things, monitor periodically some external conditions (filesystem / db), and launch a process that can take very long time. So I can't put a wait anywhere, or I'll stop

Re: Installing Pip onto a mac os x system

2012-09-19 Thread Benjamin Kaplan
On Sep 19, 2012 6:37 PM, John Mordecai Dildy jdild...@gmail.com wrote: Does anyone know how to install Pip onto a mac os x ver 10.7.4? Ive tried easy_instal pip but it brings up this message (but it doesn't help with my problem): error: can't create or remove files in install directory The

Re: Is there any difference between print 3 and print '3' in Python ?

2012-09-10 Thread Benjamin Kaplan
On Sun, Sep 9, 2012 at 11:33 PM, Dwight Hutto dwightdhu...@gmail.com wrote: On Sun, Sep 9, 2012 at 10:41 AM, Ian Foote i...@feete.org wrote: On 09/09/12 14:23, iMath wrote: 在 2012年3月26日星期一UTC+8下午7时45分26秒,iMath写道: I know the print statement produces the same result when both of these two

Re: Newbie: where's the new python gone?

2012-09-10 Thread Benjamin Kaplan
On Sun, Sep 9, 2012 at 11:10 PM, Dwight Hutto dwightdhu...@gmail.com wrote: I have several installations on my windows, so I use c:\python27_64\python.exe module_file.py or c:\python26\python.exe module_file.py in the command line. Not to show that this shouldn't be a discussion, but

Re: a python license problem?

2012-09-10 Thread Benjamin Kaplan
On Mon, Sep 10, 2012 at 7:58 PM, Jayden jayden.s...@gmail.com wrote: Python is under GPL compatible. If I develop a python code, convert it to executable and distribute the executable as a commercial software. May I need to make my source code open? If python is under GPL, is the answer

Re: Accessing dll

2012-09-06 Thread Benjamin Kaplan
On Sep 6, 2012 8:15 AM, Helpful person rrl...@yahoo.com wrote: I am a complete novice to Python. I wish to access a dll that has been written to be compatible with C and VB6. I have been told that after running Python I should enter from ctypes import * which allows Python to recognize the

Re: is implemented with id ?

2012-09-05 Thread Benjamin Kaplan
On Tue, Sep 4, 2012 at 11:30 PM, Franck Ditter fra...@ditter.org wrote: Hi ! a is b == id(a) == id(b) in builtin classes. Is that true ? Thanks, franck No. It is true that if a is b then id(a) == id(b) but the reverse is not necessarily true. id is only guaranteed to be unique among

Re: why did the WindowsError occur?

2012-09-05 Thread Benjamin Kaplan
On Tue, Sep 4, 2012 at 11:30 PM, Levi Nie levinie...@gmail.com wrote: my code: import os os.startfile(r'C:\Program Files\Internet Explorer.exe') the error: os.startfile(r'C:\Program Files\Internet Explorer.exe') WindowsError: [Error 2] : 'C:\\Program Files\\Internet Explorer.exe' There's

Re: popen4 - get exit status

2012-08-27 Thread Benjamin Kaplan
On Aug 27, 2012 3:47 PM, Tim Johnson t...@akwebsoft.com wrote: In bash I do the following: linus:journal tim$ /home/AKMLS/cgi-bin/perl/processJournal-Photo.pl hiccup -bash: /home/AKMLS/cgi-bin/perl/processJournal-Photo.pl: No such file or directory linus:journal tim$ echo $? 127 In python,

Re: How to convert base 10 to base 2?

2012-08-20 Thread Benjamin Kaplan
On Mon, Aug 20, 2012 at 12:50 AM, gianpy...@gmail.com wrote: Hi, as you can argue from the subject, i'm really,really new to python. What is the best way to achieve that with python? Because the syntax int('30',2) doesn't seem to work! That syntax goes the other way- from a string

Re: how to fix error Requires python(abi)=2.4

2012-08-14 Thread Benjamin Kaplan
On Aug 14, 2012 4:51 AM, sagarnikam123 sagarnikam...@gmail.com wrote: i am installing numpy on fedora with python 2.6,2.7 3.1 -- Python bytecode and C interface are not compatible across versions. If you're trying to install a numpy binary that was compiled against 2.4, it won't work with

Re: Idle no longer works

2012-08-11 Thread Benjamin Kaplan
On Sat, Aug 11, 2012 at 4:09 PM, Opap-OJ opiney...@yahoo.com wrote: I can no longer open the Idle IDE for Python on Windows 7. For 3-5 years I used Idle for all my python work. But in January this happens: When I right click on a python file and choose open with Idle nothing happens.

Re: I thought I understood how import worked...

2012-08-07 Thread Benjamin Kaplan
On Aug 7, 2012 8:41 AM, Roy Smith r...@panix.com wrote: On Tuesday, August 7, 2012 9:55:16 AM UTC-4, Ben Finney wrote: The tutorial is misleading on this. It it says plainly: A module can contain executable statements as well as function definitions. […] They are executed only

Re: help

2012-07-19 Thread Benjamin Kaplan
On Jul 19, 2012 4:04 PM, Miriam Gomez Rios miriam.gome...@udlap.mx wrote: Hello, sorry for bothering you, but I have a doubt, Is there a way to turn this string into a tuplelist??, I need it for gurobi

Re: how to compile pygtk in python2.7?

2012-07-07 Thread Benjamin Kaplan
On Sat, Jul 7, 2012 at 9:47 PM, contro opinion contropin...@gmail.com wrote: 1.download pygtk 2.cd /home/tiger/pygtk-2.24.0 3.PYTHON=/usr/bin/python2.7 ./configure --prefix=/usr 4. make 5. make install tiger@ocean:~$ python2.7 Python 2.7.3 (default, Jul 1 2012, 14:13:18) [GCC 4.4.5]

Re: moving methods from class to instance of other class

2012-06-28 Thread Benjamin Kaplan
On Wed, Jun 27, 2012 at 11:59 PM, lars van gemerden l...@rational-it.com wrote: Hi all, I have some trouble with the following question: Let say i have the following classes: class A(object):    def __init__(self):        self.name = 'a'    def do(self):        print 'A.do: self.name =',

Re: Is there any way to decode String using unknown codec?

2012-06-27 Thread Benjamin Kaplan
On Wed, Jun 27, 2012 at 6:14 PM, howmuchisto...@gmail.com wrote: Hi I'm a Korean and when I use modules like sys, os, c, sometimes the interpreter show me broken strings like '\x13\xb3\x12\xc8'. It mustbe the Korean alphabet but I can't decode it to the rightway. I tried to decode it using

Re: Executing Python Scripts on Mac using Python Launcher

2012-06-26 Thread Benjamin Kaplan
On Tue, Jun 26, 2012 at 10:19 AM, David Thomas dthoma...@me.com wrote: I have installed Python 2.7.3 from Python.org also in Terminal it states that I have 2.7.3. How can I execute the script from Terminal?  I've tried typing python into the window and then dragging the file to terminal but

Re: Executing Python Scripts on Mac using Python Launcher

2012-06-25 Thread Benjamin Kaplan
On Mon, Jun 25, 2012 at 11:19 AM, David Thomas dthoma...@me.com wrote: Hello, This is my first post so go easy on me.  I am just beginning to program using Python on Mac.  When I try to execute a file using Python Launcher my code seems to cause an error in terminal, when I execute the exact

Re: Perl __DATA__ construct.

2012-06-25 Thread Benjamin Kaplan
On Mon, Jun 25, 2012 at 2:20 PM, Mladen Gogala gogala.mla...@gmail.com wrote: I have a script in Perl that I need to rewrite to Python. The script contains __DATA__ at the end of the script, which enables Perl to access all the data after that through a file descriptor, like this: usage() if

Re: None shown in output

2012-06-21 Thread Benjamin Kaplan
On Thu, Jun 21, 2012 at 8:42 PM, Xander Solis xrso...@gmail.com wrote: Hello Python list, Noob here with a newbie question. I'm reading and working on the exercise of the book, Learn Python the Hard way 2.0. When I use this code, I get None on the output. My question is why does this happen?

Re: None shown in output

2012-06-21 Thread Benjamin Kaplan
damn On Thu, Jun 21, 2012 at 9:24 PM, Benjamin Kaplan benjamin.kap...@case.edu wrote: On Thu, Jun 21, 2012 at 8:42 PM, Xander Solis xrso...@gmail.com wrote: Hello Python list, Noob here with a newbie question. I'm reading and working on the exercise of the book, Learn Python the Hard way 2.0

Re: Py3.3 unicode literal and input()

2012-06-18 Thread Benjamin Kaplan
On Mon, Jun 18, 2012 at 1:19 AM, jmfauth wxjmfa...@gmail.com wrote: What is input() supposed to return? u'a' == 'a' True r1 = input(':') :a r2 = input(':') :u'a' r1 == r2 False type(r1), len(r1) (class 'str', 1) type(r2), len(r2) (class 'str', 4) --- sys.argv? jmf Python 3

Re: Read STDIN as bytes rather than a string

2012-06-18 Thread Benjamin Kaplan
On Mon, Jun 18, 2012 at 4:13 PM, Jason Friedman ja...@powerpull.net wrote: I tried this: Python 3.2.2 (default, Feb 24 2012, 20:07:04) [GCC 4.6.1] on linux2 Type help, copyright, credits or license for more information. import sys import io fh = io.open(sys.stdin) Traceback (most recent

Re: constant sharing works differently in REPL than in script ?

2012-06-18 Thread Benjamin Kaplan
On Mon, Jun 18, 2012 at 7:52 PM, shearich...@gmail.com wrote: Listening to 'Radio Free Python' episode 8 (http://radiofreepython.com/episodes/8/ - around about the 30 minute mark) I heard that Python pre creates some integer constants to avoid a proliferation of objects with the same

Re: Passing ints to a function

2012-06-08 Thread Benjamin Kaplan
On Fri, Jun 8, 2012 at 7:41 PM, stayvoid stayv...@gmail.com wrote: Hello, I want to pass several values to a function which is located on a server (so I can't change its behavior). That function only accepts five values which must be ints. There are several lists: a = [1, 2, 3, 4, 5] b =

Re: Where is the latest step by step guide to use Jython to compilePython into Java?

2012-06-04 Thread Benjamin Kaplan
On Mon, Jun 4, 2012 at 11:47 AM, David Shi davidg...@yahoo.co.uk wrote: Hello, Mohan, Did you test it?  I am using Windows.  Where are the exact steps for compiling in DOS? Once .class or jar files created, how to use these files? Could you enlighten me with tested/proven step by step

Re: ./configure

2012-06-03 Thread Benjamin Kaplan
Thanks Alain.  I should have a compiler on my Mac OS X Lion.  I am thinking that it isn't set in my $PATH variable.  I don't know where the $PATH is set at.  I will check to see if their is a binary. -- http://mail.python.org/mailman/listinfo/python-list You need to install the command

Re: Installing Mailman

2012-06-03 Thread Benjamin Kaplan
On Mon, Jun 4, 2012 at 12:49 AM, Chris Rebert c...@rebertia.com wrote: On Sun, Jun 3, 2012 at 9:04 PM, Janet Heath janetcatherine.he...@gmail.com wrote: checking for --with-python... no checking for python... /usr/bin/python checking Python interpreter... /usr/bin/python checking Python

Re: How to import Webkit and object in Official Python (not MacPorts python) without X11.

2012-05-26 Thread Benjamin Kaplan
On Sat, May 26, 2012 at 9:31 AM, Mr.T Beppu anf...@gmail.com wrote: I think that I will make a browser in Official Python (not MacPorts Python). What should I do in order to install Webkit for Official Python (not MacPorts Python) ? from tokyo Japan. You don't just install WebKit. You need

Re: install python 2.6 on Ubuntu 12.04

2012-05-22 Thread Benjamin Kaplan
On Tue, May 22, 2012 at 8:09 PM, Dan Stromberg drsali...@gmail.com wrote: If the pythons you require are in synaptic (sudo to root and run synaptic), you probably can just use them. If not, then you, for each release, need to: 1) download a tarball using a browser or whatever 2) extract the

Re: %d not working in re at Python 2.7?

2012-05-14 Thread Benjamin Kaplan
On May 14, 2012 7:06 PM, vacu vacu...@gmail.com wrote: I am frustrated to see %d not working in my Python 2.7 re.search, like this example: (re.search('%d', asdfdsf78asdfdf)).group(0) Traceback (most recent call last): File stdin, line 1, in module AttributeError: 'NoneType' object has

Re: Some posts do not show up in Google Groups

2012-04-30 Thread Benjamin Kaplan
On Mon, Apr 30, 2012 at 2:20 AM, Frank Millman fr...@chagford.com wrote: Hi all For a while now I have been using Google Groups to read this group, but on the odd occasion when I want to post a message, I use Outlook Express, as I know that some people reject all messages from Google Groups

Re: why () is () and [] is [] work in other way?

2012-04-23 Thread Benjamin Kaplan
On Mon, Apr 23, 2012 at 1:01 PM, Paul Rubin no.email@nospam.invalid wrote: Kiuhnm kiuhnm03.4t.yahoo.it writes: I can't think of a single case where 'is' is ill-defined. If I can't predict the output of    print (20+30 is 30+20)  # check whether addition is commutative    print (20*30 is

Re: system call that is killed after n seconds if not finished

2012-04-16 Thread Benjamin Kaplan
On Mon, Apr 16, 2012 at 10:51 AM, Jaroslav Dobrek jaroslav.dob...@gmail.com wrote: Hello, I would like to execute shell commands, but only if their execution time is not longer than n seconds. Like so: monitor(os.system(do_something), 5) I.e. the command do_somthing should be executed by

Re: trac.util

2012-04-11 Thread Benjamin Kaplan
On Wed, Apr 11, 2012 at 4:52 PM, cerr ron.egg...@gmail.com wrote: Hi, I want to install some python driver on my system that requires trac.util (from Image.py) but I can't find that anywhere, any suggestions, anyone? Thank you very much, any help is appreciated! Error: File

Re: Question on Python 3 shell restarting

2012-04-10 Thread Benjamin Kaplan
On Tue, Apr 10, 2012 at 2:36 PM, Franck Ditter fra...@ditter.org wrote: In article 19745339.1683.1333981625966.JavaMail.geo-discussion-forums@yncc41,  Miki Tebeka miki.teb...@gmail.com wrote: How may I get a fresh Python shell with Idle 3.2 ? Open the configuration panel (Options -

Re: Run once while loop

2012-04-04 Thread Benjamin Kaplan
On Wed, Apr 4, 2012 at 9:21 AM, Anatoli Hristov toli...@gmail.com wrote: I thing the best will be if I use hundreds of the seconds to print the message. for example at 12:00:00:10, but unfortunately I cant see that I can use hundreds of the seconds. Does anyone knows if I can use it ?

Re: Installing Python Apps on Mac Lion

2012-03-13 Thread Benjamin Kaplan
On Tue, Mar 13, 2012 at 12:42 PM, dilvanezanard...@gmail.com wrote: Sábado, 25 de Junho de 2011 02h20min49s UTC+1, JKPeck escreveu: The Lion version of the OS on the Mac comes with Python 2.7 installed, but it is in /System/Library/Frameworks/..., and this area is not writable by third

Re: What's the best way to write this regular expression?

2012-03-07 Thread Benjamin Kaplan
On Wed, Mar 7, 2012 at 4:11 PM, John Salerno johnj...@gmail.com wrote: On Wed, Mar 7, 2012 at 3:01 PM, Ian Kelly ian.g.ke...@gmail.com wrote: There is a fork of setuptools called distribute that supports Python 3. Thanks, I guess I'll give this a try tonight! setup.py is a file that

  1   2   3   4   5   6   7   8   >