I have following random number generation function
def rand_int ():
rand_num = int(math.ceil (random.random()*1000))
return rand_num
I like to make the value of rand_num (return of rand_int) static/
unchanged after first call even if it is called multiple times. If x=
rand_int () return
Thanks, much, Ramit.
On Wed, Jun 19, 2013 at 4:44 PM, Prasad, Ramit wrote:
> SM wrote:
> > Hello Chris, Thanks for your response. I have a follow-up question, if
> you don't mind, to understand
> > your answer better.
> > I am running a python3 script. So first part of your answer applies
> her
Hey guys!
So now my UI panel works well with this:
# Open file button click event binded to openfile
btn = wx.Button(self, -1, "Click me")
sizer.Add(btn, pos=(7,2))
btn.Bind(wx.EVT_BUTTON, self.openFile)
#set the panel layout
self.SetSizer
Hello,
Below is my code:
#!/bin/env python
# -*- coding: utf-8 -*-
import requests
from lxml import etree
url = 'http://192.168.0.1/webservice.svc?wsdl'
headers = {'Content-Type': 'text/xml;charset=UTF-8', 'SOAPAction': '
http://tempuri.org/ITService/SignIn'}
xml = '''http://schemas.xmlsoap.org/
On 20/06/2013 12:43, Matt D wrote:
Hey guys!
Is there a fast way test some piece of code? I would like to be able to
look at the GUI I am making with out changing the file in dir 'baz' and
running the actual program (which is quite extensive). Like if I could
just have a .py file with only the
On 20/06/13 16:11, Matt D wrote:
right make a small sample app. exactly. im sorry if im dense or
whatever and obviously i am super new to this process. but i can write
the scripts in gedit and then what? how do i run that file and make the
gui start? should i be doing something like this?:
On 06/20/2013 10:49 AM, Oscar Benjamin wrote:
> On 20 June 2013 15:32, Matt D wrote:
>> all i really want to do is test the the GUI code. i am working on a
>> 'tab' in a notebook of 7 tabs, which is itself part of a large python
>> program which gets all of its computations done in C++. The cod
On 20 June 2013 15:32, Matt D wrote:
> all i really want to do is test the the GUI code. i am working on a
> 'tab' in a notebook of 7 tabs, which is itself part of a large python
> program which gets all of its computations done in C++. The code for
> 'tab', or wxPanel really, i am using is in
On 06/20/2013 08:52 AM, Alan Gauld wrote:
> On 20/06/13 12:43, Matt D wrote:
>
>> Is there a fast way test some piece of code?
>
> There are several testing frameworks for testing Python code.
> nose is one example.
> But...
>
>> look at the GUI I am making with out changing the file in dir 'baz
On 20/06/13 12:43, Matt D wrote:
Is there a fast way test some piece of code?
There are several testing frameworks for testing Python code.
nose is one example.
But...
look at the GUI I am making with out changing the file in dir 'baz'
In general your GUI should not be tied into one partic
Hey guys!
Is there a fast way test some piece of code? I would like to be able to
look at the GUI I am making with out changing the file in dir 'baz' and
running the actual program (which is quite extensive). Like if I could
just have a .py file with only the smallest amount of code possible to
m
On 20/06/13 03:38, Steven D'Aprano wrote:
On 20/06/13 10:21, Devin Jeanpierre wrote:
they're doing -- it omits things like advice to do with security,
including neglecting to declare that functions are not safe and can
execute arbitrary Python code,
I think it is perfectly acceptable for th
12 matches
Mail list logo