On 06/23/2013 06:50 PM, Dave Angel wrote:
On 06/23/2013 12:43 PM, Jim Byrnes wrote:
On 06/22/2013 06:24 PM, Dave Angel wrote:
On 06/22/2013 07:03 PM, Jim Byrnes wrote:
On 06/22/2013 05:10 PM, David Rock wrote:
* Jim Byrnes [2013-06-22 16:01]:
I need to convert a series of digits like 060713
On 22 June 2013 19:24, Steven D'Aprano wrote:
> * If you assign to a name (e.g. "spam = 42") anywhere inside the body of a
> function, then that name is treated as a local variable, which is a fast
> lookup.
>
> * Otherwise, it is treated as unknown scope, and Python will search nesting
> functio
Dear all,
I have a very simple question about running a simple web application with
apache on MacOS.
Step 1: Copy the file mod_wsgi.so from the link
http://code.google.com/p/modwsgi/downloads/detail?name=mod_wsgi-macosx106-ap22py26-3.3.so
into the folder "/usr/libexec/apache2"
Step 2: Add the f
Week, not an experienced user per se, the more important thing is to just
start.
I can say this, the vast majority of online python classes use v2. So, if
you have never programmed before, like myself, then 2 is going to be what
you will learn. Learning to upgrade later is no big deal and I doub
On 06/17/2013 02:20 PM, Lukáš Němec wrote:
Or even better, use python moto, dont re-invent the wheel, so use built
in library logging, read the docs for it, or if you want, I can send you
some examples how to work it, it takes some time to figure out properly...
But what he's doing has
On 06/23/2013 12:43 PM, Jim Byrnes wrote:
On 06/22/2013 06:24 PM, Dave Angel wrote:
On 06/22/2013 07:03 PM, Jim Byrnes wrote:
On 06/22/2013 05:10 PM, David Rock wrote:
* Jim Byrnes [2013-06-22 16:01]:
I need to convert a series of digits like 060713 to a string so I can
make it look like a d
On 17/06/2013 22:06, Andrew Cooper wrote:
Dear Pythoners,
Sorry I am completely new to this but so far as I can see there are two
versions of Python, version 2 (which is more established and has much
more support) and version 3 which is relatively new.
As a beginner, which of the versions (2 or 3
Personally. I say 3, because support for external modules is growing every day
and only a few major modules remain, like twisted. But 3 will soon be the
standard so start to learn on it now and you will not need to transition latter
when 3 replaces 2 as the standard. I currently use 3 and only
On 6/17/2013 10:26 AM, Jacobs, Teri (CDC/NIOSH/DSHEFS) (CTR) wrote:
Hi,
Hi - welcome to the tutor list. Be aware that we are a few volunteers.
Your question is one very long line. Please in future ensure it is
wrapped so we don't have to scroll.
I have wrapped it here.
I have a command l
On Thu, Jun 20, 2013 at 6:10 PM, Antonio Zagheni wrote:
>
> I am a begginer in Python.
> I did a function that returns a string and I want to copy this to the
> clipboard.
> I have tried a lot of suggestions found at Google but nothing works properly.
> Is there an easy way to do that?
> I am usi
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
On Mon, Jun 17, 2013 at 10:17 AM, Lukas Nemec wrote:
> Hello,
>
> I changed some simple python client/server chatroom recipe
> to include RSA keypair based encryption and signature verification
>
> because I'm sick of someone spying on my conversations on FB and similar.
>
> Here is the code:
>
Note, however, that changing environment variables only affects the environment
of your script and it's child processes. Once your script exits, the original
shell you called it from is NOT changed.
Sent from my iPad
On 2013/6/23, at 14:35, Amit Saha wrote:
> Hello,
>
> On Tue, Jun 18, 2013
Hi there,
I am a begginer in Python.
I did a function that returns a string and I want to copy this to the clipboard.
I have tried a lot of suggestions found at Google but nothing works properly.
Is there an easy way to do that?
I am using Python 2.7 and Windows 7.
Thanks a lot.
Antonio Zagh
Do Win+R
type: cmd
hit enter.
in the opened cmd write cd C:/where/you/have/the/exe (you can move it to
C: for simplicity)
and run it from there
it will not close this time, and you can see the debugging info.
Enjoy.
On 06/19/2013 08:50 AM, Jack Little wrote:
I compiled a program in python
On Wed, Jun 19, 2013 at 11:58 AM, Jack Mcgarry <
iliketurtles...@googlemail.com> wrote:
> Hello ,I am contacting you because I have this bug with my python that
> needs solving. You see i coded this program when i was learning to do
> graphical coding (still am) and i was using pygame, you may be
Dne 17. 6. 2013 20:17, Dave Angel napsal(a):
On 06/17/2013 01:36 PM, Matt D wrote:
Hey,
I wrote some simple code to write data to a logfile and it works pretty
well (thanks guys). Now my problem is that every time i run the program
the old logfile.txt is overwritten. I need to be able to stop
Hello,
On Tue, Jun 18, 2013 at 9:58 AM, Anu Bhagat wrote:
> Hi I am fairly new to python. I will greatly appreciate if some one can tell
> me how set up environment variables from a python script.
>
> Thanks in advance.
You can use the 'os' module. This is the document for Python 2 [1].
That sho
Hi,
I have a command line to spread geoprocessing operations across multiple
processes to speed up performance. However, I do not know how to import the
command line (or at least import it properly) in Python 2.7.2. Here's the
script example given on ArcGIS 10.1 Help:
import arcpy
# Use ha
Hello,
I changed some simple python client/server chatroom recipe
to include RSA keypair based encryption and signature verification
because I'm sick of someone spying on my conversations on FB and similar.
Here is the code:
https://github.com/lunemec/python-chat
If anyone is interrested
Hi Charles,
I have added some comments below explaining why you are not getting the
results you expect:
>>> 4+4
8
The above is an expression, when you hit enter python will evaluate it and give
the answer.
>>> 3+3=4
SyntaxError: can't assign to operator
>>> 3=1
SyntaxError: can't assign to lite
On 21 Jun 2013 07:36, "Arijit Ukil" wrote:
>
> 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
Hello ,I am contacting you because I have this bug with my python that
needs solving. You see i coded this program when i was learning to do
graphical coding (still am) and i was using pygame, you may be familiar
with this program it is called skier. i clicked "run module" and ran skier
but when i
On Sun, Jun 16, 2013 at 6:20 PM, Timo wrote:
> I have a datafile which is parsed by an external library, I'm having trouble
> creating a hierarchical structure of the data.
>
> This is what I got so far:
>
> items = get_items() # returns a generator
> for item in items:
> print(item)
> chi
Dear Pythoners,
Sorry I am completely new to this but so far as I can see there are two
versions of Python, version 2 (which is more established and has much more
support) and version 3 which is relatively new.
As a beginner, which of the versions (2 or 3) would it be advisable to start
with fir
Hi I am fairly new to python. I will greatly appreciate if some one can
tell me how set up environment variables from a python script.
Thanks in advance.
Anu
--
Nothing is impossible, the word itself says 'I'm possible'. Audrey Hepburn
Anu Bhagat
SETI Institute
189 North Bernardo Street
Mounta
On 06/22/2013 06:24 PM, Dave Angel wrote:
On 06/22/2013 07:03 PM, Jim Byrnes wrote:
On 06/22/2013 05:10 PM, David Rock wrote:
* Jim Byrnes [2013-06-22 16:01]:
I need to convert a series of digits like 060713 to a string so I can
make it look like a date 06-07-13.
>>> a = 060713
>>> a[:2]
On Sun, Jun 23 2013,eryksun wrote:
[snipped 14 lines]
> The correct syntax is a dict of dicts:
>
> {'a': {'foo': 1, 'bar': 2, 'offset': 'fff'}}
>
> A dict is something of a resource hog, and it's unordered. Use it as
> the container because it's mutable and lookups are fast, but for the
> v
On Sun, Jun 23 2013,Steven D'Aprano wrote:
> On 23/06/13 19:42, Sivaram Neelakantan wrote:
[snipped 28 lines]
> Python doesn't have structs in the sense you mean. (But see below
> for alternatives.) There is a struct module for working with
> low-level C-style bytes, ints, doubles etc. but that'
Dave Angel wrote:
> On 06/23/2013 02:18 AM, Jack Little wrote:
>> I am trying to use random.choice for a text based game. I am using
>> windows 7, 64-bit python. Here is my code:
>>
>> def lvl2():
>> print "COMMANDER: Who should you train with?"
>> trn=random.choice(1,2)
>> if trn==
On 06/23/2013 02:18 AM, Jack Little wrote:
I am trying to use random.choice for a text based game. I am using windows 7,
64-bit python. Here is my code:
def lvl2():
print "COMMANDER: Who should you train with?"
trn=random.choice(1,2)
if trn==1:
lvl2_1()
print "S
On Sun, Jun 23, 2013 at 5:42 AM, Sivaram Neelakantan
wrote:
> I've sort of used a dict of this sort {'a': [1,2,'fff'] } in my
> programs and I've noticed that I've got to unpack the list with
> hardcoded list positions when I retrieve the value of a key.
>
> I think I'd be better off, if I did som
On 23/06/13 19:42, Sivaram Neelakantan wrote:
On Sun, Jun 23 2013,Alan Gauld wrote:
[snipped 21 lines]
But we normally call methods via the object instance rather than the
class so simplifying this further we get:
b['a'].append('c')
Thanks for the detailed explanation.
I've sort of used
On Sun, Jun 23 2013,Alan Gauld wrote:
[snipped 21 lines]
> But we normally call methods via the object instance rather than the
> class so simplifying this further we get:
>
> b['a'].append('c')
>
Thanks for the detailed explanation.
I've sort of used a dict of this sort {'a': [1,2,'fff'] } in
34 matches
Mail list logo