On 25 Aug 2013 21:47, "Luis José Novoa" wrote:
>
> Hi All. I am trying to create an executable file containing an
optimization code using the pyomo package for optimization modeling along
with ither packages like Numpy. When using py2exe to perform the task it
generates the executable file, but wh
This is a crosspost from python-tutor upon suggestion.
I am experiencing intermittent issues where an exception will be raised when
calling getresponse(), which makes the entire connection stuck in Request-sent
state. Is it possible to reset to idle state somehow without reinstantiating
the HTTPSC
I've released Peasy, which is an easy but powerful parser.
Peasy brings a new method to write the parser. with Peasy, you write the
parser by hand, just like to write any other kind of program. Do not be
confused by "by hand", with the method brought by Peasy, it's easier and more
powerful
Hi all,
I was wondering how i can get the source from which the request came from.
If a user posted a link that directs to my server on facebook i'd like to know
that a specific click was from facebook or twitter etc..
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
On 2013-08-25, sahil301...@gmail.com wrote:
> I am unable to check homogeneity of Array.
> I have take Array type Int to be default for my code.
>
> Instead of getting Error on NON-INT Values.
> I want to take input as string.
> Then check if all input is in (0-9) form, I typecast it into int and
On Mon, 26 Aug 2013 06:10:41 -0700, Guy Tamir wrote:
> Hi all,
>
> I was wondering how i can get the source from which the request came
> from. If a user posted a link that directs to my server on facebook i'd
> like to know that a specific click was from facebook or twitter etc..
That would be
On Mon, Aug 26, 2013 at 11:03 AM, Guy Tamir wrote:
> On Monday, August 26, 2013 5:25:49 PM UTC+3, Steven D'Aprano wrote:
>> On Mon, 26 Aug 2013 06:10:41 -0700, Guy Tamir wrote:
>>
>>
>>
>> > Hi all,
>>
>> >
>>
>> > I was wondering how i can get the source from which the request came
>>
>> > from.
On Mon, 2013-08-26 at 00:55 +, Steven D'Aprano wrote:
> On Sun, 25 Aug 2013 23:48:34 +0430, Mohsen Pahlevanzadeh wrote:
>
> > Dear all,
> >
> > eval doesn't run my code at the following link:
> > http://stackoverflow.com/questions/18432198/eval-function-doesnt-work-
> in-python
>
>
> Are yo
On Monday, August 26, 2013 5:25:49 PM UTC+3, Steven D'Aprano wrote:
> On Mon, 26 Aug 2013 06:10:41 -0700, Guy Tamir wrote:
>
>
>
> > Hi all,
>
> >
>
> > I was wondering how i can get the source from which the request came
>
> > from. If a user posted a link that directs to my server on faceb
Hi all,
Please see the below code,in which i'm verifying the global value in python.
CHK=10
def test1():
print "Value of CHK in test1",CHK
def test2():
CHK=40
print "Value of CHK in test2",CHK
test1()
def test3():
global CHK
test2()
test3()
When i ran above code ,I
On Mon, Aug 26, 2013 at 5:54 AM, chandan kumar wrote:
> Hi all,
>
> Please see the below code,in which i'm verifying the global value in python.
>
> CHK=10
>
> def test1():
> print "Value of CHK in test1",CHK
>
> def test2():
> CHK=40
> print "Value of CHK in test2",CHK
> test1()
On 26/08/2013 10:54, chandan kumar wrote:
Hi all,
Please see the below code,in which i'm verifying the global value in python.
CHK=10
def test1():
print "Value of CHK in test1",CHK
def test2():
CHK=40
print "Value of CHK in test2",CHK
test1()
def test3():
global CH
Hi python-guru's,
I am new to Python, coming from a long history of Unix/linux shell
programming.
I am creating a Python script (In Python 2.6) which should be able to read
command line options and arguments.
So far, I figured out how to do that with optparse. I can add options (and
arguments ) .
Andy Kannberg wrote:
> Hi python-guru's,
>
> I am new to Python, coming from a long history of Unix/linux shell
> programming.
> I am creating a Python script (In Python 2.6) which should be able to
> read command line options and arguments.
> So far, I figured out how to do that with optparse.
On Mon, Aug 26, 2013, at 11:03, Guy Tamir wrote:
> Thanks for reply,
> In what cases will i have this header?
In practice, you'll usually have it, except in cases where the user has
bookmarked your site, typed/pasted the URL directly, had it opened by an
external program, or taken action to block
Since StopIteration is not an error, how come does it inherit directly
from Exception and not from BaseException?
Thanks in advance, Marco
--
Marco
--
http://mail.python.org/mailman/listinfo/python-list
I'm currently learning about the socket module. My question is how can I detect
if a connection is closed from the other side, for example a KeyboardInterrupt
as I frequently use. My code below:
##
#server script:
class client(threading.Th
On Tue, Aug 27, 2013 at 5:45 AM, Paul Pittlerson wrote:
> I'm currently learning about the socket module. My question is how can I
> detect if a connection is closed from the other side, for example a
> KeyboardInterrupt as I frequently use. My code below:
>
Once the remote end has terminated (
On Mon, Aug 26, 2013, at 15:37, Marco Buttu wrote:
> Since StopIteration is not an error, how come does it inherit directly
> from Exception and not from BaseException?
The reason KeyboardInterrupt and SystemExit inherit from BaseException
is because you often want them to escape (allowing the pr
> Wouldn't it
> better to add a feature to Python to write the name of DLL which load
> has been failed?
If you start Python with the -v (verbose) flag, you can see all the calls to
dlopen.
--
http://mail.python.org/mailman/listinfo/python-list
On 26/08/2013 20:45, Paul Pittlerson wrote:
I'm currently learning about the socket module. My question is how
can I detect if a connection is closed from the other side, for
example a KeyboardInterrupt as I frequently use. My code below:
[snip]
When reading from a socket, it'll return as much
On 2013-08-26, Paul Pittlerson wrote:
> I'm currently learning about the socket module. My question is how
> can I detect if a connection is closed from the other side,
recv() will return an empty value of ''.
send() will eventually throw an exception. [You may be able to call
send() once or t
On 26 August 2013 14:49, Neil Cerutti wrote:
> On 2013-08-25, sahil301...@gmail.com wrote:
>>
>> eg. my input is ['1', ' ', 'asdasd231231', '1213asasd', '43242']
>> I want it to be interpreted as:
>> [1, [None], [None], [None], 43242]
>>
>> NOTE: NO INBUILT FUNCTION BE USED.
>
> Impossible. I thi
I am using Imaplib and connecting to a Gmail account. I am issuing commands to
copy the email to a custom folder then issuing delete. After expunge message
still remains in inbox and customer folder.
# COPY EMAIL TO FOLDER
copyStatus = m.copy(emailid, 'CIRIMPORTED')
pri
On 27/08/2013 00:34, r...@attoenterprises.com wrote:
I am using Imaplib and connecting to a Gmail account. I am issuing commands to
copy the email to a custom folder then issuing delete. After expunge message
still remains in inbox and customer folder.
# COPY EMAIL TO FOLDER
On Monday, August 26, 2013 5:56:09 PM UTC-6, MRAB wrote:
> On 27/08/2013 00:34, r...@attoenterprises.com wrote:
>
> > I am using Imaplib and connecting to a Gmail account. I am issuing
> > commands to copy the email to a custom folder then issuing delete. After
> > expunge message still remain
I have code in the pylockfile package that looks roughly like this
(apologies for the indentation - I'm growing to dislike Gmail for
typing code fragments):
try:
write_pid_to_lockfile(somefile)
except OSError as exc:
if conditions_i_can_handle:
do_other_stuff...
else:
ra
On 27/08/2013 02:48, Skip Montanaro wrote:
I have code in the pylockfile package that looks roughly like this
(apologies for the indentation - I'm growing to dislike Gmail for
typing code fragments):
try:
write_pid_to_lockfile(somefile)
except OSError as exc:
if conditions_i_can_handle
> Do this:
>
> raise LockFailed("Failed to create %s" % self.path) from None
Thanks. Is there some construct which will work in 2.x and 3.x?
Skip
--
http://mail.python.org/mailman/listinfo/python-list
dear friends when i try to execute following lines
import time
a = time.daylight()
print(a)
result is
TypeError: 'int' object is not callable
why is this error and how can i solve this problem?
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
The problem is in the second line.
a = time.daylight()
The daylight is not a method in time module. It is clear here,
http://docs.python.org/2/library/time.html
Since it is not a method we cannot call it. It is just a integer variable .
It returns zero if DST timezone is not defined and ret
On 08/26/2013 07:49 PM, Skip Montanaro wrote:
Do this:
raise LockFailed("Failed to create %s" % self.path) from None
Thanks. Is there some construct which will work in 2.x and 3.x?
Something like this (untested):
exc = None
try:
write_pid_to_lockfile(somefile)
excep
Here is my code. I'm just trying to play an mp3 that I've clicked in a PyQT
listwidget:
@pyqtSlot()
def item_clicked(self):
row = self.listWidget.currentRow()
song = musiclist[row]
QCoreApplication.setApplicationName("Phonon")
output = Phonon.AudioOutput(Ph
I found this question/answer on Stack Overflow:
http://stackoverflow.com/questions/15123137
but after fiddling around with it, I can't find a solution that works
for Python 3.2 and 3.3, let alone 2.x. In 3.2, exceptions have both
__cause__ and __context__ attributes. I tried setting both to Non
On 08/27/2013 08:17 AM, Marco Buttu wrote:
But if I want to catch it specifically (except BaseIteration),
Sorry, except StopIteration...
--
Marco Buttu
--
http://mail.python.org/mailman/listinfo/python-list
On 08/26/2013 10:10 PM, random...@fastmail.us wrote:
The reason KeyboardInterrupt and SystemExit inherit from BaseException
is because you often want them to escape (allowing the program to quit)
from code that would otherwise catch them (by catching Exception). On
the contrary, StopIteration is
36 matches
Mail list logo