Java Python Developer Required at NYC NY

2012-09-13 Thread Sanith_Nair
Hi, I am looking for a Java Python developer at NYC NY for one of our direct client. It is a 6 Months contract position. We need a person with experience in developing trading applications and very good with Python Development. If interested, please send me your resume to my email address, ie

Re: using subprocess.Popen does not suppress terminal window on Windows

2012-09-13 Thread janis . judvaitis
Thanks for answer, but that's not helping. I'm making a little embedded system programming IDE so I need to run .exe(windows only), make commands, perl & python scripts etc(multiplatform). I'm using subprocess.Popen for all of them and it works fine except that blank console window and btw it

Re: submit jobs on multi-core

2012-09-13 Thread Matej Cepl
On 13/09/12 03:59, Jason Friedman wrote: Or if Python 3.2 is an option, the concurrent.futures module would be very well suited for this task. Also available as an external download for Python 2.* ... http://pypi.python.org/pypi/futures/ Matěj -- http://mail.python.org/mailman/listinfo/pytho

Re: avoid the redefinition of a function

2012-09-13 Thread Peter Otten
MRAB wrote: > On 12/09/2012 19:04, Alister wrote: >> On Wed, 12 Sep 2012 18:56:46 +0200, Jabba Laci wrote: >> For example: def install_java(): pass def install_tomcat(): pass >>> >>> Thanks for the answers. I decided to use numbers in the name of the >>> fu

python2.7 lack necessary bit to build module

2012-09-13 Thread 钟驰宇
I'm in ubuntu10.04 and I decide to compile python2.7 from source myself to build a GAE app.As a result,when I done with make command,it comes out with the following warning: Python build finished, but the necessary bits to build these modules were not found: _bsddb _sqlite3

Re: using subprocess.Popen does not suppress terminal window on Windows

2012-09-13 Thread Oscar Benjamin
On Thu, 13 Sep 2012 00:27:10 -0700 (PDT), janis.judvai...@gmail.com wrote: I'm making a little embedded system programming IDE so I need to run .exe(windows only), make commands, perl & python scripts etc(multiplatform). I'm using subprocess.Popen for all of them and it works fine except that

Re: Re: using subprocess.Popen does not suppress terminal window on Windows

2012-09-13 Thread Oscar Benjamin
On 13 September 2012 10:22, Oscar Benjamin wrote: > On Thu, 13 Sep 2012 00:27:10 -0700 (PDT), janis.judvai...@gmail.com wrote: > >> I'm making a little embedded system programming IDE so I need to >> > run .exe(windows only), make commands, perl & python scripts > etc(multiplatform). I'm using su

equiv of perl regexp grammar?

2012-09-13 Thread Neal Becker
I noticed this and thought it looked interesting: http://search.cpan.org/~dconway/Regexp- Grammars-1.021/lib/Regexp/Grammars.pm#DESCRIPTION I'm wondering if python has something equivalent? -- http://mail.python.org/mailman/listinfo/python-list

Re: python2.7 lack necessary bit to build module

2012-09-13 Thread Ramchandra Apte
On Thursday, 13 September 2012 14:17:29 UTC+5:30, 钟驰宇 wrote: > I'm in ubuntu10.04 and I decide to compile python2.7 from source myself to > build a GAE app.As a result,when I done with make command,it comes out with > the following warning: > > Python build finished, but the necessary bits to b

Re: python2.7 lack necessary bit to build module

2012-09-13 Thread Ulrich Eckhardt
Am 13.09.2012 10:47, schrieb 钟驰宇: I'm in ubuntu10.04 and I decide to compile python2.7 from source [...] However when I run my GAE app,it comes out with no module named _ssl and _sqlite3. There are Debian-specific ways to ease this task that should work in Ubuntu, too. First is "apt-get build-d

Re: using subprocess.Popen does not suppress terminal window on Windows

2012-09-13 Thread janis . judvaitis
It looks like normal terminal to me, could You define normal? Looks like it appears only when target script prints something, but it shouldn't cus I'm using pipes on stdout and stderr. If anyone is interested I'm using function doPopen from here: http://code.google.com/p/mansos/source/browse/tr

Python2.4 on Win32 suddenly started crashing last night

2012-09-13 Thread Tim Chase
I'm not sure if this is some Win32 update that was silently applied by our netadmin, but when I simply "import socket" at the command line, it's crashing (with the "Do you want to send this information to Microsoft" debug/crash dialog). It was working as of last night, and to the best of my knowle

main and dependent objects

