Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,556,964
Community Members
 
Community Events
184
Community Groups

Inline Python Scripting possible?

Cameron Ferguson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Oct 23, 2011

Is it possible with inline scripts to be able to use python? I know it does bash scripting just fine, didn't know if there was a plugin that could do inline python or not.

4 answers

1 accepted

0 votes
Answer accepted
Przemek Bruski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Oct 23, 2011

Just use:

/usr/bin/python <<EOF
print "Hello, World!"
EOF

as the inline script body.

Cameron Ferguson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Oct 23, 2011

Once again... you are amazing. Thanks again

when I tried it, I get this error

<< was unexpected at this time.

Like Anchita Birla likes this


@Przemek Bruski  thank you for your reply

I am still getting error when attempting an python script "inline".  I know your response is straight forward but can you elaborate more on how to achieve a python script inline?

If you want to execute a longer script and use the "Command" task with a Python executable in order to have the Python capability automatically added you can do the following:

  1. Add a script task with code like this:
    cat <<EOF >script.py

    print "Hello, World!"

    EOF
  2. Add a command task with executable "python" and argument "script.py"
0 votes
ReneR
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Oct 24, 2011

Then again, anything non trivial should probably go into a file anyway.

Definitely. You can backup your database. But any build scripts should always be part of your source repository, whenever possible. You don't want to do a lot of 'hidden magic' that exists only in Bamboo Tasks (or any other CI tool for that matter)

0 votes
Brent Villalobos
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Oct 23, 2011

python -c "print 'Hello, World!'"

Maybe not the best solution for a large amount of python code. Then again, anything non trivial should probably go into a file anyway.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events