On Wed, Oct 21, 2009 at 3:56 PM, Jason Willis wrote:
> so i changed the .bashrc and added at the end :
> PATH="/home/compy/pythons:$PATH" ###which is the actual path to my python
> proggies###
>
> and i still get
> co...@compy-laptop:~/pythons$ herosinventory.py
> herosinventory.py: command not f
On Wed, Oct 21, 2009 at 5:56 PM, Jason Willis wrote:
> so i changed the .bashrc and added at the end :
> PATH="/home/compy/pythons:$PATH" ###which is the actual path to my python
> proggies###
>
> and i still get
> co...@compy-laptop:~/pythons$ herosinventory.py
> herosinventory.py: command not f
On Wed, Oct 21, 2009 at 5:12 PM, Luke Paireepinart
wrote:
>
>
> On Wed, Oct 21, 2009 at 4:56 PM, Jason Willis wrote:
>
>> so i changed the .bashrc and added at the end :
>> PATH="/home/compy/pythons:$PATH" ###which is the actual path to my python
>> proggies###
>
> No, you have to set the environ
On Wed, Oct 21, 2009 at 4:56 PM, Jason Willis wrote:
> so i changed the .bashrc and added at the end :
> PATH="/home/compy/pythons:$PATH" ###which is the actual path to my python
> proggies###
No, you have to set the environment variable from within the path, not
modifying .bashrc. $PATH refers
so i changed the .bashrc and added at the end :
PATH="/home/compy/pythons:$PATH" ###which is the actual path to my python
proggies###
and i still get
co...@compy-laptop:~/pythons$ herosinventory.py
herosinventory.py: command not found
co...@compy-laptop:~/pythons$ herosinventory.py
herosinventory
On Wed, Oct 21, 2009 at 3:29 PM, Lie Ryan wrote:
> Lizhi Yang wrote:
>
>> Is there anything similar to ifdef statement in C or C++ in python?
>>
>
> Not really, but python's regular if can be used for a similar purpose:
>
> DEBUG = True
>
> if DEBUG:
>import logging
>def foo():
>#
Lizhi Yang wrote:
Is there anything similar to ifdef statement in C or C++ in python?
Not really, but python's regular if can be used for a similar purpose:
DEBUG = True
if DEBUG:
import logging
def foo():
# debug version
else:
def foo():
# normal version
def main
Jason Willis wrote:
hi everyone,
sorry for the rather boring question but i'm having serious issues
getting my programs to run from the command line without having to type
"python" in-front of them. I've tried a lot of different variations on
the #!/usr/bin/ etc. line and have come up with th
On Wed, Oct 21, 2009 at 3:26 PM, Lizhi Yang wrote:
> Is there anything similar to ifdef statement in C or C++ in python?
No, Python doesn't have a preprocessor. Can you say why you want it?
You may be able to do what you want using an ordinary if statement,
for example you can conditionally impor
Is there anything similar to ifdef statement in C or C++ in python?
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
On Wed, Oct 21, 2009 at 2:09 PM, Lizhi Yang wrote:
> Hi,
>
> When I define functions in a Module, how to avoid override the name of
> existing functions?
> For example:
>
> define func1():
> define func2():
> define func1():
>
> Is there anyway to pop up the warnings?
Take a look at PyFlakes and
On Wed, Oct 21, 2009 at 12:33 PM, vince spicer wrote:
>
>
> On Wed, Oct 21, 2009 at 12:31 PM, vince spicer wrote:
>
>>
>>
>> On Wed, Oct 21, 2009 at 12:21 PM, Jason Willis
>> wrote:
>>
>>> hi everyone,
>>>
>>> sorry for the rather boring question but i'm having serious issues
>>> getting my prog
On Wed, Oct 21, 2009 at 02:21:23PM -0400, Jason Willis wrote:
> hi everyone,
>
> sorry for the rather boring question but i'm having serious issues getting
> my programs to run from the command line without having to type "python"
> in-front of them. I've tried a lot of different variations on the
The directory you are sitting in doesn't appear to be in your path...
[ehow...@preacher ~/bin]$ ls macosver
macosver*
[ehow...@preacher ~/bin]$ macosver
10.5.8
[ehow...@preacher ~/bin]$ echo $PATH
/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:~/bin:/opt/local/bin:/opt/local/sbin
~elh
On Wed, Oct
On Wed, Oct 21, 2009 at 12:31 PM, vince spicer wrote:
>
>
> On Wed, Oct 21, 2009 at 12:21 PM, Jason Willis
> wrote:
>
>> hi everyone,
>>
>> sorry for the rather boring question but i'm having serious issues getting
>> my programs to run from the command line without having to type "python"
>> in
Are you by chance editing the file in Windows? Have you verified that python
is in /usr/bin? In some cases it could be in a different location.
On Wed, Oct 21, 2009 at 1:21 PM, Jason Willis wrote:
> hi everyone,
>
> sorry for the rather boring question but i'm having serious issues getting
> my p
On Wed, Oct 21, 2009 at 12:21 PM, Jason Willis wrote:
> hi everyone,
>
> sorry for the rather boring question but i'm having serious issues getting
> my programs to run from the command line without having to type "python"
> in-front of them. I've tried a lot of different variations on the
> #!/us
hi everyone,
sorry for the rather boring question but i'm having serious issues getting
my programs to run from the command line without having to type "python"
in-front of them. I've tried a lot of different variations on the
#!/usr/bin/ etc. line and have come up with the following every time:
Forwarding to the list with my reply...
On Wed, Oct 21, 2009 at 1:21 PM, Chris Fuller
wrote:
>
> There are workarounds. The point is that they aren't necessary in Linux, and
> usually involve something fishy, like sleeping a (more or less) arbitrary
> period to get the synchronization right, whi
Hi,
When I define functions in a Module, how to avoid override the name of
existing functions?
For example:
define func1():
define func2():
define func1():
Is there anyway to pop up the warnings?
___
Tutor maillist - Tutor@python.org
To unsubscribe o
On Wed, Oct 21, 2009 at 10:43 AM, Chris Fuller
wrote:
>
> on differences:
>
> The downloads include binaries, so there have to be distinct files for Linux
> and Windoze. If you download the same versions, there shouldn't be any
> noticeable differences, with one big exception: multithreading and
-Original Message-
>From: Chris Fuller
>Sent: Oct 21, 2009 10:43 AM
>To: tutor@python.org
>Subject: Re: [Tutor] PyGTK: is there a library for both Linux and Windows
>
>
>on differences:
>
>The downloads include binaries, so there have to be distinct files for Linux
>and Windoze. If you
on differences:
The downloads include binaries, so there have to be distinct files for Linux
and Windoze. If you download the same versions, there shouldn't be any
noticeable differences, with one big exception: multithreading and PyGTK
don't mix well on Windows. Your application might run
The version of GTK for windows I like to use is at
http://gladewin32.sourceforge.net/, but it is rather out of date. It's main
advantage is everything is bundled up in a nice installer. You can also get
it from the main site at ftp://ftp.gtk.org/pub/gtk, but you have to grab
several files an
On Wed, Oct 21, 2009 at 8:42 AM, Nicola De Quattro <
lead.express...@gmail.com> wrote:
> Hi
> I'm starting to design some windows for my little tool.
> I've two questions for you:
> 1) In this page http://www.pygtk.org/downloads.html there are two
> different library for Windows and GNU/Linux, but
Hi
I'm starting to design some windows for my little tool.
I've two questions for you:
1) In this page http://www.pygtk.org/downloads.html there are two
different library for Windows and GNU/Linux, but I want my application
to be executed identically under Windows and under GNU/Linux. Is PyGTK
a go
Mike Sweany wrote:
33 print len(playerid)
34 print playerid[0]
35
*playerid* = []
**: list index out of range
args = ('list index out of range',)
message = 'list index out of range'
If I change the print playerid[0] to print playerid[1], same er
On Tue, Oct 20, 2009 at 4:55 PM, wrote:
> Hello all,
> Just started looking at Python, I have not programmed in a good 8-10 years
> now, and find myself woefully behind.
>
Luckily it shouldn't take you too much time with python - it's a lot easier
to learn/relearn than a lot of other languages!
On Wed, Oct 21, 2009 at 3:30 AM, Albert-Jan Roskam wrote:
> Is the if-else (esp. 'else') in a list comprehension specific for Python 3.x?
> Or did I miss something?
List comps have always allowed a condition since they were introduced:
[ for in if ]
This is the form of the original questi
wrote
Just started looking at Python
Welcome to the list.
I was wondering if there was a Preset Menu and file system module
Not really sure what you are expecting here?
Can you give examples of what you would expect these to do?
There are operations for acting on files, if thats what you
> Is the if-else (esp. 'else') in a list comprehension specific for Python 3.x?
> Or
> did I miss something?
Its not part of list comprehensions per se, you can use it in any *expression*.
It was introduced in Python 2.5 as a response to C's ternary operator:
C:
x = foo?bar:baz
Python
x =
Albert-Jan Roskam wrote:
Is the if-else (esp. 'else') in a list comprehension specific for Python 3.x?
Or did I miss something?
Cheers!!
Albert-Jan
~~
Before you criticize someone, walk a mile in their shoes, that way
when yo
Is the if-else (esp. 'else') in a list comprehension specific for Python 3.x?
Or did I miss something?
Cheers!!
Albert-Jan
~~
Before you criticize someone, walk a mile in their shoes, that way
when you do criticize them, you're
33 matches
Mail list logo