2012-09-13 Thread andrea crotti
I am in a situation where I have a class Obj which contains many attributes, and also contains logically another object of class Dependent. This dependent_object, however, also needs to access many fields of the original class, so at the moment we did something like this: class Dependent: de

Re: Some questions about atexit

2012-09-13 Thread Roy Smith
In article , Terry Reedy wrote: > On 9/12/2012 8:58 PM, Roy Smith wrote: > > The atexit docs (http://docs.python.org/library/atexit.html) are very > > confusing. In one place they say, "The order in which the functions are > > called is not defined". In another place, "all functions registered

Re: Python2.4 on Win32 suddenly started crashing last night

2012-09-13 Thread Tim Chase
On 09/13/12 07:42, Tim Chase wrote: > It was working as of last night, and to the best of my knowledge, > nothing was changed on the system. It took a while to track it > down, but it came from importing smtplib which in turn imports socket. > > I've tried "import socket" and it crashes, but then

Re: Python2.4 on Win32 suddenly started crashing last night

2012-09-13 Thread MRAB
On 13/09/2012 13:42, Tim Chase wrote: I'm not sure if this is some Win32 update that was silently applied by our netadmin, but when I simply "import socket" at the command line, it's crashing (with the "Do you want to send this information to Microsoft" debug/crash dialog). It was working as of

Re: main and dependent objects

2012-09-13 Thread Jean-Michel Pichavant
- Original Message - > I am in a situation where I have a class Obj which contains many > attributes, and also contains logically another object of class > Dependent. > > This dependent_object, however, also needs to access many fields of > the > original class, so at the moment we did som

Re: Python2.4 on Win32 suddenly started crashing last night

2012-09-13 Thread Tim Chase
On 09/13/12 08:12, MRAB wrote: > I've just downloaded, installed and tested Python 2.4.4. No crash. > > This is with Windows XP Pro (32-bit). Could I get the MD5 of your $PYTHONDIR\DLLs\_socket.pyd to see if it matches mine? >>> data = file('_socket.pyd', 'rb').read() >>> import md5 >>> md5.md5(

Re: Python2.4 on Win32 suddenly started crashing last night

2012-09-13 Thread MRAB
On 2012-09-13 14:35, Tim Chase wrote: On 09/13/12 08:12, MRAB wrote: I've just downloaded, installed and tested Python 2.4.4. No crash. This is with Windows XP Pro (32-bit). Could I get the MD5 of your $PYTHONDIR\DLLs\_socket.pyd to see if it matches mine? data = file('_socket.pyd', 'rb').r

Re: [SOLVED] Python2.4 on Win32 suddenly started crashing last night

2012-09-13 Thread Tim Chase
On 09/13/12 08:51, MRAB wrote: > I get this: > > Python 2.4.4 (#71, Oct 18 2006, 08:34:43) [MSC v.1310 32 bit (Intel)] on > win32 > Type "help", "copyright", "credits" or "license" for more information. > >>> data = file(r'C:\Python24\DLLs\_socket.pyd', 'rb').read() > >>> import md5 > >>> md5.

Re: main and dependent objects

2012-09-13 Thread andrea crotti
2012/9/13 Jean-Michel Pichavant : > > Nothing shocking right here imo. It looks like a classic parent-child > implementation. > However it seems the relation between Obj and Dependent are 1-to-1. Since > Dependent need to access all Obj attributes, are you sure that Dependent and > Obj are not a

Guides for communicating with business accounting systems

2012-09-13 Thread Ben Finney
Howdy all, What material should a team of programmers read before designing a database model and export format for sending commerce transactions to a business accounting system? I'm especially not wanting ad hoc advice in this thread; this is surely an old, complex problem with a lot of ground al

SciPy for Python 2.6?

2012-09-13 Thread garyr
Is there a version for SciPy/numpy available for Python 2.6? I could only find a version for 2.7 on the SciPy site. A search on the Scipy mailing list archive did not turn up anything. The link to the Scipy-user list signup appeared to be broken. -- http://mail.python.org/mailman/listinfo/py

Re: main and dependent objects

2012-09-13 Thread Ulrich Eckhardt
Am 13.09.2012 14:51, schrieb andrea crotti: I am in a situation where I have a class Obj which contains many attributes, and also contains logically another object of class Dependent. This dependent_object, however, also needs to access many fields of the original class, so at the moment we did

subprocess call is not waiting.

2012-09-13 Thread paulstaten
I have a subprocess.call which tries to download a data from a remote server using HTAR. I put the call in a while loop, which tests to see if the download was successful, and if not, loops back around up to five times, just in case my internet connection has a hiccup. Subprocess.call is suppos

Re: main and dependent objects

2012-09-13 Thread Jean-Michel Pichavant
- Original Message - > 2012/9/13 Jean-Michel Pichavant : > > > > Nothing shocking right here imo. It looks like a classic > > parent-child implementation. > > However it seems the relation between Obj and Dependent are 1-to-1. > > Since Dependent need to access all Obj attributes, are you s

Re: SciPy for Python 2.6?

2012-09-13 Thread MRAB
On 2012-09-13 16:04, garyr wrote: Is there a version for SciPy/numpy available for Python 2.6? I could only find a version for 2.7 on the SciPy site. A search on the Scipy mailing list archive did not turn up anything. The link to the Scipy-user list signup appeared to be broken. There's numpy

Re: Guides for communicating with business accounting systems

2012-09-13 Thread Chris Angelico
On Fri, Sep 14, 2012 at 1:02 AM, Ben Finney wrote: > What I want is pointers to a putative “What every programmer needs to > know about storing commercial transactions for business accounting” > general guide. > > Does that information already exist where I can point our team to it? Not a guide p

Re: subprocess call is not waiting.

2012-09-13 Thread Jean-Michel Pichavant
- Original Message - > I have a subprocess.call which tries to download a data from a remote > server using HTAR. I put the call in a while loop, which tests to > see if the download was successful, and if not, loops back around up > to five times, just in case my internet connection has a

Re: subprocess call is not waiting.

2012-09-13 Thread MRAB
On 2012-09-13 16:17, paulsta...@gmail.com wrote: I have a subprocess.call which tries to download a data from a remote server using HTAR. I put the call in a while loop, which tests to see if the download was successful, and if not, loops back around up to five times, just in case my internet

datetime

2012-09-13 Thread Max
How do I set the time in Python? Also, is there any *direct* way to shift it? Say, it's 09:00 now and Python makes it 11:30 *without* me having specified "11:30" but only given Python the 2h30m interval. Note that any "indirect" methods may need complicated ways to keep track of the milliseconds

Re: datetime

2012-09-13 Thread Chris Angelico
On Fri, Sep 14, 2012 at 1:19 AM, Max wrote: > Say, it's 09:00 now and Python makes it 11:30 *without* me having specified > "11:30" but only given Python the 2h30m interval. Could you cheat and change the timezone offset? :D ChrisA -- http://mail.python.org/mailman/listinfo/python-list

Re: subprocess call is not waiting.

2012-09-13 Thread MRAB
On 2012-09-13 16:34, Jean-Michel Pichavant wrote: - Original Message - I have a subprocess.call which tries to download a data from a remote server using HTAR. I put the call in a while loop, which tests to see if the download was successful, and if not, loops back around up to five time

Re: Python presentations

2012-09-13 Thread John Gordon
In andrea crotti writes: > For my experience if I only see code in slides I tend not to believe > that it works somehow Presumably you will have some credibility with your audience so they won't just assume you're making it up? I think slides would be fine. -- John Gordon

Re: Guides for communicating with business accounting systems

2012-09-13 Thread Emile van Sebille
On 9/13/2012 8:02 AM Ben Finney said... Howdy all, What material should a team of programmers read before designing a database model and export format for sending commerce transactions to a business accounting system? The only standard I'm aware of is the EDI specification which I first encou

Re: Python presentations

2012-09-13 Thread mblume
Am Thu, 13 Sep 2012 17:00:19 +0100 schrieb andrea crotti: > > I have to give a couple of Python presentations in the next weeks, and > I'm still thinking what is the best approach. > My idea for an introductory presentation of python was to prepare some code snippets (all valid python), show them

Re: datetime

2012-09-13 Thread Ian Kelly
On Thu, Sep 13, 2012 at 9:19 AM, Max wrote: > How do I set the time in Python? On what platform? I don't know of any libraries for this, so it would be a matter of making the necessary system calls (which is all that a library would do anyway). > Also, is there any *direct* way to shift it? On

Re: Python presentations

2012-09-13 Thread andrea crotti
2012/9/13 William R. Wing (Bill Wing) : > > [byte] > > Speaking from experience as both a presenter and an audience member, please > be sure that anything you demo interactively you include in your slide deck > (even if only as an addendum). I assume your audience will have access to > the deck

Re: Python presentations

2012-09-13 Thread William R. Wing (Bill Wing)
On Sep 13, 2012, at 12:00 PM, andrea crotti wrote: > I have to give a couple of Python presentations in the next weeks, and > I'm still thinking what is the best approach. > > In one presentation for example I will present decorators and context > managers, and my biggest doubt is how much I sho

Re: subprocess call is not waiting.

2012-09-13 Thread woooee
It possibly requires a "shell=True", but without any code on any way to test, we can not say. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python presentations

2012-09-13 Thread Jean-Michel Pichavant
- Original Message - > I have to give a couple of Python presentations in the next weeks, > and > I'm still thinking what is the best approach. > > In one presentation for example I will present decorators and context > managers, and my biggest doubt is how much I should show and explain >

Re: avoid the redefinition of a function

2012-09-13 Thread Alister
On Thu, 13 Sep 2012 10:23:22 +0200, Peter Otten wrote: > MRAB wrote: > >> On 12/09/2012 19:04, Alister wrote: >>> On Wed, 12 Sep 2012 18:56:46 +0200, Jabba Laci wrote: >>> > For example: > > def install_java(): >pass > > def install_tomcat(): >pass Th

RE: How to print something only if it exists?

2012-09-13 Thread Prasad, Ramit
tinn...@isbd.co.uk wrote: > I want to print a series of list elements some of which may not exist, > e.g. I have a line:- > > print day, fld[1], balance, fld[2] > > fld[2] doesn't always exist (fld is the result of a split) so the > print fails when it isn't set. > > I know I could simply u

Re: datetime

2012-09-13 Thread Terry Reedy
On 9/13/2012 11:19 AM, Max wrote: How do I set the time in Python? If you look up 'time' in the index of the current manual, it directs you to the time module. "time.clock_settime(clk_id, time) Set the time of the specified clock clk_id. Availability: Unix. New in version 3.3." You did not

Re: Python presentations

2012-09-13 Thread Alister
> Also try to keep the presentation interactive by asking questions to > your audience (unless some of them are already participating), otherwise > people will be snoring or texting after 20 minutes. That is a v good suggestion. the best presentation I ever attended was one on using an emergency l

Batching HTTP requests with httplib (Python 2.7)

2012-09-13 Thread Chicken McNuggets
I'm writing a simple library that communicates with a web service and am wondering if there are any generally well regarded methods for batching HTTP requests? The problem with most web services is that they require a list of sequential commands to be executed in a certain order to complete a

Re: subprocess call is not waiting.

2012-09-13 Thread paulstaten
Thanks, guys. MRAB-RedHat 6 64-bit, Python 2.6.5 JM-Here's the relevant stuff from my last try. I've also tried with subprocess.call. Just now I tried shell=True, but it made no difference. sticking a print(out) in there just prints a blank line in between each iteration. It's not until the 5 tr

Re: equiv of perl regexp grammar?

2012-09-13 Thread Dwight Hutto
On Thu, Sep 13, 2012 at 7:30 AM, Neal Becker wrote: > I noticed this and thought it looked interesting: > > http://search.cpan.org/~dconway/Regexp- > Grammars-1.021/lib/Regexp/Grammars.pm#DESCRIPTION > > I'm wondering if python has something equivalent? > If you mean regex, it's import re. --

Re: equiv of perl regexp grammar?

2012-09-13 Thread Ian Kelly
On Thu, Sep 13, 2012 at 5:30 AM, Neal Becker wrote: > I noticed this and thought it looked interesting: > > http://search.cpan.org/~dconway/Regexp- > Grammars-1.021/lib/Regexp/Grammars.pm#DESCRIPTION > > I'm wondering if python has something equivalent? The pyparsing module is a good option for b

Re: Python presentations

2012-09-13 Thread 88888 Dihedral
mblume於 2012年9月14日星期五UTC+8上午12時26分17秒寫道: > Am Thu, 13 Sep 2012 17:00:19 +0100 schrieb andrea crotti: > > > > > > I have to give a couple of Python presentations in the next weeks, and > > > I'm still thinking what is the best approach. > > > > > My idea for an introductory presentation of pyt

Re: datetime

2012-09-13 Thread readmax
Terry Reedy udel.edu> writes: > You did not specify *which* time to set, but ... > > If you mean time.clock_shift(clk_id, shift_seconds), no. > > time.clock_settime(clk_id, time.clock_gettime(clk_id) + delta_seconds) > I am talking about the system-wide clock on Debian. What should I use as

RE: Comparing strings from the back?

2012-09-13 Thread Prasad, Ramit
Dwight Hutto wrote: > Why don' you just time it,eit lops through incrementing thmax input/ What? Without context I have no idea what this means. Ramit -- This email is confidential and subject to important disclaimers and conditions including on offers for the purchase or sale of securities,

Re: Comparing strings from the back?

2012-09-13 Thread Dwight Hutto
On Thu, Sep 13, 2012 at 2:39 PM, Prasad, Ramit wrote: > Dwight Hutto wrote: >> Why don' you just time it,eit lops through incrementing thmax input/ > > What? Without context I have no idea what this means. > > > Ramit Why don't you read the OP: Let's assume you're testing two strings for equal

Re: Comparing strings from the back?

2012-09-13 Thread Mark Lawrence
On 13/09/2012 19:39, Prasad, Ramit wrote: Dwight Hutto wrote: Why don' you just time it,eit lops through incrementing thmax input/ What? Without context I have no idea what this means. Ramit You're wasting your time, I've been described as a jackass for having the audacity to ask for con

Re: Tkinter bug in Entry widgets on OS X

2012-09-13 Thread Russell E. Owen
In article , Kevin Walzer wrote: > On 8/31/12 6:18 AM, Arnaud Delobelle wrote: > > I'm very inexperienced with Tkinter (I've never used it before). All > > I'm looking for is a workaround, i.e. a way to somehow suppress that > > output. > > What are you trying to do? Navigate the focus to anot

Re: Comparing strings from the back?

2012-09-13 Thread Joshua Landau
On 13 September 2012 20:53, Mark Lawrence wrote: > On 13/09/2012 19:39, Prasad, Ramit wrote: > >> Dwight Hutto wrote: >> >>> Why don' you just time it,eit lops through incrementing thmax input/ >>> >> >> What? Without context I have no idea what this means. >> > > You're wasting your time, I've

Re: using subprocess.Popen does not suppress terminal window on Windows

2012-09-13 Thread Oscar Benjamin
On 13 September 2012 13:33, wrote: > It looks like normal terminal to me, could You define normal? > > Looks like it appears only when target script prints something, but it > shouldn't cus I'm using pipes on stdout and stderr. > > If anyone is interested I'm using function doPopen from here: > h

Re: Comparing strings from the back?

2012-09-13 Thread Dwight Hutto
On Thu, Sep 13, 2012 at 4:34 PM, Joshua Landau wrote: > On 13 September 2012 20:53, Mark Lawrence wrote: >> >> On 13/09/2012 19:39, Prasad, Ramit wrote: >>> >>> Dwight Hutto wrote: Why don' you just time it,eit lops through incrementing thmax input/ >>> >>> >>> What? Without context I h

Re: Comparing strings from the back?

2012-09-13 Thread Mark Lawrence
On 13/09/2012 21:34, Joshua Landau wrote: On 13 September 2012 20:53, Mark Lawrence wrote: On 13/09/2012 19:39, Prasad, Ramit wrote: Dwight Hutto wrote: Why don' you just time it,eit lops through incrementing thmax input/ What? Without context I have no idea what this means. You're

Least-lossy string.encode to us-ascii?

2012-09-13 Thread Tim Chase
I've got a bunch of text in Portuguese and to transmit them, need to have them in us-ascii (7-bit). I'd like to keep as much information as possible, just stripping accents, cedillas, tildes, etc. So "serviço móvil" becomes "servico movil". Is there anything stock that I've missed? I can do mys

Re: Comparing strings from the back?

2012-09-13 Thread Dwight Hutto
On Thu, Sep 13, 2012 at 5:17 PM, Mark Lawrence wrote: > On 13/09/2012 21:34, Joshua Landau wrote: >> >> On 13 September 2012 20:53, Mark Lawrence >> wrote:acci sequence >> >>> On 13/09/2012 19:39, Prasad, Ramit wrote: >>> Dwight Hutto wrote: > Why don' you just time it,eit lops thr

Re: Least-lossy string.encode to us-ascii?

2012-09-13 Thread Vlastimil Brom
2012/9/13 Tim Chase : > I've got a bunch of text in Portuguese and to transmit them, need to > have them in us-ascii (7-bit). I'd like to keep as much information > as possible, just stripping accents, cedillas, tildes, etc. So > "serviço móvil" becomes "servico movil". Is there anything stock >

Re: Least-lossy string.encode to us-ascii?

2012-09-13 Thread Christian Heimes
Am 13.09.2012 23:26, schrieb Tim Chase: > I've got a bunch of text in Portuguese and to transmit them, need to > have them in us-ascii (7-bit). I'd like to keep as much information > as possible, just stripping accents, cedillas, tildes, etc. So > "serviço móvil" becomes "servico movil". Is ther

Re: [SOLVED] Least-lossy string.encode to us-ascii?

2012-09-13 Thread Tim Chase
On 09/13/12 16:44, Vlastimil Brom wrote: > >>> import unicodedata > >>> unicodedata.normalize("NFD", u"serviço móvil").encode("ascii", > >>> "ignore").decode("ascii") > u'servico movil' Works well for all the test-cases I threw at it. Thanks! -tkc -- http://mail.python.org/mailman/listinfo/p

Re: Python presentations

2012-09-13 Thread Alexander Blinne
On 13.09.2012 21:01, 8 Dihedral wrote: > def powerlist(x, n): > # n is a natural number > result=[] > y=1 > for i in xrange(n): > result.append(y) > y*=x > return result # any object in the local function can be returned def powerlist(x, n): result=

Re: Least-lossy string.encode to us-ascii?

2012-09-13 Thread Ethan Furman
[sorry for the direct reply, Tim] Tim Chase wrote: I've got a bunch of text in Portuguese and to transmit them, need to have them in us-ascii (7-bit). I'd like to keep as much information as possible, just stripping accents, cedillas, tildes, etc. So "serviço móvil" becomes "servico movil". I

Re: Python presentations

2012-09-13 Thread Chris Angelico
On Fri, Sep 14, 2012 at 8:33 AM, Alexander Blinne wrote: > On 13.09.2012 21:01, 8 Dihedral wrote: >> def powerlist(x, n): >> # n is a natural number >> result=[] >> y=1 >> for i in xrange(n): >> result.append(y) >> y*=x >> return result # any object in t

Re: Python presentations

2012-09-13 Thread Miki Tebeka
> What do you think work best in general? I find typing during class (other than small REPL examples) time consuming and error prone. What works well for me is to create a slidy HTML presentation with asciidoc, then I can include code snippets that can be also run from the command line. (Somethi

Re: Python presentations

2012-09-13 Thread Andrea Crotti
On 09/13/2012 11:58 PM, Miki Tebeka wrote: What do you think work best in general? I find typing during class (other than small REPL examples) time consuming and error prone. What works well for me is to create a slidy HTML presentation with asciidoc, then I can include code snippets that can

RE: pythonOCC examples doesn't work?

2012-09-13 Thread Prasad, Ramit
Dwight Hutto wrote: [snip] > On Wed, Sep 12, 2012 at 3:37 AM, Mark Lawrence > wrote: [snip] > Others would be able to see this for themselves but > > you insist on sending email without context. Please don't do this. > > How are my emails without context? I'm referring the OP to the docs,

Re: datetime

2012-09-13 Thread Terry Reedy
On 9/13/2012 3:06 PM, readmax wrote: Terry Reedy udel.edu> writes: You did not specify *which* time to set, but ... If you mean time.clock_shift(clk_id, shift_seconds), no. time.clock_settime(clk_id, time.clock_gettime(clk_id) + delta_seconds) I am talking about the system-wide clock

RE: Which Version of Python?

2012-09-13 Thread Prasad, Ramit
Ramchandra Apte wrote: > On Wednesday, 12 September 2012 14:11:56 UTC+5:30, Ramchandra Apte wrote: > > On Wednesday, 12 September 2012 14:04:56 UTC+5:30, alex23 wrote: > > > On 12 Sep, 16:31, Mark Lawrence wrote: > > > > Perhaps this will sway youhttp://docs.python.org/dev/whatsnew/3.3.html > >

Re: Least-lossy string.encode to us-ascii?

2012-09-13 Thread Terry Reedy
On 9/13/2012 5:26 PM, Tim Chase wrote: I've got a bunch of text in Portuguese and to transmit them, need to have them in us-ascii (7-bit). I'd like to keep as much information as possible,just stripping accents, cedillas, tildes, etc. 'keep as much information as possible' would mean an effect

Re: Python presentations

2012-09-13 Thread Cameron Simpson
On 13Sep2012 17:00, andrea crotti wrote: | I have to give a couple of Python presentations in the next weeks, and | I'm still thinking what is the best approach. | | In one presentation for example I will present decorators and context | managers, and my biggest doubt is how much I should show an

Re: Least-lossy string.encode to us-ascii?

2012-09-13 Thread Tim Chase
On 09/13/12 18:36, Terry Reedy wrote: > On 9/13/2012 5:26 PM, Tim Chase wrote: >> I've got a bunch of text in Portuguese and to transmit them, need to >> have them in us-ascii (7-bit). I'd like to keep as much information >> as possible,just stripping accents, cedillas, tildes, etc. > > 'keep as

How to implement a combo Web and Desktop app in python.

2012-09-13 Thread Shawn McElroy
I am somewhat new to python. I am still learning it. I am starting an app that I ma not quite sure how to best implement it. In the grand scheme, there will be 4 apps total. There will be a core shared between them that allows them to easily talk to each other (ill explain) and communicate with

Re: pythonOCC examples doesn't work?

2012-09-13 Thread Dwight Hutto
On Thu, Sep 13, 2012 at 7:26 PM, Prasad, Ramit wrote: > Dwight Hutto wrote: > > [snip] > >> On Wed, Sep 12, 2012 at 3:37 AM, Mark Lawrence >> wrote: > > [snip] > >> Others would be able to see this for themselves but >> > you insist on sending email without context. Please don't do this. >> >>

Re: pythonOCC examples doesn't work?

2012-09-13 Thread Dwight Hutto
On Thu, Sep 13, 2012 at 9:11 PM, Dwight Hutto wrote: > On Thu, Sep 13, 2012 at 7:26 PM, Prasad, Ramit > wrote: >> Dwight Hutto wrote: >> >> [snip] >> >>> On Wed, Sep 12, 2012 at 3:37 AM, Mark Lawrence >>> wrote: >> >> [snip] >> >>> Others would be able to see this for themselves but >>> > you i

Decorators not worth the effort

2012-09-13 Thread alex23
On Sep 14, 3:54 am, Jean-Michel Pichavant wrote: > I don't like decorators, I think they're not worth the mental effort. Because passing a function to a function is a huge cognitive burden? -- http://mail.python.org/mailman/listinfo/python-list

Re: Least-lossy string.encode to us-ascii?

2012-09-13 Thread Mark Tolonen
On Thursday, September 13, 2012 4:53:13 PM UTC-7, Tim Chase wrote: > On 09/13/12 18:36, Terry Reedy wrote: > > > On 9/13/2012 5:26 PM, Tim Chase wrote: > > >> I've got a bunch of text in Portuguese and to transmit them, need to > > >> have them in us-ascii (7-bit). I'd like to keep as much info

Re: main and dependent objects

2012-09-13 Thread alex23
On Sep 13, 10:52 pm, andrea crotti wrote: > I am in a situation where I have a class Obj which contains many > attributes, and also contains logically another object of class > Dependent. > But I'm not so sure it's a good idea, it's a bit smelly.. It's actually a well regarded technique known as

Re: Decorators not worth the effort

2012-09-13 Thread Cameron Simpson
On 13Sep2012 18:58, alex23 wrote: | On Sep 14, 3:54 am, Jean-Michel Pichavant | wrote: | > I don't like decorators, I think they're not worth the mental effort. | | Because passing a function to a function is a huge cognitive burden? It is for me when I'm _writing_ the decorator:-) But if I get

Re: Batching HTTP requests with httplib (Python 2.7)

2012-09-13 Thread Cameron Simpson
On 13Sep2012 19:34, Chicken McNuggets wrote: | I'm writing a simple library that communicates with a web service and am | wondering if there are any generally well regarded methods for batching | HTTP requests? | | The problem with most web services is that they require a list of | sequential

Re: Least-lossy string.encode to us-ascii?

2012-09-13 Thread Tim Chase
On 09/13/12 21:09, Mark Tolonen wrote: > On Thursday, September 13, 2012 4:53:13 PM UTC-7, Tim Chase wrote: >> Vlastimil's solution kept the characters but stripped them of their >> accents/tildes/cedillas/etc, doing just what I wanted, all using the >> stdlib. Hard to do better than that :-) > >

Re: Decorators not worth the effort

2012-09-13 Thread alex23
On Sep 14, 12:12 pm, Cameron Simpson wrote: > On 13Sep2012 18:58, alex23 wrote: > | On Sep 14, 3:54 am, Jean-Michel Pichavant | wrote: > | > I don't like decorators, I think they're not worth the mental effort. > | > | Because passing a function to a function is a huge cognitive burden? > > It is

Re: datetime

2012-09-13 Thread Steven D'Aprano
On Thu, 13 Sep 2012 15:19:32 +, Max wrote: > How do I set the time in Python? You don't. You ask the operating system to set the time. If you don't have permission to change the time, which regular users shouldn't have because it is a security threat, it will (rightly) fail. E.g.: import o

Re: Comparing strings from the back?

2012-09-13 Thread Steven D'Aprano
On Thu, 13 Sep 2012 17:06:23 -0400, Dwight Hutto wrote: > Then there is the problem of people saying you posted too much of the > context, or not inline with the OP, just at the end, or top posting. The solution to "you quoted too much unnecessary verbiage" is not "quote nothing". It is quote on

Re: Comparing strings from the back?

2012-09-13 Thread alex23
On Sep 14, 5:37 am, Dwight Hutto wrote: > Why don't take the time to read the OP, and ramit in your head? Please, don't be a dick. -- http://mail.python.org/mailman/listinfo/python-list

Re: Least-lossy string.encode to us-ascii?

2012-09-13 Thread Steven D'Aprano
On Thu, 13 Sep 2012 16:26:07 -0500, Tim Chase wrote: > I've got a bunch of text in Portuguese and to transmit them, need to > have them in us-ascii (7-bit). That could mean two things: 1) "The receiver is incapable of dealing with Unicode in 2012, which is frankly appalling, but what can I do a

Re: Least-lossy string.encode to us-ascii?

2012-09-13 Thread Steven D'Aprano
On Thu, 13 Sep 2012 21:34:52 -0500, Tim Chase wrote: > On 09/13/12 21:09, Mark Tolonen wrote: >> On Thursday, September 13, 2012 4:53:13 PM UTC-7, Tim Chase wrote: >>> Vlastimil's solution kept the characters but stripped them of their >>> accents/tildes/cedillas/etc, doing just what I wanted, all

Re: Comparing strings from the back?

2012-09-13 Thread Chris Angelico
On Fri, Sep 14, 2012 at 1:39 PM, Steven D'Aprano wrote: > You're assuming that people read your posts immediately after they read > the post you replied to. Always imagine that your reply will be read a > week after the post you replied to. And a week is extremely generous too; these posts get ar

Re: Comparing strings from the back?

2012-09-13 Thread Dwight Hutto
On Thu, Sep 13, 2012 at 11:48 PM, alex23 wrote: > On Sep 14, 5:37 am, Dwight Hutto wrote: >> Why don't take the time to read the OP, and ramit in your head? > > Please, don't be a dick. > > For telling him to ramit into his head that you should read the OP? -- Best Regards, David Hutto CEO:

Re: Comparing strings from the back?

2012-09-13 Thread alex23
On Sep 14, 2:46 pm, Dwight Hutto wrote: > For telling him to ramit into his head that you should read the OP? Yes. I'm not sure if it was intentionally racist, but you come across as a bit of a dwight supremacist. -- http://mail.python.org/mailman/listinfo/python-list

Re: subprocess call is not waiting.

2012-09-13 Thread Chris Rebert
On Thu, Sep 13, 2012 at 11:36 AM, wrote: > Thanks, guys. > MRAB-RedHat 6 64-bit, Python 2.6.5 In your Unix shell, what does the command: type htar output? > JM-Here's the relevant stuff from my last try. If you could give a complete, self-contained example, it would assist us in troublesho

Re: subprocess call is not waiting.

2012-09-13 Thread Chris Rebert
On Thu, Sep 13, 2012 at 8:17 AM, wrote: > I have a subprocess.call > But it doesn't work as intended. > Should I just go back to os.system? Did the os.system() version work? As of recent Python versions, os.system() is itself implemented using the `subprocess` module, so if it does work, then

Re: hi

2012-09-13 Thread Dwight Hutto
Hey, how are you? -- Best Regards, David Hutto CEO: http://www.hitwebdevelopment.com -- http://mail.python.org/mailman/listinfo/python-list

Re: hi

2012-09-13 Thread Dwight Hutto
Wait, that was out of context. Subject: Hi On Fri, Sep 14, 2012 at 1:09 AM, genban tade wrote: > > > -- > http://mail.python.org/mailman/listinfo/python-list > Hey, how are you? -- Best Regards, David Hutto CEO: http://www.hitwebdevelopment.com -- http://mail.python.org/mailman/listinfo/pytho

Re: Comparing strings from the back?

2012-09-13 Thread Dwight Hutto
On Fri, Sep 14, 2012 at 12:54 AM, alex23 wrote: > On Sep 14, 2:46 pm, Dwight Hutto wrote: >> For telling him to ramit into his head that you should read the OP? > > Yes. I'm not sure if it was intentionally racist, but you come across > as a bit of a dwight supremacist. Please explain any logic

Re: hi

2012-09-13 Thread Dwight Hutto
On Fri, Sep 14, 2012 at 1:09 AM, genban tade -- > http://mail.python.org/mailman/listinfo/python-list ail.com> wrote: > > > -- > http://mail.python.org/mailman/listinfo/python-list > thank you for your reply,I'm new here You'll love it here. It's always amusing. But remember to hit reply all when

Re: hi

2012-09-13 Thread Dwight Hutto
> You'll love it here. It's always amusing. > But remember to hit reply all Unless you might want to contact someone personally. Some don't mind, and some may complain. Me I don't care either way. Great to meet you though. Hope you find the it educationally stimulating. -- Best Regards, David

  1   2   >